|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.4.0) E15995-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceActivityStreamExtension
Allows a service that owns activity-types to perform ad hoc processing whenever a different service publishes activities of those types.
For instance, the Comments module publishes an activity whenever a comment is made on an object (e.g. Wall message). The activity type belongs to the service to which the object belongs (e.g. Wall service), and that could have a message that has actor/object attributes that are specific to that service (e.g. owner of the Wall on which the message being commented on had been posted). The Comments module is not aware of how to determine these attribute values at the time of publishing the activity. So it passes on this responsibility to the service by allowing it to implement a ServiceActivityStreamExtension
, on which the Comments module would call the createActivityElement(java.lang.String, oracle.webcenter.framework.service.Scope, java.lang.String, oracle.webcenter.framework.service.ActivityType, java.util.List extends oracle.webcenter.activitystreaming.ActivityActor>
, java.util.List extends oracle.webcenter.activitystreaming.ActivityObject>
, oracle.webcenter.activitystreaming.ActivityPermission, java.util.Date)
method when publishing the activity. The method in the ServiceActivityStreamExtension
implementation is then responsible for using the Activity Streaming Service to create the activity, after peforming whatever processing is required (e.g. the Wall service implementation could look up the owner of the Wall from the message ID passed as object, and add that user to the list of actors when actually creating the activity element).
Method Summary | |
---|---|
ActivityElement |
createActivityElement(java.lang.String applicationID, oracle.webcenter.framework.service.Scope scope, java.lang.String serviceID, oracle.webcenter.framework.service.ActivityType activityType, java.util.List<? extends ActivityActor> actors, java.util.List<? extends ActivityObject> objects, ActivityPermission permission, java.util.Date activityTime) Creates an activity element using the supplied information, augmenting any additional information if needed. |
void |
deleteActivity(ActivityObject object, ActivityActor actor, oracle.webcenter.framework.service.Scope scope) Remove service data corresponding to the activity using the supplied information, augmenting any additional information if needed. |
Method Detail |
---|
ActivityElement createActivityElement(java.lang.String applicationID, oracle.webcenter.framework.service.Scope scope, java.lang.String serviceID, oracle.webcenter.framework.service.ActivityType activityType, java.util.List<? extends ActivityActor> actors, java.util.List<? extends ActivityObject> objects, ActivityPermission permission, java.util.Date activityTime) throws ActivityException
Implementations are expected to use the supplied information, look up any additional information if needed, and use the Activity Streaming Service to create and return an activity element using that information.
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 happensActivityException
- if any error is encountered while processing the supplied information or creating the activityvoid deleteActivity(ActivityObject object, ActivityActor actor, oracle.webcenter.framework.service.Scope scope) throws ActivityException
object
- to be removedactor
- object's ownwerscope
- object's scopeActivityException
- if any error is encountered while processing the supplied information or removing service data
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.4.0) E15995-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |