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
public final class Classification extends BaseScopableProcessorExtension
Support class for finding categories, finding root nodes for categories and creating root categories.- Author:
- Andy Hind
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classClassification.TagTag class returned from getCategoryUsage().
-
Constructor Summary
Constructors Constructor Description Classification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CategoryNodecreateRootCategory(java.lang.String aspect, java.lang.String name)Create a root category in a classification.org.mozilla.javascript.ScriptablegetAllCategoryNodes(java.lang.String aspect)Find all the category nodes in a given classification.java.lang.String[]getAllClassificationAspects()Get all the aspects that define a classification.CategoryNodegetCategory(java.lang.String categoryRef)Get the category node from the category node reference.org.mozilla.javascript.ScriptablegetCategoryUsage(java.lang.String aspect, int maxCount)Get the category usage count.org.mozilla.javascript.ScriptablegetRootCategories(java.lang.String aspect)Get the root categories in a classification.org.mozilla.javascript.ScriptablegetRootCategories(java.lang.String aspect, java.lang.String filter, int maxItems, int skipCount)Get ordered, filtered and paged root categories in a classification.voidsetServiceRegistry(ServiceRegistry services)Set the service registryvoidsetStoreUrl(java.lang.String storeRef)Set the default store reference-
Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScope
-
Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
-
-
-
Method Detail
-
setStoreUrl
public void setStoreUrl(java.lang.String storeRef)
Set the default store reference- Parameters:
storeRef- the default store reference
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry services)
Set the service registry- Parameters:
services- the service registry
-
getAllCategoryNodes
public org.mozilla.javascript.Scriptable getAllCategoryNodes(java.lang.String aspect)
Find all the category nodes in a given classification.- Parameters:
aspect- String- Returns:
- Scriptable
-
getAllClassificationAspects
public java.lang.String[] getAllClassificationAspects()
Get all the aspects that define a classification.- Returns:
- String[]
-
createRootCategory
public CategoryNode createRootCategory(java.lang.String aspect, java.lang.String name)
Create a root category in a classification.- Parameters:
aspect- Stringname- String
-
getCategory
public CategoryNode getCategory(java.lang.String categoryRef)
Get the category node from the category node reference.- Parameters:
categoryRef- category node reference- Returns:
CategoryNodecategory node
-
getRootCategories
public org.mozilla.javascript.Scriptable getRootCategories(java.lang.String aspect)
Get the root categories in a classification.- Parameters:
aspect- String- Returns:
- Scriptable
-
getRootCategories
public org.mozilla.javascript.Scriptable getRootCategories(java.lang.String aspect, java.lang.String filter, int maxItems, int skipCount)Get ordered, filtered and paged root categories in a classification.- Parameters:
aspect-filter-maxItems-skipCount- (offset)- Returns:
-
getCategoryUsage
public org.mozilla.javascript.Scriptable getCategoryUsage(java.lang.String aspect, int maxCount)Get the category usage count.- Parameters:
aspect- StringmaxCount- int- Returns:
- Scriptable
-
-