com.sapportals.portal.prt.service

Interface IServiceContext


public interface IServiceContext

A service context allows to contact other resources in the portal. It represents the context in which an IService is executed.


Method Summary
 String getApplicationName()
          Gets the portal application name
 ILogger getClassLogger(Class aClass)
          Returns the logger associated to aClass's package.
 ILogger getLogger()
          get the default log handler
 ILogger getLogger(String aLoggerName)
          get the log handler
 String getPrivateResourceHome()
          Gets the home path for private resources
 String getPrivateServicePath()
          Returns the full path to access private resources of the current service.
 String getPropertyValue(String propertyName)
          Gets a property value form the service config
 String getPublicServicePath()
          Returns the full path to access public resources of the current service.
 IResource getResource(String resourceType, File file)
          Gets an IResource object referring to the file specified.
 IResource getResource(String resourceType, String fileName)
          Gets an IResource object that belongs to the current service.
 IResource getResource(String serviceName, String resourceType, String fileName)
          Gets an IResource object that belongs to the service.
 IService getService(String aService)
          get a service by its name
 IService getService(String aService, IServiceConfiguration aServiceConfiguration)
          Deprecated. Do not use anymore.
 IService getService(String aService, IServiceId aServiceUserId)
          Deprecated. Do not use anymore.
 IServiceConfig getServiceConfig()
          Gets the service config
 String getServiceName()
          Gets the portal service name
 IServiceProfile getServiceProfile()
          Gets the service profile
 String getWebResourcePath(String applicationName)
          Gets a URL to access to web resources that belong to the application.
 String getWorkplaceProperty(String key, String lDefault)
          returns the system property corresponding to the key specified.
 

Method Detail

getResource

IResource getResource(String serviceName,
                      String resourceType,
                      String fileName)
Gets an IResource object that belongs to the service.

The IResource interface defines string constants for standard resource types.

Parameters:
serviceName - the name of the service
resourceType - the type of the resource
fileName - the file name
Returns:
an IResource object.
See Also:
getResource(String, String)

getResource

IResource getResource(String resourceType,
                      String fileName)
Gets an IResource object that belongs to the current service.

The IResource interface defines string constants for standard resource types.

Parameters:
resourceType - the type of the resource
fileName - the file name
Returns:
an IResource object.

getResource

IResource getResource(String resourceType,
                      File file)
Gets an IResource object referring to the file specified.

The IResource interface defines string constants for standard resource types.

Parameters:
resourceType - the type of the resource
file - a File object referring to the resource
Returns:
an IResource object.

getWorkplaceProperty

String getWorkplaceProperty(String key,
                            String lDefault)
returns the system property corresponding to the key specified.

Parameters:
key -
lDefault -

getPrivateResourceHome

String getPrivateResourceHome()
Gets the home path for private resources

Returns:
a String denoting the path where private resources are located.

getPrivateServicePath

String getPrivateServicePath()
Returns the full path to access private resources of the current service.

Returns:
a String denoting the full path to access private resources

getPublicServicePath

String getPublicServicePath()
Returns the full path to access public resources of the current service.

Returns:
a String denoting the full path to access public resources

getLogger

ILogger getLogger()
get the default log handler


getLogger

ILogger getLogger(String aLoggerName)
get the log handler

Parameters:
aLoggerName -

getClassLogger

ILogger getClassLogger(Class aClass)
Returns the logger associated to aClass's package.

Parameters:
aClass - The class which is calling the logger.
Returns:
The logger associated to aClass's package.

getService

IService getService(String aService,
                    IServiceId aServiceUserId)
                    throws ServiceException
Deprecated. Do not use anymore.

get a service

Parameters:
aService - the service to get
aServiceUserId - the Id of the user requesting the service
Returns:
the Service requested, null otherwise.
Throws:
ServiceException
See Also:
IService

getService

IService getService(String aService,
                    IServiceConfiguration aServiceConfiguration)
                    throws ServiceException
Deprecated. Do not use anymore.

get a service

Parameters:
aService - the service to get
aServiceConfiguration -
Returns:
the Service requested, null otherwise.
Throws:
ServiceException
See Also:
IService

getService

IService getService(String aService)
                    throws ServiceException
get a service by its name

Parameters:
aService - the service name to get
Returns:
the Service requested, null otherwise.
Throws:
ServiceException
See Also:
IService

getPropertyValue

String getPropertyValue(String propertyName)
Gets a property value form the service config


getApplicationName

String getApplicationName()
Gets the portal application name


getServiceName

String getServiceName()
Gets the portal service name


getServiceConfig

IServiceConfig getServiceConfig()
Gets the service config


getServiceProfile

IServiceProfile getServiceProfile()
Gets the service profile


getWebResourcePath

String getWebResourcePath(String applicationName)
Gets a URL to access to web resources that belong to the application.

Parameters:
applicationName - The name of the application.
Returns:
The path to access to application resources.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice