Package org.ametys.cms.search.ui.model
Class StaticSearchUIModelColumnsParser
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.runtime.model.AbstractViewParser
org.ametys.cms.contenttype.AbstractContentTypeViewParser
org.ametys.cms.search.ui.model.StaticSearchUIModelColumnsParser
- All Implemented Interfaces:
ViewParser,Component,LogEnabled,Serviceable
Component that parses the columns of a
StaticSearchUIModel-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collection<ContentType>Content types containing the item available in the search model's columnsFields inherited from class org.ametys.cms.contenttype.AbstractContentTypeViewParser
_contentTypeExtensionPoint, _contentTypesHelper, _systemPropertyExtensionPointFields inherited from class org.ametys.runtime.model.AbstractViewParser
__VIEW_REFERENCE_PATTERN, __VIEW_REFERENCE_REGEXFields inherited from interface org.ametys.runtime.model.ViewParser
ADD_GROUP_TAG_NAME, ADD_ITEM_TAG_NAME, ALL_ITEMS_REFERENCE, ITEM_REFERENCE_ATTRIBUTE_NAME, REMOVE_ITEM_TAG_NAME -
Constructor Summary
ConstructorsConstructorDescriptionStaticSearchUIModelColumnsParser(Collection<ContentType> contentTypes) Creates aStaticSearchUIModel's columns parser -
Method Summary
Modifier and TypeMethodDescriptionprotected ModelViewItem_createModelViewItemInstance(ModelItem modelItem) Creates an instance ofModelViewItemdue to the givenModelItemprotected ViewItemCreates aViewIteminstance, that will be the copy of an existing view item in a referenced viewprotected void_fillViewGeneralInformation(ModelHelper.ConfigurationAndPluginName viewConfiguration, View view, View existingView, Collection<? extends Model> model) Fill the general information of the given view (label, description, ...)protected Collection<? extends Model>Retrieves the model corresponding to the view to parseprotected ModelItem_getModelItem(ModelHelper.ConfigurationAndPluginName itemConfiguration, String modelItemName, Collection<? extends ModelItemAccessor> parents) Retrieves the model item with the given nameprotected String_parseViewName(ModelHelper.ConfigurationAndPluginName viewConfiguration) Parses the name of the viewprotected ModelViewItemcreateModelViewItem(ModelHelper.ConfigurationAndPluginName itemConfiguration, ModelItem modelItem, View referenceView, boolean override) Creates the model view item corresponding to the given configurationprotected ModelViewItemcreateModelViewItemForAllItemsReference(ModelHelper.ConfigurationAndPluginName itemConfiguration, ModelItem modelItem, View referenceView, boolean override) Creates the model view item corresponding to the given configuration, in cas of all items referencesoverrideView(ModelHelper.ConfigurationAndPluginName viewConfiguration, View existingView) Parses a view configuration to override aViewobject.Methods inherited from class org.ametys.cms.contenttype.AbstractContentTypeViewParser
_parseContentElementViewItem, _parseViewElement, _parseViewReference, serviceMethods inherited from class org.ametys.runtime.model.AbstractViewParser
_addItemToOverriddenView, _addItemToViewItemAccessor, _createViewItemAccessor, _getAddItemChildConfiguration, _getModelItemReference, _insertItemInViewItemAccessor, _isAddingGroupConfiguration, _isAddingItemConfiguration, _isRemovingItemConfiguration, _parseModelViewItem, _parseSimpleViewItemGroup, _parseSimpleViewItemGroupChild, _parseViewChild, _parseViewItemAccessorChild, _removeViewItemFromView, parseAllModelViewItems, parseViewMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_contentTypes
Content types containing the item available in the search model's columns
-
-
Constructor Details
-
StaticSearchUIModelColumnsParser
Creates aStaticSearchUIModel's columns parser- Parameters:
contentTypes- The content types containing the item available in the search model's columns
-
-
Method Details
-
_parseViewName
protected String _parseViewName(ModelHelper.ConfigurationAndPluginName viewConfiguration) throws ConfigurationException Description copied from class:AbstractViewParserParses the name of the view- Overrides:
_parseViewNamein classAbstractViewParser- Parameters:
viewConfiguration- the view's configuration- Returns:
- the view's name
- Throws:
ConfigurationException- if an error occurs while parsing the view's name
-
overrideView
public View overrideView(ModelHelper.ConfigurationAndPluginName viewConfiguration, View existingView) throws ConfigurationException Description copied from interface:ViewParserParses a view configuration to override aViewobject.- Specified by:
overrideViewin interfaceViewParser- Overrides:
overrideViewin classAbstractViewParser- Parameters:
viewConfiguration- the configuration of the view to parseexistingView- The view to override- Returns:
- the overridden view
- Throws:
ConfigurationException- if the configuration is not valid.
-
_fillViewGeneralInformation
protected void _fillViewGeneralInformation(ModelHelper.ConfigurationAndPluginName viewConfiguration, View view, View existingView, Collection<? extends Model> model) throws ConfigurationException Description copied from class:AbstractViewParserFill the general information of the given view (label, description, ...)- Overrides:
_fillViewGeneralInformationin classAbstractViewParser- Parameters:
viewConfiguration- the configuration of the view to fillview- the view to fillexistingView- the existing view, that may already contain general informationmodel- The model of the view- Throws:
ConfigurationException- if the configuration is not valid.
-
_getModel
Description copied from class:AbstractViewParserRetrieves the model corresponding to the view to parse- Specified by:
_getModelin classAbstractViewParser- Returns:
- the model
-
_getModelItem
protected ModelItem _getModelItem(ModelHelper.ConfigurationAndPluginName itemConfiguration, String modelItemName, Collection<? extends ModelItemAccessor> parents) throws ConfigurationException Description copied from class:AbstractViewParserRetrieves the model item with the given name- Overrides:
_getModelItemin classAbstractContentTypeViewParser- Parameters:
itemConfiguration- configuration of the model view itemmodelItemName- the model item nameparents- the accessors containing the model item- Returns:
- the model item
- Throws:
ConfigurationException- if the configuration is not valid.
-
createModelViewItemForAllItemsReference
protected ModelViewItem createModelViewItemForAllItemsReference(ModelHelper.ConfigurationAndPluginName itemConfiguration, ModelItem modelItem, View referenceView, boolean override) throws ConfigurationException Description copied from class:AbstractViewParserCreates the model view item corresponding to the given configuration, in cas of all items references- Overrides:
createModelViewItemForAllItemsReferencein classAbstractViewParser- Parameters:
itemConfiguration- configuration of the model view itemmodelItem- the model itemreferenceView- view that references the itemoverride-trueif the configuration is an override,falseotherwise- Returns:
- the created model view item
- Throws:
ConfigurationException- if the configuration is not valid.
-
createModelViewItem
protected ModelViewItem createModelViewItem(ModelHelper.ConfigurationAndPluginName itemConfiguration, ModelItem modelItem, View referenceView, boolean override) throws ConfigurationException Description copied from class:AbstractViewParserCreates the model view item corresponding to the given configuration- Overrides:
createModelViewItemin classAbstractViewParser- Parameters:
itemConfiguration- configuration of the model view itemmodelItem- the model itemreferenceView- view that references the itemoverride-trueif the configuration is an override,falseotherwise- Returns:
- the created model view item
- Throws:
ConfigurationException- if the configuration is not valid.
-
_createModelViewItemInstance
Description copied from class:AbstractViewParserCreates an instance ofModelViewItemdue to the givenModelItem- Overrides:
_createModelViewItemInstancein classAbstractViewParser- Parameters:
modelItem- the model item corresponding to the view item to create- Returns:
- the created view item
-
_createViewItemCopyInstanceForReferencedView
Description copied from class:AbstractContentTypeViewParserCreates aViewIteminstance, that will be the copy of an existing view item in a referenced view- Overrides:
_createViewItemCopyInstanceForReferencedViewin classAbstractContentTypeViewParser- Parameters:
viewItem- the view item that will be copied- Returns:
- the created
ViewIteminstance
-