|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IUWLService is the public interface for accessing other interfaces like
IUWLConfigurationManager, IUWLItemManager, IUWLAdmin,
IUWLViewManager.
IUWLService is a portal service and is accessible by calling PortalRuntime api.
IUWLService uwlService=(IUWLService)PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY);
Alternatively JNDI look up can also be done for the key IUWLService.ALIAS_KEY to get a handle to
UWL service.
In order to provide security for the operations, concept of session is used.
A client should have a valid logged in user and it has to pass this information through
UWLContext to create a UWL session with beginSession() method.
A client can end the session with UWL by calling endSession()method.
If the session is kept idle for timeout specified in the beginSession() method, session is invalidated.
Typically in a portal environment where different application parts access, UWL they could share the same user's UWL session by accessing a HTTPSession or WebDynpro Session scope variable by name IUWLSession.UWL_SESSION_ID. If UWL UI creates a UWL session for the user, it stores session id which is a String in the HttpSession (for HTMLB clients) or in WebDynpro Session Scope.
It is recommended for the creator of the session to end the Session when user logs out or
when user's browser session is invalidated because it is idle for a long time.
For a sample code about how Session could be handled refer to IUWLSession
Other components can register plug-ins thro register API variants.
The method registerProviderConnector registers an item producer
component with UWL. This producer component can then push Items to UWL using
IPushChannel interface or support retrieving of items
through IProviderConnector interface.
UWLContext,
IUWLConfigurationManager,
IUWLItemManager,
IUWLAdmin,
IPushChannel,
IProviderConnector| Field Summary | |
static String |
ALIAS_KEY
KEY with which UWL Service is registered in the Portal service registry. |
| Method Summary | |
IUWLSession |
beginSession(UWLContext context,
int idleTimeOutInSeconds)
This begins the session with UWL service. |
boolean |
displaySupportInfo()
Only for internal usage. |
void |
endSession(UWLContext context)
This closes the session with UWL. |
IUWLAdmin |
getAdmin(UWLContext ctx)
Obtains the UWL admin. |
IUWLConfigurationManager |
getConfigurationManager(UWLContext ctx)
Obtains the UWL Configuration Manager. |
IUWLItemManager |
getItemManager(UWLContext ctx)
Obtains the UWL Item Manager. |
IPropertiesManager |
getPropertiesManager()
Only for internal usage. |
IPushChannel |
getPushChannel()
Returns the push channel that could be used for the Provider to do operations on UWL like sending items, deleting items etc. |
IProviderConnector[] |
getRegisteredProviderConnectors()
Returns all the Provider Connectors registered with UWL during runtime. |
IProviderConnector |
getRegisterProviderConnector(String id)
|
IUWLSession |
getSession(String sessionId)
Returns the session if it is valid. |
IUWLSubstitutionManager |
getSubstitutionManager(UWLContext ctx)
Only for internal usage. |
IUWLSession |
getUwlSessionForWebDynproClient(UWLContext context)
This method creates a UWL Client exclusively for WebDynpro clients with a timeout value of idle time=10 minutes. |
IUWLViewManager |
getViewManager(UWLContext ctx)
Obtains the UWL view manager. |
boolean |
isTestMode()
Only for internal usage. |
void |
registerAttachmentConnector(String ID,
IAttachmentConnector ac)
Registration of Custom Attachment Connector. |
void |
registerAttributeConnector(String ID,
IAttributeAccessConnector ac)
Registraton of Custom Attribute retrieval interface. |
void |
registerEventResolutionService(IEventResolutionServiceAdaptor service)
Register the Event Resolution Service. |
void |
registerProviderConnector(IProviderConnector pc)
This method registers the given provider connector with UWL service. |
void |
registerProviderSubstitutionManager(IProviderSubstitutionManager psm)
This method registers the substitution manager of a given provider with UWL service. |
| Field Detail |
public static final String ALIAS_KEY
| Method Detail |
public IUWLSession beginSession(UWLContext context,
int idleTimeOutInSeconds)
throws UWLException
context - the UWL context containing User information. Do note that this has to
be the current logged in user for security purposes. The user so passed is validated against
SAP J2EE Engine and User Management authentications. In case of authentication failures, exception is
thrown.idleTimeOutInSeconds - indicates when this session expires if kept idle.
A value of -1 will keep session alive until endSession is explicitly called.
Do note that if -1 is specified and endSession is never called it creates memory
leakage.
UWLException - in case of security breach or initialzation failures.public IUWLSession getSession(String sessionId)
sessionId - not null
public void endSession(UWLContext context)
throws UWLException
context - the UWL context.
UWLException
public IUWLConfigurationManager getConfigurationManager(UWLContext ctx)
throws UWLException
ctx - the UWL context.
UWLException
public IUWLItemManager getItemManager(UWLContext ctx)
throws UWLException
ctx - the UWL context.
UWLException
public IUWLAdmin getAdmin(UWLContext ctx)
throws UWLException
ctx - the UWL context.
UWLException
public IUWLViewManager getViewManager(UWLContext ctx)
throws UWLException
ctx - the UWL context.
UWLException
public IPushChannel getPushChannel()
throws UWLException
UWLException
public void registerProviderConnector(IProviderConnector pc)
throws UWLException
pc - the provider connector.
UWLException
public void registerAttributeConnector(String ID,
IAttributeAccessConnector ac)
throws UWLException
ID - needed, not nullac - the attribute access connector.
UWLException
public void registerAttachmentConnector(String ID,
IAttachmentConnector ac)
throws UWLException
ID - needed, not nullac - the attachment connector.
UWLExceptionpublic boolean isTestMode()
public boolean displaySupportInfo()
public IUWLSubstitutionManager getSubstitutionManager(UWLContext ctx)
throws UWLException
ctx -
UWLException
public void registerProviderSubstitutionManager(IProviderSubstitutionManager psm)
throws UWLException
psm - the provider substitution manager
UWLExceptionpublic IPropertiesManager getPropertiesManager()
public void registerEventResolutionService(IEventResolutionServiceAdaptor service)
public IProviderConnector[] getRegisteredProviderConnectors()
public IProviderConnector getRegisterProviderConnector(String id)
id - of the Provider Connector to retrieve
public IUWLSession getUwlSessionForWebDynproClient(UWLContext context)
throws UWLException
context - required, should have valid authenticated user set
UWLException - if caller is not a WebDynpro clientbeginSession
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||