Class CmsDefaultXmlContentHandler
- java.lang.Object
-
- org.opencms.xml.content.CmsDefaultXmlContentHandler
-
- All Implemented Interfaces:
I_CmsXmlContentHandler,I_CmsXmlContentVisibilityHandler
- Direct Known Subclasses:
CmsCategoryXmlContentHandler,CmsHtmlRedirectHandler,CmsListConfigContentHandler,CmsXmlContainerPageHandler,CmsXmlDynamicFunctionHandler,CmsXmlGroupContainerHandler,CmsXmlInheritGroupContainerHandler
public class CmsDefaultXmlContentHandler extends java.lang.Object implements I_CmsXmlContentHandler, I_CmsXmlContentVisibilityHandler
Default implementation for the XML content handler, will be used by all XML contents that do not provide their own handler.- Since:
- 6.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCmsDefaultXmlContentHandler.InvalidRelationActionEnum for IfInvalidRelation field setting values.protected static classCmsDefaultXmlContentHandler.VisibilityConfigurationContains the visibility handler configuration for a content field path.-
Nested classes/interfaces inherited from interface org.opencms.xml.content.I_CmsXmlContentHandler
I_CmsXmlContentHandler.DisplayType, I_CmsXmlContentHandler.JsonRendererSettings, I_CmsXmlContentHandler.MappingType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringA_CONFIGURATIONAttribute name for configuration string.static java.lang.StringAPPINFO_APPINFOConstant for the "appinfo" element name itself.static java.lang.StringAPPINFO_ATTR_ADD_TOConstant for the "addto" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_BOOSTConstant for the "boost" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_CLASSConstant for the "class" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_COLLAPSEConstant for the "collapse" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_CONFIGURATIONConstant for the "configuration" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_CONTAINER_PAGE_ONLYThe exclude from index attribute.static java.lang.StringAPPINFO_ATTR_COPY_FIELDSConstant for the "copyfields" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_DEFAULTConstant for the "default" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_DESCRIPTIONConstant for the "description" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_DISPLAYConstant for the "displaycompact" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_ELEMENTConstant for the "element" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_ERRORConstant for the "error" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_INVALIDATEConstant for the "invalidate" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_KEYConstant for the "key" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_LOCALEConstant for the "locale" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_MAPPINGConstant for the "mapping" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_MAPTOConstant for the "mapto" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_MAXWIDTHConstant for the "maxwidth" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_MESSAGEConstant for the "message" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_MINWIDTHConstant for the "minwidth" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_NAMEConstant for the "name" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_NICE_NAMEConstant for the "nice-name" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_PARAMSConstant for the "params" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_PREVIEWConstant for the "preview" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_REGEXConstant for the "regex" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_RESOLVE_MACROSConstant for the "resolveMacros" attribute name.static java.lang.StringAPPINFO_ATTR_RULE_REGEXConstant for the "rule-regex" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_RULE_TYPEConstant for the "rule-type" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_SCOPEConstant for the "scope" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_SEARCHCONTENTConstant for the "searchcontent" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_SELECT_INHERITConstant for the "select-inherit" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_SOURCE_FIELDConstant for the "sourcefield" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_TARGET_FIELDConstant for the "targetfield" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_TYPEConstant for the "type" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_TYPE_NODEConstant for the "node" appinfo attribute value.static java.lang.StringAPPINFO_ATTR_TYPE_PARENTConstant for the "parent" appinfo attribute value.static java.lang.StringAPPINFO_ATTR_TYPE_WARNINGConstant for the "warning" appinfo attribute value.static java.lang.StringAPPINFO_ATTR_URIConstant for the "uri" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_USEALLConstant for the "useall" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_VALUEConstant for the "value" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_WIDGETConstant for the "widget" appinfo attribute name.static java.lang.StringAPPINFO_ATTR_WIDGET_CONFIGConstant for the "widget-config" appinfo attribute name.static java.lang.StringAPPINFO_ATTRIBUTE_TYPE_CSSConstant for formatter include resource type 'CSS'.static java.lang.StringAPPINFO_ATTRIBUTE_TYPE_JAVASCRIPTConstant for formatter include resource type 'JAVASCRIPT'.static java.lang.StringAPPINFO_BUNDLEConstant for the "bundle" appinfo element name.static java.lang.StringAPPINFO_DEFAULTConstant for the "default" appinfo element name.static java.lang.StringAPPINFO_DEFAULTSConstant for the "defaults" appinfo element name.static java.lang.StringAPPINFO_EDIT_HANDLERConstant for the "edithandler" appinfo element name.static java.lang.StringAPPINFO_EDITOR_CHANGE_HANDLERConstant for the "editorchangehandler" appinfo element name.static java.lang.StringAPPINFO_EDITOR_CHANGE_HANDLERSConstant for the "editorchangehandlers" appinfo element name.static java.lang.StringAPPINFO_FORBIDDEN_CONTEXTSConstant for the "forbidden-contexts" appinfo attribute name.static java.lang.StringAPPINFO_FORMATTERConstant for the "formatter" appinfo element name.static java.lang.StringAPPINFO_FORMATTERSConstant for the "formatters" appinfo element name.static java.lang.StringAPPINFO_GEOMAPPINGConstant for the 'geomapping' node.static java.lang.StringAPPINFO_HEAD_INCLUDEConstant for the "headinclude" appinfo element name.static java.lang.StringAPPINFO_HEAD_INCLUDESConstant for the "headincludes" appinfo element name.static java.lang.StringAPPINFO_LAYOUTConstant for the "layout" appinfo element name.static java.lang.StringAPPINFO_LAYOUTSConstant for the "layouts" appinfo element name.static java.lang.StringAPPINFO_MAPPINGConstant for the "mapping" appinfo element name.static java.lang.StringAPPINFO_MAPPINGSConstant for the "mappings" appinfo element name.static java.lang.StringAPPINFO_MESSAGEKEYHANDLERConstant for the 'messagekeyhandler' node.static java.lang.StringAPPINFO_MODELFOLDERConstant for the "modelfolder" appinfo element name.static java.lang.StringAPPINFO_NESTED_FORMATTERConstant for the "nestedformatter" appinfo element name.static java.lang.StringAPPINFO_NESTED_FORMATTERSConstant for the "nestedformatters" appinfo element name.static java.lang.StringAPPINFO_PARAMConstant for the "param" appinfo attribute name.static java.lang.StringAPPINFO_PARAMETERSConstant for the "parameters" appinfo element name.static java.lang.StringAPPINFO_PREVIEWConstant for the "preview" appinfo element name.static java.lang.StringAPPINFO_PROPERTYBUNDLEConstant for the "propertybundle" appinfo element name.static java.lang.StringAPPINFO_RELATIONConstant for the "relation" appinfo element name.static java.lang.StringAPPINFO_RELATIONSConstant for the "relations" appinfo element name.static java.lang.StringAPPINFO_RESOURCEConstant for the "resource" appinfo element name.static java.lang.StringAPPINFO_RESOURCEBUNDLEConstant for the "resourcebundle" appinfo element name.static java.lang.StringAPPINFO_RESOURCEBUNDLESConstant for the "resourcebundles" appinfo element name.static java.lang.StringAPPINFO_REVERSE_MAPPING_ENABLEDConstant for the reverse-mapping-enabled appinfo element name.static java.lang.StringAPPINFO_RULEConstant for the "rule" appinfo element name.static java.lang.StringAPPINFO_SCHEMA_FILEThe file where the default appinfo schema is located.static java.lang.StringAPPINFO_SCHEMA_FILE_TYPESThe file where the default appinfo schema types are located.static java.lang.StringAPPINFO_SCHEMA_SYSTEM_IDThe XML system id for the default appinfo schema types.static java.lang.StringAPPINFO_SCHEMA_TYPES_SYSTEM_IDThe XML system id for the default appinfo schema types.static java.lang.StringAPPINFO_SEARCHSETTINGConstant for the "searchsetting" appinfo element name.static java.lang.StringAPPINFO_SEARCHSETTINGSConstant for the "searchsettings" appinfo element name.static java.lang.StringAPPINFO_SETTINGConstant for the "setting" appinfo element name.static java.lang.StringAPPINFO_SETTINGSConstant for the "settings" appinfo element name.static java.lang.StringAPPINFO_SOLR_FIELDConstant for the "solrfield" appinfo element name.static java.lang.StringAPPINFO_SYNCHRONIZATIONConstant for the "synchronization" appinfo element name.static java.lang.StringAPPINFO_SYNCHRONIZATIONSConstant for the "synchronizations" appinfo element name.static java.lang.StringAPPINFO_TABConstant for the "tab" appinfo element name.static java.lang.StringAPPINFO_TABSConstant for the "tabs" appinfo element name.static java.lang.StringAPPINFO_TEMPLATENode name.static java.lang.StringAPPINFO_TEMPLATESNode name.static java.lang.StringAPPINFO_VALIDATIONRULEConstant for the "validationrule" appinfo element name.static java.lang.StringAPPINFO_VALIDATIONRULESConstant for the "validationrules" appinfo element name.static java.lang.StringAPPINFO_VALUE_ADD_TO_CONTENTConstant for the "element" value of the appinfo attribute "addto".static java.lang.StringAPPINFO_VALUE_ADD_TO_PAGEConstant for the "page" value of the appinfo attribute "addto".static java.lang.StringAPPINFO_VISIBILITIESConstant for the "visibilities" appinfo element name.static java.lang.StringAPPINFO_VISIBILITYConstant for the "visibility" appinfo element name.static java.lang.StringAPPINFO_XMLBUNDLEConstant for the "xmlbundle" appinfo element name.static java.lang.StringATTR_ENABLEDAttribute name.static java.lang.StringATTR_ENABLED_BY_DEFAULTAttribute name.static java.lang.StringATTR_USE_ACACIAAttribute name.static java.lang.StringATTRIBUTE_INCLUDE_TYPE_CSSConstant for head include type attribute: CSS.static java.lang.StringATTRIBUTE_INCLUDE_TYPE_JAVASCRIPTConstant for head include type attribute: java-script.static java.lang.StringGEOMAPPING_FIELDField for mapping geo-coordinates.protected CmsDefaultSet<java.lang.String>m_allowedTemplatesThe set of allowed templates.protected java.util.Map<java.lang.String,java.lang.String>m_configurationValuesThe configuration values for the element widgets (as defined in the annotations).protected java.util.Set<java.lang.String>m_cssHeadIncludesThe CSS resources to include into the html-page head.protected java.util.Map<java.lang.String,java.lang.String>m_defaultValuesThe default values for the elements (as defined in the annotations).protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>m_elementMappingsThe element mappings (as defined in the annotations).protected CmsFormatterConfigurationm_formatterConfigurationThe formatter configuration.protected java.util.List<CmsFormatterBean>m_formattersThe list of formatters from the XSD.protected java.util.List<CmsGeoMappingConfiguration.Entry>m_geomappingEntriesThe configured geo-coordinate mapping configuration entries.protected java.util.Map<java.lang.String,CmsDefaultXmlContentHandler.InvalidRelationAction>m_invalidRelationActionsRelation actions.protected java.util.Set<java.lang.String>m_jsHeadIncludesThe java-script resources to include into the html-page head.protected java.util.List<java.lang.String>m_messageBundleNamesThe resource bundle name to be used for localization of this content handler.protected java.lang.Stringm_modelFolderThe folder containing the model file(s) for the content.protected java.lang.Stringm_previewLocationThe preview location (as defined in the annotations).protected java.lang.Stringm_primaryGeomappingFieldName of the field used for geo-coordinate mapping.protected java.util.Map<java.lang.String,java.lang.Boolean>m_relationChecksThe relation check rules.protected java.util.Map<java.lang.String,CmsRelationType>m_relationsThe relation check rules.protected java.util.Map<java.lang.String,CmsSearchField>m_searchFieldsThe Solr field configurations.protected java.util.Map<java.lang.String,CmsSearchField>m_searchFieldsPageThe Solr field configurations added to the container pages contents are on.protected java.util.Map<java.lang.String,I_CmsXmlContentValue.SearchContentType>m_searchSettingsThe search settings.protected org.antlr.stringtemplate.StringTemplateGroupm_searchTemplateGroupString template group for the simple search setting expansions.protected java.util.Map<java.lang.String,CmsXmlContentProperty>m_settingsThe configured settings for the formatters (as defined in the annotations).protected java.util.List<java.lang.String>m_synchronizationsThe configured locale synchronization elements.protected java.util.List<CmsXmlContentTab>m_tabsThe configured tabs.protected java.util.List<java.lang.String>m_titleMappingsThe list of mappings to the "Title" property.protected booleanm_useAcaciaFlag which controls whether the Acacia editor should be disabled for this type.protected java.util.Map<java.lang.String,java.lang.String>m_validationErrorMessagesThe messages for the error validation rules.protected java.util.Map<java.lang.String,java.lang.String>m_validationErrorRulesThe validation rules that cause an error (as defined in the annotations).protected java.util.Map<java.lang.String,java.lang.String>m_validationWarningMessagesThe messages for the warning validation rules.protected java.util.Map<java.lang.String,java.lang.String>m_validationWarningRulesThe validation rules that cause a warning (as defined in the annotations).static java.lang.StringMACRO_PREVIEW_TEMPFILEMacro for resolving the preview URI.protected static java.lang.StringMESSAGE_VALIDATION_DEFAULT_ERRORDefault message for validation errors.protected static java.lang.StringMESSAGE_VALIDATION_DEFAULT_WARNINGDefault message for validation warnings.static java.lang.StringN_CHANGEHANDLERNode name for change handler.static java.lang.StringN_SETTINGConstant for the 'Setting' node name.-
Fields inherited from interface org.opencms.xml.content.I_CmsXmlContentHandler
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 Summary
Constructors Constructor Description CmsDefaultXmlContentHandler()Creates a new instance of the default XML content handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddCheckRule(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String invalidate, java.lang.String type)Adds a check rule for a specified element.protected voidaddConfiguration(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String configurationValue)Adds a configuration value for an element widget.protected voidaddDefault(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String defaultValue, java.lang.String resolveMacrosValue)Adds a default value for an element.protected voidaddDefaultCheckRules(CmsXmlContentDefinition rootContentDefinition, I_CmsXmlSchemaType schemaType, java.lang.String elementPath)Adds all needed default check rules recursively for the given schema type.protected voidaddDisplayType(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, I_CmsXmlContentHandler.DisplayType displayType)Adds the given element to the compact view set.protected voidaddGeoMappingField()Finally adds the field used for geo-coordinate mapping by combining the configuration from the geomapping section and the field settings.protected voidaddMapping(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String mapping, java.lang.String useDefault)Adds an element mapping.protected voidaddNestedFormatter(java.lang.String elementName, CmsXmlContentDefinition contentDefinition)Adds a nested formatter element.protected voidaddSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field)Deprecated.protected voidaddSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field, I_CmsXmlContentHandler.MappingType type)Adds a Solr field for an element.protected voidaddSearchSetting(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, I_CmsXmlContentValue.SearchContentType value)Adds a search setting for an element.protected voidaddSimpleSearchSetting(CmsXmlContentDefinition contentDef, java.lang.String name, java.lang.String value)Adds search settings as defined by 'simple' syntax in fields.protected voidaddValidationRule(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 voidaddWidget(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String name)Adds a GUI widget for a specified element.booleanapplyReverseAvailabilityMapping(CmsObject cms, CmsXmlContent content, CmsMappingResolutionContext.AttributeType attr, java.util.List<java.util.Locale> resourceLocales, long valueToSet)Writes an availability date back to the content, if a mapping is defined for it.booleancanUseReverseAvailabilityMapping(CmsMappingResolutionContext.AttributeType attr)Checks if an availability attribute should be written back to the content if the availability is changed through the availability dialog.CmsObjectcreateRootCms(CmsObject cms)Copies a given CMS context and set the copy's site root to '/'.protected CmsDefaultXmlContentHandler.VisibilityConfigurationcreateVisibilityConfiguration(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.protected org.opencms.xml.content.CmsDefaultXmlContentHandler.MappingInfogetAttributeMapping(CmsMappingResolutionContext.AttributeType attr)Returns information about the availability mapping for the given availability attribute.java.util.List<CmsChangeHandlerConfig>getChangeHandlerConfigs()Gets the list of change handler configurations.I_CmsComplexWidgetgetComplexWidget(CmsObject cms, java.lang.String path)Gets the unconfigured complex widget defined for the given path.java.lang.StringgetConfiguration(java.lang.String path)Gets the widget configuration for the given sub-path.java.lang.StringgetConfiguration(I_CmsXmlSchemaType type)Returns the configuration String value for the widget used to edit the given XML content schema type.I_CmsXmlContentHandler.DisplayTypegetConfiguredDisplayType(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.StringgetDefault(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.StringgetDefault(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_CmsComplexWidgetgetDefaultComplexWidget()Gets the default complex widget to be used for this type.java.lang.StringgetDefaultComplexWidgetClass()Gets the default complex widget class name configured for this type.java.lang.StringgetDefaultComplexWidgetConfiguration()Gets the default complex widget configuration string configured for this type.I_CmsXmlContentHandler.DisplayTypegetDisplayType(I_CmsXmlSchemaType type)Returns if the widget for this type should be displayed in compact view.I_CmsEditHandlergetEditHandler()Returns the edit handler if configured.java.util.List<I_CmsXmlContentEditorChangeHandler>getEditorChangeHandlers(boolean selfOnly)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.CmsFormatterConfigurationgetFormatterConfiguration(CmsObject cms, CmsResource resource)Returns the container page element formatter configuration for a given resource.CmsGeoMappingConfigurationgetGeoMappingConfiguration()Gets the geo mapping configuration.CmsDefaultXmlContentHandler.InvalidRelationActiongetInvalidRelationAction(java.lang.String name)Gets the action to perform if the given name refers to a link field which refers to a VFS file that no longer exists.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.I_CmsXmlContentHandler.JsonRendererSettingsgetJsonRendererSettings()Gets the JSON renderer settings.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.Map<java.lang.String,java.util.List<java.lang.String>>getMappings()Gets the mappings defined in the schema.java.util.List<java.lang.String>getMappings(java.lang.String elementName)Returns the all mappings defined for the given element xpath.CmsMultiMessages.I_KeyFallbackHandlergetMessageKeyHandler()Gets the message key fallback handler.CmsMessagesgetMessages(java.util.Locale locale)Returns theCmsMessagesthat are used to resolve localized keys for the given locale in this content handler.java.lang.StringgetModelFolder()Returns the folder name that contains eventual XML content model files to use for this resource type.protected java.util.List<I_CmsXmlContentEditorChangeHandler>getNestedEditorChangeHandlers()Creates editor change handler instances for all nested fields that have configured them in their field settingsjava.util.List<java.lang.String>getNestedFormatters(CmsObject cms, CmsResource res, java.util.Locale locale, javax.servlet.ServletRequest req)Returns the nested formatters for the given resource.java.lang.StringgetParameter(java.lang.String name)Gets the parameter with the given name..CmsParameterConfigurationgetParameters()Gets the set of parameters.java.lang.StringgetPreview(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.StringgetReferencePath(CmsObject cms, I_CmsXmlContentValue value)Returns the category reference path for the given value.CmsRelationTypegetRelationType(java.lang.String xpath)Returns the relation type for the given path.CmsRelationTypegetRelationType(java.lang.String xpath, CmsRelationType defaultType)Returns the relation type for the given path.CmsRelationTypegetRelationType(I_CmsXmlContentValue value)Deprecated.I_CmsXmlContentValue.SearchContentTypegetSearchContentType(I_CmsXmlContentValue value)Returns the search content type, ie., the way how to integrate the value into full text search.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,I_CmsXmlContentValue.SearchContentType>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.StringgetTitleMapping(CmsObject cms, CmsXmlContent document, java.util.Locale locale)Returns the "Title" mapping set for the given XML content document in the given Locale.protected java.lang.StringgetValidationMessage(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_CmsWidgetgetWidget(CmsObject cms, java.lang.String path)Gets the widget for the given path and CMS context.I_CmsWidgetgetWidget(I_CmsXmlSchemaType value)Deprecated.booleanhasModifiableFormatters()Returns true if the contents for this content handler have schema-based formatters which can be disabled or enabled.booleanhasNestedFormatters()Returns whether there are nested formatters configured for this content type.booleanhasSynchronizedElements()Returns if there are locale synchronized elements configured.booleanhasVisibilityHandlers()Returns if there are visibility handlers configured for this content type.protected voidinit()Called when this content handler is initialized.protected voidinitDefaultValues(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the default values for this content handler.protected voidinitDefaultWidget(org.dom4j.Element element)Initializes the default complex widget.protected voidinitEditHandler(org.dom4j.Element handlerElement)Initializes the edit handler.protected voidinitEditorChangeHandlers(org.dom4j.Element element)Initializes the editor change handlers.protected voidinitField(org.dom4j.Element elem, CmsXmlContentDefinition contentDef)Processes a single field definition.protected voidinitFields(org.dom4j.Element parent, CmsXmlContentDefinition contentDef)Processes all field declarations in the schema.protected voidinitFormatters(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the formatters for this content handler.protected voidinitHeadIncludes(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the head includes for this content handler.voidinitialize(org.dom4j.Element appInfoElement, CmsXmlContentDefinition contentDefinition)Initializes this content handler for the given XML content definition by analyzing the "appinfo" node.protected voidinitJsonRenderer(org.dom4j.Element element)Reads the JSON renderer settings.protected voidinitLayouts(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the layout for this content handler.protected voidinitMappings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the element mappings for this content handler.protected voidinitModelFolder(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the folder containing the model file(s) for this content handler.protected voidinitNestedFormatters(org.dom4j.Element element, CmsXmlContentDefinition contentDefinition)Initializes the nested formatter fields.protected voidinitParameters(org.dom4j.Element root)Initializes the parameters from the schema.protected voidinitPreview(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the preview location for this content handler.protected voidinitRelations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the relation configuration for this content handler.protected voidinitResourceBundle(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition, boolean single)Initializes the resource bundle to use for localized messages in this content handler.protected voidinitSearchSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the search exclusions values for this content handler.protected voidinitSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the element settings for this content handler.protected voidinitSynchronizations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the locale synchronizations elements.protected voidinitTabs(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the tabs for this content handler.protected voidinitTemplates(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the forbidden template contexts.protected voidinitValidationRules(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the validation rules this content handler.protected voidinitVisibilities(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)Initializes the content visibility settings.voidinvalidateBrokenLinks(CmsObject cms, CmsXmlContent document)Performs a check of the given XML document.booleanisAcaciaEditorDisabled()Returns true if the Acacia editor is disabled for this type.booleanisContainerPageOnly()Returnstrueif the XML content should be indexed when it is dropped in a container page, and returnsfalseif this XML content should be indexed as 'stand-alone' document.protected booleanisInvalidateParent(java.lang.String xpath)Returns the is-invalidate-parent flag for the given xpath.booleanisValueVisible(CmsObject cms, I_CmsXmlSchemaType value, java.lang.String elementName, java.lang.String params, CmsResource resource, java.util.Locale contentLocale)Returns the content field visibilty.booleanisVisible(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.Stringkey(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)CmsXmlContentprepareForUse(CmsObject cms, CmsXmlContent content)Prepares the given XML content to be used after it was read from the OpenCms VFS.CmsFileprepareForWrite(CmsObject cms, CmsXmlContent content, CmsFile file)Prepares the given XML content to be written to the OpenCms VFS.protected voidremoveEmptyMappings(CmsObject cms, CmsFile file, CmsXmlContent content)Removes property values on resources for non-existing, optional elements.protected voidresolveDefaultMappings(CmsObject cms, CmsFile file, CmsXmlContent content)Resolves those mappings for which no content value exists and useDefault is set to true.voidresolveMapping(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.CmsXmlContentErrorHandlerresolveValidation(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 voidvalidateAppinfoElement(org.dom4j.Element appinfoElement)Validates if the givenappinfoelement node from the XML content definition schema is valid according the the capabilities of this content handler.protected CmsXmlContentErrorHandlervalidateCategories(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)The errorHandler parameter is optional, ifnullis given a new error handler instance must be created.protected booleanvalidateLink(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)Validates the given rules against the given value.protected CmsXmlContentErrorHandlervalidateValue(CmsObject cms, I_CmsXmlContentValue value, java.lang.String valueStr, CmsXmlContentErrorHandler errorHandler, boolean isWarning)Checks the default XML schema validation rules.protected CmsXmlContentErrorHandlervalidateValue(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 CmsFilewriteCategories(CmsObject cms, CmsFile file, CmsXmlContent content)Writes the categories if a category widget is present.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.xml.content.I_CmsXmlContentHandler
isSearchable
-
-
-
-
Field Detail
-
A_CONFIGURATION
public static final java.lang.String A_CONFIGURATION
Attribute name for configuration string.- See Also:
- Constant Field Values
-
APPINFO_APPINFO
public static final java.lang.String APPINFO_APPINFO
Constant for the "appinfo" element name itself.- See Also:
- Constant Field Values
-
APPINFO_ATTR_ADD_TO
public static final java.lang.String APPINFO_ATTR_ADD_TO
Constant for the "addto" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_BOOST
public static final java.lang.String APPINFO_ATTR_BOOST
Constant for the "boost" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_CLASS
public static final java.lang.String APPINFO_ATTR_CLASS
Constant for the "class" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_COLLAPSE
public static final java.lang.String APPINFO_ATTR_COLLAPSE
Constant for the "collapse" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_CONFIGURATION
public static final java.lang.String APPINFO_ATTR_CONFIGURATION
Constant for the "configuration" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_CONTAINER_PAGE_ONLY
public static final java.lang.String APPINFO_ATTR_CONTAINER_PAGE_ONLY
The exclude from index attribute.- See Also:
- Constant Field Values
-
APPINFO_ATTR_COPY_FIELDS
public static final java.lang.String APPINFO_ATTR_COPY_FIELDS
Constant for the "copyfields" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_DEFAULT
public static final java.lang.String APPINFO_ATTR_DEFAULT
Constant for the "default" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_DESCRIPTION
public static final java.lang.String APPINFO_ATTR_DESCRIPTION
Constant for the "description" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_DISPLAY
public static final java.lang.String APPINFO_ATTR_DISPLAY
Constant for the "displaycompact" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_ELEMENT
public static final java.lang.String APPINFO_ATTR_ELEMENT
Constant for the "element" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_ERROR
public static final java.lang.String APPINFO_ATTR_ERROR
Constant for the "error" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_INVALIDATE
public static final java.lang.String APPINFO_ATTR_INVALIDATE
Constant for the "invalidate" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_KEY
public static final java.lang.String APPINFO_ATTR_KEY
Constant for the "key" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_LOCALE
public static final java.lang.String APPINFO_ATTR_LOCALE
Constant for the "locale" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_MAPPING
public static final java.lang.String APPINFO_ATTR_MAPPING
Constant for the "mapping" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_MAPTO
public static final java.lang.String APPINFO_ATTR_MAPTO
Constant for the "mapto" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_MAXWIDTH
public static final java.lang.String APPINFO_ATTR_MAXWIDTH
Constant for the "maxwidth" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_MESSAGE
public static final java.lang.String APPINFO_ATTR_MESSAGE
Constant for the "message" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_MINWIDTH
public static final java.lang.String APPINFO_ATTR_MINWIDTH
Constant for the "minwidth" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_NAME
public static final java.lang.String APPINFO_ATTR_NAME
Constant for the "name" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_NICE_NAME
public static final java.lang.String APPINFO_ATTR_NICE_NAME
Constant for the "nice-name" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_PARAMS
public static final java.lang.String APPINFO_ATTR_PARAMS
Constant for the "params" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_PREVIEW
public static final java.lang.String APPINFO_ATTR_PREVIEW
Constant for the "preview" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_REGEX
public static final java.lang.String APPINFO_ATTR_REGEX
Constant for the "regex" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_RESOLVE_MACROS
public static final java.lang.String APPINFO_ATTR_RESOLVE_MACROS
Constant for the "resolveMacros" attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_RULE_REGEX
public static final java.lang.String APPINFO_ATTR_RULE_REGEX
Constant for the "rule-regex" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_RULE_TYPE
public static final java.lang.String APPINFO_ATTR_RULE_TYPE
Constant for the "rule-type" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_SCOPE
public static final java.lang.String APPINFO_ATTR_SCOPE
Constant for the "scope" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_SEARCHCONTENT
public static final java.lang.String APPINFO_ATTR_SEARCHCONTENT
Constant for the "searchcontent" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_SELECT_INHERIT
public static final java.lang.String APPINFO_ATTR_SELECT_INHERIT
Constant for the "select-inherit" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_SOURCE_FIELD
public static final java.lang.String APPINFO_ATTR_SOURCE_FIELD
Constant for the "sourcefield" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_TARGET_FIELD
public static final java.lang.String APPINFO_ATTR_TARGET_FIELD
Constant for the "targetfield" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_TYPE
public static final java.lang.String APPINFO_ATTR_TYPE
Constant for the "type" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_TYPE_NODE
public static final java.lang.String APPINFO_ATTR_TYPE_NODE
Constant for the "node" appinfo attribute value.- See Also:
- Constant Field Values
-
APPINFO_ATTR_TYPE_PARENT
public static final java.lang.String APPINFO_ATTR_TYPE_PARENT
Constant for the "parent" appinfo attribute value.- See Also:
- Constant Field Values
-
APPINFO_ATTR_TYPE_WARNING
public static final java.lang.String APPINFO_ATTR_TYPE_WARNING
Constant for the "warning" appinfo attribute value.- See Also:
- Constant Field Values
-
APPINFO_ATTR_URI
public static final java.lang.String APPINFO_ATTR_URI
Constant for the "uri" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_USEALL
public static final java.lang.String APPINFO_ATTR_USEALL
Constant for the "useall" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_VALUE
public static final java.lang.String APPINFO_ATTR_VALUE
Constant for the "value" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_WIDGET
public static final java.lang.String APPINFO_ATTR_WIDGET
Constant for the "widget" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTR_WIDGET_CONFIG
public static final java.lang.String APPINFO_ATTR_WIDGET_CONFIG
Constant for the "widget-config" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_ATTRIBUTE_TYPE_CSS
public static final java.lang.String APPINFO_ATTRIBUTE_TYPE_CSS
Constant for formatter include resource type 'CSS'.- See Also:
- Constant Field Values
-
APPINFO_ATTRIBUTE_TYPE_JAVASCRIPT
public static final java.lang.String APPINFO_ATTRIBUTE_TYPE_JAVASCRIPT
Constant for formatter include resource type 'JAVASCRIPT'.- See Also:
- Constant Field Values
-
APPINFO_BUNDLE
public static final java.lang.String APPINFO_BUNDLE
Constant for the "bundle" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_DEFAULT
public static final java.lang.String APPINFO_DEFAULT
Constant for the "default" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_DEFAULTS
public static final java.lang.String APPINFO_DEFAULTS
Constant for the "defaults" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_EDIT_HANDLER
public static final java.lang.String APPINFO_EDIT_HANDLER
Constant for the "edithandler" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_EDITOR_CHANGE_HANDLER
public static final java.lang.String APPINFO_EDITOR_CHANGE_HANDLER
Constant for the "editorchangehandler" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_EDITOR_CHANGE_HANDLERS
public static final java.lang.String APPINFO_EDITOR_CHANGE_HANDLERS
Constant for the "editorchangehandlers" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_FORBIDDEN_CONTEXTS
public static final java.lang.String APPINFO_FORBIDDEN_CONTEXTS
Constant for the "forbidden-contexts" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_FORMATTER
public static final java.lang.String APPINFO_FORMATTER
Constant for the "formatter" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_FORMATTERS
public static final java.lang.String APPINFO_FORMATTERS
Constant for the "formatters" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_GEOMAPPING
public static final java.lang.String APPINFO_GEOMAPPING
Constant for the 'geomapping' node.- See Also:
- Constant Field Values
-
APPINFO_HEAD_INCLUDE
public static final java.lang.String APPINFO_HEAD_INCLUDE
Constant for the "headinclude" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_HEAD_INCLUDES
public static final java.lang.String APPINFO_HEAD_INCLUDES
Constant for the "headincludes" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_LAYOUT
public static final java.lang.String APPINFO_LAYOUT
Constant for the "layout" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_LAYOUTS
public static final java.lang.String APPINFO_LAYOUTS
Constant for the "layouts" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_MAPPING
public static final java.lang.String APPINFO_MAPPING
Constant for the "mapping" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_MAPPINGS
public static final java.lang.String APPINFO_MAPPINGS
Constant for the "mappings" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_MESSAGEKEYHANDLER
public static final java.lang.String APPINFO_MESSAGEKEYHANDLER
Constant for the 'messagekeyhandler' node.- See Also:
- Constant Field Values
-
APPINFO_MODELFOLDER
public static final java.lang.String APPINFO_MODELFOLDER
Constant for the "modelfolder" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_NESTED_FORMATTER
public static final java.lang.String APPINFO_NESTED_FORMATTER
Constant for the "nestedformatter" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_NESTED_FORMATTERS
public static final java.lang.String APPINFO_NESTED_FORMATTERS
Constant for the "nestedformatters" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_PARAM
public static final java.lang.String APPINFO_PARAM
Constant for the "param" appinfo attribute name.- See Also:
- Constant Field Values
-
APPINFO_PARAMETERS
public static final java.lang.String APPINFO_PARAMETERS
Constant for the "parameters" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_PREVIEW
public static final java.lang.String APPINFO_PREVIEW
Constant for the "preview" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_PROPERTYBUNDLE
public static final java.lang.String APPINFO_PROPERTYBUNDLE
Constant for the "propertybundle" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RELATION
public static final java.lang.String APPINFO_RELATION
Constant for the "relation" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RELATIONS
public static final java.lang.String APPINFO_RELATIONS
Constant for the "relations" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RESOURCE
public static final java.lang.String APPINFO_RESOURCE
Constant for the "resource" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RESOURCEBUNDLE
public static final java.lang.String APPINFO_RESOURCEBUNDLE
Constant for the "resourcebundle" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RESOURCEBUNDLES
public static final java.lang.String APPINFO_RESOURCEBUNDLES
Constant for the "resourcebundles" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_REVERSE_MAPPING_ENABLED
public static final java.lang.String APPINFO_REVERSE_MAPPING_ENABLED
Constant for the reverse-mapping-enabled appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_RULE
public static final java.lang.String APPINFO_RULE
Constant for the "rule" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SCHEMA_FILE
public static final java.lang.String APPINFO_SCHEMA_FILE
The file where the default appinfo schema is located.- See Also:
- Constant Field Values
-
APPINFO_SCHEMA_FILE_TYPES
public static final java.lang.String APPINFO_SCHEMA_FILE_TYPES
The file where the default appinfo schema types are located.- See Also:
- Constant Field Values
-
APPINFO_SCHEMA_SYSTEM_ID
public static final java.lang.String APPINFO_SCHEMA_SYSTEM_ID
The XML system id for the default appinfo schema types.- See Also:
- Constant Field Values
-
APPINFO_SCHEMA_TYPES_SYSTEM_ID
public static final java.lang.String APPINFO_SCHEMA_TYPES_SYSTEM_ID
The XML system id for the default appinfo schema types.- See Also:
- Constant Field Values
-
APPINFO_SEARCHSETTING
public static final java.lang.String APPINFO_SEARCHSETTING
Constant for the "searchsetting" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SEARCHSETTINGS
public static final java.lang.String APPINFO_SEARCHSETTINGS
Constant for the "searchsettings" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SETTING
public static final java.lang.String APPINFO_SETTING
Constant for the "setting" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SETTINGS
public static final java.lang.String APPINFO_SETTINGS
Constant for the "settings" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SOLR_FIELD
public static final java.lang.String APPINFO_SOLR_FIELD
Constant for the "solrfield" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SYNCHRONIZATION
public static final java.lang.String APPINFO_SYNCHRONIZATION
Constant for the "synchronization" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_SYNCHRONIZATIONS
public static final java.lang.String APPINFO_SYNCHRONIZATIONS
Constant for the "synchronizations" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_TAB
public static final java.lang.String APPINFO_TAB
Constant for the "tab" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_TABS
public static final java.lang.String APPINFO_TABS
Constant for the "tabs" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_TEMPLATE
public static final java.lang.String APPINFO_TEMPLATE
Node name.- See Also:
- Constant Field Values
-
APPINFO_TEMPLATES
public static final java.lang.String APPINFO_TEMPLATES
Node name.- See Also:
- Constant Field Values
-
APPINFO_VALIDATIONRULE
public static final java.lang.String APPINFO_VALIDATIONRULE
Constant for the "validationrule" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_VALIDATIONRULES
public static final java.lang.String APPINFO_VALIDATIONRULES
Constant for the "validationrules" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_VALUE_ADD_TO_CONTENT
public static final java.lang.String APPINFO_VALUE_ADD_TO_CONTENT
Constant for the "element" value of the appinfo attribute "addto".- See Also:
- Constant Field Values
-
APPINFO_VALUE_ADD_TO_PAGE
public static final java.lang.String APPINFO_VALUE_ADD_TO_PAGE
Constant for the "page" value of the appinfo attribute "addto".- See Also:
- Constant Field Values
-
APPINFO_VISIBILITIES
public static final java.lang.String APPINFO_VISIBILITIES
Constant for the "visibilities" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_VISIBILITY
public static final java.lang.String APPINFO_VISIBILITY
Constant for the "visibility" appinfo element name.- See Also:
- Constant Field Values
-
APPINFO_XMLBUNDLE
public static final java.lang.String APPINFO_XMLBUNDLE
Constant for the "xmlbundle" appinfo element name.- See Also:
- Constant Field Values
-
ATTR_ENABLED
public static final java.lang.String ATTR_ENABLED
Attribute name.- See Also:
- Constant Field Values
-
ATTR_ENABLED_BY_DEFAULT
public static final java.lang.String ATTR_ENABLED_BY_DEFAULT
Attribute name.- See Also:
- Constant Field Values
-
ATTR_USE_ACACIA
public static final java.lang.String ATTR_USE_ACACIA
Attribute name.- See Also:
- Constant Field Values
-
ATTRIBUTE_INCLUDE_TYPE_CSS
public static final java.lang.String ATTRIBUTE_INCLUDE_TYPE_CSS
Constant for head include type attribute: CSS.- See Also:
- Constant Field Values
-
ATTRIBUTE_INCLUDE_TYPE_JAVASCRIPT
public static final java.lang.String ATTRIBUTE_INCLUDE_TYPE_JAVASCRIPT
Constant for head include type attribute: java-script.- See Also:
- Constant Field Values
-
GEOMAPPING_FIELD
public static final java.lang.String GEOMAPPING_FIELD
Field for mapping geo-coordinates.- See Also:
- Constant Field Values
-
MACRO_PREVIEW_TEMPFILE
public static final java.lang.String MACRO_PREVIEW_TEMPFILE
Macro for resolving the preview URI.- See Also:
- Constant Field Values
-
N_CHANGEHANDLER
public static final java.lang.String N_CHANGEHANDLER
Node name for change handler.- See Also:
- Constant Field Values
-
N_SETTING
public static final java.lang.String N_SETTING
Constant for the 'Setting' node name.- See Also:
- Constant Field Values
-
MESSAGE_VALIDATION_DEFAULT_ERROR
protected static final java.lang.String MESSAGE_VALIDATION_DEFAULT_ERROR
Default message for validation errors.- See Also:
- Constant Field Values
-
MESSAGE_VALIDATION_DEFAULT_WARNING
protected static final java.lang.String MESSAGE_VALIDATION_DEFAULT_WARNING
Default message for validation warnings.- See Also:
- Constant Field Values
-
m_allowedTemplates
protected CmsDefaultSet<java.lang.String> m_allowedTemplates
The set of allowed templates.
-
m_configurationValues
protected java.util.Map<java.lang.String,java.lang.String> m_configurationValues
The configuration values for the element widgets (as defined in the annotations).
-
m_cssHeadIncludes
protected java.util.Set<java.lang.String> m_cssHeadIncludes
The CSS resources to include into the html-page head.
-
m_defaultValues
protected java.util.Map<java.lang.String,java.lang.String> m_defaultValues
The default values for the elements (as defined in the annotations).
-
m_elementMappings
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_elementMappings
The element mappings (as defined in the annotations).
-
m_formatterConfiguration
protected CmsFormatterConfiguration m_formatterConfiguration
The formatter configuration.
-
m_formatters
protected java.util.List<CmsFormatterBean> m_formatters
The list of formatters from the XSD.
-
m_geomappingEntries
protected java.util.List<CmsGeoMappingConfiguration.Entry> m_geomappingEntries
The configured geo-coordinate mapping configuration entries.
-
m_invalidRelationActions
protected java.util.Map<java.lang.String,CmsDefaultXmlContentHandler.InvalidRelationAction> m_invalidRelationActions
Relation actions.
-
m_jsHeadIncludes
protected java.util.Set<java.lang.String> m_jsHeadIncludes
The java-script resources to include into the html-page head.
-
m_messageBundleNames
protected java.util.List<java.lang.String> m_messageBundleNames
The resource bundle name to be used for localization of this content handler.
-
m_modelFolder
protected java.lang.String m_modelFolder
The folder containing the model file(s) for the content.
-
m_previewLocation
protected java.lang.String m_previewLocation
The preview location (as defined in the annotations).
-
m_primaryGeomappingField
protected java.lang.String m_primaryGeomappingField
Name of the field used for geo-coordinate mapping.
-
m_relationChecks
protected java.util.Map<java.lang.String,java.lang.Boolean> m_relationChecks
The relation check rules.
-
m_relations
protected java.util.Map<java.lang.String,CmsRelationType> m_relations
The relation check rules.
-
m_searchFields
protected java.util.Map<java.lang.String,CmsSearchField> m_searchFields
The Solr field configurations.
-
m_searchFieldsPage
protected java.util.Map<java.lang.String,CmsSearchField> m_searchFieldsPage
The Solr field configurations added to the container pages contents are on.
-
m_searchSettings
protected java.util.Map<java.lang.String,I_CmsXmlContentValue.SearchContentType> m_searchSettings
The search settings.
-
m_searchTemplateGroup
protected org.antlr.stringtemplate.StringTemplateGroup m_searchTemplateGroup
String template group for the simple search setting expansions.
-
m_settings
protected java.util.Map<java.lang.String,CmsXmlContentProperty> m_settings
The configured settings for the formatters (as defined in the annotations).
-
m_synchronizations
protected java.util.List<java.lang.String> m_synchronizations
The configured locale synchronization elements.
-
m_tabs
protected java.util.List<CmsXmlContentTab> m_tabs
The configured tabs.
-
m_titleMappings
protected java.util.List<java.lang.String> m_titleMappings
The list of mappings to the "Title" property.
-
m_useAcacia
protected boolean m_useAcacia
Flag which controls whether the Acacia editor should be disabled for this type.
-
m_validationErrorMessages
protected java.util.Map<java.lang.String,java.lang.String> m_validationErrorMessages
The messages for the error validation rules.
-
m_validationErrorRules
protected java.util.Map<java.lang.String,java.lang.String> m_validationErrorRules
The validation rules that cause an error (as defined in the annotations).
-
m_validationWarningMessages
protected java.util.Map<java.lang.String,java.lang.String> m_validationWarningMessages
The messages for the warning validation rules.
-
m_validationWarningRules
protected java.util.Map<java.lang.String,java.lang.String> m_validationWarningRules
The validation rules that cause a warning (as defined in the annotations).
-
-
Constructor Detail
-
CmsDefaultXmlContentHandler
public CmsDefaultXmlContentHandler()
Creates a new instance of the default XML content handler.
-
-
Method Detail
-
applyReverseAvailabilityMapping
public boolean applyReverseAvailabilityMapping(CmsObject cms, CmsXmlContent content, CmsMappingResolutionContext.AttributeType attr, java.util.List<java.util.Locale> resourceLocales, long valueToSet)
Description copied from interface:I_CmsXmlContentHandlerWrites an availability date back to the content, if a mapping is defined for it.- Specified by:
applyReverseAvailabilityMappingin interfaceI_CmsXmlContentHandler- Parameters:
cms- the CMS contextcontent- the content to write toattr- the attribute to writeresourceLocales- the locales of the resourcevalueToSet- the value to write- See Also:
I_CmsXmlContentHandler.applyReverseAvailabilityMapping(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, org.opencms.xml.content.CmsMappingResolutionContext.AttributeType, java.util.List, long)
-
canUseReverseAvailabilityMapping
public boolean canUseReverseAvailabilityMapping(CmsMappingResolutionContext.AttributeType attr)
Description copied from interface:I_CmsXmlContentHandlerChecks if an availability attribute should be written back to the content if the availability is changed through the availability dialog.- Specified by:
canUseReverseAvailabilityMappingin interfaceI_CmsXmlContentHandler- Parameters:
attr- the attribute to check- Returns:
- true if the attribute should be written to the content
- See Also:
I_CmsXmlContentHandler.canUseReverseAvailabilityMapping(org.opencms.xml.content.CmsMappingResolutionContext.AttributeType)
-
createRootCms
public CmsObject createRootCms(CmsObject cms) throws CmsException
Copies a given CMS context and set the copy's site root to '/'.- Parameters:
cms- the CMS context to copy- Returns:
- the copy
- Throws:
CmsException- if something goes wrong
-
getAllowedTemplates
public CmsDefaultSet<java.lang.String> getAllowedTemplates()
Description copied from interface:I_CmsXmlContentHandlerGets the list of allowed template context names.- Specified by:
getAllowedTemplatesin interfaceI_CmsXmlContentHandler- Returns:
- the list of allowed template context names
- See Also:
I_CmsXmlContentHandler.getAllowedTemplates()
-
getChangeHandlerConfigs
public java.util.List<CmsChangeHandlerConfig> getChangeHandlerConfigs()
Description copied from interface:I_CmsXmlContentHandlerGets the list of change handler configurations.- Specified by:
getChangeHandlerConfigsin interfaceI_CmsXmlContentHandler- Returns:
- the list of change handler configurations
- See Also:
I_CmsXmlContentHandler.getChangeHandlerConfigs()
-
getComplexWidget
public I_CmsComplexWidget getComplexWidget(CmsObject cms, java.lang.String path)
Description copied from interface:I_CmsXmlContentHandlerGets the unconfigured complex widget defined for the given path.- Specified by:
getComplexWidgetin interfaceI_CmsXmlContentHandler- Parameters:
cms- the CMS contextpath- the value path- Returns:
- the complex widget
- See Also:
I_CmsXmlContentHandler.getComplexWidget(org.opencms.file.CmsObject, java.lang.String)
-
getConfiguration
public java.lang.String getConfiguration(I_CmsXmlSchemaType type)
Description copied from interface:I_CmsXmlContentHandlerReturns the configuration String value for the widget used to edit the given XML content schema type.If no configuration value is available, this method must return
null.- Specified by:
getConfigurationin interfaceI_CmsXmlContentHandler- Parameters:
type- the value to get the widget configuration for- Returns:
- the configuration String value for the widget used to edit the given XML content schema type
- See Also:
I_CmsXmlContentHandler.getConfiguration(org.opencms.xml.types.I_CmsXmlSchemaType)
-
getConfiguration
public java.lang.String getConfiguration(java.lang.String path)
Description copied from interface:I_CmsXmlContentHandlerGets the widget configuration for the given sub-path.- Specified by:
getConfigurationin interfaceI_CmsXmlContentHandler- Parameters:
path- a sub-path- Returns:
- the widget configuration for the given sub-path
- See Also:
I_CmsXmlContentHandler.getConfiguration(org.opencms.xml.types.I_CmsXmlSchemaType)
-
getConfiguredDisplayType
public I_CmsXmlContentHandler.DisplayType getConfiguredDisplayType(java.lang.String path, I_CmsXmlContentHandler.DisplayType defaultValue)
Description copied from interface:I_CmsXmlContentHandlerGets the configured display type for a given path.- Specified by:
getConfiguredDisplayTypein interfaceI_CmsXmlContentHandler- Parameters:
path- the pathdefaultValue- the value to return if no configured display type is found- Returns:
- the configured display type (or the default value)
- See Also:
I_CmsXmlContentHandler.getConfiguredDisplayType(java.lang.String, org.opencms.xml.content.I_CmsXmlContentHandler.DisplayType)
-
getCSSHeadIncludes
public java.util.Set<java.lang.String> getCSSHeadIncludes()
Description copied from interface:I_CmsXmlContentHandlerReturns the resource-independent CSS resources to include into the html-page head.- Specified by:
getCSSHeadIncludesin interfaceI_CmsXmlContentHandler- Returns:
- the CSS resources to include into the html-page head
- See Also:
I_CmsXmlContentHandler.getCSSHeadIncludes()
-
getCSSHeadIncludes
public java.util.Set<java.lang.String> getCSSHeadIncludes(CmsObject cms, CmsResource resource) throws CmsException
Description copied from interface:I_CmsXmlContentHandlerReturns all the CSS resources to include into the html-page head.- Specified by:
getCSSHeadIncludesin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current CMS contextresource- the resource from which to get the head includes- Returns:
- the CSS resources to include into the html-page head
- Throws:
CmsException- if something goes wrong- See Also:
I_CmsXmlContentHandler.getCSSHeadIncludes(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
-
getDefault
public java.lang.String getDefault(CmsObject cms, CmsResource resource, I_CmsXmlSchemaType type, java.lang.String path, java.util.Locale locale)
Description copied from interface:I_CmsXmlContentHandlerReturns the default String value for the given XML content schema type object in the given XML content.If a schema type does not have a default value, this method must return
null.- Specified by:
getDefaultin interfaceI_CmsXmlContentHandler- Parameters:
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 value- Returns:
- the default String value for the given XML content value object
- See Also:
I_CmsXmlContentHandler.getDefault(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.xml.types.I_CmsXmlSchemaType, java.lang.String, java.util.Locale)
-
getDefault
public java.lang.String getDefault(CmsObject cms, I_CmsXmlContentValue value, java.util.Locale locale)
Description copied from interface:I_CmsXmlContentHandlerReturns the default String value for the given XML content schema type object in the given XML content.If a schema type does not have a default value, this method must return
null.- Specified by:
getDefaultin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current users OpenCms contextvalue- the value to get the default forlocale- the currently selected locale for the value- Returns:
- the default String value for the given XML content value object
- See Also:
I_CmsXmlContentHandler.getDefault(org.opencms.file.CmsObject, I_CmsXmlContentValue, java.util.Locale)
-
getDefaultComplexWidget
public I_CmsComplexWidget getDefaultComplexWidget()
Description copied from interface:I_CmsXmlContentHandlerGets the default complex widget to be used for this type.- Specified by:
getDefaultComplexWidgetin interfaceI_CmsXmlContentHandler- Returns:
- the default complex widget for this type
- See Also:
I_CmsXmlContentHandler.getDefaultComplexWidget()
-
getDefaultComplexWidgetClass
public java.lang.String getDefaultComplexWidgetClass()
Description copied from interface:I_CmsXmlContentHandlerGets the default complex widget class name configured for this type.- Specified by:
getDefaultComplexWidgetClassin interfaceI_CmsXmlContentHandler- Returns:
- the default complex widget class name
- See Also:
I_CmsXmlContentHandler.getDefaultComplexWidgetClass()
-
getDefaultComplexWidgetConfiguration
public java.lang.String getDefaultComplexWidgetConfiguration()
Description copied from interface:I_CmsXmlContentHandlerGets the default complex widget configuration string configured for this type.- Specified by:
getDefaultComplexWidgetConfigurationin interfaceI_CmsXmlContentHandler- Returns:
- the default complex widget configuration string
- See Also:
I_CmsXmlContentHandler.getDefaultComplexWidgetConfiguration()
-
getDisplayType
public I_CmsXmlContentHandler.DisplayType getDisplayType(I_CmsXmlSchemaType type)
Description copied from interface:I_CmsXmlContentHandlerReturns if the widget for this type should be displayed in compact view.- Specified by:
getDisplayTypein interfaceI_CmsXmlContentHandler- Parameters:
type- the value to check the view mode for- Returns:
- the widgets display type
- See Also:
I_CmsXmlContentHandler.getDisplayType(org.opencms.xml.types.I_CmsXmlSchemaType)
-
getEditHandler
public I_CmsEditHandler getEditHandler()
Returns the edit handler if configured.- Specified by:
getEditHandlerin interfaceI_CmsXmlContentHandler- Returns:
- the edit handler
-
getEditorChangeHandlers
public java.util.List<I_CmsXmlContentEditorChangeHandler> getEditorChangeHandlers(boolean selfOnly)
Description copied from interface:I_CmsXmlContentHandlerReturns the editor change handlers.- Specified by:
getEditorChangeHandlersin interfaceI_CmsXmlContentHandler- Parameters:
selfOnly- if true, only return editor change handlers configured directly for this content handler- Returns:
- the editor change handlers
- See Also:
I_CmsXmlContentHandler.getEditorChangeHandlers(boolean)
-
getFieldHelp
public java.util.Map<java.lang.String,java.lang.String> getFieldHelp()
Gets the help texts for the fields.- Returns:
- the help texts for the fields
-
getFieldLabels
public java.util.Map<java.lang.String,java.lang.String> getFieldLabels()
Gets the labels for the fields.- Returns:
- the labels for the fields
-
getFormatterConfiguration
public CmsFormatterConfiguration getFormatterConfiguration(CmsObject cms, CmsResource resource)
Description copied from interface:I_CmsXmlContentHandlerReturns the container page element formatter configuration for a given resource.- Specified by:
getFormatterConfigurationin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current users OpenCms context, used for selecting the right projectresource- the resource for which the formatter configuration should be retrieved- Returns:
- the container page element formatter configuration for this handler
- See Also:
I_CmsXmlContentHandler.getFormatterConfiguration(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
-
getGeoMappingConfiguration
public CmsGeoMappingConfiguration getGeoMappingConfiguration()
Gets the geo mapping configuration.- Specified by:
getGeoMappingConfigurationin interfaceI_CmsXmlContentHandler- Returns:
- the geo mapping configuration
-
getInvalidRelationAction
public CmsDefaultXmlContentHandler.InvalidRelationAction getInvalidRelationAction(java.lang.String name)
Description copied from interface:I_CmsXmlContentHandlerGets the action to perform if the given name refers to a link field which refers to a VFS file that no longer exists.- Specified by:
getInvalidRelationActionin interfaceI_CmsXmlContentHandler- Parameters:
name- the field name- Returns:
- the action
- See Also:
I_CmsXmlContentHandler.getInvalidRelationAction(java.lang.String)
-
getJSHeadIncludes
public java.util.Set<java.lang.String> getJSHeadIncludes()
Description copied from interface:I_CmsXmlContentHandlerReturns the resource-independent javascript resources to include into the html-page head.- Specified by:
getJSHeadIncludesin interfaceI_CmsXmlContentHandler- Returns:
- the javascript resources to include into the html-page head
- See Also:
I_CmsXmlContentHandler.getJSHeadIncludes()
-
getJSHeadIncludes
public java.util.Set<java.lang.String> getJSHeadIncludes(CmsObject cms, CmsResource resource) throws CmsException
Description copied from interface:I_CmsXmlContentHandlerReturns all the javascript resources to include into the html-page head.- Specified by:
getJSHeadIncludesin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current CMS contextresource- the resource for which the head includes should be retrieved- Returns:
- the javascript resources to include into the html-page head
- Throws:
CmsException- if something goes wrong- See Also:
I_CmsXmlContentHandler.getJSHeadIncludes(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
-
getJsonRendererSettings
public I_CmsXmlContentHandler.JsonRendererSettings getJsonRendererSettings()
Description copied from interface:I_CmsXmlContentHandlerGets the JSON renderer settings.- Specified by:
getJsonRendererSettingsin interfaceI_CmsXmlContentHandler- Returns:
- the JSON renderer settings
- See Also:
I_CmsXmlContentHandler.getJsonRendererSettings()
-
getMappings
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMappings()
Description copied from interface:I_CmsXmlContentHandlerGets the mappings defined in the schema.- Specified by:
getMappingsin interfaceI_CmsXmlContentHandler- Returns:
- the mappings
- See Also:
I_CmsXmlContentHandler.getMappings()
-
getMappings
public java.util.List<java.lang.String> getMappings(java.lang.String elementName)
Returns the all mappings defined for the given element xpath.- Specified by:
getMappingsin interfaceI_CmsXmlContentHandler- Parameters:
elementName- the element xpath to look up the mapping for- Returns:
- the mapping defined for the given element xpath
- Since:
- 7.0.2
-
getMessageKeyHandler
public CmsMultiMessages.I_KeyFallbackHandler getMessageKeyHandler()
Description copied from interface:I_CmsXmlContentHandlerGets the message key fallback handler.This is used to automatically provide fallbacks for missing message keys in the editor.
- Specified by:
getMessageKeyHandlerin interfaceI_CmsXmlContentHandler- Returns:
- the message key fallback handler
- See Also:
I_CmsXmlContentHandler.getMessageKeyHandler()
-
getMessages
public CmsMessages getMessages(java.util.Locale locale)
Description copied from interface:I_CmsXmlContentHandlerReturns theCmsMessagesthat 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.- Specified by:
getMessagesin interfaceI_CmsXmlContentHandler- Parameters:
locale- the locale to get the messages for- Returns:
- the
CmsMessagesthat are used to resolve localized keys for the given locale in this content handler - See Also:
I_CmsXmlContentHandler.getMessages(java.util.Locale)
-
getModelFolder
public java.lang.String getModelFolder()
Description copied from interface:I_CmsXmlContentHandlerReturns the folder name that contains eventual XML content model files to use for this resource type.- Specified by:
getModelFolderin interfaceI_CmsXmlContentHandler- Returns:
- the folder name containing eventual XML content master files
- See Also:
I_CmsXmlContentHandler.getModelFolder()
-
getNestedFormatters
public java.util.List<java.lang.String> getNestedFormatters(CmsObject cms, CmsResource res, java.util.Locale locale, javax.servlet.ServletRequest req)
Description copied from interface:I_CmsXmlContentHandlerReturns the nested formatters for the given resource.- Specified by:
getNestedFormattersin interfaceI_CmsXmlContentHandler- Parameters:
cms- the cms contextres- the resourcelocale- the content localereq- the request if available- Returns:
- the nested formatter ids
- See Also:
I_CmsXmlContentHandler.getNestedFormatters(org.opencms.file.CmsObject, org.opencms.file.CmsResource, java.util.Locale, javax.servlet.ServletRequest)
-
getParameter
public java.lang.String getParameter(java.lang.String name)
Description copied from interface:I_CmsXmlContentHandlerGets the parameter with the given name..- Specified by:
getParameterin interfaceI_CmsXmlContentHandler- Parameters:
name- the parameter name- Returns:
- the parameter value
- See Also:
I_CmsXmlContentHandler.getParameter(java.lang.String)
-
getParameters
public CmsParameterConfiguration getParameters()
Gets the set of parameters.- Returns:
- zhr drz og pstsmrzrtd d
-
getPreview
public java.lang.String getPreview(CmsObject cms, CmsXmlContent content, java.lang.String resourcename)
Description copied from interface:I_CmsXmlContentHandlerReturns the preview URI for the given XML content value object to be displayed in the editor.If
nullis returned, no preview is possible for contents using this handler.- Specified by:
getPreviewin interfaceI_CmsXmlContentHandler- Parameters:
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 edited- Returns:
- the preview URI for the given XML content value object to be displayed in the editor
- See Also:
I_CmsXmlContentHandler.getPreview(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.lang.String)
-
getRelationType
@Deprecated public CmsRelationType getRelationType(I_CmsXmlContentValue value)
Deprecated.Description copied from interface:I_CmsXmlContentHandlerReturns the relation type for the given value.- Specified by:
getRelationTypein interfaceI_CmsXmlContentHandler- Parameters:
value- the value to get the relation type for- Returns:
- the relation type for the given value
- See Also:
I_CmsXmlContentHandler.getRelationType(I_CmsXmlContentValue)
-
getRelationType
public CmsRelationType getRelationType(java.lang.String xpath)
Description copied from interface:I_CmsXmlContentHandlerReturns the relation type for the given path.- Specified by:
getRelationTypein interfaceI_CmsXmlContentHandler- Parameters:
xpath- the path to get the relation type for- Returns:
- the relation type for the given path
- See Also:
I_CmsXmlContentHandler.getRelationType(String)
-
getRelationType
public CmsRelationType getRelationType(java.lang.String xpath, CmsRelationType defaultType)
Description copied from interface:I_CmsXmlContentHandlerReturns the relation type for the given path.- Specified by:
getRelationTypein interfaceI_CmsXmlContentHandler- Parameters:
xpath- the path to get the relation type fordefaultType- the default type if none is set- Returns:
- the relation type for the given path
- See Also:
I_CmsXmlContentHandler.getRelationType(java.lang.String, org.opencms.relations.CmsRelationType)
-
getSearchContentType
public I_CmsXmlContentValue.SearchContentType getSearchContentType(I_CmsXmlContentValue value)
Description copied from interface:I_CmsXmlContentHandlerReturns the search content type, ie., the way how to integrate the value into 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.
Moreover, if the value contains a link to another resource, the content of that other resource can be added.
- Specified by:
getSearchContentTypein interfaceI_CmsXmlContentHandler- Parameters:
value- the XML content value to check- Returns:
- the search content type, indicating how the element should be added to the content for the full text search
- See Also:
I_CmsXmlContentHandler.getSearchContentType(org.opencms.xml.types.I_CmsXmlContentValue)
-
getSearchFields
public java.util.Set<CmsSearchField> getSearchFields()
Description copied from interface:I_CmsXmlContentHandlerReturns all configured Search fields for this XML content.- Specified by:
getSearchFieldsin interfaceI_CmsXmlContentHandler- Returns:
- the Search fields for this XMl content
- See Also:
I_CmsXmlContentHandler.getSearchFields()
-
getSearchFieldsForPage
public java.util.Set<CmsSearchField> getSearchFieldsForPage()
Description copied from interface:I_CmsXmlContentHandlerReturns all configured Search fields for this XML content that should be attached to container pages the content is placed on.- Specified by:
getSearchFieldsForPagein interfaceI_CmsXmlContentHandler- Returns:
- the Search fields for this XMl content
- See Also:
I_CmsXmlContentHandler.getSearchFieldsForPage()
-
getSearchSettings
public java.util.Map<java.lang.String,I_CmsXmlContentValue.SearchContentType> getSearchSettings()
Description copied from interface:I_CmsXmlContentHandlerReturns the search content settings defined in the annotation node of this XML content.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.
- Specified by:
getSearchSettingsin interfaceI_CmsXmlContentHandler- Returns:
- the search field settings for this XML content schema
- See Also:
I_CmsXmlContentHandler.getSearchSettings()
-
getSettings
public java.util.Map<java.lang.String,CmsXmlContentProperty> getSettings(CmsObject cms, CmsResource resource)
Description copied from interface:I_CmsXmlContentHandlerReturns the element settings defined for the container page formatters.- Specified by:
getSettingsin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current CMS contextresource- the resource for which to get the setting definitions- Returns:
- the element settings defined for the container page formatters
- See Also:
I_CmsXmlContentHandler.getSettings(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
-
getSynchronizations
public java.util.List<java.lang.String> getSynchronizations()
Description copied from interface:I_CmsXmlContentHandlerReturns the elements that require a synchronization across all locales.- Specified by:
getSynchronizationsin interfaceI_CmsXmlContentHandler- Returns:
- the element paths
- See Also:
I_CmsXmlContentHandler.getSynchronizations()
-
getTabs
public java.util.List<CmsXmlContentTab> getTabs()
Description copied from interface:I_CmsXmlContentHandlerReturns the tabs to be displayed in the editor.- Specified by:
getTabsin interfaceI_CmsXmlContentHandler- Returns:
- the tabs to be displayed in the editor
- See Also:
I_CmsXmlContentHandler.getTabs()
-
getTitleMapping
public java.lang.String getTitleMapping(CmsObject cms, CmsXmlContent document, java.util.Locale locale)
Description copied from interface:I_CmsXmlContentHandlerReturns the "Title" mapping set for the given XML content document in the given Locale.- Specified by:
getTitleMappingin interfaceI_CmsXmlContentHandler- Parameters:
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 for- Returns:
- the "Title" mapping set for the given XML content document in the given Locale
- See Also:
I_CmsXmlContentHandler.getTitleMapping(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.util.Locale)
-
getWidget
public I_CmsWidget getWidget(CmsObject cms, java.lang.String path)
Description copied from interface:I_CmsXmlContentHandlerGets the widget for the given path and CMS context.- Specified by:
getWidgetin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current CMS contextpath- the XML value path- Returns:
- the widget for the path
- See Also:
I_CmsXmlContentHandler.getWidget(org.opencms.file.CmsObject, java.lang.String)
-
getWidget
@Deprecated public I_CmsWidget getWidget(I_CmsXmlSchemaType value)
Deprecated.Description copied from interface:I_CmsXmlContentHandlerReturns the editor widget that should be used for the given XML content value.The handler implementations should use the "appinfo" node of the XML content definition schema to define the mappings of elements to widgets.
- Specified by:
getWidgetin interfaceI_CmsXmlContentHandler- Parameters:
value- the XML content value to get the widget for- Returns:
- the editor widget that should be used for the given XML content value
- See Also:
I_CmsXmlContentHandler.getWidget(org.opencms.xml.types.I_CmsXmlSchemaType)
-
hasModifiableFormatters
public boolean hasModifiableFormatters()
Description copied from interface:I_CmsXmlContentHandlerReturns true if the contents for this content handler have schema-based formatters which can be disabled or enabled.- Specified by:
hasModifiableFormattersin interfaceI_CmsXmlContentHandler- Returns:
- true if the contents for this content handler have schema-based formatters which can be disabled or enabled
- See Also:
I_CmsXmlContentHandler.hasModifiableFormatters()
-
hasNestedFormatters
public boolean hasNestedFormatters()
Description copied from interface:I_CmsXmlContentHandlerReturns whether there are nested formatters configured for this content type.- Specified by:
hasNestedFormattersin interfaceI_CmsXmlContentHandler- Returns:
trueif there are nested formatters configured for this content type- See Also:
I_CmsXmlContentHandler.hasNestedFormatters()
-
hasSynchronizedElements
public boolean hasSynchronizedElements()
Description copied from interface:I_CmsXmlContentHandlerReturns if there are locale synchronized elements configured.- Specified by:
hasSynchronizedElementsin interfaceI_CmsXmlContentHandler- Returns:
trueif there are locale synchronized elements configured- See Also:
I_CmsXmlContentHandler.hasSynchronizedElements()
-
hasVisibilityHandlers
public boolean hasVisibilityHandlers()
Description copied from interface:I_CmsXmlContentHandlerReturns if there are visibility handlers configured for this content type.- Specified by:
hasVisibilityHandlersin interfaceI_CmsXmlContentHandler- Returns:
trueif there are visibility handlers configured for this content type- See Also:
I_CmsXmlContentHandler.hasVisibilityHandlers()
-
initialize
public void initialize(org.dom4j.Element appInfoElement, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Description copied from interface:I_CmsXmlContentHandlerInitializes this content handler for the given XML content definition by analyzing the "appinfo" node.- Specified by:
initializein interfaceI_CmsXmlContentHandler- Parameters:
appInfoElement- the "appinfo" element root node to analyzecontentDefinition- the XML content definition that XML content handler belongs to- Throws:
CmsXmlException- if something goes wrong- See Also:
I_CmsXmlContentHandler.initialize(org.dom4j.Element, org.opencms.xml.CmsXmlContentDefinition)
-
invalidateBrokenLinks
public void invalidateBrokenLinks(CmsObject cms, CmsXmlContent document)
Description copied from interface:I_CmsXmlContentHandlerPerforms a check of the given XML document.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.- Specified by:
invalidateBrokenLinksin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current OpenCms user contextdocument- the document to resolve the check rules for- See Also:
I_CmsXmlContentHandler.invalidateBrokenLinks(CmsObject, CmsXmlContent)
-
isAcaciaEditorDisabled
public boolean isAcaciaEditorDisabled()
Returns true if the Acacia editor is disabled for this type.- Specified by:
isAcaciaEditorDisabledin interfaceI_CmsXmlContentHandler- Returns:
- true if the acacia editor is disabled
-
isContainerPageOnly
public boolean isContainerPageOnly()
Description copied from interface:I_CmsXmlContentHandlerReturnstrueif the XML content should be indexed when it is dropped in a container page, and returnsfalseif 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.- Specified by:
isContainerPageOnlyin interfaceI_CmsXmlContentHandler- Returns:
- the container page only flag
- See Also:
I_CmsXmlContentHandler.isContainerPageOnly()
-
isValueVisible
public 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.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.
- Specified by:
isValueVisiblein interfaceI_CmsXmlContentVisibilityHandler- Parameters:
cms- the cms contextvalue- the content valueelementName- the path to the elementparams- configuration parametersresource- the edited resourcecontentLocale- the locale being edited- Returns:
trueif the given content value field should be visible to the current user- See Also:
I_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)
-
isVisible
public boolean isVisible(CmsObject cms, I_CmsXmlSchemaType contentValue, java.lang.String valuePath, CmsResource resource, java.util.Locale contentLocale)
Description copied from interface:I_CmsXmlContentHandlerReturns if the given content field should be visible to the current user.- Specified by:
isVisiblein interfaceI_CmsXmlContentHandler- Parameters:
cms- the cms contextcontentValue- the content value typevaluePath- the value pathresource- the edited resourcecontentLocale- the content locale- Returns:
trueif the given content field should be visible to the current user- See Also:
I_CmsXmlContentHandler.isVisible(org.opencms.file.CmsObject, org.opencms.xml.types.I_CmsXmlSchemaType, java.lang.String, org.opencms.file.CmsResource, java.util.Locale)
-
prepareForUse
public CmsXmlContent prepareForUse(CmsObject cms, CmsXmlContent content)
Description copied from interface:I_CmsXmlContentHandlerPrepares the given XML content to be used after it was read from the OpenCms VFS.This method is always called after any content is unmarshalled. It can be used to perform customized actions on the given XML content.
- Specified by:
prepareForUsein interfaceI_CmsXmlContentHandler- Parameters:
cms- the current OpenCms user contextcontent- the XML content to be used as read from the VFS- Returns:
- the prepared content to be used
- See Also:
I_CmsXmlContentHandler.prepareForUse(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent)
-
prepareForWrite
public CmsFile prepareForWrite(CmsObject cms, CmsXmlContent content, CmsFile file) throws CmsException
Description copied from interface:I_CmsXmlContentHandlerPrepares the given XML content to be written to the OpenCms VFS.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.
- Specified by:
prepareForWritein interfaceI_CmsXmlContentHandler- Parameters:
cms- the current OpenCms user contextcontent- the XML content to be writtenfile- the resource the XML content in it's current state was unmarshalled from- Returns:
- the file to write to the OpenCms VFS, this will be an updated version of the parameter file
- Throws:
CmsException- in case something goes wrong- See Also:
I_CmsXmlContentHandler.prepareForWrite(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, org.opencms.file.CmsFile)
-
resolveMapping
public void resolveMapping(CmsObject cms, CmsXmlContent content, I_CmsXmlContentValue value) throws CmsException
Description copied from interface:I_CmsXmlContentHandlerResolves the value mappings of the given XML content value, according to the rules of this XML content handler.- Specified by:
resolveMappingin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current OpenCms user contextcontent- the XML content to resolve the mappings forvalue- the value to resolve the mappings for- Throws:
CmsException- if something goes wrong- See Also:
I_CmsXmlContentHandler.resolveMapping(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, org.opencms.xml.types.I_CmsXmlContentValue)
-
resolveValidation
public CmsXmlContentErrorHandler resolveValidation(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
Description copied from interface:I_CmsXmlContentHandlerPerforms a validation of the given XML content value, and saves all errors or warnings found in the provided XML content error handler.The errorHandler parameter is optional, if
nullis given a new error handler instance must be created.- Specified by:
resolveValidationin interfaceI_CmsXmlContentHandler- Parameters:
cms- the current OpenCms user contextvalue- the value to resolve the validation rules forerrorHandler- (optional) an error handler instance that contains previous error or warnings- Returns:
- an error handler that contains all errors and warnings currently found
- See Also:
I_CmsXmlContentHandler.resolveValidation(org.opencms.file.CmsObject, org.opencms.xml.types.I_CmsXmlContentValue, org.opencms.xml.content.CmsXmlContentErrorHandler)
-
addCheckRule
protected void addCheckRule(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String invalidate, java.lang.String type) throws CmsXmlException
Adds a check rule for a specified element.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element name to add the rule toinvalidate-false, to disable link check /trueornode, 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 type- Throws:
CmsXmlException- in case an unknown element name is used
-
addConfiguration
protected void addConfiguration(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String configurationValue) throws CmsXmlException
Adds a configuration value for an element widget.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element nameconfigurationValue- the configuration value to use- Throws:
CmsXmlException- in case an unknown element name is used
-
addDefault
protected void addDefault(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String defaultValue, java.lang.String resolveMacrosValue) throws CmsXmlException
Adds a default value for an element.- Parameters:
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' attribute- Throws:
CmsXmlException- in case an unknown element name is used
-
addDefaultCheckRules
protected void addDefaultCheckRules(CmsXmlContentDefinition rootContentDefinition, I_CmsXmlSchemaType schemaType, java.lang.String elementPath) throws CmsXmlException
Adds all needed default check rules recursively for the given schema type.- Parameters:
rootContentDefinition- the root content definitionschemaType- the schema type to checkelementPath- the current element path- Throws:
CmsXmlException- if something goes wrong
-
addDisplayType
protected void addDisplayType(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, I_CmsXmlContentHandler.DisplayType displayType) throws CmsXmlException
Adds the given element to the compact view set.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element namedisplayType- the display type to use for the element widget- Throws:
CmsXmlException- in case an unknown element name is used
-
addGeoMappingField
protected void addGeoMappingField()
Finally adds the field used for geo-coordinate mapping by combining the configuration from the geomapping section and the field settings.
-
addMapping
protected void addMapping(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String mapping, java.lang.String useDefault) throws CmsXmlException
Adds an element mapping.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element name to mapmapping- the mapping to useuseDefault- the 'useDefault' attribute- Throws:
CmsXmlException- in case an unknown element name is used
-
addNestedFormatter
protected void addNestedFormatter(java.lang.String elementName, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Adds a nested formatter element.- Parameters:
elementName- the element namecontentDefinition- the content definition- Throws:
CmsXmlException- in case something goes wrong
-
addSearchField
@Deprecated protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field)
Deprecated.Adds a Solr field for an element.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs tofield- the Solr field
-
addSearchField
protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field, I_CmsXmlContentHandler.MappingType type)
Adds a Solr field for an element.- Parameters:
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 on
-
addSearchSetting
protected void addSearchSetting(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, I_CmsXmlContentValue.SearchContentType value) throws CmsXmlException
Adds a search setting for an element.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element name to mapvalue- the search setting value to store- Throws:
CmsXmlException- in case an unknown element name is used
-
addSimpleSearchSetting
protected void addSimpleSearchSetting(CmsXmlContentDefinition contentDef, java.lang.String name, java.lang.String value) throws CmsXmlException
Adds search settings as defined by 'simple' syntax in fields.- Parameters:
contentDef- the content definitionname- the element namevalue- the search setting value- Throws:
CmsXmlException- if something goes wrong
-
addValidationRule
protected void addValidationRule(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String regex, java.lang.String message, boolean isWarning) throws CmsXmlException
Adds a validation rule for a specified element.- Parameters:
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 error- Throws:
CmsXmlException- in case an unknown element name is used
-
addWidget
protected void addWidget(CmsXmlContentDefinition contentDefinition, java.lang.String elementName, java.lang.String name) throws CmsXmlException
Adds a GUI widget for a specified element.- Parameters:
contentDefinition- the XML content definition this XML content handler belongs toelementName- the element name to mapname- the widget to use as GUI for the element (registered alias or class name)- Throws:
CmsXmlException- in case an unknown element name is used
-
createVisibilityConfiguration
protected CmsDefaultXmlContentHandler.VisibilityConfiguration createVisibilityConfiguration(java.lang.String className, java.lang.String params)
Helper method to create a visibility configuration.- Parameters:
className- the visibility handler class nameparams- the parameters for the visibility- Returns:
- the visibility configuration
-
getAttributeMapping
protected org.opencms.xml.content.CmsDefaultXmlContentHandler.MappingInfo getAttributeMapping(CmsMappingResolutionContext.AttributeType attr)
Returns information about the availability mapping for the given availability attribute.- Parameters:
attr- the availability attribute- Returns:
- the information about the mapping
-
getLocalesForResource
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.- Parameters:
cms- the cms contextresource- the resource path to get the default locales for- Returns:
- the default locales of the resource
-
getNestedEditorChangeHandlers
protected java.util.List<I_CmsXmlContentEditorChangeHandler> getNestedEditorChangeHandlers()
Creates editor change handler instances for all nested fields that have configured them in their field settings- Returns:
- editor change handlers for all nested fields for which they are configured
-
getReferencePath
protected java.lang.String getReferencePath(CmsObject cms, I_CmsXmlContentValue value)
Returns the category reference path for the given value.- Parameters:
cms- the cms contextvalue- the xml content value- Returns:
- the category reference path for the given value
-
getValidationMessage
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.- Parameters:
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 error- Returns:
- the validation message to be displayed
-
init
protected void init()
Called when this content handler is initialized.
-
initDefaultValues
protected void initDefaultValues(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the default values for this content handler.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.
- Parameters:
root- the "defaults" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the default values belong to- Throws:
CmsXmlException- if something goes wrong
-
initDefaultWidget
protected void initDefaultWidget(org.dom4j.Element element)
Initializes the default complex widget.- Parameters:
element- the element in which the default complex widget is configured
-
initEditHandler
protected void initEditHandler(org.dom4j.Element handlerElement)
Initializes the edit handler.- Parameters:
handlerElement- the edit handler element
-
initEditorChangeHandlers
protected void initEditorChangeHandlers(org.dom4j.Element element)
Initializes the editor change handlers.- Parameters:
element- the editorchangehandlers node of the app info
-
initField
protected void initField(org.dom4j.Element elem, CmsXmlContentDefinition contentDef) throws CmsXmlException
Processes a single field definition.- Parameters:
elem- the parent elementcontentDef- the content definition- Throws:
CmsXmlException- if something goes wrong
-
initFields
protected void initFields(org.dom4j.Element parent, CmsXmlContentDefinition contentDef) throws CmsXmlException
Processes all field declarations in the schema.- Parameters:
parent- the parent elementcontentDef- the content definition- Throws:
CmsXmlException- if something goes wrong
-
initFormatters
protected void initFormatters(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the formatters for this content handler.- Parameters:
root- the "formatters" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the formatters belong to
-
initHeadIncludes
protected void initHeadIncludes(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the head includes for this content handler.- Parameters:
root- the "headincludes" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the head-includes belong to
-
initJsonRenderer
protected void initJsonRenderer(org.dom4j.Element element)
Reads the JSON renderer settings.- Parameters:
element- the configuration XML element
-
initLayouts
protected void initLayouts(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the layout for this content handler.Unless otherwise instructed, the editor uses one specific GUI widget for each XML value schema type. For example, for a
CmsXmlStringValuethe default widget is theCmsInputWidget. However, certain values can also use more then one widget, for example you may also use aCmsCheckboxWidgetfor 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
widgetattribute. You can specify either a valid widget alias such asStringWidget, or the name of a Java class that implements.I_CmsWidgetConfiguration options to the widget can be passed using the
configurationattribute. 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.- Parameters:
root- the "layouts" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the layout belongs to- Throws:
CmsXmlException- if something goes wrong
-
initMappings
protected void initMappings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the element mappings for this content handler.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.
- Parameters:
root- the "mappings" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the mappings belong to- Throws:
CmsXmlException- if something goes wrong
-
initModelFolder
protected void initModelFolder(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the folder containing the model file(s) for this content handler.- Parameters:
root- the "modelfolder" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the model folder belongs to- Throws:
CmsXmlException- if something goes wrong
-
initNestedFormatters
protected void initNestedFormatters(org.dom4j.Element element, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the nested formatter fields.- Parameters:
element- the formatters elementcontentDefinition- the content definition- Throws:
CmsXmlException- in case something goes wron
-
initParameters
protected void initParameters(org.dom4j.Element root)
Initializes the parameters from the schema.- Parameters:
root- the parameter root element
-
initPreview
protected void initPreview(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the preview location for this content handler.- Parameters:
root- the "preview" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the validation rules belong to- Throws:
CmsXmlException- if something goes wrong
-
initRelations
protected void initRelations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the relation configuration for this content handler.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.
- Parameters:
root- the "relations" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the check rules belong to- Throws:
CmsXmlException- if something goes wrong
-
initResourceBundle
protected void initResourceBundle(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition, boolean single) throws CmsXmlException
Initializes the resource bundle to use for localized messages in this content handler.- Parameters:
root- the "resourcebundle" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the validation rules belong tosingle- iftruewe process the classic sinle line entry, otherwise it's the multiple line setting- Throws:
CmsXmlException- if something goes wrong
-
initSearchSettings
protected void initSearchSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the search exclusions values for this content handler.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.
- Parameters:
root- the "searchsettings" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the default values belong to- Throws:
CmsXmlException- if something goes wrong
-
initSettings
protected void initSettings(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the element settings for this content handler.- Parameters:
root- the "settings" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the element settings belong to
-
initSynchronizations
protected void initSynchronizations(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the locale synchronizations elements.- Parameters:
root- the synchronizations element of the content schema appinfo.contentDefinition- the content definition
-
initTabs
protected void initTabs(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the tabs for this content handler.- Parameters:
root- the "tabs" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the tabs belong to
-
initTemplates
protected void initTemplates(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the forbidden template contexts.- Parameters:
root- the root XML elementcontentDefinition- the content definition
-
initValidationRules
protected void initValidationRules(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException
Initializes the validation rules this content handler.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.
- Parameters:
root- the "validationrules" element from the appinfo node of the XML content definitioncontentDefinition- the content definition the validation rules belong to- Throws:
CmsXmlException- if something goes wrong
-
initVisibilities
protected void initVisibilities(org.dom4j.Element root, CmsXmlContentDefinition contentDefinition)
Initializes the content visibility settings.- Parameters:
root- the visibilities appinfo elementcontentDefinition- the content definition
-
isInvalidateParent
protected boolean isInvalidateParent(java.lang.String xpath)
Returns the is-invalidate-parent flag for the given xpath.- Parameters:
xpath- the path to get the check rule for- Returns:
- the configured is-invalidate-parent flag for the given xpath
-
key
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.If the key was not found in the configured bundle, or no bundle is configured for this content handler, the return value is
"??? " + keyName + " ???".- Parameters:
keyName- the key for the desired stringlocale- the locale to get the key from- Returns:
- the resource string for the given key
- See Also:
CmsMessages.formatUnknownKey(String),CmsMessages.isUnknownKey(String)
-
parseSearchMappingTypes
protected java.util.Set<I_CmsXmlContentHandler.MappingType> parseSearchMappingTypes(org.dom4j.Element solrElement)
- Parameters:
solrElement- the XML node of the <solrfield> node- Returns:
- parsed values of the attribute "addto"
-
removeEmptyMappings
protected void removeEmptyMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
Removes property values on resources for non-existing, optional elements.- Parameters:
cms- the current users OpenCms contextfile- the file which is currently being prepared for writingcontent- the XML content to remove the property values for- Throws:
CmsException- in case of read/write errors accessing the OpenCms VFS
-
resolveDefaultMappings
protected void resolveDefaultMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
Resolves those mappings for which no content value exists and useDefault is set to true.- Parameters:
cms- the CMS context to usefile- the content filecontent- the content object- Throws:
CmsException- if something goes wrong
-
validateAppinfoElement
protected void validateAppinfoElement(org.dom4j.Element appinfoElement) throws CmsXmlException
Validates if the givenappinfoelement node from the XML content definition schema is valid according the the capabilities of this content handler.- Parameters:
appinfoElement- theappinfoelement node to validate- Throws:
CmsXmlException- in case the element validation fails
-
validateCategories
protected CmsXmlContentErrorHandler validateCategories(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
The errorHandler parameter is optional, ifnullis given a new error handler instance must be created.- Parameters:
cms- the current OpenCms user contextvalue- the value to resolve the validation rules forerrorHandler- (optional) an error handler instance that contains previous error or warnings- Returns:
- an error handler that contains all errors and warnings currently found
-
validateLink
protected boolean validateLink(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler)
Validates the given rules against the given value.- Parameters:
cms- the current users OpenCms contextvalue- the value to validateerrorHandler- the error handler to use in case errors or warnings are detected- Returns:
- if a broken link has been found
-
validateValue
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.- Parameters:
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 error- Returns:
- the updated error handler
-
validateValue
protected CmsXmlContentErrorHandler validateValue(CmsObject cms, I_CmsXmlContentValue value, java.lang.String valueStr, CmsXmlContentErrorHandler errorHandler, boolean isWarning)
Checks the default XML schema validation rules.These rules should only be tested if this is not a test for warnings.
- Parameters:
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 error- Returns:
- the updated error handler
-
writeCategories
protected CmsFile writeCategories(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException
Writes the categories if a category widget is present.- Parameters:
cms- the cms contextfile- the filecontent- the xml content to set the categories for- Returns:
- the perhaps modified file
- Throws:
CmsException- if something goes wrong
-
-