Package org.ametys.cms.trash.model
Class TrashElementModel
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.trash.model.TrashElementModel
- All Implemented Interfaces:
Model,ModelItemAccessor,ModelItemContainer,LogEnabled,Component,Contextualizable,Serviceable
- Direct Known Subclasses:
WebTrashElementModel
public class TrashElementModel
extends AbstractLogEnabled
implements Model, Component, Serviceable, Contextualizable
The model for trash elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ModelItemTypeExtensionPointThe model item typeprotected TrashElementTypeEnumeratorThe trash element type enumeratorprotected TrashElementTypeExtensionPointThe trash element type extension pointstatic final StringItem name for the author of the deletionstatic final StringItem name for the deletion datestatic final StringItem name for the reference to the deleted objectstatic final StringItem name for the reference to the deleted objectstatic final StringItem name for the reference to the linked objectsstatic final StringItem name for the parent path of the objectstatic final StringThe avalon rolestatic final StringItem name for the title of the elementstatic final StringItem name for the type of the element -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) protected List<ElementDefinition> Create the model items present in the trash element modelRetrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family IdgetId()Retrieves the model id (an id must be unique in the familyModel.getFamilyId()Collection<? extends ModelItem> Retrieves all the model items of this accessorvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
-
Field Details
-
ROLE
The avalon role -
TITLE
Item name for the title of the element- See Also:
-
TRASH_TYPE
Item name for the type of the element- See Also:
-
AUTHOR
Item name for the author of the deletion- See Also:
-
DATE
Item name for the deletion date- See Also:
-
PARENT_PATH
Item name for the parent path of the object- See Also:
-
DELETED_OBJECT
Item name for the reference to the deleted object- See Also:
-
HIDDEN
Item name for the reference to the deleted object- See Also:
-
LINKED_OBJECTS
Item name for the reference to the linked objects- See Also:
-
_trashElementTypeEnum
The trash element type enumerator -
_trashElementTypeEP
The trash element type extension point -
_modelAwareItemTypeEP
The model item type
-
-
Constructor Details
-
TrashElementModel
public TrashElementModel()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getId
Description copied from interface:ModelRetrieves the model id (an id must be unique in the familyModel.getFamilyId() -
getFamilyId
Description copied from interface:ModelRetrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family Id- Specified by:
getFamilyIdin interfaceModel- Returns:
- content point (for example "org.ametys.cms.contenttype.ContentTypeExtensionPoint" for a content)
-
getModelItems
Description copied from interface:ModelItemAccessorRetrieves all the model items of this accessor- Specified by:
getModelItemsin interfaceModelItemAccessor- Returns:
- the model items
-
createModelItems
Create the model items present in the trash element model- Returns:
- the model items
- Throws:
Exception- if an occurs when creating the model items
-