Interface ActivityStreamingService
@Exported
public interface ActivityStreamingService
ActivityStreamingService is the main interface for the activity streaming
functionality within WebCenter.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanModerateActivities(oracle.webcenter.framework.service.Scope scope) Decides if the current user can moderate activities in the passed scope.booleancanViewActivities(oracle.webcenter.framework.service.Scope scope) Decides if the current user can view activities in the passed scope.createActivityElement(String applicationID, String scopeGUID, String serviceID, String activityTypeID, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) createActivityElement(String applicationID, oracle.webcenter.framework.service.Scope scope, String serviceID, oracle.webcenter.framework.service.ActivityType activityType, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) Create a new ActivityStreamingElementcreateActor(String userGUID) Create a new ActorcreateActor(String id, boolean isGroup) createActorByName(String userName) createCustAttr(String name, String value, String url) Create Custom AttributeCreate DisplayOptionscreateEvalQueryOptions(QueryOptions queryOptions) Create EvalQueryOptions.Create FilterOptionscreateGenericActivityElement(String applicationID, oracle.webcenter.framework.service.ActivityType activityType, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) Create a generic Activity Element.createObject(String objectID, String objectTypeID, String displayName) createObject(String objectID, oracle.webcenter.framework.service.ServiceObjectType objectType, String displayName) Create a new Object<T> QueryItem<T>createQueryItem(T value, List<ActivityPermission> permissions) Create QueryItem.createQueryOptions(String profileUserGUID) Create QueryOptionscreateServiceActivityType(String serviceId, oracle.webcenter.framework.service.ActivityType type) Create ServiceActivityTypeCreate SummaryDisplayOptionsvoiddeleteActivities(ActivityObject activityObject) Mark all activites for the given object as deletevoiddeletePortalActivities(String scopeGUID) Delete all portal scoped activities for given portal scopeGUID.findActivity(QueryOptions queryOptions, String activityId) Find and return theActivityDisplayElement.oracle.webcenter.framework.service.ActivityTypefindActivityType(String serviceId, String typeName) Return the definition for the specified activity type for the specified service.oracle.webcenter.framework.service.ServiceObjectTypefindObjectType(String serviceId, String typeName) Return the definition for the specified object type for the specified service.oracle.webcenter.framework.service.ScopegetActivityScope(ActivityObject object) Returns the Scope of the Activity associated with the passed activity object.getActivityServiceIdPreferences(String _strTaskflowInstanceID) Return all service's IDs that have are configured to be displayed in the current context.Return all service's IDs that have published activities to Activity StreamReturn activity stream data manager from the factoryoracle.webcenter.activitystreaming.ArchiveManagerReturn a archive manager instance for archiving/restoring acvitiy stream dataReturns a follow manager instance for performing follow/unfollow on certain item and other follow-related actionsReturns an object details manager instance for retrieving detail information about objects in WebCenter.Returns a security handler instance for checking objects securityoracle.webcenter.activitystreaming.SettingsManagerReturn a settings manager instance for configure the activity stream admin settingsbooleanReturn whether activity stream service is configuredvoidpublish(List<ActivityElement> activities) Publish list of activitiesvoidpublish(ActivityElement activity) Publish an activityvoidpublishAnalyticsEvent(ActivityElement activity) Generates an analytics event for the given activity and publishes that event for collection by an analytics server.retrieve(String applicationID, QueryOptions queryOptions, FilterOptions filterOptions, DisplayOptions displayOptions) Return activities that satisifes the passed in optionsretrieveSummaries(String applicationID, QueryOptions queryOptions, FilterOptions filterOptions, SummaryDisplayOptions displayOptions) voidteardown()Does cleanup for this service this is normally called from the app shutdown context listener.voidtouchActivity(String activityId, Timestamp time) Update an activity's timestamp to reflect recent activity
-
Method Details
-
publish
Publish an activity- Parameters:
activity- the activity to be published- Throws:
ActivityException
-
publish
Publish list of activities- Parameters:
activities- the activities to be published- Throws:
ActivityException
-
retrieve
List<ActivityDisplayElement> retrieve(String applicationID, QueryOptions queryOptions, FilterOptions filterOptions, DisplayOptions displayOptions) throws ActivityException Return activities that satisifes the passed in options- Parameters:
applicationID-queryOptions-filterOptions-displayOptions-- Returns:
- the list of
ActivityDisplayElement. - Throws:
ActivityException
-
retrieveSummaries
List<ActivityDisplayElement> retrieveSummaries(String applicationID, QueryOptions queryOptions, FilterOptions filterOptions, SummaryDisplayOptions displayOptions) throws ActivityException - Throws:
ActivityException
-
createActor
Create a new Actor- Parameters:
userGUID- the user GUID- Returns:
- a new Actor
- Throws:
ActivityException
-
createActor
- Throws:
ActivityException
-
createActorByName
- Throws:
ActivityException
-
createObject
ActivityObject createObject(String objectID, oracle.webcenter.framework.service.ServiceObjectType objectType, String displayName) throws ActivityException Create a new Object- Parameters:
objectID- the ID of the objectobjectType- the type of the object- Returns:
- a new Object
- Throws:
ActivityException
-
createObject
ActivityObject createObject(String objectID, String objectTypeID, String displayName) throws ActivityException - Throws:
ActivityException
-
createActivityElement
ActivityElement createActivityElement(String applicationID, oracle.webcenter.framework.service.Scope scope, String serviceID, oracle.webcenter.framework.service.ActivityType activityType, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) throws ActivityException Create a new ActivityStreamingElement- Parameters:
applicationID- application ID of the activityscope- the Scope of the activityserviceID- the service ID of the activityactivityType- type of the activityactors- list of actors involved in the activity (there must be at least one actor in the activity)objects- list of objects involved in the activity (optional)permission- the permission of the activityactivityTime- time when the activity happens- Returns:
- a new ActivityElement
- Throws:
ActivityException
-
createActivityElement
ActivityElement createActivityElement(String applicationID, String scopeGUID, String serviceID, String activityTypeID, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) throws ActivityException - Throws:
ActivityException
-
createCustAttr
Create Custom Attribute- Parameters:
name- the name of the attributevalue- the value of the attributeurl- the url of the attribute- Returns:
- a new Custom Attribute object
- Throws:
ActivityException- if name or value is null
-
findActivityType
oracle.webcenter.framework.service.ActivityType findActivityType(String serviceId, String typeName) throws ActivityException Return the definition for the specified activity type for the specified service.- Parameters:
serviceId- Service ID for which to look up object typetypeName- Name of the activity type to look for- Returns:
- The defintion for the specified activity type for the
specified service, of
nullif none could be found. - Throws:
ActivityException- If any problem occurs looking up the activity type definition.
-
findObjectType
oracle.webcenter.framework.service.ServiceObjectType findObjectType(String serviceId, String typeName) throws ActivityException Return the definition for the specified object type for the specified service.- Parameters:
serviceId- Service ID for which to look up object typetypeName- Name of the object type to look for- Returns:
- The defintion for the specified object type for the
specified service, of
nullif none could be found. - Throws:
ActivityException- If any problem occurs looking up the object type definition.
-
getActivityServiceIds
Return all service's IDs that have published activities to Activity Stream- Returns:
- a list of service IDs
-
getActivityServiceIdPreferences
Return all service's IDs that have are configured to be displayed in the current context.- Parameters:
_strTaskflowInstanceID- The ID of the current task flow. Optional.- Returns:
- a list of service IDs. Null if there was an error.
-
createGenericActivityElement
ActivityElement createGenericActivityElement(String applicationID, oracle.webcenter.framework.service.ActivityType activityType, List<? extends ActivityActor> actors, List<? extends ActivityObject> objects, ActivityPermission permission, Date activityTime) throws ActivityException Create a generic Activity Element. The service ID and scope of generic activity element will be defaulted to some constant values. NOT IMPLEMENTED YET- Parameters:
applicationID-activityType-actors-objects-permission-activityTime-- Returns:
- the
ActivityElement - Throws:
ActivityException
-
createQueryItem
<T> QueryItem<T> createQueryItem(T value, List<ActivityPermission> permissions) throws ActivityException Create QueryItem. QueryItem is used to create QueryOptions. QueryItem is a bundle of any arbitrary value along with the associated permission.- Type Parameters:
T- any arbitrary type- Parameters:
value- the value of the QueryItempermissions- a list of permission- Returns:
- the
QueryItem. - Throws:
ActivityException
-
createEvalQueryOptions
Create EvalQueryOptions. This will be used by extension handler.- Parameters:
queryOptions-- Returns:
- the
EvalQueryOptions. - Throws:
ActivityException
-
createQueryOptions
Create QueryOptions- Parameters:
profileUserGUID- the profile user whose activities to be displayed- Returns:
- QueryOptions
- Throws:
ActivityException
-
createFilterOptions
Create FilterOptions- Returns:
- FilterOptions
- Throws:
ActivityException
-
createServiceActivityType
ServiceActivityType createServiceActivityType(String serviceId, oracle.webcenter.framework.service.ActivityType type) throws ActivityException Create ServiceActivityType- Returns:
- ServiceActivityType
- Throws:
ActivityException
-
createDisplayOptions
Create DisplayOptions- Returns:
- the
DisplayOptions - Throws:
ActivityException
-
createSummaryDisplayOptions
Create SummaryDisplayOptions- Returns:
- the
SummaryDisplayOptions - Throws:
ActivityException
-
publishAnalyticsEvent
Generates an analytics event for the given activity and publishes that event for collection by an analytics server.- Parameters:
activity- Activity Stream activity to generate analytics event for- Throws:
ActivityException- If any problem occurs generating an analytics event for the given activity or while publishing that event
-
teardown
void teardown()Does cleanup for this service this is normally called from the app shutdown context listener. -
getActorDetailsManager
ActorDetailsManager getActorDetailsManager()Return activity stream data manager from the factory- Returns:
- ActorDetailsManager Returns the instance of details manager
-
getObjectDetailsManager
ObjectDetailsManager getObjectDetailsManager()Returns an object details manager instance for retrieving detail information about objects in WebCenter.- Returns:
- An object details manager instance for retrieving detail information about objects in WebCenter.
-
getFollowManager
FollowManager getFollowManager()Returns a follow manager instance for performing follow/unfollow on certain item and other follow-related actions- Returns:
- A follow manager instance
-
getSecurityHandler
SecurityHandler getSecurityHandler()Returns a security handler instance for checking objects security- Returns:
- A security handler instance
-
isConfigured
boolean isConfigured()Return whether activity stream service is configured- Returns:
- whether activity stream service is configured
-
getArchiveManager
oracle.webcenter.activitystreaming.ArchiveManager getArchiveManager()Return a archive manager instance for archiving/restoring acvitiy stream data- Returns:
- a archive manager instance
-
getSettingsManager
oracle.webcenter.activitystreaming.SettingsManager getSettingsManager()Return a settings manager instance for configure the activity stream admin settings- Returns:
- a settings manager instance.
-
deleteActivities
Mark all activites for the given object as delete- Parameters:
activityObject- the activity object whose activites to be marked as deleted- Throws:
ActivityException- If any problem occurs while remove activites.
-
deletePortalActivities
Delete all portal scoped activities for given portal scopeGUID.- Parameters:
scopeGUID- scopeGUID of portal for which activities has to be deleted- Throws:
ActivityException- If any problem occurs while deleting activites.
-
touchActivity
Update an activity's timestamp to reflect recent activity- Parameters:
activityId- the id of the activity to update- Throws:
ActivityException- If any problem occurs
-
findActivity
ActivityDisplayElement findActivity(QueryOptions queryOptions, String activityId) throws ActivityException Find and return theActivityDisplayElement.- Parameters:
activityId- the id of the activity being retrieved.- Returns:
- The
ActivityDisplayElement. - Throws:
ActivityException- If any problem occurs.
-
getActivityScope
Returns the Scope of the Activity associated with the passed activity object.- Parameters:
object- the Activity object- Returns:
- Scope
-
canViewActivities
boolean canViewActivities(oracle.webcenter.framework.service.Scope scope) Decides if the current user can view activities in the passed scope. If a user can view an activity, that means the user can: - See the Activity - Comment on the Activity - Get a summary of the Comments on the Activity - Like the Activity - Get a summary of the Likes on the Activity- Parameters:
scope- the passed Scope- Returns:
- boolean
-
canModerateActivities
boolean canModerateActivities(oracle.webcenter.framework.service.Scope scope) Decides if the current user can moderate activities in the passed scope. If a user can moderate an activity, that means the user can: - See the Activity - Comment on the Activity - Get a summary of the Comments on the Activity - Delete any Comments on the Activity - Like the Activity - Get a summary of the Likes on the Activity - Delete and Likes on the Activity- Parameters:
scope- the passed Scope- Returns:
- boolean
-