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 ModelItemTypeExtensionPoint
The model item typeprotected TrashElementTypeEnumerator
The trash element type enumeratorprotected TrashElementTypeExtensionPoint
The trash element type extension pointstatic final String
Item name for the author of the deletionstatic final String
Item name for the deletion datestatic final String
Item name for the reference to the deleted objectstatic final String
Item name for the reference to the deleted objectstatic final String
Item name for the reference to the linked objectsstatic final String
Item name for the parent path of the objectstatic final String
The avalon rolestatic final String
Item name for the title of the elementstatic final String
Item name for the type of the element -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(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 accessorvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getId
Description copied from interface:Model
Retrieves the model id (an id must be unique in the familyModel.getFamilyId()
-
getFamilyId
Description copied from interface:Model
Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family Id- Specified by:
getFamilyId
in interfaceModel
- Returns:
- content point (for example "org.ametys.cms.contenttype.ContentTypeExtensionPoint" for a content)
-
getModelItems
Description copied from interface:ModelItemAccessor
Retrieves all the model items of this accessor- Specified by:
getModelItems
in 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
-