public NodeRef createDefaultFolder(NodeRef p_parentNode, String p_icon, String p_name, String p_qnameType) {
Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>();
contentProps.put(ApplicationModel.PROP_ICON, p_icon);
contentProps.put(ContentModel.PROP_NAME, p_name);
contentProps.put(ContentModel.PROP_TITLE, p_qnameType);
ChildAssociationRef cafolder = nodeService.createNode(p_parentNode,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, p_name),
ContentModel.TYPE_FOLDER,
contentProps);
NodeRef folder = cafolder.getChildRef();
return folder;
}
nodeService.createAssociation
Des aspect :nodeService.addAspect
…
void nodeService.setProperty(NodeRef, QName, Serializable);
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, "toto");
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.