com.sap.workspaces.module

Class ModuleHelper

java.lang.Object
  extended by com.sap.workspaces.module.ModuleHelper

public final class ModuleHelper
extends Object

A helper class for easy retrieval of a module context. The following sample illustrates how to use this class:

*
IModuleContext IModuleContext moduleContext = ModuleHelper.getModuleContext(request);


Constructor Summary
ModuleHelper()
           
 
Method Summary
static IModuleContext getModuleContext(IIdentifier workspaceID, String instanceID, com.sap.security.api.IUser user)
          Deprecated. Returns the module context specified by the workspace ID, module instance ID and user, in the original locale
static IModuleContext getModuleContext(IIdentifier workspaceID, String instanceID, com.sap.security.api.IUser user, Locale locale)
          Returns the module context specified by the workspace ID, module instance ID, user and locale
static IModuleContext getModuleContext(com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Returns the module context specified by the current request
static IModuleContext getModuleContext(String modulePCDPath, com.sap.security.api.IUser user)
          Deprecated. Returns Returns the context of a module specified by the module’s PCD path and user
static IModuleContext getModuleContext(String modulePCDPath, com.sap.security.api.IUser user, Locale locale)
          Returns the context of a module specified by the module’s PCD path, user and locale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleHelper

public ModuleHelper()
Method Detail

getModuleContext

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

Parameters:
request - the current request
Returns:
The module context
Throws:
WorkspacesRuntimeException - if an error occurs or the current running component is not a module instance

getModuleContext

public static IModuleContext getModuleContext(IIdentifier workspaceID,
                                              String instanceID,
                                              com.sap.security.api.IUser user,
                                              Locale locale)
                                       throws WorkspacesRuntimeException
Returns the module context specified by the workspace ID, module instance ID, user and locale

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

getModuleContext

public static IModuleContext getModuleContext(IIdentifier workspaceID,
                                              String instanceID,
                                              com.sap.security.api.IUser user)
                                       throws WorkspacesRuntimeException
Deprecated. Returns the module context specified by the workspace ID, module instance ID and user, in the original locale

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

getModuleContext

public static IModuleContext getModuleContext(String modulePCDPath,
                                              com.sap.security.api.IUser user,
                                              Locale locale)
                                       throws WorkspacesRuntimeException
Returns the context of a module specified by the module’s PCD path, user and locale

Parameters:
modulePCDPath - the PCD path of the module instance
user - the user
locale - the locale
Returns:
The module context
Throws:
WorkspacesRuntimeException

getModuleContext

public static IModuleContext getModuleContext(String modulePCDPath,
                                              com.sap.security.api.IUser user)
                                       throws WorkspacesRuntimeException
Deprecated. Returns Returns the context of a module specified by the module’s PCD path and user

Parameters:
modulePCDPath - the PCD path of the module instance
user - the user
Returns:
The module context
Throws:
WorkspacesRuntimeException


Copyright 2011 SAP AG Complete Copyright Notice