cancel
Showing results for 
Search instead for 
Did you mean: 

Listing ALL assets

shmoula
Champ in-the-making
Champ in-the-making
Hi, I would like to list all assets under specified path, how can I do that? I tried listAssets from assetService
List<AssetInfo> submitted = assetService.listAssets(wpInfo.getStoreId(), ROOT_PATH, false);
but this list has only submitted stuff. So I tried to get list of new (or modified stuff) via
List<AssetInfo> changed = sandboxService.listChanged(wpInfo.getStoreId(), ROOT_PATH, false);

Is there any listAllStuffInSandbox() method? Can it work recursively over subdirs? Or do I have to write my own?

Thanks in advance
2 REPLIES 2

shmoula
Champ in-the-making
Champ in-the-making
I'm diving inside AVMBrowseBean to figure out how listings work. Both getFolders and getFiles refers to method, in which is something like

Map<String, AVMNodeDescriptor> nodes = avmService.getDirectoryListing(-1, path);

but when I use this code, it returns just submitted stuff again. I can't see any other piece of code, which turns this off. How can I get the rest of content (unsubmitted)?

shmoula
Champ in-the-making
Champ in-the-making
meantime I tried it with lucene search (I have 3.4.d-comm) and again - just submitted stuff:

sp.setQuery("TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"");
sp.addStore(new StoreRef(StoreRef.PROTOCOL_AVM, stagingStore));
. . .      
results = searchService.query(sp);