SAP NetWeaver '04

com.sapportals.wcm.repository
Class ResourceContext

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.repository.ResourceContext
All Implemented Interfaces:
IResourceContext, java.io.Serializable

public class ResourceContext
extends java.lang.Object
implements IResourceContext, java.io.Serializable

Instances of this class contain information about the context the client is running is (request, session, etc.)

Copyright (c) SAP AG 2001-2004

See Also:
Serialized Form

Field Summary
protected  java.util.Locale locale
          the locale object
protected  java.util.Properties placeholders
          URI placeholder used by resource factory
protected  java.util.HashMap properties
          some properties used by setValue() /getValue()
protected static java.lang.String SESSION
          testing ?
protected  com.sapportals.portal.security.usermanagement.IUser user
          the current user in that context
 
Fields inherited from interface com.sapportals.wcm.repository.IResourceContext
NO_KEYWORD_SUBSTITUTION
 
Constructor Summary
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user)
           
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user, java.util.Locale fallbackLocale)
           
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user, java.util.Locale locale, boolean isPrimaryLocale)
           
 
Method Summary
 IResourceContext cloneContext()
          Clone resource context.
 long getCreationTime()
           
 java.util.Locale getLocale()
          Get the locale for that context.
 java.lang.Object getObjectValue(java.lang.String name)
          Returns the value for the specified name
 com.sapportals.portal.security.usermanagement.IUser getUser()
          Get the current user for that context.
 java.lang.String getValue(java.lang.String name)
          Returns the value for the specified name
 java.util.HashMap getValues()
          Returns the internal properties map as is without copying them to be used and possible modified from outside.
 void setLocale(java.util.Locale locale)
          Set the locale for that context.
 void setObjectValue(java.lang.String name, java.lang.Object value)
          Add/update a name/value pair
 void setUser(com.sapportals.portal.security.usermanagement.IUser user)
          Set the current user for that context.
 void setValue(java.lang.String name, java.lang.String value)
          Add/update a name/value pair
 void setValues(java.util.HashMap properties)
          Takes and sets the properties as is without copying them to be used and possibly modified as internal properties map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION

protected static final java.lang.String SESSION
testing ?

properties

protected java.util.HashMap properties
some properties used by setValue() /getValue()

locale

protected java.util.Locale locale
the locale object

user

protected transient com.sapportals.portal.security.usermanagement.IUser user
the current user in that context

placeholders

protected java.util.Properties placeholders
URI placeholder used by resource factory
Constructor Detail

ResourceContext

public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user)

ResourceContext

public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
                       java.util.Locale fallbackLocale)

ResourceContext

public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
                       java.util.Locale locale,
                       boolean isPrimaryLocale)
Method Detail

getCreationTime

public long getCreationTime()

setObjectValue

public void setObjectValue(java.lang.String name,
                           java.lang.Object value)
                    throws ResourceException
Description copied from interface: IResourceContext
Add/update a name/value pair
Specified by:
setObjectValue in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
name - A unique name
value - An object
Throws:
ResourceException - If the name paramater is invalid

getObjectValue

public java.lang.Object getObjectValue(java.lang.String name)
Description copied from interface: IResourceContext
Returns the value for the specified name
Specified by:
getObjectValue in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
name - TBD: Description of the incoming method parameter
Returns:
The result object or null if the name was not found

setValue

public void setValue(java.lang.String name,
                     java.lang.String value)
              throws ResourceException
Description copied from interface: IResourceContext
Add/update a name/value pair
Specified by:
setValue in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
name - A unique name
value - The value
Throws:
ResourceException - If the name paramater is invalid

getValue

public java.lang.String getValue(java.lang.String name)
Description copied from interface: IResourceContext
Returns the value for the specified name
Specified by:
getValue in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
name - TBD: Description of the incoming method parameter
Returns:
The value or null if the name was not found

setValues

public void setValues(java.util.HashMap properties)
Description copied from interface: IResourceContext
Takes and sets the properties as is without copying them to be used and possibly modified as internal properties map.
Specified by:
setValues in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
properties - properties

getValues

public java.util.HashMap getValues()
Description copied from interface: IResourceContext
Returns the internal properties map as is without copying them to be used and possible modified from outside.
Specified by:
getValues in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Returns:
properties

getLocale

public java.util.Locale getLocale()
Description copied from interface: IResourceContext
Get the locale for that context.
Specified by:
getLocale in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Returns:
Locale the locale to use.
See Also:
Locale

setLocale

public void setLocale(java.util.Locale locale)
Description copied from interface: IResourceContext
Set the locale for that context.
Specified by:
setLocale in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
locale - locale to be set
See Also:
Locale

setUser

public void setUser(com.sapportals.portal.security.usermanagement.IUser user)
Description copied from interface: IResourceContext
Set the current user for that context.
Specified by:
setUser in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Parameters:
user - user to be set

getUser

public com.sapportals.portal.security.usermanagement.IUser getUser()
Description copied from interface: IResourceContext
Get the current user for that context.
Specified by:
getUser in interface IResourceContext
Following copied from interface: com.sapportals.wcm.repository.IResourceContext
Returns:
IUser the user.

cloneContext

public IResourceContext cloneContext()
Clone resource context.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
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.