com.sap.netweaver.bc.uwl.connect

Interface IOptimizedPullSupport


public interface IOptimizedPullSupport

This interface defines methods used for optimized retrieval of items from the Provider. For any connector implementation of this interface is optional. Primarily this interface defines methods for retrieving delta items for multiple users at the same time. This concept is also known as bundled pull or aggregated retrieval.
Implementations of this interface is expected to be stateless. All the state information is provided thro IPullChannel

See Also:
IProviderConnector, IPullChannel

Method Summary
 boolean canAssignUserToChannel(IPullChannel channel, IUser user)
          Implementation should check if it is ok to assign the channel to the user.
 Date getCurrentSystemTime(String system)
          Method that should return the current time at the system.
 String getId()
          Every IProviderConnector should identify itself with a unique identifer.
 ConnectorResult getItems(IPullChannel pullChannel)
          Method that gets called to get Items for all users assigned in the pull Channel.
 IPullChannelListener getPullChannelListener()
          If ProviderConnecor needs to communicate pull channel events like user added, removed etc to the back end it could do so by adding a listener.
 boolean supportsOptimization(String system, String itemType)
          Method indicating if Optimized pull is supported for the particular system.
 boolean validateUsersAccessRights(IUser user, String system)
          Implementation should check if the user has rights to the system.
 

Method Detail

getId

String getId()
Every IProviderConnector should identify itself with a unique identifer.

Returns:
not null identifier

supportsOptimization

boolean supportsOptimization(String system,
                             String itemType)
Method indicating if Optimized pull is supported for the particular system.

Parameters:
system - not null, indicates system for which support is queried.
itemType - could be null. If it is null implementation should just consider if system supports the optimization or not. If itemType is not null, in addition to system, item Type also needs to be considered. For example WebflowConnector might support optimization only for uwl.task and not for uwl.completedtask.
Returns:
true if for the system specified, aggregation of items is supported. Connector implementation can access the configuration settings to determine if aggretation of items is allowed or not.

getItems

ConnectorResult getItems(IPullChannel pullChannel)
                         throws ConnectorException
Method that gets called to get Items for all users assigned in the pull Channel. It is upto the implementation of this method to take care of getting the function modules if necessary to connect to the back end or if it is a direct Java method call, invoking the respective API.

Parameters:
pullChannel, - do not hold reference to this after the method call
Returns:
ConnectorResult containing items for all usres assigned in the channel
Throws:
ConnectorException
See Also:
IProviderConnector.getItems(com.sap.netweaver.bc.uwl.UWLContext, java.lang.String, com.sap.netweaver.bc.uwl.connect.ConnectorFilter, java.lang.String)

getPullChannelListener

IPullChannelListener getPullChannelListener()
If ProviderConnecor needs to communicate pull channel events like user added, removed etc to the back end it could do so by adding a listener.

Returns:
could be null if it doesnt listen to pull channel events.

getCurrentSystemTime

Date getCurrentSystemTime(String system)
Method that should return the current time at the system. Actual return time is typically a bit lower than the exact time because of method invocation delay. But this should be okey for delta retrieval.

Returns:
not null, current UTC time at the back end. For all practical purposes it is just standard time at Greenwich England. The people in Greenwich use Daylight saving time, so the term GMT or Greenwich time would be ambiguous. In other words, the returned date's getTime() should return number of milliseconds since January 1, 1970, 00:00:00 GMT.
See Also:
Calendar, TimeZone, Date.getTime()

validateUsersAccessRights

boolean validateUsersAccessRights(IUser user,
                                  String system)
Implementation should check if the user has rights to the system. For example if connecting to Abap back end, then check could be done to see if user mapping is defined for that user or not. If users doesnt have any rights to the system, then no items are retrieved for that users.

Parameters:
user - not null
system - not null
Returns:
by default true. false if user doesnt have rigths or mappings present.

canAssignUserToChannel

boolean canAssignUserToChannel(IPullChannel channel,
                               IUser user)
Implementation should check if it is ok to assign the channel to the user.

Parameters:
user - not null
channel - not null
Returns:
by default true.


Copyright 2009 SAP AG Complete Copyright Notice