Class ContentViewConfigurationAdapter
- java.lang.Object
-
- org.nuxeo.ecm.core.api.localconfiguration.AbstractLocalConfiguration<ContentViewConfiguration>
-
- org.nuxeo.ecm.platform.types.localconfiguration.ContentViewConfigurationAdapter
-
- All Implemented Interfaces:
DetachedAdapter
,LocalConfiguration<ContentViewConfiguration>
,ContentViewConfiguration
public class ContentViewConfigurationAdapter extends AbstractLocalConfiguration<ContentViewConfiguration> implements ContentViewConfiguration
Default implementation ofContentViewConfiguration
.- Author:
- Quentin Lamerand
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canMerge
protected DocumentRef
documentRef
protected Map<String,List<String>>
typeToContentViewNames
-
Constructor Summary
Constructors Constructor Description ContentViewConfigurationAdapter(DocumentModel doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canMerge()
Returnstrue
if thisLocalConfiguration
accepted to be merged with a parent configuration,false
otherwise.List<String>
getContentViewsForType(String docType)
Returns the ContentView name for a specified document type if any is configured.DocumentRef
getDocumentRef()
Returns the relatedDocumentRef
of this local configuration.Map<String,List<String>>
getTypeToContentViewNames()
Returns the ContentView names for all the configured types.ContentViewConfiguration
merge(ContentViewConfiguration other)
Merge thisLocalConfiguration
with another one.-
Methods inherited from class org.nuxeo.ecm.core.api.localconfiguration.AbstractLocalConfiguration
save
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.api.localconfiguration.LocalConfiguration
save
-
-
-
-
Field Detail
-
documentRef
protected DocumentRef documentRef
-
typeToContentViewNames
protected Map<String,List<String>> typeToContentViewNames
-
canMerge
protected boolean canMerge
-
-
Constructor Detail
-
ContentViewConfigurationAdapter
public ContentViewConfigurationAdapter(DocumentModel doc)
-
-
Method Detail
-
getContentViewsForType
public List<String> getContentViewsForType(String docType)
Description copied from interface:ContentViewConfiguration
Returns the ContentView name for a specified document type if any is configured. Else, returns null.- Specified by:
getContentViewsForType
in interfaceContentViewConfiguration
-
canMerge
public boolean canMerge()
Description copied from interface:LocalConfiguration
Returnstrue
if thisLocalConfiguration
accepted to be merged with a parent configuration,false
otherwise.- Specified by:
canMerge
in interfaceLocalConfiguration<ContentViewConfiguration>
- Overrides:
canMerge
in classAbstractLocalConfiguration<ContentViewConfiguration>
-
getDocumentRef
public DocumentRef getDocumentRef()
Description copied from interface:LocalConfiguration
Returns the relatedDocumentRef
of this local configuration.- Specified by:
getDocumentRef
in interfaceLocalConfiguration<ContentViewConfiguration>
-
merge
public ContentViewConfiguration merge(ContentViewConfiguration other)
Description copied from interface:LocalConfiguration
Merge thisLocalConfiguration
with another one.- Specified by:
merge
in interfaceLocalConfiguration<ContentViewConfiguration>
- Overrides:
merge
in classAbstractLocalConfiguration<ContentViewConfiguration>
-
getTypeToContentViewNames
public Map<String,List<String>> getTypeToContentViewNames()
Description copied from interface:ContentViewConfiguration
Returns the ContentView names for all the configured types. Used for merging configurations.- Specified by:
getTypeToContentViewNames
in interfaceContentViewConfiguration
-
-