Package org.opencms.xml.containerpage
Class CmsXmlContainerPageHandler
java.lang.Object
org.opencms.xml.content.CmsDefaultXmlContentHandler
org.opencms.xml.containerpage.CmsXmlContainerPageHandler
- All Implemented Interfaces:
I_CmsXmlContentHandler
,I_CmsXmlContentVisibilityHandler
Container page handler to validate consistency.
- Since:
- 7.6
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.xml.content.CmsDefaultXmlContentHandler
CmsDefaultXmlContentHandler.InvalidRelationAction, CmsDefaultXmlContentHandler.VisibilityConfiguration
Nested classes/interfaces inherited from interface org.opencms.xml.content.I_CmsXmlContentHandler
I_CmsXmlContentHandler.DisplayType, I_CmsXmlContentHandler.JsonRendererSettings, I_CmsXmlContentHandler.MappingType, I_CmsXmlContentHandler.SynchronizationMode
-
Field Summary
Fields inherited from class org.opencms.xml.content.CmsDefaultXmlContentHandler
A_CONFIGURATION, APPINFO_APPINFO, APPINFO_ATTR_ADD_TO, APPINFO_ATTR_BOOST, APPINFO_ATTR_CLASS, APPINFO_ATTR_COLLAPSE, APPINFO_ATTR_CONFIGURATION, APPINFO_ATTR_CONTAINER_PAGE_ONLY, APPINFO_ATTR_COPY_FIELDS, APPINFO_ATTR_DEFAULT, APPINFO_ATTR_DESCRIPTION, APPINFO_ATTR_DISPLAY, APPINFO_ATTR_ELEMENT, APPINFO_ATTR_ERROR, APPINFO_ATTR_INVALIDATE, APPINFO_ATTR_KEY, APPINFO_ATTR_LOCALE, APPINFO_ATTR_MAPPING, APPINFO_ATTR_MAPTO, APPINFO_ATTR_MAXWIDTH, APPINFO_ATTR_MESSAGE, APPINFO_ATTR_MINWIDTH, APPINFO_ATTR_NAME, APPINFO_ATTR_NICE_NAME, APPINFO_ATTR_PARAMS, APPINFO_ATTR_PREVIEW, APPINFO_ATTR_REGEX, APPINFO_ATTR_RESOLVE_MACROS, APPINFO_ATTR_RULE_REGEX, APPINFO_ATTR_RULE_TYPE, APPINFO_ATTR_SCOPE, APPINFO_ATTR_SEARCHCONTENT, APPINFO_ATTR_SELECT_INHERIT, APPINFO_ATTR_SOURCE_FIELD, APPINFO_ATTR_TARGET_FIELD, APPINFO_ATTR_TYPE, APPINFO_ATTR_TYPE_NODE, APPINFO_ATTR_TYPE_PARENT, APPINFO_ATTR_TYPE_WARNING, APPINFO_ATTR_URI, APPINFO_ATTR_USEALL, APPINFO_ATTR_VALUE, APPINFO_ATTR_WIDGET, APPINFO_ATTR_WIDGET_CONFIG, APPINFO_ATTRIBUTE_TYPE_CSS, APPINFO_ATTRIBUTE_TYPE_JAVASCRIPT, APPINFO_BUNDLE, APPINFO_DEFAULT, APPINFO_DEFAULTS, APPINFO_EDIT_HANDLER, APPINFO_EDITOR_CHANGE_HANDLER, APPINFO_EDITOR_CHANGE_HANDLERS, APPINFO_FORBIDDEN_CONTEXTS, APPINFO_FORMATTER, APPINFO_FORMATTERS, APPINFO_GEOMAPPING, APPINFO_HEAD_INCLUDE, APPINFO_HEAD_INCLUDES, APPINFO_LAYOUT, APPINFO_LAYOUTS, APPINFO_MAPPING, APPINFO_MAPPINGS, APPINFO_MESSAGEKEYHANDLER, APPINFO_MODELFOLDER, APPINFO_NESTED_FORMATTER, APPINFO_NESTED_FORMATTERS, APPINFO_PARAM, APPINFO_PARAMETERS, APPINFO_PREVIEW, APPINFO_PROPERTYBUNDLE, APPINFO_RELATION, APPINFO_RELATIONS, APPINFO_RESOURCE, APPINFO_RESOURCEBUNDLE, APPINFO_RESOURCEBUNDLES, APPINFO_REVERSE_MAPPING_ENABLED, APPINFO_RULE, APPINFO_SCHEMA_FILE, APPINFO_SCHEMA_FILE_TYPES, APPINFO_SCHEMA_SYSTEM_ID, APPINFO_SCHEMA_TYPES_SYSTEM_ID, APPINFO_SEARCHSETTING, APPINFO_SEARCHSETTINGS, APPINFO_SETTING, APPINFO_SETTINGS, APPINFO_SOLR_FIELD, APPINFO_SYNCHRONIZATION, APPINFO_SYNCHRONIZATIONS, APPINFO_TAB, APPINFO_TABS, APPINFO_TEMPLATE, APPINFO_TEMPLATES, APPINFO_VALIDATIONRULE, APPINFO_VALIDATIONRULES, APPINFO_VALUE_ADD_TO_CONTENT, APPINFO_VALUE_ADD_TO_PAGE, APPINFO_VERSION_TRANSFORMATION, APPINFO_VISIBILITIES, APPINFO_VISIBILITY, APPINFO_XMLBUNDLE, ATTR_ENABLED, ATTR_ENABLED_BY_DEFAULT, ATTR_USE_ACACIA, ATTRIBUTE_INCLUDE_TYPE_CSS, ATTRIBUTE_INCLUDE_TYPE_JAVASCRIPT, GEOMAPPING_FIELD, m_allowedTemplates, m_combinedSynchronizations, m_configurationValues, m_cssHeadIncludes, m_defaultValues, m_elementMappings, m_formatterConfiguration, m_formatters, m_geomappingEntries, m_invalidRelationActions, m_jsHeadIncludes, m_messageBundleNames, m_modelFolder, m_previewLocation, m_primaryGeomappingField, m_relationChecks, m_relations, m_searchFields, m_searchFieldsPage, m_searchSettings, m_searchTemplateGroup, m_settings, m_synchronizations, m_tabs, m_titleMappings, m_useAcacia, m_validationErrorMessages, m_validationErrorRules, m_validationWarningMessages, m_validationWarningRules, m_versionTransformation, MACRO_PREVIEW_TEMPFILE, MESSAGE_VALIDATION_DEFAULT_ERROR, MESSAGE_VALIDATION_DEFAULT_WARNING, N_CHANGEHANDLER, N_SETTING
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the contents for this content handler have schema-based formatters which can be disabled or enabled.prepareForWrite
(CmsObject cms, CmsXmlContent content, CmsFile file) Prepares the given XML content to be written to the OpenCms VFS.resolveValidation
(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler) Performs a validation of the given XML content value, and saves all errors or warnings found in the provided XML content error handler.protected boolean
validateLink
(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler) Validates the given rules against the given value.protected void
validateNames
(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContent content) Validates container names, so that they are unique in the page.Methods inherited from class org.opencms.xml.content.CmsDefaultXmlContentHandler
addCheckRule, addConfiguration, addDefault, addDefaultCheckRules, addDisplayType, addGeoMappingField, addMapping, addNestedFormatter, addSearchField, addSearchField, addSearchSetting, addSimpleSearchSetting, addValidationRule, addWidget, applyReverseAvailabilityMapping, canUseReverseAvailabilityMapping, createRootCms, createVisibilityConfiguration, getAllowedTemplates, getAttributeMapping, getChangeHandlerConfigs, getComplexWidget, getConfiguration, getConfiguration, getConfiguredDisplayType, getCSSHeadIncludes, getCSSHeadIncludes, getDefault, getDefault, getDefaultComplexWidget, getDefaultComplexWidgetClass, getDefaultComplexWidgetConfiguration, getDisplayType, getEditHandler, getEditorChangeHandlers, getFieldHelp, getFieldLabels, getFormatterConfiguration, getGeoMappingConfiguration, getInvalidRelationAction, getJSHeadIncludes, getJSHeadIncludes, getJsonRendererSettings, getLocalesForResource, getMappings, getMappings, getMessageKeyHandler, getMessages, getModelFolder, getNestedEditorChangeHandlers, getNestedFormatters, getParameter, getParameters, getPreview, getReferencePath, getRelationType, getRelationType, getRelationType, getSearchContentType, getSearchFields, getSearchFieldsForPage, getSearchSettings, getSettings, getSynchronizations, getTabs, getTitleMapping, getValidationError, getValidationMessage, getValidationWarning, getValidationWarningOrErrorMessage, getVersionTransformation, getVisibilityConfigString, getWidget, getWidget, hasNestedFormatters, hasSynchronizedElements, hasVisibilityHandlers, init, initDefaultValues, initDefaultWidget, initEditHandler, initEditorChangeHandlers, initField, initFields, initFormatters, initHeadIncludes, initialize, initJsonRenderer, initLayouts, initMappings, initModelFolder, initNestedFormatters, initParameters, initPreview, initRelations, initResourceBundle, initSearchSettings, initSettings, initSynchronizations, initTabs, initTemplates, initValidationRules, initVisibilities, invalidateBrokenLinks, isAcaciaEditorDisabled, isContainerPageOnly, isInvalidateParent, isValueVisible, isVisible, key, parseSearchMappingTypes, prepareForUse, removeEmptyMappings, resolveDefaultMappings, resolveMapping, validateAppinfoElement, validateCategories, validateValue, validateValue, writeCategories
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
-
Constructor Details
-
CmsXmlContainerPageHandler
public CmsXmlContainerPageHandler()Creates a new instance.
-
-
Method Details
-
hasModifiableFormatters
Description copied from interface:I_CmsXmlContentHandler
Returns true if the contents for this content handler have schema-based formatters which can be disabled or enabled.- Specified by:
hasModifiableFormatters
in interfaceI_CmsXmlContentHandler
- Overrides:
hasModifiableFormatters
in classCmsDefaultXmlContentHandler
- Returns:
- true if the contents for this content handler have schema-based formatters which can be disabled or enabled
- See Also:
-
prepareForWrite
public CmsFile prepareForWrite(CmsObject cms, CmsXmlContent content, CmsFile file) throws CmsException Description copied from interface:I_CmsXmlContentHandler
Prepares 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:
prepareForWrite
in interfaceI_CmsXmlContentHandler
- Overrides:
prepareForWrite
in classCmsDefaultXmlContentHandler
- 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:
-
resolveValidation
public CmsXmlContentErrorHandler resolveValidation(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler) Description copied from interface:I_CmsXmlContentHandler
Performs 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
null
is given a new error handler instance must be created.- Specified by:
resolveValidation
in interfaceI_CmsXmlContentHandler
- Overrides:
resolveValidation
in classCmsDefaultXmlContentHandler
- 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:
-
validateLink
protected boolean validateLink(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContentErrorHandler errorHandler) Description copied from class:CmsDefaultXmlContentHandler
Validates the given rules against the given value.- Overrides:
validateLink
in classCmsDefaultXmlContentHandler
- 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
- See Also:
-
validateNames
protected void validateNames(CmsObject cms, I_CmsXmlContentValue value, CmsXmlContent content) throws CmsXmlException Validates container names, so that they are unique in the page.- Parameters:
cms
- the cms contextvalue
- the value to validatecontent
- the container page to validate- Throws:
CmsXmlException
- if there are duplicated names
-