cancel
Showing results for 
Search instead for 
Did you mean: 

SOLVED Query Custom content.

joksy
Champ in-the-making
Champ in-the-making
Hi guys,

Exist the same things as the AuthorityService, for retrieving custom content type???

I will thanks all in advance.
1 REPLY 1

joksy
Champ in-the-making
Champ in-the-making
The body of my method  

     ResultSet resultSet = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getSearchService().query(
                Repository.getStoreRef(),
                SearchService.LANGUAGE_LUCENE,
                "TYPE:\"{http://www.xxxx.com/model/content/1.0}customContent\"");
       
        List<NodeRef> nodes;
        
       
        try{
           nodes = resultSet.getNodeRefs();
        }
        finally{
           resultSet.close();
        }
       
       
        SelectItem[] array = new SelectItem[nodes.size()];
        int x = 0;
        String label;
        for (NodeRef nf : nodes) {
           label = (String)getNodeService().getProperty(nf, ContentModel.PROP_NAME);
           array[x] = new SelectItem(label,label);
           x++;
      }


Take a look at http://wiki.alfresco.com/wiki/Search for other query example.