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.
I've just (yesterday) added REST api's for groups to HEAD.If you want to do this with older versions of Alfresco you will need to use the Java AuthorityService.
private ArrayList<AssociationDefinition> getAssociations(){ DictionaryService dictionaryService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDictionaryService(); ArrayList<QName> qnames = new ArrayList<QName>( dictionaryService.getAssociations(QName.createQName("{http://www.xxx.com/model/content/1.0}adocument"))); ArrayList<AssociationDefinition> associations = new ArrayList<AssociationDefinition>(); for (QName qname : qnames) { associations.add( dictionaryService.getAssociation(qname)); } return associations; /}
Hi Alfy Users,I look for a method for quesy the group in ALfresco, I just watch the pickerCallBack. For users and run ok,The point now is to search for group and document. Someone of you know how??Thanks in advanceBest Regards.
public SelectItem[] pickerGroups(int filterIndex, final String contains){ SelectItem[] gropusItems = new SelectItem[authorityService.getAllAuthorities(AuthorityType.GROUP).size()]; Iterator<String> iterator = authorityService.getAllAuthorities(AuthorityType.GROUP).iterator(); for (int i = 0;iterator.hasNext();i++) { String value = iterator.next(); gropusItems[i] = new SelectItem(value,value); } return gropusItems; }
StoreRef storeRef = new StoreRef("alfrescoUserStore","user"); searcher.query(storeRef, "lucene", "TYPE: \\\"{http://www.alfresco.org/model/user/1.0}authorityContainer\\\"", null, null)