Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.activitystreaming
Interface ServiceActivityStreamExtension

All Known Implementing Classes:
DefaultServiceActivityStreamExtension

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 , java.util.List , 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).

Since:
release specific (what release of product did this appear in)

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

createActivityElement

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
Creates an activity element using the supplied information, augmenting any additional information if needed.

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.

Parameters:
applicationID - application ID of the activity
scope - the Scope of the activity
serviceID - the service ID of the activity
activityType - type of the activity
actors - 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 activity
activityTime - time when the activity happens
Returns:
a new ActivityElement
Throws:
ActivityException - if any error is encountered while processing the supplied information or creating the activity

deleteActivity

void deleteActivity(ActivityObject object,
                    ActivityActor actor,
                    oracle.webcenter.framework.service.Scope scope)
                    throws ActivityException
Remove service data corresponding to the activity using the supplied information, augmenting any additional information if needed.
Parameters:
object - to be removed
actor - object's ownwer
scope - object's scope
Throws:
ActivityException - if any error is encountered while processing the supplied information or removing service data

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.