Interface ActivityHolder
- All Known Subinterfaces:
ActivityHolderAmetysObject
- All Known Implementing Classes:
DefaultActivityHolder,Project
public interface ActivityHolder
Interface for activity holder
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe activity root node namestatic final StringPrefix used for naming the activity nodestatic final DateTimeFormatterformatter to store date time in jcr node name -
Method Summary
Modifier and TypeMethodDescriptionaddActivity(ZonedDateTime date, ActivityType type, Map<String, Object> parameters, UserIdentity author, String eventId) Add an activity to the activity holderaddActivity(ActivityType type, Map<String, Object> parameters, String eventId) Add an activity to the activity holderdefault ActivityaddActivity(ActivityType type, Map<String, Object> parameters, UserIdentity author, String eventId) Add an activity to the activity holder This convenient method will calladdActivity(ZonedDateTime, ActivityType, Map, UserIdentity, String)with the current time.Returns the activities stored by this activity holder
-
Field Details
-
ACTIVITIES_ROOT_NODE_NAME
the activity root node name- See Also:
-
ACTIVITY_NAME_PREFIX
Prefix used for naming the activity node- See Also:
-
JCR_UTC_FORMAT
formatter to store date time in jcr node name
-
-
Method Details
-
getActivities
Returns the activities stored by this activity holder- Returns:
- The activities
- Throws:
javax.jcr.RepositoryException- if failed to get activity nodes
-
addActivity
Activity addActivity(ActivityType type, Map<String, Object> parameters, String eventId) throws javax.jcr.RepositoryExceptionAdd an activity to the activity holder- Parameters:
type- the typeparameters- the parameterseventId- the id of the event- Returns:
- the activity
- Throws:
javax.jcr.RepositoryException- when an error occurred
-
addActivity
default Activity addActivity(ActivityType type, Map<String, Object> parameters, UserIdentity author, String eventId) throws javax.jcr.RepositoryExceptionAdd an activity to the activity holder This convenient method will calladdActivity(ZonedDateTime, ActivityType, Map, UserIdentity, String)with the current time.- Parameters:
type- the typeparameters- the parametersauthor- the authoreventId- the id of the event- Returns:
- the activity
- Throws:
javax.jcr.RepositoryException- when an error occurred
-
addActivity
Activity addActivity(ZonedDateTime date, ActivityType type, Map<String, Object> parameters, UserIdentity author, String eventId) throws javax.jcr.RepositoryExceptionAdd an activity to the activity holder- Parameters:
date- the datetype- the typeparameters- the parametersauthor- the authoreventId- the id of the event- Returns:
- the activity
- Throws:
javax.jcr.RepositoryException- when an error occurred
-