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 Summary
Fields Modifier and Type Field Description protected DefaultSimpleReferenceSelectorModelreferenceSelectorModel-
Fields inherited from class de.hybris.platform.cockpit.model.referenceeditor.collection.model.AbstractCollectionEditorModel
listeners
-
-
Constructor Summary
Constructors Constructor Description DefaultCollectionEditorModel(ObjectType rootType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCollectionItem(java.lang.Object item)voidaddCollectionItems(java.util.Collection<? extends java.lang.Object> collection)voidclearCollectionItems()java.util.List<java.lang.Object>getCollectionItems()java.lang.StringgetItemLabel(java.lang.Object item)ObjectTypegetRootSearchType()Returns the type for which this reference collection editor should search for.ObjectTypegetRootType()Returns the root type of this reference collection editor i.e.DefaultSimpleReferenceSelectorModelgetSimpleReferenceSelectorModel()TypeServicegetTypeService()protected voidinitializeReferenceSelectorModel(ObjectType rootType)booleanmoveCollectionItem(int fromIndex, int toIndex)booleanremoveCollectionItem(int index)booleanremoveCollectionItem(java.lang.Object item)voidsetCollectionItems(java.util.Collection<java.lang.Object> collectionItems)voidsetParameters(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)voidsetRootSearchType(ObjectType rootSearchType)Sets the type for which this reference selector should search for.voidsetRootType(ObjectType rootType)Sets the root type of this reference selector i.e.-
Methods inherited from class de.hybris.platform.cockpit.model.referenceeditor.collection.model.AbstractCollectionEditorModel
addCollectionEditorModelListener, fireCollectionItemsChanged, fireRootSearchTypeChanged, fireRootTypeChanged, getListeners, removeCollectionEditorModelListener
-
-
-
-
Field Detail
-
referenceSelectorModel
protected DefaultSimpleReferenceSelectorModel referenceSelectorModel
-
-
Constructor Detail
-
DefaultCollectionEditorModel
public DefaultCollectionEditorModel(ObjectType rootType)
-
-
Method Detail
-
setParameters
public void setParameters(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)
-
getSimpleReferenceSelectorModel
public DefaultSimpleReferenceSelectorModel getSimpleReferenceSelectorModel()
-
getCollectionItems
public java.util.List<java.lang.Object> getCollectionItems()
-
setCollectionItems
public void setCollectionItems(java.util.Collection<java.lang.Object> collectionItems)
-
addCollectionItem
public void addCollectionItem(java.lang.Object item)
-
addCollectionItems
public void addCollectionItems(java.util.Collection<? extends java.lang.Object> collection)
-
removeCollectionItem
public boolean removeCollectionItem(int index)
-
removeCollectionItem
public boolean removeCollectionItem(java.lang.Object item)
-
moveCollectionItem
public boolean moveCollectionItem(int fromIndex, int toIndex)
-
clearCollectionItems
public void clearCollectionItems()
-
getItemLabel
public java.lang.String getItemLabel(java.lang.Object item)
-
getRootType
public ObjectType getRootType()
Description copied from interface:CollectionEditorModelReturns 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 byCollectionEditorModel.getRootSearchType(). In this case information about the root type is generally needed for value handling.- Returns:
- the root type of this editor
- See Also:
CollectionEditorModel.getRootSearchType()
-
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 asgetRootType().- Parameters:
rootType- reference type- See Also:
getRootSearchType(),setRootType(ObjectType),setRootSearchType(ObjectType)
-
getRootSearchType
public ObjectType getRootSearchType()
Description copied from interface:CollectionEditorModelReturns 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 asCollectionEditorModel.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:
CollectionEditorModel.getRootType()
-
setRootSearchType
public void setRootSearchType(ObjectType rootSearchType)
Sets the type for which this reference selector should search for. IfrootSearchTypeisnullgetRootSearchType()will return the same type asgetRootType().- Parameters:
rootSearchType- the type of the items to search for- See Also:
setRootType(ObjectType),getRootSearchType(),getRootType()
-
initializeReferenceSelectorModel
protected void initializeReferenceSelectorModel(ObjectType rootType)
-
getTypeService
public TypeService getTypeService()
-
-