As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<type name="dwdb:DB"> <title>DB</title> <parent>cm:folder</parent> </type>
<type name="opapp:company"> <title>Company</title> <description></description> <parent>cm:folder</parent> <associations> <child-association name="opapp:businessUnit"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>opapp:businessUnit</class> <mandatory>false</mandatory> <many>true</many> </target> </child-association> </associations> </type>
public void onCreateNode(final ChildAssociationRef childAssocRef) { final NodeRef element = childAssocRef.getChildRef(); final QName assocType = childAssocRef.getTypeQName(); if (assocType.equals(ContentModel.ASSOC_CONTAINS)) { this.nodeService.moveNode(element, childAssocRef.getParent(), OurModel.ASSOC_BUSINESS_UNIT, childAssocRef.getQName()); // create a secondary cm:contains assoc for FileFolder-based features this.nodeService.addChild(childAssocRef.getParent(), element, ContentModel.ASSOC_CONTAINS, childAssocRef.getQName()); } }