Package lumis.portal.activitystream
Class Activity
- java.lang.Object
-
- lumis.portal.activitystream.Activity
-
- All Implemented Interfaces:
java.io.Serializable
@StableMinor(version="17.0", sinceVersion="8.2") public class Activity extends java.lang.Object implements java.io.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$ $Date$
- See Also:
ManagerFactory.getActivityStreamManager()
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SCOPE_OBJECT_ADMIN
Scope value that indicates this activity is relevant to theactivity's object
administrators.static java.lang.String
SCOPE_OBJECT_END_USER
Scope value that indicates this activity is relevant to theactivity's object
end users.static java.lang.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(java.lang.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.java.lang.String
getCustomData()
Returns the custom data stored in this activity.java.lang.String
getId()
Returns the identifier of this activity.ActivityObject
getObject()
Returns the direct object of this activity.java.lang.String
getOriginServiceInstanceId()
Returns the identifier of the service instance origin of the activity.java.util.Collection<java.lang.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(java.lang.String customData)
Sets the custom data of this activity.void
setObject(ActivityObject object)
Sets the direct object of this activity.void
setOriginServiceInstanceId(java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String getId()
Returns the identifier of this activity.- Returns:
- the identifier of this activity.
- Since:
- 8.2.0
-
getOriginServiceInstanceId
public java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.util.Collection<java.lang.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(java.lang.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
-
-