com.sap.workspaces.module

Interface IModuleContextFactory

All Superinterfaces:
IWorkspacesService

public interface IModuleContextFactory
extends IWorkspacesService

Returns the runtime context of module instance. The module context can be used only by module instances. Other components, such as module templates, cannot use it. The following example illustrates retrieving the module context using the API calls:


IWorkspacesRuntime runtime = RuntimeFactory.getWorkspacesRuntime();
IModuleContextFactory contextFactory = runtime.getService(IModuleContextFactory.class);
IModuleContext context = contextFactory.getModuleContext(request);


Method Summary
 IModuleContext getModuleContext(IIdentifier workspaceID, String moduleInstanceID, com.sap.security.api.IUser user)
          Returns the context of a module specified by the workspace ID, module instance ID and user
 IModuleContext getModuleContext(com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Returns the context of a module specified by the current request
 IModuleContext getModuleContext(String moduleInstancePcdUrl, com.sap.security.api.IUser user)
          Returns the context of a module specified by the moduleInstancePcdUrl and user
 

Method Detail

getModuleContext

IModuleContext getModuleContext(com.sapportals.portal.prt.component.IPortalComponentRequest request)
                                throws WorkspacesRuntimeException
Returns the context of a module specified by the current request

Parameters:
request - the current request. If an error occurs or the current running component is not a module instance, an exception is thrown
Returns:
the module context
Throws:
WorkspacesRuntimeException - if an error occurs or the current running component is not a module instance

getModuleContext

IModuleContext getModuleContext(IIdentifier workspaceID,
                                String moduleInstanceID,
                                com.sap.security.api.IUser user)
                                throws WorkspacesRuntimeException
Returns the context of a module specified by the workspace ID, module instance ID and user

Parameters:
workspaceID - the workspace identifier
moduleInstanceID - the module instance unique ID
user - the user
Returns:
the module context
Throws:
WorkspacesRuntimeException

getModuleContext

IModuleContext getModuleContext(String moduleInstancePcdUrl,
                                com.sap.security.api.IUser user)
                                throws WorkspacesRuntimeException
Returns the context of a module specified by the moduleInstancePcdUrl and user

Parameters:
moduleInstancePcdUrl - the pcd path of the module instance
user - the user
Returns:
the module context
Throws:
WorkspacesRuntimeException


Copyright 2010 SAP AG Complete Copyright Notice