Can someone please help in this?
I think you want to know the numbers if i understand correctly.
You can implement javabacked webscript which can execute a search query to find the folders in a given site at any depth. You can implement same thing using javascript as well.
Sample search query : PATH:"/app:company_home/st:sites/cm:test-site/cm:documentLibrary//*" AND TYPE:"cm:folder"
You can execute the above query in node browser as well and see the total results.
See the sample code below which can be used to get the number of nodes in a site
main();
function main(){
//Defualt to cm:folder if no inputs provided
var objectType = (args["objectType"]==null || args["objectType"]==undefined) ? "cm:folder" : args["objectType"];
//Defualt to test-site if no inputs provided
var siteShortName = (args["siteShortName"]==null || args["siteShortName"]==undefined) ? "test-site" : args["siteShortName"];
//Defualt to 0 if no inputs provided
var skipCount = (args["skipCount"]==null || args["skipCount"]==undefined)?0:args["skipCount"];
//Defualt to 1000 if no inputs provided
var maxCount = (args["maxCount"]==null || args["maxCount"]==undefined)?1000:args["maxCount"];
var query = 'PATH:"/app:company_home/st:sites/cm:' +siteShortName+'/cm:documentLibrary//*" AND TYPE:"'+objectType+'"';
var page = {
skipCount : parseInt(skipCount),
maxItems : parseInt(maxCount)
};
var searchQuery = {
query : query,
language : "lucene",
page : page
};
logger.log("Executing SearchQuery: "+query)
var nodes = search.query(searchQuery);
var totalNodes = nodes.length;
logger.log("Total Nodes: "+totalNodes)
model.totalCount = totalNodes;
}
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
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.