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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActivity(javax.jcr.Node node, String parentPath, ActivityFactory factory) Creates anActivity. -
Method Summary
Modifier and TypeMethodDescriptionGet the type of the activityGet the author of the activityReturns theDataHolderof thisAmetysObject.getDate()Get the date of the activityGet the event type that generated this activitySerialize the activity as a JSONvoidtoSAX(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, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNamesMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultipleMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods 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:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getActivityType
Get the type of 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
-