Package org.ametys.cms.model
Class CMSDataContext
java.lang.Object
org.ametys.runtime.model.type.DataContext
org.ametys.plugins.repository.model.RepositoryDataContext
org.ametys.cms.model.CMSDataContext
- Direct Known Subclasses:
 IndexableDataContext
Object that gives some context for cms data manipulation
- 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of aCMSDataContextprotectedCMSDataContext(DataContext context) Creates a new instance of aCMSDataContextfrom anotherDataContext - 
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of aCMSDataContext, with the current context valuesintRetrieves the rich text max length.static CMSDataContextCreates a new instance of aCMSDataContextstatic CMSDataContextnewInstance(DataContext context) Creates a new instance of aCMSDataContextfrom anotherDataContext.<T extends CMSDataContext>
TwithRichTextMaxLength(int richTextMaxLength) Sets the rich text max length Set to 0 to keep the whole rich text content (default)Methods inherited from class org.ametys.plugins.repository.model.RepositoryDataContext
_getRootObject, _withRootObject, copyExternalMetadata, getExternalizableData, getObject, getObjectId, getRootObjectId, isDataExternalizable, withExternalizableData, withExternalMetadataInCopy, withObjectMethods inherited from class org.ametys.runtime.model.type.DataContext
addSegmentToDataPath, addSuffixToLastSegment, getDataPath, getDataPathLastSegment, getFullDataPath, getLocale, getModelItem, getViewItem, renderDisabledValues, renderEmptyValues, withDataPath, withDisabledValues, withEmptyValues, withFullDataPath, withLocale, withModelItem, withViewItem 
- 
Constructor Details
- 
CMSDataContext
protected CMSDataContext()Creates a new instance of aCMSDataContext - 
CMSDataContext
Creates a new instance of aCMSDataContextfrom anotherDataContext- Parameters:
 context- the data context to copy
 
 - 
 - 
Method Details
- 
newInstance
Creates a new instance of aCMSDataContext- Returns:
 - the created instance
 
 - 
newInstance
Creates a new instance of aCMSDataContextfrom anotherDataContext. It can be the same implementation or another one, but it will be casted to the current implementation.- Parameters:
 context- the data context to copy- Returns:
 - the created instance
 
 - 
cloneContext
Creates a new instance of aCMSDataContext, with the current context values- Overrides:
 cloneContextin classRepositoryDataContext- Returns:
 - the created instance
 
 - 
getRichTextMaxLength
Retrieves the rich text max length. If the max length is 0, the whole rich text content is kept- Returns:
 - the rich text max length
 
 - 
withRichTextMaxLength
Sets the rich text max length Set to 0 to keep the whole rich text content (default)- Type Parameters:
 T- the type of the retrievedDataContext- Parameters:
 richTextMaxLength- the rich text max length to set- Returns:
 - the current 
CMSDataContext 
 
 -