Package org.alfresco.repo.jscript
Class Classification
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.jscript.BaseScopableProcessorExtension
org.alfresco.repo.jscript.Classification
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension,Scopeable
Support class for finding categories, finding root nodes for categories and creating root categories.
- Author:
- Andy Hind
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classTag class returned from getCategoryUsage(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRootCategory(String aspect, String name) Create a root category in a classification.org.mozilla.javascript.ScriptablegetAllCategoryNodes(String aspect) Find all the category nodes in a given classification.String[]Get all the aspects that define a classification.getCategory(String categoryRef) Get the category node from the category node reference.org.mozilla.javascript.ScriptablegetCategoryUsage(String aspect, int maxCount) Get the category usage count.org.mozilla.javascript.ScriptablegetRootCategories(String aspect) Get the root categories in a classification.org.mozilla.javascript.ScriptablegetRootCategories(String aspect, String filter, int maxItems, int skipCount) Get ordered, filtered and paged root categories in a classification.voidsetServiceRegistry(ServiceRegistry services) Set the service registryvoidsetStoreUrl(String storeRef) Set the default store referenceMethods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScopeMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
Constructor Details
-
Classification
public Classification()
-
-
Method Details
-
setStoreUrl
Set the default store reference- Parameters:
storeRef- the default store reference
-
setServiceRegistry
Set the service registry- Parameters:
services- the service registry
-
getAllCategoryNodes
Find all the category nodes in a given classification.- Parameters:
aspect- String- Returns:
- Scriptable
-
getAllClassificationAspects
Get all the aspects that define a classification.- Returns:
- String[]
-
createRootCategory
Create a root category in a classification.- Parameters:
aspect- Stringname- String
-
getCategory
Get the category node from the category node reference.- Parameters:
categoryRef- category node reference- Returns:
CategoryNodecategory node
-
getRootCategories
Get the root categories in a classification.- Parameters:
aspect- String- Returns:
- Scriptable
-
getRootCategories
public org.mozilla.javascript.Scriptable getRootCategories(String aspect, String filter, int maxItems, int skipCount) Get ordered, filtered and paged root categories in a classification.- Parameters:
aspect-filter-maxItems-skipCount- (offset)- Returns:
-
getCategoryUsage
Get the category usage count.- Parameters:
aspect- StringmaxCount- int- Returns:
- Scriptable
-