public class CmsDefaultXmlContentHandler extends java.lang.Object implements I_CmsXmlContentHandler, I_CmsXmlContentVisibilityHandler
Modifier and Type | Class and Description |
---|---|
protected static class |
CmsDefaultXmlContentHandler.VisibilityConfiguration
Contains the visibility handler configuration for a content field path.
|
I_CmsXmlContentHandler.DisplayType, I_CmsXmlContentHandler.MappingType
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPINFO_APPINFO
Constant for the "appinfo" element name itself.
|
static java.lang.String |
APPINFO_ATTR_ADD_TO
Constant for the "addto" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_BOOST
Constant for the "boost" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_CLASS
Constant for the "class" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_COLLAPSE
Constant for the "collapse" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_CONFIGURATION
Constant for the "configuration" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_CONTAINER_PAGE_ONLY
The exclude from index attribute.
|
static java.lang.String |
APPINFO_ATTR_COPY_FIELDS
Constant for the "copyfields" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_DEFAULT
Constant for the "default" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_DESCRIPTION
Constant for the "description" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_DISPLAY
Constant for the "displaycompact" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_ELEMENT
Constant for the "element" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_ERROR
Constant for the "error" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_INVALIDATE
Constant for the "invalidate" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_KEY
Constant for the "key" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_LOCALE
Constant for the "locale" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_MAPPING
Constant for the "mapping" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_MAPTO
Constant for the "mapto" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_MAXWIDTH
Constant for the "maxwidth" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_MESSAGE
Constant for the "message" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_MINWIDTH
Constant for the "minwidth" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_NAME
Constant for the "name" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_NICE_NAME
Constant for the "nice-name" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_PARAMS
Constant for the "params" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_PREVIEW
Constant for the "preview" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_REGEX
Constant for the "regex" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_RESOLVE_MACROS
Constant for the "resolveMacros" attribute name.
|
static java.lang.String |
APPINFO_ATTR_RULE_REGEX
Constant for the "rule-regex" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_RULE_TYPE
Constant for the "rule-type" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_SCOPE
Constant for the "scope" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_SEARCHCONTENT
Constant for the "searchcontent" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_SELECT_INHERIT
Constant for the "select-inherit" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_SOURCE_FIELD
Constant for the "sourcefield" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_TARGET_FIELD
Constant for the "targetfield" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_TYPE
Constant for the "type" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_TYPE_NODE
Constant for the "node" appinfo attribute value.
|
static java.lang.String |
APPINFO_ATTR_TYPE_PARENT
Constant for the "parent" appinfo attribute value.
|
static java.lang.String |
APPINFO_ATTR_TYPE_WARNING
Constant for the "warning" appinfo attribute value.
|
static java.lang.String |
APPINFO_ATTR_URI
Constant for the "uri" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_USEALL
Constant for the "useall" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_VALUE
Constant for the "value" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_WIDGET
Constant for the "widget" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTR_WIDGET_CONFIG
Constant for the "widget-config" appinfo attribute name.
|
static java.lang.String |
APPINFO_ATTRIBUTE_TYPE_CSS
Constant for formatter include resource type 'CSS'.
|
static java.lang.String |
APPINFO_ATTRIBUTE_TYPE_JAVASCRIPT
Constant for formatter include resource type 'JAVASCRIPT'.
|
static java.lang.String |
APPINFO_BUNDLE
Constant for the "bundle" appinfo element name.
|
static java.lang.String |
APPINFO_DEFAULT
Constant for the "default" appinfo element name.
|
static java.lang.String |
APPINFO_DEFAULTS
Constant for the "defaults" appinfo element name.
|
static java.lang.String |
APPINFO_EDIT_HANDLER
Constant for the "edithandler" appinfo element name.
|
static java.lang.String |
APPINFO_EDITOR_CHANGE_HANDLER
Constant for the "editorchangehandler" appinfo element name.
|
static java.lang.String |
APPINFO_EDITOR_CHANGE_HANDLERS
Constant for the "editorchangehandlers" appinfo element name.
|
static java.lang.String |
APPINFO_FORBIDDEN_CONTEXTS
Constant for the "forbidden-contexts" appinfo attribute name.
|
static java.lang.String |
APPINFO_FORMATTER
Constant for the "formatter" appinfo element name.
|
static java.lang.String |
APPINFO_FORMATTERS
Constant for the "formatters" appinfo element name.
|
static java.lang.String |
APPINFO_HEAD_INCLUDE
Constant for the "headinclude" appinfo element name.
|
static java.lang.String |
APPINFO_HEAD_INCLUDES
Constant for the "headincludes" appinfo element name.
|
static java.lang.String |
APPINFO_LAYOUT
Constant for the "layout" appinfo element name.
|
static java.lang.String |
APPINFO_LAYOUTS
Constant for the "layouts" appinfo element name.
|
static java.lang.String |
APPINFO_MAPPING
Constant for the "mapping" appinfo element name.
|
static java.lang.String |
APPINFO_MAPPINGS
Constant for the "mappings" appinfo element name.
|
static java.lang.String |
APPINFO_MESSAGEKEYHANDLER
Constant for the 'messagekeyhandler' node.
|
static java.lang.String |
APPINFO_MODELFOLDER
Constant for the "modelfolder" appinfo element name.
|
static java.lang.String |
APPINFO_NESTED_FORMATTER
Constant for the "nestedformatter" appinfo element name.
|
static java.lang.String |
APPINFO_NESTED_FORMATTERS
Constant for the "nestedformatters" appinfo element name.
|
static java.lang.String |
APPINFO_PARAM
Constant for the "param" appinfo attribute name.
|
static java.lang.String |
APPINFO_PARAMETERS
Constant for the "parameters" appinfo element name.
|
static java.lang.String |
APPINFO_PREVIEW
Constant for the "preview" appinfo element name.
|
static java.lang.String |
APPINFO_PROPERTYBUNDLE
Constant for the "propertybundle" appinfo element name.
|
static java.lang.String |
APPINFO_RELATION
Constant for the "relation" appinfo element name.
|
static java.lang.String |
APPINFO_RELATIONS
Constant for the "relations" appinfo element name.
|
static java.lang.String |
APPINFO_RESOURCE
Constant for the "resource" appinfo element name.
|
static java.lang.String |
APPINFO_RESOURCEBUNDLE
Constant for the "resourcebundle" appinfo element name.
|
static java.lang.String |
APPINFO_RESOURCEBUNDLES
Constant for the "resourcebundles" appinfo element name.
|
static java.lang.String |
APPINFO_RULE
Constant for the "rule" appinfo element name.
|
static java.lang.String |
APPINFO_SCHEMA_FILE
The file where the default appinfo schema is located.
|
static java.lang.String |
APPINFO_SCHEMA_FILE_TYPES
The file where the default appinfo schema types are located.
|
static java.lang.String |
APPINFO_SCHEMA_SYSTEM_ID
The XML system id for the default appinfo schema types.
|
static java.lang.String |
APPINFO_SCHEMA_TYPES_SYSTEM_ID
The XML system id for the default appinfo schema types.
|
static java.lang.String |
APPINFO_SEARCHSETTING
Constant for the "searchsetting" appinfo element name.
|
static java.lang.String |
APPINFO_SEARCHSETTINGS
Constant for the "searchsettings" appinfo element name.
|
static java.lang.String |
APPINFO_SETTING
Constant for the "setting" appinfo element name.
|
static java.lang.String |
APPINFO_SETTINGS
Constant for the "settings" appinfo element name.
|
static java.lang.String |
APPINFO_SOLR_FIELD
Constant for the "solrfield" appinfo element name.
|
static java.lang.String |
APPINFO_SYNCHRONIZATION
Constant for the "synchronization" appinfo element name.
|
static java.lang.String |
APPINFO_SYNCHRONIZATIONS
Constant for the "synchronizations" appinfo element name.
|
static java.lang.String |
APPINFO_TAB
Constant for the "tab" appinfo element name.
|
static java.lang.String |
APPINFO_TABS
Constant for the "tabs" appinfo element name.
|
static java.lang.String |
APPINFO_TEMPLATE
Node name.
|
static java.lang.String |
APPINFO_TEMPLATES
Node name.
|
static java.lang.String |
APPINFO_VALIDATIONRULE
Constant for the "validationrule" appinfo element name.
|
static java.lang.String |
APPINFO_VALIDATIONRULES
Constant for the "validationrules" appinfo element name.
|
static java.lang.String |
APPINFO_VALUE_ADD_TO_CONTENT
Constant for the "element" value of the appinfo attribute "addto".
|
static java.lang.String |
APPINFO_VALUE_ADD_TO_PAGE
Constant for the "page" value of the appinfo attribute "addto".
|
static java.lang.String |
APPINFO_VISIBILITIES
Constant for the "visibilities" appinfo element name.
|
static java.lang.String |
APPINFO_VISIBILITY
Constant for the "visibility" appinfo element name.
|
static java.lang.String |
APPINFO_XMLBUNDLE
Constant for the "xmlbundle" appinfo element name.
|
static java.lang.String |
ATTR_ENABLED
Attribute name.
|
static java.lang.String |
ATTR_ENABLED_BY_DEFAULT
Attribute name.
|
static java.lang.String |
ATTR_USE_ACACIA
Attribute name.
|
static java.lang.String |
ATTRIBUTE_INCLUDE_TYPE_CSS
Constant for head include type attribute: CSS.
|
static java.lang.String |
ATTRIBUTE_INCLUDE_TYPE_JAVASCRIPT
Constant for head include type attribute: java-script.
|
protected CmsDefaultSet<java.lang.String> |
m_allowedTemplates
The set of allowed templates.
|
protected java.util.Map<java.lang.String,I_CmsComplexWidget> |
m_complexWidgets
A map from attribute name to complex widgets.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_configurationValues
The configuration values for the element widgets (as defined in the annotations).
|
protected java.util.Set<java.lang.String> |
m_cssHeadIncludes
The CSS resources to include into the html-page head.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_defaultValues
The default values for the elements (as defined in the annotations).
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
m_elementMappings
The element mappings (as defined in the annotations).
|
protected java.util.Map<java.lang.String,I_CmsWidget> |
m_elementWidgets
The widgets used for the elements (as defined in the annotations).
|
protected CmsFormatterConfiguration |
m_formatterConfiguration
The formatter configuration.
|
protected java.util.List<CmsFormatterBean> |
m_formatters
The list of formatters from the XSD.
|
protected java.util.Set<java.lang.String> |
m_jsHeadIncludes
The java-script resources to include into the html-page head.
|
protected java.util.List<java.lang.String> |
m_messageBundleNames
The resource bundle name to be used for localization of this content handler.
|
protected java.lang.String |
m_modelFolder
The folder containing the model file(s) for the content.
|
protected java.lang.String |
m_previewLocation
The preview location (as defined in the annotations).
|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
m_relationChecks
The relation check rules.
|
protected java.util.Map<java.lang.String,CmsRelationType> |
m_relations
The relation check rules.
|
protected java.util.Map<java.lang.String,CmsSearchField> |
m_searchFields
The Solr field configurations.
|
protected java.util.Map<java.lang.String,CmsSearchField> |
m_searchFieldsPage
The Solr field configurations added to the container pages contents are on.
|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
m_searchSettings
The search settings.
|
protected org.antlr.stringtemplate.StringTemplateGroup |
m_searchTemplateGroup
String template group for the simple search setting expansions.
|
protected java.util.Map<java.lang.String,CmsXmlContentProperty> |
m_settings
The configured settings for the formatters (as defined in the annotations).
|
protected java.util.List<java.lang.String> |
m_synchronizations
The configured locale synchronization elements.
|
protected java.util.List<CmsXmlContentTab> |
m_tabs
The configured tabs.
|
protected java.util.List<java.lang.String> |
m_titleMappings
The list of mappings to the "Title" property.
|
protected boolean |
m_useAcacia
Flag which controls whether the Acacia editor should be disabled for this type.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_validationErrorMessages
The messages for the error validation rules.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_validationErrorRules
The validation rules that cause an error (as defined in the annotations).
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_validationWarningMessages
The messages for the warning validation rules.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_validationWarningRules
The validation rules that cause a warning (as defined in the annotations).
|
static java.lang.String |
MACRO_PREVIEW_TEMPFILE
Macro for resolving the preview URI.
|
protected static java.lang.String |
MESSAGE_VALIDATION_DEFAULT_ERROR
Default message for validation errors.
|
protected static java.lang.String |
MESSAGE_VALIDATION_DEFAULT_WARNING
Default message for validation warnings.
|
static java.lang.String |
N_SETTING
Constant for the 'Setting' node name.
|
ATTRIBUTE_DATEEXPIRED, ATTRIBUTE_DATERELEASED, ATTRIBUTES, MAPTO_ATTRIBUTE, MAPTO_PERMISSION, MAPTO_PROPERTY, MAPTO_PROPERTY_INDIVIDUAL, MAPTO_PROPERTY_LIST, MAPTO_PROPERTY_LIST_INDIVIDUAL, MAPTO_PROPERTY_LIST_SHARED, MAPTO_PROPERTY_SHARED, MAPTO_URLNAME
Constructor and Description |
---|
CmsDefaultXmlContentHandler()
Creates a new instance of the default XML content handler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCheckRule(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String invalidate,
java.lang.String type)
Adds a check rule for a specified element.
|
protected void |
addConfiguration(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String configurationValue)
Adds a configuration value for an element widget.
|
protected void |
addDefault(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String defaultValue,
java.lang.String resolveMacrosValue)
Adds a default value for an element.
|
protected void |
addDefaultCheckRules(CmsXmlContentDefinition rootContentDefinition,
I_CmsXmlSchemaType schemaType,
java.lang.String elementPath)
Adds all needed default check rules recursively for the given schema type.
|
protected void |
addDisplayType(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
I_CmsXmlContentHandler.DisplayType displayType)
Adds the given element to the compact view set.
|
protected void |
addMapping(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String mapping,
java.lang.String useDefault)
Adds an element mapping.
|
protected void |
addNestedFormatter(java.lang.String elementName,
CmsXmlContentDefinition contentDefinition)
Adds a nested formatter element.
|
protected void |
addSearchField(CmsXmlContentDefinition contentDefinition,
CmsSearchField field)
Deprecated.
|
protected void |
addSearchField(CmsXmlContentDefinition contentDefinition,
CmsSearchField field,
I_CmsXmlContentHandler.MappingType type)
Adds a Solr field for an element.
|
protected void |
addSearchSetting(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.Boolean value)
Adds a search setting for an element.
|
protected void |
addSimpleSearchSetting(CmsXmlContentDefinition contentDef,
java.lang.String name,
java.lang.String value)
Adds search settings as defined by 'simple' syntax in fields.
|
protected void |
addValidationRule(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String regex,
java.lang.String message,
boolean isWarning)
Adds a validation rule for a specified element.
|
protected void |
addWidget(CmsXmlContentDefinition contentDefinition,
java.lang.String elementName,
java.lang.String widgetClassOrAlias)
Adds a GUI widget for a specified element.
|
CmsObject |
createRootCms(CmsObject cms)
Copies a given CMS context and set the copy's site root to '/'.
|
protected CmsDefaultXmlContentHandler.VisibilityConfiguration |
createVisibilityConfiguration(java.lang.String className,
java.lang.String params)
Helper method to create a visibility configuration.
|
CmsDefaultSet<java.lang.String> |
getAllowedTemplates()
Gets the list of allowed template context names.
|
I_CmsComplexWidget |
getComplexWidget(I_CmsXmlSchemaType value)
Gets the complex widget for the given schema type.
|
java.lang.String |
getConfiguration(I_CmsXmlSchemaType type)
Returns the configuration String value for the widget used to edit the given XML content schema type.
|
java.lang.String |
getConfiguration(java.lang.String path)
Gets the widget configuration for the given sub-path.
|
I_CmsXmlContentHandler.DisplayType |
getConfiguredDisplayType(java.lang.String path,
I_CmsXmlContentHandler.DisplayType defaultValue)
Gets the configured display type for a given path.
|
java.util.Set<java.lang.String> |
getCSSHeadIncludes()
Returns the resource-independent CSS resources to include into the html-page head.
|
java.util.Set<java.lang.String> |
getCSSHeadIncludes(CmsObject cms,
CmsResource resource)
Returns all the CSS resources to include into the html-page head.
|
java.lang.String |
getDefault(CmsObject cms,
CmsResource resource,
I_CmsXmlSchemaType type,
java.lang.String path,
java.util.Locale locale)
Returns the default String value for the given XML content schema type object in the given XML content.
|
java.lang.String |
getDefault(CmsObject cms,
I_CmsXmlContentValue value,
java.util.Locale locale)
Returns the default String value for the given XML content schema type object in the given XML content.
|
I_CmsComplexWidget |
getDefaultComplexWidget()
Gets the default complex widget to be used for this type.
|
java.lang.String |
getDefaultComplexWidgetClass()
Gets the default complex widget class name configured for this type.
|
java.lang.String |
getDefaultComplexWidgetConfiguration()
Gets the default complex widget configuration string configured for this type.
|
I_CmsXmlContentHandler.DisplayType |
getDisplayType(I_CmsXmlSchemaType type)
Returns if the widget for this type should be displayed in compact view.
|
I_CmsEditHandler |
getEditHandler()
Returns the edit handler if configured.
|
java.util.List<I_CmsXmlContentEditorChangeHandler> |
getEditorChangeHandlers()
Returns the editor change handlers.
|
java.util.Map<java.lang.String,java.lang.String> |
getFieldHelp()
Gets the help texts for the fields.
|
java.util.Map<java.lang.String,java.lang.String> |
getFieldLabels()
Gets the labels for the fields.
|
CmsFormatterConfiguration |
getFormatterConfiguration(CmsObject cms,
CmsResource resource)
Returns the container page element formatter configuration for a given resource.
|
java.util.Set<java.lang.String> |
getJSHeadIncludes()
Returns the resource-independent javascript resources to include into the html-page head.
|
java.util.Set<java.lang.String> |
getJSHeadIncludes(CmsObject cms,
CmsResource resource)
Returns all the javascript resources to include into the html-page head.
|
protected java.util.List<java.util.Locale> |
getLocalesForResource(CmsObject cms,
java.lang.String resource)
Returns the configured default locales for the content of the given resource.
|
java.util.List<java.lang.String> |
getMappings(java.lang.String elementName)
Returns the all mappings defined for the given element xpath.
|
CmsMultiMessages.I_KeyFallbackHandler |
getMessageKeyHandler()
Gets the message key fallback handler.
|
CmsMessages |
getMessages(java.util.Locale locale)
Returns the
CmsMessages that are used to resolve localized keys
for the given locale in this content handler. |
java.lang.String |
getModelFolder()
Returns the folder name that contains eventual XML content model files to use for this resource type.
|
java.util.List<CmsUUID> |
getNestedFormatters(CmsObject cms,
CmsResource res,
java.util.Locale locale,
javax.servlet.ServletRequest req)
Returns the nested formatters for the given resource.
|
java.lang.String |
getParameter(java.lang.String name)
Gets the parameter with the given name..
|
CmsParameterConfiguration |
getParameters()
Gets the set of parameters.
|
java.lang.String |
getPreview(CmsObject cms,
CmsXmlContent content,
java.lang.String resourcename)
Returns the preview URI for the given XML content value object to be displayed in the editor.
|
protected java.lang.String |
getReferencePath(CmsObject cms,
I_CmsXmlContentValue value)
Returns the category reference path for the given value.
|
CmsRelationType |
getRelationType(I_CmsXmlContentValue value)
Deprecated.
|
CmsRelationType |
getRelationType(java.lang.String xpath)
Returns the relation type for the given path.
|
CmsRelationType |
getRelationType(java.lang.String xpath,
CmsRelationType defaultType)
Returns the relation type for the given path.
|
java.util.Set<CmsSearchField> |
getSearchFields()
Returns all configured Search fields for this XML content.
|
java.util.Set<CmsSearchField> |
getSearchFieldsForPage()
Returns all configured Search fields for this XML content that should be attached to container pages the content is placed on.
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getSearchSettings()
Returns the search content settings defined in the annotation node of this XML content.
|
java.util.Map<java.lang.String,CmsXmlContentProperty> |
getSettings(CmsObject cms,
CmsResource resource)
Returns the element settings defined for the container page formatters.
|
java.util.List<java.lang.String> |
getSynchronizations()
Returns the elements that require a synchronization across all locales.
|
java.util.List<CmsXmlContentTab> |
getTabs()
Returns the tabs to be displayed in the editor.
|
java.lang.String |
getTitleMapping(CmsObject cms,
CmsXmlContent document,
java.util.Locale locale)
Returns the "Title" mapping set for the given XML content document in the given Locale.
|
I_CmsComplexWidget |
getUnconfiguredComplexWidget(java.lang.String path)
Gets the unconfigured complex widget defined for the given path.
|
I_CmsWidget |
getUnconfiguredWidget(java.lang.String path)
Gets an unconfigured widget for a given sub-path, i.e. one without a configuration string.
|
protected java.lang.String |
getValidationMessage(CmsObject cms,
I_CmsXmlContentValue value,
java.lang.String regex,
java.lang.String valueStr,
boolean matchResult,
boolean isWarning)
Returns the validation message to be displayed if a certain rule was violated.
|
I_CmsWidget |
getWidget(I_CmsXmlSchemaType value)
Deprecated.
|
boolean |
hasModifiableFormatters()
Returns true if the contents for this content handler have schema-based formatters which can be disabled or enabled.
|
boolean |
hasNestedFormatters()
Returns whether there are nested formatters configured for this content type.
|
boolean |
hasSynchronizedElements()
Returns if there are locale synchronized elements configured.
|
boolean |
hasVisibilityHandlers()
Returns if there are visibility handlers configured for this content type.
|
protected void |
init()
Called when this content handler is initialized.
|
protected void |
initDefaultValues(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the default values for this content handler.
|
protected void |
initDefaultWidget(org.dom4j.Element element)
Initializes the default complex widget.
|
protected void |
initEditHandler(org.dom4j.Element handlerElement)
Initializes the edit handler.
|
protected void |
initEditorChangeHandlers(org.dom4j.Element element)
Initializes the editor change handlers.
|
protected void |
initField(org.dom4j.Element elem,
CmsXmlContentDefinition contentDef)
Processes a single field definition.
|
protected void |
initFields(org.dom4j.Element parent,
CmsXmlContentDefinition contentDef)
Processes all field declarations in the schema.
|
protected void |
initFormatters(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the formatters for this content handler.
|
protected void |
initHeadIncludes(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the head includes for this content handler.
|
void |
initialize(org.dom4j.Element appInfoElement,
CmsXmlContentDefinition contentDefinition)
Initializes this content handler for the given XML content definition by
analyzing the "appinfo" node.
|
protected void |
initLayouts(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the layout for this content handler.
|
protected void |
initMappings(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the element mappings for this content handler.
|
protected void |
initModelFolder(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the folder containing the model file(s) for this content handler.
|
protected void |
initNestedFormatters(org.dom4j.Element element,
CmsXmlContentDefinition contentDefinition)
Initializes the nested formatter fields.
|
protected void |
initParameters(org.dom4j.Element root)
Initializes the parameters from the schema.
|
protected void |
initPreview(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the preview location for this content handler.
|
protected void |
initRelations(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the relation configuration for this content handler.
|
protected void |
initResourceBundle(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition,
boolean single)
Initializes the resource bundle to use for localized messages in this content handler.
|
protected void |
initSearchSettings(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the search exclusions values for this content handler.
|
protected void |
initSettings(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the element settings for this content handler.
|
protected void |
initSynchronizations(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the locale synchronizations elements.
|
protected void |
initTabs(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the tabs for this content handler.
|
protected void |
initTemplates(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the forbidden template contexts.
|
protected void |
initValidationRules(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the validation rules this content handler.
|
protected void |
initVisibilities(org.dom4j.Element root,
CmsXmlContentDefinition contentDefinition)
Initializes the content visibility settings.
|
void |
invalidateBrokenLinks(CmsObject cms,
CmsXmlContent document)
Performs a check of the given XML document.
|
boolean |
isAcaciaEditorDisabled()
Returns true if the Acacia editor is disabled for this type.
|
boolean |
isContainerPageOnly()
Returns
true if the XML content should be indexed when it is dropped in a container page,
and returns false if this XML content should be indexed as 'stand-alone' document. |
protected boolean |
isInvalidateParent(java.lang.String xpath)
Returns the is-invalidate-parent flag for the given xpath.
|
boolean |
isSearchable(I_CmsXmlContentValue value)
Returns
true in case the given value should be searchable with
the integrated full text search. |
boolean |
isValueVisible(CmsObject cms,
I_CmsXmlSchemaType value,
java.lang.String elementName,
java.lang.String params,
CmsResource resource,
java.util.Locale contentLocale)
Returns the content field visibilty.
|
boolean |
isVisible(CmsObject cms,
I_CmsXmlSchemaType contentValue,
java.lang.String valuePath,
CmsResource resource,
java.util.Locale contentLocale)
Returns if the given content field should be visible to the current user.
|
protected java.lang.String |
key(java.lang.String keyName,
java.util.Locale locale)
Returns the localized resource string for a given message key according to the configured resource bundle
of this content handler.
|
protected java.util.Set<I_CmsXmlContentHandler.MappingType> |
parseSearchMappingTypes(org.dom4j.Element solrElement) |
CmsXmlContent |
prepareForUse(CmsObject cms,
CmsXmlContent content)
Prepares the given XML content to be used after it was read from the OpenCms VFS.
|
CmsFile |
prepareForWrite(CmsObject cms,
CmsXmlContent content,
CmsFile file)
Prepares the given XML content to be written to the OpenCms VFS.
|
protected void |
removeEmptyMappings(CmsObject cms,
CmsFile file,
CmsXmlContent content)
Removes property values on resources for non-existing, optional elements.
|
protected void |
resolveDefaultMappings(CmsObject cms,
CmsFile file,
CmsXmlContent content)
Resolves those mappings for which no content value exists and useDefault is set to true.
|
void |
resolveMapping(CmsObject cms,
CmsXmlContent content,
I_CmsXmlContentValue value)
Resolves the value mappings of the given XML content value, according
to the rules of this XML content handler.
|
CmsXmlContentErrorHandler |
resolveValidation(CmsObject cms,
I_CmsXmlContentValue value,
CmsXmlContentErrorHandler errorHandler)
Performs a validation of the given XML content value, and saves all errors or warnings found in
the provided XML content error handler.
|
protected void |
validateAppinfoElement(org.dom4j.Element appinfoElement)
Validates if the given
appinfo element node from the XML content definition schema
is valid according the the capabilities of this content handler. |
protected CmsXmlContentErrorHandler |
validateCategories(CmsObject cms,
I_CmsXmlContentValue value,
CmsXmlContentErrorHandler errorHandler)
The errorHandler parameter is optional, if
null is given a new error handler
instance must be created. |
protected boolean |
validateLink(CmsObject cms,
I_CmsXmlContentValue value,
CmsXmlContentErrorHandler errorHandler)
Validates the given rules against the given value.
|
protected CmsXmlContentErrorHandler |
validateValue(CmsObject cms,
I_CmsXmlContentValue value,
CmsXmlContentErrorHandler errorHandler,
java.util.Map<java.lang.String,java.lang.String> rules,
boolean isWarning)
Validates the given rules against the given value.
|
protected CmsXmlContentErrorHandler |
validateValue(CmsObject cms,
I_CmsXmlContentValue value,
java.lang.String valueStr,
CmsXmlContentErrorHandler errorHandler,
boolean isWarning)
Checks the default XML schema validation rules.
|
protected CmsFile |
writeCategories(CmsObject cms,
CmsFile file,
CmsXmlContent content)
Writes the categories if a category widget is present.
|
public static final java.lang.String APPINFO_APPINFO
public static final java.lang.String APPINFO_ATTR_ADD_TO
public static final java.lang.String APPINFO_ATTR_BOOST
public static final java.lang.String APPINFO_ATTR_CLASS
public static final java.lang.String APPINFO_ATTR_COLLAPSE
public static final java.lang.String APPINFO_ATTR_CONFIGURATION
public static final java.lang.String APPINFO_ATTR_CONTAINER_PAGE_ONLY
public static final java.lang.String APPINFO_ATTR_COPY_FIELDS
public static final java.lang.String APPINFO_ATTR_DEFAULT
public static final java.lang.String APPINFO_ATTR_DESCRIPTION
public static final java.lang.String APPINFO_ATTR_DISPLAY
public static final java.lang.String APPINFO_ATTR_ELEMENT
public static final java.lang.String APPINFO_ATTR_ERROR
public static final java.lang.String APPINFO_ATTR_INVALIDATE
public static final java.lang.String APPINFO_ATTR_KEY
public static final java.lang.String APPINFO_ATTR_LOCALE
public static final java.lang.String APPINFO_ATTR_MAPPING
public static final java.lang.String APPINFO_ATTR_MAPTO
public static final java.lang.String APPINFO_ATTR_MAXWIDTH
public static final java.lang.String APPINFO_ATTR_MESSAGE
public static final java.lang.String APPINFO_ATTR_MINWIDTH
public static final java.lang.String APPINFO_ATTR_NAME
public static final java.lang.String APPINFO_ATTR_NICE_NAME
public static final java.lang.String APPINFO_ATTR_PARAMS
public static final java.lang.String APPINFO_ATTR_PREVIEW
public static final java.lang.String APPINFO_ATTR_REGEX
public static final java.lang.String APPINFO_ATTR_RESOLVE_MACROS
public static final java.lang.String APPINFO_ATTR_RULE_REGEX
public static final java.lang.String APPINFO_ATTR_RULE_TYPE
public static final java.lang.String APPINFO_ATTR_SCOPE
public static final java.lang.String APPINFO_ATTR_SEARCHCONTENT
public static final java.lang.String APPINFO_ATTR_SELECT_INHERIT
public static final java.lang.String APPINFO_ATTR_SOURCE_FIELD
public static final java.lang.String APPINFO_ATTR_TARGET_FIELD
public static final java.lang.String APPINFO_ATTR_TYPE
public static final java.lang.String APPINFO_ATTR_TYPE_NODE
public static final java.lang.String APPINFO_ATTR_TYPE_PARENT
public static final java.lang.String APPINFO_ATTR_TYPE_WARNING
public static final java.lang.String APPINFO_ATTR_URI
public static final java.lang.String APPINFO_ATTR_USEALL
public static final java.lang.String APPINFO_ATTR_VALUE
public static final java.lang.String APPINFO_ATTR_WIDGET
public static final java.lang.String APPINFO_ATTR_WIDGET_CONFIG
public static final java.lang.String APPINFO_ATTRIBUTE_TYPE_CSS
public static final java.lang.String APPINFO_ATTRIBUTE_TYPE_JAVASCRIPT
public static final java.lang.String APPINFO_BUNDLE
public static final java.lang.String APPINFO_DEFAULT
public static final java.lang.String APPINFO_DEFAULTS
public static final java.lang.String APPINFO_EDIT_HANDLER
public static final java.lang.String APPINFO_EDITOR_CHANGE_HANDLER
public static final java.lang.String APPINFO_EDITOR_CHANGE_HANDLERS
public static final java.lang.String APPINFO_FORBIDDEN_CONTEXTS
public static final java.lang.String APPINFO_FORMATTER
public static final java.lang.String APPINFO_FORMATTERS
public static final java.lang.String APPINFO_HEAD_INCLUDE
public static final java.lang.String APPINFO_HEAD_INCLUDES
public static final java.lang.String APPINFO_LAYOUT
public static final java.lang.String APPINFO_LAYOUTS
public static final java.lang.String APPINFO_MAPPING
public static final java.lang.String APPINFO_MAPPINGS
public static final java.lang.String APPINFO_MESSAGEKEYHANDLER
public static final java.lang.String APPINFO_MODELFOLDER
public static final java.lang.String APPINFO_NESTED_FORMATTER
public static final java.lang.String APPINFO_NESTED_FORMATTERS
public static final java.lang.String APPINFO_PARAM
public static final java.lang.String APPINFO_PARAMETERS
public static final java.lang.String APPINFO_PREVIEW
public static final java.lang.String APPINFO_PROPERTYBUNDLE
public static final java.lang.String APPINFO_RELATION
public static final java.lang.String APPINFO_RELATIONS
public static final java.lang.String APPINFO_RESOURCE
public static final java.lang.String APPINFO_RESOURCEBUNDLE
public static final java.lang.String APPINFO_RESOURCEBUNDLES
public static final java.lang.String APPINFO_RULE
public static final java.lang.String APPINFO_SCHEMA_FILE
public static final java.lang.String APPINFO_SCHEMA_FILE_TYPES
public static final java.lang.String APPINFO_SCHEMA_SYSTEM_ID
public static final java.lang.String APPINFO_SCHEMA_TYPES_SYSTEM_ID
public static final java.lang.String APPINFO_SEARCHSETTING
public static final java.lang.String APPINFO_SEARCHSETTINGS
public static final java.lang.String APPINFO_SETTING
public static final java.lang.String APPINFO_SETTINGS
public static final java.lang.String APPINFO_SOLR_FIELD
public static final java.lang.String APPINFO_SYNCHRONIZATION
public static final java.lang.String APPINFO_SYNCHRONIZATIONS
public static final java.lang.String APPINFO_TAB
public static final java.lang.String APPINFO_TABS
public static final java.lang.String APPINFO_TEMPLATE
public static final java.lang.String APPINFO_TEMPLATES
public static final java.lang.String APPINFO_VALIDATIONRULE
public static final java.lang.String APPINFO_VALIDATIONRULES
public static final java.lang.String APPINFO_VALUE_ADD_TO_CONTENT
public static final java.lang.String APPINFO_VALUE_ADD_TO_PAGE
public static final java.lang.String APPINFO_VISIBILITIES
public static final java.lang.String APPINFO_VISIBILITY
public static final java.lang.String APPINFO_XMLBUNDLE
public static final java.lang.String ATTR_ENABLED
public static final java.lang.String ATTR_ENABLED_BY_DEFAULT
public static final java.lang.String ATTR_USE_ACACIA
public static final java.lang.String ATTRIBUTE_INCLUDE_TYPE_CSS
public static final java.lang.String ATTRIBUTE_INCLUDE_TYPE_JAVASCRIPT
public static final java.lang.String MACRO_PREVIEW_TEMPFILE
public static final java.lang.String N_SETTING
protected static final java.lang.String MESSAGE_VALIDATION_DEFAULT_ERROR
protected static final java.lang.String MESSAGE_VALIDATION_DEFAULT_WARNING
protected CmsDefaultSet<java.lang.String> m_allowedTemplates
protected java.util.Map<java.lang.String,I_CmsComplexWidget> m_complexWidgets
protected java.util.Map<java.lang.String,java.lang.String> m_configurationValues
protected java.util.Set<java.lang.String> m_cssHeadIncludes
protected java.util.Map<java.lang.String,java.lang.String> m_defaultValues
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_elementMappings
protected java.util.Map<java.lang.String,I_CmsWidget> m_elementWidgets
protected CmsFormatterConfiguration m_formatterConfiguration
protected java.util.List<CmsFormatterBean> m_formatters
protected java.util.Set<java.lang.String> m_jsHeadIncludes
protected java.util.List<java.lang.String> m_messageBundleNames
protected java.lang.String m_modelFolder
protected java.lang.String m_previewLocation
protected java.util.Map<java.lang.String,java.lang.Boolean> m_relationChecks
protected java.util.Map<java.lang.String,CmsRelationType> m_relations
protected java.util.Map<java.lang.String,CmsSearchField> m_searchFields
protected java.util.Map<java.lang.String,CmsSearchField> m_searchFieldsPage
protected java.util.Map<java.lang.String,java.lang.Boolean> m_searchSettings
protected org.antlr.stringtemplate.StringTemplateGroup m_searchTemplateGroup
protected java.util.Map<java.lang.String,CmsXmlContentProperty> m_settings
protected java.util.List<java.lang.String> m_synchronizations
protected java.util.List<CmsXmlContentTab> m_tabs
protected java.util.List<java.lang.String> m_titleMappings
protected boolean m_useAcacia
protected java.util.Map<java.lang.String,java.lang.String> m_validationErrorMessages
protected java.util.Map<java.lang.String,java.lang.String> m_validationErrorRules
protected java.util.Map<java.lang.String,java.lang.String> m_validationWarningMessages
protected java.util.Map<java.lang.String,java.lang.String> m_validationWarningRules
public CmsDefaultXmlContentHandler()
public CmsObject createRootCms(CmsObject cms) throws CmsException
cms
- the CMS context to copyCmsException
- if something goes wrongpublic CmsDefaultSet<java.lang.String> getAllowedTemplates()
I_CmsXmlContentHandler
getAllowedTemplates
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getAllowedTemplates()
public I_CmsComplexWidget getComplexWidget(I_CmsXmlSchemaType value)
I_CmsXmlContentHandler
getComplexWidget
in interface I_CmsXmlContentHandler
value
- the schema type for which we want the complex widgetI_CmsXmlContentHandler.getComplexWidget(org.opencms.xml.types.I_CmsXmlSchemaType)
public java.lang.String getConfiguration(I_CmsXmlSchemaType type)
I_CmsXmlContentHandler
If no configuration value is available, this method must return null
.
getConfiguration
in interface I_CmsXmlContentHandler
type
- the value to get the widget configuration forI_CmsXmlContentHandler.getConfiguration(org.opencms.xml.types.I_CmsXmlSchemaType)
public java.lang.String getConfiguration(java.lang.String path)
I_CmsXmlContentHandler
getConfiguration
in interface I_CmsXmlContentHandler
path
- a sub-pathI_CmsXmlContentHandler.getConfiguration(org.opencms.xml.types.I_CmsXmlSchemaType)
public I_CmsXmlContentHandler.DisplayType getConfiguredDisplayType(java.lang.String path, I_CmsXmlContentHandler.DisplayType defaultValue)
I_CmsXmlContentHandler
getConfiguredDisplayType
in interface I_CmsXmlContentHandler
path
- the pathdefaultValue
- the value to return if no configured display type is foundI_CmsXmlContentHandler.getConfiguredDisplayType(java.lang.String, org.opencms.xml.content.I_CmsXmlContentHandler.DisplayType)
public java.util.Set<java.lang.String> getCSSHeadIncludes()
I_CmsXmlContentHandler
getCSSHeadIncludes
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getCSSHeadIncludes()
public java.util.Set<java.lang.String> getCSSHeadIncludes(CmsObject cms, CmsResource resource) throws CmsException
I_CmsXmlContentHandler
getCSSHeadIncludes
in interface I_CmsXmlContentHandler
cms
- the current CMS contextresource
- the resource from which to get the head includesCmsException
- if something goes wrongI_CmsXmlContentHandler.getCSSHeadIncludes(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public java.lang.String getDefault(CmsObject cms, CmsResource resource, I_CmsXmlSchemaType type, java.lang.String path, java.util.Locale locale)
I_CmsXmlContentHandler
If a schema type does not have a default value, this method must return null
.
getDefault
in interface I_CmsXmlContentHandler
cms
- the current users OpenCms contextresource
- the content resourcetype
- the type to get the default forpath
- the element pathlocale
- the currently selected locale for the valueI_CmsXmlContentHandler.getDefault(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.xml.types.I_CmsXmlSchemaType, java.lang.String, java.util.Locale)
public java.lang.String getDefault(CmsObject cms, I_CmsXmlContentValue value, java.util.Locale locale)
I_CmsXmlContentHandler
If a schema type does not have a default value, this method must return null
.
getDefault
in interface I_CmsXmlContentHandler
cms
- the current users OpenCms contextvalue
- the value to get the default forlocale
- the currently selected locale for the valueI_CmsXmlContentHandler.getDefault(org.opencms.file.CmsObject, I_CmsXmlContentValue, java.util.Locale)
public I_CmsComplexWidget getDefaultComplexWidget()
I_CmsXmlContentHandler
getDefaultComplexWidget
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getDefaultComplexWidget()
public java.lang.String getDefaultComplexWidgetClass()
I_CmsXmlContentHandler
getDefaultComplexWidgetClass
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getDefaultComplexWidgetClass()
public java.lang.String getDefaultComplexWidgetConfiguration()
I_CmsXmlContentHandler
getDefaultComplexWidgetConfiguration
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getDefaultComplexWidgetConfiguration()
public I_CmsXmlContentHandler.DisplayType getDisplayType(I_CmsXmlSchemaType type)
I_CmsXmlContentHandler
getDisplayType
in interface I_CmsXmlContentHandler
type
- the value to check the view mode forI_CmsXmlContentHandler.getDisplayType(org.opencms.xml.types.I_CmsXmlSchemaType)
public I_CmsEditHandler getEditHandler()
getEditHandler
in interface I_CmsXmlContentHandler
public java.util.List<I_CmsXmlContentEditorChangeHandler> getEditorChangeHandlers()
I_CmsXmlContentHandler
getEditorChangeHandlers
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getEditorChangeHandlers()
public java.util.Map<java.lang.String,java.lang.String> getFieldHelp()
public java.util.Map<java.lang.String,java.lang.String> getFieldLabels()
public CmsFormatterConfiguration getFormatterConfiguration(CmsObject cms, CmsResource resource)
I_CmsXmlContentHandler
getFormatterConfiguration
in interface I_CmsXmlContentHandler
cms
- the current users OpenCms context, used for selecting the right projectresource
- the resource for which the formatter configuration should be retrievedI_CmsXmlContentHandler.getFormatterConfiguration(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public java.util.Set<java.lang.String> getJSHeadIncludes()
I_CmsXmlContentHandler
getJSHeadIncludes
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getJSHeadIncludes()
public java.util.Set<java.lang.String> getJSHeadIncludes(CmsObject cms, CmsResource resource) throws CmsException
I_CmsXmlContentHandler
getJSHeadIncludes
in interface I_CmsXmlContentHandler
cms
- the current CMS contextresource
- the resource for which the head includes should be retrievedCmsException
- if something goes wrongI_CmsXmlContentHandler.getJSHeadIncludes(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public java.util.List<java.lang.String> getMappings(java.lang.String elementName)
getMappings
in interface I_CmsXmlContentHandler
elementName
- the element xpath to look up the mapping forpublic CmsMultiMessages.I_KeyFallbackHandler getMessageKeyHandler()
I_CmsXmlContentHandler
This is used to automatically provide fallbacks for missing message keys in the editor.
getMessageKeyHandler
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getMessageKeyHandler()
public CmsMessages getMessages(java.util.Locale locale)
I_CmsXmlContentHandler
CmsMessages
that are used to resolve localized keys
for the given locale in this content handler.
If no localized messages are configured for this content handler,
this method returns null
.
getMessages
in interface I_CmsXmlContentHandler
locale
- the locale to get the messages forCmsMessages
that are used to resolve localized keys
for the given locale in this content handlerI_CmsXmlContentHandler.getMessages(java.util.Locale)
public java.lang.String getModelFolder()
I_CmsXmlContentHandler
getModelFolder
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getModelFolder()
public java.util.List<CmsUUID> getNestedFormatters(CmsObject cms, CmsResource res, java.util.Locale locale, javax.servlet.ServletRequest req)
I_CmsXmlContentHandler
getNestedFormatters
in interface I_CmsXmlContentHandler
cms
- the cms contextres
- the resourcelocale
- the content localereq
- the request if availableI_CmsXmlContentHandler.getNestedFormatters(org.opencms.file.CmsObject, org.opencms.file.CmsResource, java.util.Locale, javax.servlet.ServletRequest)
public java.lang.String getParameter(java.lang.String name)
I_CmsXmlContentHandler
getParameter
in interface I_CmsXmlContentHandler
name
- the parameter nameI_CmsXmlContentHandler.getParameter(java.lang.String)
public CmsParameterConfiguration getParameters()
public java.lang.String getPreview(CmsObject cms, CmsXmlContent content, java.lang.String resourcename)
I_CmsXmlContentHandler
If null
is returned, no preview is possible for contents using this handler.
getPreview
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextcontent
- the XML content to display the preview URI forresourcename
- the name in the VFS of the resource that is currently editedI_CmsXmlContentHandler.getPreview(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.lang.String)
@Deprecated public CmsRelationType getRelationType(I_CmsXmlContentValue value)
I_CmsXmlContentHandler
getRelationType
in interface I_CmsXmlContentHandler
value
- the value to get the relation type forI_CmsXmlContentHandler.getRelationType(I_CmsXmlContentValue)
public CmsRelationType getRelationType(java.lang.String xpath)
I_CmsXmlContentHandler
getRelationType
in interface I_CmsXmlContentHandler
xpath
- the path to get the relation type forI_CmsXmlContentHandler.getRelationType(String)
public CmsRelationType getRelationType(java.lang.String xpath, CmsRelationType defaultType)
I_CmsXmlContentHandler
getRelationType
in interface I_CmsXmlContentHandler
xpath
- the path to get the relation type fordefaultType
- the default type if none is setI_CmsXmlContentHandler.getRelationType(java.lang.String, org.opencms.relations.CmsRelationType)
public java.util.Set<CmsSearchField> getSearchFields()
I_CmsXmlContentHandler
getSearchFields
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getSearchFields()
public java.util.Set<CmsSearchField> getSearchFieldsForPage()
I_CmsXmlContentHandler
getSearchFieldsForPage
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getSearchFieldsForPage()
public java.util.Map<java.lang.String,java.lang.Boolean> getSearchSettings()
I_CmsXmlContentHandler
A search setting defined within the xsd:annotaion node of an XML schema definition can look like:
<searchsetting element="Image/Align" searchContent="false"/>
The returned map contains the 'element' attribute value as keys and the 'searchContent' attribute value as values.
getSearchSettings
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getSearchSettings()
public java.util.Map<java.lang.String,CmsXmlContentProperty> getSettings(CmsObject cms, CmsResource resource)
I_CmsXmlContentHandler
getSettings
in interface I_CmsXmlContentHandler
cms
- the current CMS contextresource
- the resource for which to get the setting definitionsI_CmsXmlContentHandler.getSettings(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public java.util.List<java.lang.String> getSynchronizations()
I_CmsXmlContentHandler
getSynchronizations
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getSynchronizations()
public java.util.List<CmsXmlContentTab> getTabs()
I_CmsXmlContentHandler
getTabs
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.getTabs()
public java.lang.String getTitleMapping(CmsObject cms, CmsXmlContent document, java.util.Locale locale)
I_CmsXmlContentHandler
getTitleMapping
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextdocument
- the XML content to get the title mapping for (this must be of a type that uses this handler)locale
- the locale to get the title mapping forI_CmsXmlContentHandler.getTitleMapping(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.util.Locale)
public I_CmsComplexWidget getUnconfiguredComplexWidget(java.lang.String path)
I_CmsXmlContentHandler
getUnconfiguredComplexWidget
in interface I_CmsXmlContentHandler
path
- the value pathI_CmsXmlContentHandler.getUnconfiguredComplexWidget(java.lang.String)
public I_CmsWidget getUnconfiguredWidget(java.lang.String path)
I_CmsXmlContentHandler
getUnconfiguredWidget
in interface I_CmsXmlContentHandler
path
- the sub-pathI_CmsXmlContentHandler.getUnconfiguredWidget(java.lang.String)
@Deprecated public I_CmsWidget getWidget(I_CmsXmlSchemaType value)
I_CmsXmlContentHandler
The handler implementations should use the "appinfo" node of the XML content definition schema to define the mappings of elements to widgets.
getWidget
in interface I_CmsXmlContentHandler
value
- the XML content value to get the widget forI_CmsXmlContentHandler.getWidget(org.opencms.xml.types.I_CmsXmlSchemaType)
public boolean hasModifiableFormatters()
I_CmsXmlContentHandler
hasModifiableFormatters
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.hasModifiableFormatters()
public boolean hasNestedFormatters()
I_CmsXmlContentHandler
hasNestedFormatters
in interface I_CmsXmlContentHandler
true
if there are nested formatters configured for this content typeI_CmsXmlContentHandler.hasNestedFormatters()
public boolean hasSynchronizedElements()
I_CmsXmlContentHandler
hasSynchronizedElements
in interface I_CmsXmlContentHandler
true
if there are locale synchronized elements configuredI_CmsXmlContentHandler.hasSynchronizedElements()
public boolean hasVisibilityHandlers()
I_CmsXmlContentHandler
hasVisibilityHandlers
in interface I_CmsXmlContentHandler
true
if there are visibility handlers configured for this content typeI_CmsXmlContentHandler.hasVisibilityHandlers()
public void initialize(org.dom4j.Element appInfoElement, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
I_CmsXmlContentHandler
initialize
in interface I_CmsXmlContentHandler
appInfoElement
- the "appinfo" element root node to analyzecontentDefinition
- the XML content definition that XML content handler belongs toCmsXmlException
- if something goes wrongI_CmsXmlContentHandler.initialize(org.dom4j.Element, org.opencms.xml.CmsXmlContentDefinition)
public void invalidateBrokenLinks(CmsObject cms, CmsXmlContent document)
I_CmsXmlContentHandler
The main difference to the I_CmsXmlContentHandler.resolveValidation(CmsObject, I_CmsXmlContentValue, CmsXmlContentErrorHandler)
method is that this method may silently remove some values, for instance, for broken links.
invalidateBrokenLinks
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextdocument
- the document to resolve the check rules forI_CmsXmlContentHandler.invalidateBrokenLinks(CmsObject, CmsXmlContent)
public boolean isAcaciaEditorDisabled()
isAcaciaEditorDisabled
in interface I_CmsXmlContentHandler
public boolean isContainerPageOnly()
I_CmsXmlContentHandler
true
if the XML content should be indexed when it is dropped in a container page,
and returns false
if this XML content should be indexed as 'stand-alone' document.This flag is intended by excluding XML contents from the search index that are not used as detail pages, but to index those extraction result when they are part of a container page.
In order to set this falg add an attribute containerpageOnly="true"
to the
'<searchsettings>-node'
of the XSD of the resource type you want to be indexed only
when it is part of a container page.
isContainerPageOnly
in interface I_CmsXmlContentHandler
I_CmsXmlContentHandler.isContainerPageOnly()
public boolean isSearchable(I_CmsXmlContentValue value)
I_CmsXmlContentHandler
true
in case the given value should be searchable with
the integrated full text search.For the full text search, the value of all elements in one locale of the XML content are combined to one big text, which is referred to as the "content" in the context of the full text search. With this option, it is possible to hide certain elements from this "content" that does not make sense to include in the full text search.
isSearchable
in interface I_CmsXmlContentHandler
value
- the XML content value to checktrue
in case the given value should be searchableI_CmsXmlContentHandler.isSearchable(org.opencms.xml.types.I_CmsXmlContentValue)
public boolean isValueVisible(CmsObject cms, I_CmsXmlSchemaType value, java.lang.String elementName, java.lang.String params, CmsResource resource, java.util.Locale contentLocale)
This implementation will be used as default if no other org.opencms.xml.content.I_CmsXmlContentVisibilityHandler is configured.
Only users that are member in one of the specified groups will be allowed to view and edit the given content field.
The parameter should contain a '|' separated list of group names.
isValueVisible
in interface I_CmsXmlContentVisibilityHandler
cms
- the cms contextvalue
- the content valueelementName
- the path to the elementparams
- configuration parametersresource
- the edited resourcecontentLocale
- the locale being editedtrue
if the given content value field should be visible to the current userI_CmsXmlContentVisibilityHandler.isValueVisible(org.opencms.file.CmsObject, org.opencms.xml.types.I_CmsXmlSchemaType, java.lang.String, java.lang.String, org.opencms.file.CmsResource, java.util.Locale)
public boolean isVisible(CmsObject cms, I_CmsXmlSchemaType contentValue, java.lang.String valuePath, CmsResource resource, java.util.Locale contentLocale)
I_CmsXmlContentHandler
isVisible
in interface I_CmsXmlContentHandler
cms
- the cms contextcontentValue
- the content value typevaluePath
- the value pathresource
- the edited resourcecontentLocale
- the content localetrue
if the given content field should be visible to the current userI_CmsXmlContentHandler.isVisible(org.opencms.file.CmsObject, org.opencms.xml.types.I_CmsXmlSchemaType, java.lang.String, org.opencms.file.CmsResource, java.util.Locale)
public CmsXmlContent prepareForUse(CmsObject cms, CmsXmlContent content)
I_CmsXmlContentHandler
This method is always called after any content is unmarshalled. It can be used to perform customized actions on the given XML content.
prepareForUse
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextcontent
- the XML content to be used as read from the VFSI_CmsXmlContentHandler.prepareForUse(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent)
public CmsFile prepareForWrite(CmsObject cms, CmsXmlContent content, CmsFile file) throws CmsException
I_CmsXmlContentHandler
This method is always called before any content gets written. It can be used to perform XML validation, pretty - printing or customized actions on the given XML content.
prepareForWrite
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextcontent
- the XML content to be writtenfile
- the resource the XML content in it's current state was unmarshalled fromCmsException
- in case something goes wrongI_CmsXmlContentHandler.prepareForWrite(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, org.opencms.file.CmsFile)
public void resolveMapping(CmsObject cms, CmsXmlContent content, I_CmsXmlContentValue value) throws CmsException
I_CmsXmlContentHandler
resolveMapping
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextcontent
- the XML content to resolve the mappings forvalue
- the value to resolve the mappings forCmsException
- if something goes wrongI_CmsXmlContentHandler.resolveMapping(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, org.opencms.xml.types.I_CmsXmlContentValue)
public CmsXmlContentErrorHandler resolveValidation(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
I_CmsXmlContentHandler
The errorHandler parameter is optional, if null
is given a new error handler
instance must be created.
resolveValidation
in interface I_CmsXmlContentHandler
cms
- the current OpenCms user contextvalue
- the value to resolve the validation rules forerrorHandler
- (optional) an error handler instance that contains previous error or warningsI_CmsXmlContentHandler.resolveValidation(org.opencms.file.CmsObject, org.opencms.xml.types.I_CmsXmlContentValue, org.opencms.xml.content.CmsXmlContentErrorHandler)
protected void addCheckRule(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String invalidate, java.lang.String type) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to add the rule toinvalidate
- false
, to disable link check /
true
or node
, to invalidate just the single node if the link is broken /
parent
, if this rule will invalidate the whole parent node in nested contenttype
- the relation typeCmsXmlException
- in case an unknown element name is usedprotected void addConfiguration(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String configurationValue) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element nameconfigurationValue
- the configuration value to useCmsXmlException
- in case an unknown element name is usedprotected void addDefault(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String defaultValue, java.lang.String resolveMacrosValue) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to mapdefaultValue
- the default value to useresolveMacrosValue
- the value of the 'resolveMacros' attributeCmsXmlException
- in case an unknown element name is usedprotected void addDefaultCheckRules(CmsXmlContentDefinition rootContentDefinition, I_CmsXmlSchemaType schemaType, java.lang.String elementPath) throws CmsXmlException
rootContentDefinition
- the root content definitionschemaType
- the schema type to checkelementPath
- the current element pathCmsXmlException
- if something goes wrongprotected void addDisplayType(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, I_CmsXmlContentHandler.DisplayType displayType) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element namedisplayType
- the display type to use for the element widgetCmsXmlException
- in case an unknown element name is usedprotected void addMapping(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String mapping, java.lang.String useDefault) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to mapmapping
- the mapping to useuseDefault
- the 'useDefault' attributeCmsXmlException
- in case an unknown element name is usedprotected void addNestedFormatter(java.lang.String elementName, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
elementName
- the element namecontentDefinition
- the content definitionCmsXmlException
- in case something goes wrong@Deprecated protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field)
contentDefinition
- the XML content definition this XML content handler belongs tofield
- the Solr fieldprotected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field, I_CmsXmlContentHandler.MappingType type)
contentDefinition
- the XML content definition this XML content handler belongs tofield
- the Solr fieldtype
- the type, specifying if the field should be attached to the document of the XML content or to all container pages the content is placed onprotected void addSearchSetting(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.Boolean value) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to mapvalue
- the search setting value to storeCmsXmlException
- in case an unknown element name is usedprotected void addSimpleSearchSetting(CmsXmlContentDefinition contentDef, java.lang.String name, java.lang.String value) throws CmsXmlException
contentDef
- the content definitionname
- the element namevalue
- the search setting valueCmsXmlException
- if something goes wrongprotected void addValidationRule(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String regex, java.lang.String message, boolean isWarning) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to add the rule toregex
- the validation rule regular expressionmessage
- the message in case validation fails (may be null)isWarning
- if true, this rule is used for warnings, otherwise it's an errorCmsXmlException
- in case an unknown element name is usedprotected void addWidget(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String widgetClassOrAlias) throws CmsXmlException
contentDefinition
- the XML content definition this XML content handler belongs toelementName
- the element name to mapwidgetClassOrAlias
- the widget to use as GUI for the element (registered alias or class name)CmsXmlException
- in case an unknown element name is usedprotected CmsDefaultXmlContentHandler.VisibilityConfiguration createVisibilityConfiguration(java.lang.String className, java.lang.String params)
className
- the visibility handler class nameparams
- the parameters for the visibilityprotected java.util.List<java.util.Locale> getLocalesForResource(CmsObject cms, java.lang.String resource)
cms
- the cms contextresource
- the resource path to get the default locales forprotected java.lang.String getReferencePath(CmsObject cms, I_CmsXmlContentValue value)
cms
- the cms contextvalue
- the xml content valueprotected java.lang.String getValidationMessage(CmsObject cms, I_CmsXmlContentValue value, java.lang.String regex, java.lang.String valueStr, boolean matchResult, boolean isWarning)
cms
- the current users OpenCms contextvalue
- the value to validateregex
- the rule that was violatedvalueStr
- the string value of the given valuematchResult
- if false, the rule was negatedisWarning
- if true, this validation indicate a warning, otherwise an errorprotected void init()
protected void initDefaultValues(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Using the default values from the appinfo node, it's possible to have more sophisticated logic for generating the defaults then just using the XML schema "default" attribute.
root
- the "defaults" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the default values belong toCmsXmlException
- if something goes wrongprotected void initDefaultWidget(org.dom4j.Element element)
element
- the element in which the default complex widget is configuredprotected void initEditHandler(org.dom4j.Element handlerElement)
handlerElement
- the edit handler elementprotected void initEditorChangeHandlers(org.dom4j.Element element)
element
- the editorchangehandlers node of the app infoprotected void initField(org.dom4j.Element elem, CmsXmlContentDefinition contentDef) throws CmsXmlException
elem
- the parent elementcontentDef
- the content definitionCmsXmlException
- if something goes wrongprotected void initFields(org.dom4j.Element parent, CmsXmlContentDefinition contentDef) throws CmsXmlException
parent
- the parent elementcontentDef
- the content definitionCmsXmlException
- if something goes wrongprotected void initFormatters(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the "formatters" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the formatters belong toprotected void initHeadIncludes(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the "headincludes" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the head-includes belong toprotected void initLayouts(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Unless otherwise instructed, the editor uses one specific GUI widget for each
XML value schema type. For example, for a CmsXmlStringValue
the default widget is the CmsInputWidget
.
However, certain values can also use more then one widget, for example you may
also use a CmsCheckboxWidget
for a String value,
and as a result the Strings possible values would be either "false"
or "true"
,
but nevertheless be a String.
The widget to use can further be controlled using the widget
attribute.
You can specify either a valid widget alias such as StringWidget
,
or the name of a Java class that implements
.I_CmsWidget
Configuration options to the widget can be passed using the configuration
attribute. You can specify any String as configuration. This String is then passed
to the widget during initialization. It's up to the individual widget implementation
to interpret this configuration String.
root
- the "layouts" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the layout belongs toCmsXmlException
- if something goes wrongprotected void initMappings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Element mappings allow storing values from the XML content in other locations. For example, if you have an element called "Title", it's likely a good idea to store the value of this element also in the "Title" property of a XML content resource.
root
- the "mappings" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the mappings belong toCmsXmlException
- if something goes wrongprotected void initModelFolder(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
root
- the "modelfolder" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the model folder belongs toCmsXmlException
- if something goes wrongprotected void initNestedFormatters(org.dom4j.Element element, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
element
- the formatters elementcontentDefinition
- the content definitionCmsXmlException
- in case something goes wronprotected void initParameters(org.dom4j.Element root)
root
- the parameter root elementprotected void initPreview(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
root
- the "preview" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the validation rules belong toCmsXmlException
- if something goes wrongprotected void initRelations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
OpenCms performs link checks for all OPTIONAL links defined in XML content values of type OpenCmsVfsFile. However, for most projects in the real world a more fine-grained control over the link check process is required. For these cases, individual relation behavior can be defined for the appinfo node.
Additional here can be defined an optional type for the relations, for instance.
root
- the "relations" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the check rules belong toCmsXmlException
- if something goes wrongprotected void initResourceBundle(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition, boolean single) throws CmsXmlException
root
- the "resourcebundle" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the validation rules belong tosingle
- if true
we process the classic sinle line entry, otherwise it's the multiple line settingCmsXmlException
- if something goes wrongprotected void initSearchSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
For the full text search, the value of all elements in one locale of the XML content are combined to one big text, which is referred to as the "content" in the context of the full text search. With this option, it is possible to hide certain elements from this "content" that does not make sense to include in the full text search.
root
- the "searchsettings" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the default values belong toCmsXmlException
- if something goes wrongprotected void initSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the "settings" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the element settings belong toprotected void initSynchronizations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the synchronizations element of the content schema appinfo.contentDefinition
- the content definitionprotected void initTabs(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the "tabs" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the tabs belong toprotected void initTemplates(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the root XML elementcontentDefinition
- the content definitionprotected void initValidationRules(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
OpenCms always performs XML schema validation for all XML contents. However, for most projects in the real world a more fine-grained control over the validation process is required. For these cases, individual validation rules can be defined for the appinfo node.
root
- the "validationrules" element from the appinfo node of the XML content definitioncontentDefinition
- the content definition the validation rules belong toCmsXmlException
- if something goes wrongprotected void initVisibilities(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
root
- the visibilities appinfo elementcontentDefinition
- the content definitionprotected boolean isInvalidateParent(java.lang.String xpath)
xpath
- the path to get the check rule forprotected java.lang.String key(java.lang.String keyName, java.util.Locale locale)
If the key was not found in the configured bundle, or no bundle is configured for this
content handler, the return value is
"??? " + keyName + " ???"
.
keyName
- the key for the desired stringlocale
- the locale to get the key fromCmsMessages.formatUnknownKey(String)
,
CmsMessages.isUnknownKey(String)
protected java.util.Set<I_CmsXmlContentHandler.MappingType> parseSearchMappingTypes(org.dom4j.Element solrElement)
solrElement
- the XML node of the <solrfield> nodeprotected void removeEmptyMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
cms
- the current users OpenCms contextfile
- the file which is currently being prepared for writingcontent
- the XML content to remove the property values forCmsException
- in case of read/write errors accessing the OpenCms VFSprotected void resolveDefaultMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
cms
- the CMS context to usefile
- the content filecontent
- the content objectCmsException
- if something goes wrongprotected void validateAppinfoElement(org.dom4j.Element appinfoElement) throws CmsXmlException
appinfo
element node from the XML content definition schema
is valid according the the capabilities of this content handler.appinfoElement
- the appinfo
element node to validateCmsXmlException
- in case the element validation failsprotected CmsXmlContentErrorHandler validateCategories(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
null
is given a new error handler
instance must be created.cms
- the current OpenCms user contextvalue
- the value to resolve the validation rules forerrorHandler
- (optional) an error handler instance that contains previous error or warningsprotected boolean validateLink(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
cms
- the current users OpenCms contextvalue
- the value to validateerrorHandler
- the error handler to use in case errors or warnings are detectedprotected CmsXmlContentErrorHandler validateValue(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler, java.util.Map<java.lang.String,java.lang.String> rules, boolean isWarning)
cms
- the current users OpenCms contextvalue
- the value to validateerrorHandler
- the error handler to use in case errors or warnings are detectedrules
- the rules to validate the value againstisWarning
- if true, this validation should be stored as a warning, otherwise as an errorprotected CmsXmlContentErrorHandler validateValue(CmsObject cms, I_CmsXmlContentValue value, java.lang.String valueStr, CmsXmlContentErrorHandler errorHandler, boolean isWarning)
These rules should only be tested if this is not a test for warnings.
cms
- the current users OpenCms contextvalue
- the value to validatevalueStr
- the string value of the given valueerrorHandler
- the error handler to use in case errors or warnings are detectedisWarning
- if true, this validation should be stored as a warning, otherwise as an errorprotected CmsFile writeCategories(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
cms
- the cms contextfile
- the filecontent
- the xml content to set the categories forCmsException
- if something goes wrong