AnsweredAssumed Answered

How to get storeref for alfresco content categories

Question asked by dynamolalit on Mar 24, 2010
Latest reply on Apr 5, 2010 by dynamolalit

I am using Alfresco 3.2r with Tomcat 6 with JDK 1.6.

I want to know how can i get storeref for alfresco categories. Here is my code:

StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");

LuceneCategoryServiceImpl categoryServiceImpl = new LuceneCategoryServiceImpl();
       Collection<ChildAssociationRef> listOfCategories = categoryServiceImpl.getCategories(storeRef , QName.createQName("{}company_home/{}category_root"), CategoryService.Depth.ANY);

Here i am getting error as:

   at states this:

private Set<NodeRef> getClassificationNodes(StoreRef storeRef, QName qname)
        storeRef = tenantService.getName(storeRef); <– Line no 284

        ResultSet resultSet = null;

I think that i am putting right parameters but its not the case.

I also tried this:

StoreRef storeRef =new StoreRef("workspace://SpacesStore/{}categoryRoot");
StoreRef storeRef =new StoreRef("workspace://SpacesStore/");{}category_root");

But no luck!!

Any help?