04-13-2015 04:41 AM
List<ChildAssociationRef> assocs = new ArrayList<ChildAssociationRef>();
assocs = getNodeService().getChildAssocsByPropertyValue(nodeRef,
QName.createQName(Constants.modelAlfrescoNS, Constants.titleProperty), titleFolder);
if (assocs==null || assocs.isEmpty()) {
// A folder with this title not exists
…
}
04-13-2015 08:18 AM
04-13-2015 09:37 AM
properties.put(ContentModel.PROP_NAME, nodeName);
nodeRef = getNodeService().createNode(parent,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, nodeName),
myCustomType,
properties).getChildRef();
if (nodeRef!=null) {
QName CUSTOM_ASPECT_QNAME = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, Constants.aspectTitled);
Map<QName,Serializable> aspectValues = new HashMap<QName,Serializable>();
aspectValues.put(QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, Constants.titleProperty), myTitleName);
aspectValues.put(QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, Constants.descriptionProperty), myDescription);
getNodeService().addAspect(nodeRef, CUSTOM_ASPECT_QNAME, aspectValues);
}
properties.put(ContentModel.PROP_TITLE, myTitleName)
04-14-2015 05:01 AM
04-14-2015 06:11 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.