Package org.nuxeo.template.adapters
Class TemplateAdapterFactory
- java.lang.Object
-
- org.nuxeo.template.adapters.TemplateAdapterFactory
-
- All Implemented Interfaces:
DocumentAdapterFactory
public class TemplateAdapterFactory extends Object implements DocumentAdapterFactory
PluggableDocumentAdapterFactory
used to return the rightTemplateBasedDocument
orTemplateSourceDocument
implementation according to givenDocumentModel
.- Author:
- Tiry ([email protected])
-
-
Constructor Summary
Constructors Constructor Description TemplateAdapterFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAdapter(DocumentModel doc, Class adapterClass)
static boolean
isAdaptable(DocumentModel doc, Class<?> adapterClass)
Checks if the document can be adapted.
-
-
-
Field Detail
-
log
protected static final Log log
-
-
Method Detail
-
isAdaptable
public static boolean isAdaptable(DocumentModel doc, Class<?> adapterClass)
Checks if the document can be adapted. Also works on a ShallowDocumentModel.
-
getAdapter
public Object getAdapter(DocumentModel doc, Class adapterClass)
- Specified by:
getAdapter
in interfaceDocumentAdapterFactory
-
-