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 getWorkplaceProperty(String key, String lDefault)
          returns the system property corresponding to the key specified.
 

Method Detail

getResource

public 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

public 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

public 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

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

Parameters:
key -
lDefault -

getPrivateResourceHome

public String getPrivateResourceHome()
Gets the home path for private resources

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

getPrivateServicePath

public 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

public 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

public ILogger getLogger()
get the default log handler


getLogger

public ILogger getLogger(String aLoggerName)
get the log handler

Parameters:
aLoggerName -

getClassLogger

public 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

public 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

public 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

public 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

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


getApplicationName

public String getApplicationName()
Gets the portal application name


getServiceName

public String getServiceName()
Gets the portal service name


getServiceConfig

public IServiceConfig getServiceConfig()
Gets the service config


getServiceProfile

public IServiceProfile getServiceProfile()
Gets the service profile



Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.