Class DefaultCollectionEditorModel

java.lang.Object
de.hybris.platform.cockpit.model.referenceeditor.collection.model.AbstractCollectionEditorModel
de.hybris.platform.cockpit.model.referenceeditor.collection.model.DefaultCollectionEditorModel
All Implemented Interfaces:
CollectionEditorModel
Direct Known Subclasses:
DefaultMediaCollectionEditorModel

public class DefaultCollectionEditorModel extends AbstractCollectionEditorModel
  • Field Details

  • Constructor Details

    • DefaultCollectionEditorModel

      public DefaultCollectionEditorModel(ObjectType rootType)
  • Method Details

    • setParameters

      public void setParameters(Map<String,? extends Object> parameters)
    • getSimpleReferenceSelectorModel

      public DefaultSimpleReferenceSelectorModel getSimpleReferenceSelectorModel()
    • getCollectionItems

      public List<Object> getCollectionItems()
    • setCollectionItems

      public void setCollectionItems(Collection<Object> collectionItems)
    • addCollectionItem

      public void addCollectionItem(Object item)
    • addCollectionItems

      public void addCollectionItems(Collection<? extends Object> collection)
    • removeCollectionItem

      public boolean removeCollectionItem(int index)
    • removeCollectionItem

      public boolean removeCollectionItem(Object item)
    • moveCollectionItem

      public boolean moveCollectionItem(int fromIndex, int toIndex)
    • clearCollectionItems

      public void clearCollectionItems()
    • getItemLabel

      public String getItemLabel(Object item)
    • getRootType

      public ObjectType getRootType()
      Description copied from interface: CollectionEditorModel
      Returns the root type of this reference collection editor i.e. the type of the items which this editor should hold references to.

      Note: If the root search type differs from the root type, this editor will actually hold items of the type returned by CollectionEditorModel.getRootSearchType(). In this case information about the root type is generally needed for value handling.

      Returns:
      the root type of this editor
      See Also:
    • setRootType

      public void setRootType(ObjectType rootType)
      Sets the root type of this reference selector i.e. the type of the items which this editor should hold references to.

      Note: Unless search type has been set explicitly, getRootSearchType() will return the same type as getRootType().

      Parameters:
      rootType - reference type
      See Also:
    • getRootSearchType

      public ObjectType getRootSearchType()
      Description copied from interface: CollectionEditorModel
      Returns the type for which this reference collection editor should search for.

      Generally, if no root search type has been explicitly set, this method returns the same type as CollectionEditorModel.getRootType().

      Note: The root search type is actually the type of the items held by this editor, whereas root type is the type which should be used for persisting values.
      Returns:
      the type for which this reference collection editor should search for
      See Also:
    • setRootSearchType

      public void setRootSearchType(ObjectType rootSearchType)
      Sets the type for which this reference selector should search for. If rootSearchType is null getRootSearchType() will return the same type as getRootType().
      Parameters:
      rootSearchType - the type of the items to search for
      See Also:
    • initializeReferenceSelectorModel

      protected void initializeReferenceSelectorModel(ObjectType rootType)
    • getTypeService

      public TypeService getTypeService()