stRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE,"SpacesStore");
SearchParameters searchParameters = new SearchParameters();
searchParameters.addStore(stRef);
searchParameters.setQuery("PATH:\"/cm:generalclassifiable" +
"/cm:" + ISO9075.encode("aaaa")+
"/member\""
);
searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);
categories = new ArrayList<NodeRef>(1);
categories.add(categoryNodeRef);
getServiceRegistry().getNodeService().setProperty(nodeRefDoc, ContentModel.PROP_CATEGORIES, categories);
//obtain the root category
Collection coll = getServiceRegistry().getCategoryService().getRootCategories(
new StoreRef(StoreRef.PROTOCOL_WORKSPACE,"SpacesStore"),
ContentModel.ASPECT_GEN_CLASSIFIABLE);
it = coll.iterator();
while(it.hasNext())
{
ChildAssociationRef temp=(ChildAssociationRef) it.next();
System.out.println(" QName="+temp.getQName());
System.out.println(" value=" + temp.getQName().getPrefixString()+"___");
System.out.println(" nodeRef=" + temp.getChildRef());
}
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.