Class Activity
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<ActivityFactory>
org.ametys.plugins.repository.activities.Activity
- All Implemented Interfaces:
AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,ModifiableModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,ModifiableDataHolder
,ModifiableModelLessDataHolder
,JCRAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableAmetysObject
,RemovableAmetysObject
public class Activity
extends SimpleAmetysObject<ActivityFactory>
implements ModifiableModelLessDataAwareAmetysObject
Object representing an activity (such as the creation of content)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionActivity
(javax.jcr.Node node, String parentPath, ActivityFactory factory) Creates anActivity
. -
Method Summary
Modifier and TypeMethodDescriptionGet the type of the activity from the event type stored in the activityGet the author of the activityReturns theDataHolder
of thisAmetysObject
.getDate()
Get the date of the activityGet the event type that generated this activitySerialize the activity as a JSONvoid
toSAX
(ContentHandler contentHandler) Generate SAX event to represent all the activityMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValues
-
Field Details
-
ACTIVITY_ID_KEY
key used to store the activity id when serialized- See Also:
-
ACTIVITY_NAME_KEY
key used to store the activity name when serialized- See Also:
-
-
Constructor Details
-
Method Details
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelLessDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelLessDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-
getActivityType
Get the type of the activity from the event type stored in the activity- Returns:
- the activity type
-
getEventType
Get the event type that generated this activity- Returns:
- the event id
-
getDate
Get the date of the activity- Returns:
- the date time
-
getAuthor
Get the author of the activity- Returns:
- the author identity
-
toSAX
Generate SAX event to represent all the activity- Parameters:
contentHandler
- the targeted contentHandler- Throws:
SAXException
- if an error occurred
-
toJSONForClient
Serialize the activity as a JSON- Returns:
- the JSON
-