org.alfresco.repo.jscript
Class Classification

java.lang.Object
  extended by org.alfresco.repo.processor.BaseProcessorExtension
      extended by org.alfresco.repo.jscript.BaseScopableProcessorExtension
          extended by 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.


Nested Class Summary
 class Classification.Tag
          Tag class returned from getCategoryUsage().
 
Constructor Summary
Classification()
           
 
Method Summary
 CategoryNode createRootCategory(java.lang.String aspect, java.lang.String name)
          Create a root category in a classification.
 org.mozilla.javascript.Scriptable getAllCategoryNodes(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.
 CategoryNode getCategory(java.lang.String categoryRef)
          Get the category node from the category node reference.
 org.mozilla.javascript.Scriptable getCategoryUsage(java.lang.String aspect, int maxCount)
          Get the category usage count.
 org.mozilla.javascript.Scriptable getRootCategories(java.lang.String aspect)
          Get the root categories in a classification.
 void setServiceRegistry(ServiceRegistry services)
          Set the service registry
 void setStoreUrl(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Classification

public Classification()
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 -
Returns:

getAllClassificationAspects

public java.lang.String[] getAllClassificationAspects()
Get all the aspects that define a classification.

Returns:

createRootCategory

public CategoryNode createRootCategory(java.lang.String aspect,
                                       java.lang.String name)
Create a root category in a classification.

Parameters:
aspect -
name -

getCategory

public CategoryNode getCategory(java.lang.String categoryRef)
Get the category node from the category node reference.

Parameters:
categoryRef - category node reference
Returns:
CategoryNode category node

getRootCategories

public org.mozilla.javascript.Scriptable getRootCategories(java.lang.String aspect)
Get the root categories in a classification.

Parameters:
aspect -
Returns:

getCategoryUsage

public org.mozilla.javascript.Scriptable getCategoryUsage(java.lang.String aspect,
                                                          int maxCount)
Get the category usage count.

Parameters:
aspect -
maxCount -
Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.