Package lumis.portal.activitystream
Class Activity
- java.lang.Object
-
- lumis.portal.activitystream.Activity
-
- All Implemented Interfaces:
Serializable
@StableMinor(version="14.2", sinceVersion="8.2") public class Activity extends Object implements Serializable
Object that represents an activity in the activity stream framework.This entity must not be persisted or removed directly using
EntityManager
. Use methods available inIActivityStreamManager
instead.- Since:
- 8.2.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
- See Also:
ManagerFactory.getActivityStreamManager()
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
SCOPE_OBJECT_ADMIN
Scope value that indicates this activity is relevant to theactivity's object
administrators.static String
SCOPE_OBJECT_END_USER
Scope value that indicates this activity is relevant to theactivity's object
end users.static String
SCOPE_PORTAL_ADMIN
Scope value that indicates this activity is relevant to the portal administrators.
-
Constructor Summary
Constructors Constructor Description Activity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScope(String scope)
Adds a scope in this activity.ActivityAction
getAction()
Returns the action of this activity.ActivityActor
getActor()
Returns the actor of this activity.long
getCreatedDateTimeMillis()
Returns the date/time this activity was created.String
getCustomData()
Returns the custom data stored in this activity.String
getId()
Returns the identifier of this activity.ActivityObject
getObject()
Returns the direct object of this activity.String
getOriginServiceInstanceId()
Returns the identifier of the service instance origin of the activity.Collection<String>
getScopes()
Returns the scopes that indicates the population this activity is relevant for.
Scopes should be added withaddScope(String)
.ActivityObject
getTarget()
Returns the target of this activity.void
setAction(ActivityAction action)
Sets the action of this activity.void
setActor(ActivityActor actor)
Sets the actor of this activity.void
setCustomData(String customData)
Sets the custom data of this activity.void
setObject(ActivityObject object)
Sets the direct object of this activity.void
setOriginServiceInstanceId(String originServiceInstanceId)
Sets the service instance origin of the activity.void
setTarget(ActivityObject target)
Sets the direct target of this activity.
-
-
-
Field Detail
-
SCOPE_OBJECT_END_USER
public static final String SCOPE_OBJECT_END_USER
Scope value that indicates this activity is relevant to theactivity's object
end users.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
SCOPE_OBJECT_ADMIN
public static final String SCOPE_OBJECT_ADMIN
Scope value that indicates this activity is relevant to theactivity's object
administrators.- Since:
- 8.2.0
- See Also:
- Constant Field Values
-
SCOPE_PORTAL_ADMIN
public static final String SCOPE_PORTAL_ADMIN
Scope value that indicates this activity is relevant to the portal administrators.- Since:
- 9.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
Returns the identifier of this activity.- Returns:
- the identifier of this activity.
- Since:
- 8.2.0
-
getOriginServiceInstanceId
public String getOriginServiceInstanceId()
Returns the identifier of the service instance origin of the activity.- Returns:
- the origin service instance identifier.
- Since:
- 8.2.0
-
setOriginServiceInstanceId
public void setOriginServiceInstanceId(String originServiceInstanceId)
Sets the service instance origin of the activity.- Since:
- 8.2.0
-
getCreatedDateTimeMillis
public long getCreatedDateTimeMillis()
Returns the date/time this activity was created.- Returns:
- the date/time this activity was created in milliseconds after epoch.
- Since:
- 8.2.0
-
getCustomData
public String getCustomData()
Returns the custom data stored in this activity.- Returns:
- the json object as string that was stored as custom data of this
activity, or
null
if it was not set. - Since:
- 8.2.0
-
setCustomData
public void setCustomData(String customData)
Sets the custom data of this activity.- Parameters:
customData
- the json object string code to store as custom data of this activity.- Since:
- 8.2.0
-
getObject
public ActivityObject getObject()
Returns the direct object of this activity.- Returns:
- the direct object of this activity, or
null
if it does not have a direct object. - Since:
- 8.2.0
-
setObject
public void setObject(ActivityObject object)
Sets the direct object of this activity.- Parameters:
object
- the direct object.- Since:
- 8.2.0
-
getActor
public ActivityActor getActor()
Returns the actor of this activity.- Returns:
- the user identifier of the actor of this activity, or
null
if it does not have an actor. - Since:
- 8.2.0
-
setActor
public void setActor(ActivityActor actor)
Sets the actor of this activity.- Parameters:
actor
- the user identifier of the actor.- Since:
- 8.2.0
-
getAction
public ActivityAction getAction()
Returns the action of this activity.- Returns:
- the action of this activity, or
null
if it does not have an action. - Since:
- 8.2.0
-
setAction
public void setAction(ActivityAction action)
Sets the action of this activity.- Parameters:
action
- the action.- Since:
- 8.2.0
-
getScopes
public Collection<String> getScopes()
Returns the scopes that indicates the population this activity is relevant for.
Scopes should be added withaddScope(String)
.- Returns:
- an unmodifiable collection with the scope values. If no scope is set, an empty collection is returned.
- Since:
- 8.2.0
-
addScope
public void addScope(String scope)
Adds a scope in this activity.- Parameters:
scope
- the scope value. A scope value may only contain ASCII alphanumeric characters and underscore, and cannot benull
or an empty string.- Since:
- 8.2.0
- See Also:
getScopes()
,SCOPE_OBJECT_END_USER
,SCOPE_OBJECT_ADMIN
-
getTarget
public ActivityObject getTarget()
Returns the target of this activity.- Returns:
- the target of this activity, or
null
if it does not have a target. - Since:
- 8.2.0
-
setTarget
public void setTarget(ActivityObject target)
Sets the direct target of this activity.- Parameters:
object
- the direct object.- Since:
- 8.2.0
-
-