public class ClassificationServiceImpl extends DefaultComponent implements ClassificationService
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
TYPES_XP |
Constructor and Description |
---|
ClassificationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
List<String> |
getClassifiableDocumentTypes()
This will return only the document types that was contributed as
classifiable.
|
boolean |
isClassifiable(DocumentModel doc)
If this document is classifiable
|
boolean |
isClassifiable(String docType)
If this type of document is classifiable.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterContribution, unregisterExtension
public static final String NAME
public static final String TYPES_XP
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public List<String> getClassifiableDocumentTypes()
ClassificationService
getClassifiableDocumentTypes
in interface ClassificationService
public boolean isClassifiable(String docType)
ClassificationService
ClassificationService.isClassifiable(DocumentModel)
and to add the facet Classifiable
to the classifiable document instead of use the contribution.isClassifiable
in interface ClassificationService
public boolean isClassifiable(DocumentModel doc)
ClassificationService
isClassifiable
in interface ClassificationService
Copyright © 2012 Nuxeo SA. All Rights Reserved.