cancel
Showing results for 
Search instead for 
Did you mean: 

Repercussions not extending cm:folder

skoalbrother952
Champ in-the-making
Champ in-the-making
Hello,

cm:folder defines the cm:contains child association, allowing types of sys:base to become it's children.  We have requirements that we must restrict the type allowed for some folders and to create additional associations to other types.

We know that the <overrides/> directive allows for property overrides, but not associations.

following this approach, we have noticed
1) that the share application will have to be configured to view/manipulate our types.
2) FileFolderService is expecting cm:folder or sys:container none of which our types extend

Are there additional consequences for this approach?

Thanks
2 REPLIES 2

patil
Champ on-the-rise
Champ on-the-rise
Hi,

final NodeRef _childNodeRef = new NodeRef("workspace://SpacesStore/83196957-6bdb-4caa-87ff-d08f773cda4a")
//replace the hardcode string with your actual noderef
            final String name = nodeService.getProperty(_childNodeRef, ContentModel.PROP_NAME).toString();
            final String downloadURL = DownloadContentServlet.generateDownloadURL(_childNodeRef, name);

downloadURL  will give you the url to generate. To access the content along with this url pass the ticket.



Thanks,
Patil
Cignex Technologies
Bangalore

lotharmärkle
Champ in-the-making
Champ in-the-making
If you would like to restrict files within a folder to some set of specific document types, I think you are better of using a policy to enforce this behaviour. See http://wiki.alfresco.com/wiki/Policy_Component#Binding_Behaviour_to_a_Policy and other posts. This would result in some transaction failed error messages.