com.sapportals.wcm.repository

Interface IResourceContext

All Known Implementing Classes:
ResourceContext

public interface IResourceContext

A resource context must be used by every application when accessing resources of the Repository Framework. Every context is associated with an authenticated user instance (provided by user management). These are the possible kinds of users:

In addition the context contains (optional) information/parameters which are used by repository managers.

See Also:
ResourceContext.getInstance(IUser),

Copyright (c) SAP AG 2001-2005


Field Summary
static String J2EE_SCAN_PROFILE
          Defines the parameter name for the getValue(String) and setValue(String, String) method.
static String NO_KEYWORD_SUBSTITUTION
           
static String TRANSPORT_EXPORT
          Defines the parameter name for the getValue(String) method.
static String TRANSPORT_IMPORT
          Defines the parameter name for the getValue(String) method.
 
Method Summary
 Locale getLocale()
          Get the locale for that context.
 Object getObjectValue(String name)
          Returns the value for the specified name
 String getTuccId()
          Returns the TUCC transaction identifier - can be null.
 com.sapportals.portal.security.usermanagement.IUser getUser()
          Deprecated. As of NetWeaver 7.1, replaced by getUserUME()
 IUser getUserUME()
          Get the current user for that context.
 String getValue(String name)
          Returns the value for the specified name
 HashMap getValues()
          Returns the internal properties map as is without copying them to be used and possible modified from outside.
 IPropertyMap getVariantContext()
          Returns a map of context properties used for variant handling - may be null.
 void setLocale(Locale locale)
          Set the locale for that context.
 void setObjectValue(String name, Object value)
          Add/update a name/value pair
 void setUser(com.sapportals.portal.security.usermanagement.IUser user)
          Deprecated. As of NetWeaver 7.1, replaced by setUserUME(com.sap.security.api.IUser)
 void setUserUME(IUser user)
          Set the current user for that context.
 void setValue(String name, String value)
          Add/update a name/value pair
 void setValues(HashMap properties)
          Takes and sets the properties as is without copying them to be used and possibly modified as internal properties map.
 void setVariantContext(IPropertyMap variantContext)
          Sets a map of context properties used for variant handling - may be null.
 

Field Detail

NO_KEYWORD_SUBSTITUTION

static final String NO_KEYWORD_SUBSTITUTION
See Also:
Constant Field Values

TRANSPORT_IMPORT

static final String TRANSPORT_IMPORT
Defines the parameter name for the getValue(String) method. The framework will set this parameter as a flag (returned value is not null) to indicate to a repository that the createXXX() method is used to create a deserialized resource as part of a import of the transport service.

See Also:
Constant Field Values

TRANSPORT_EXPORT

static final String TRANSPORT_EXPORT
Defines the parameter name for the getValue(String) method. The framework will set this parameter as a flag (returned value is not null) to indicate to a repository that the readXXX() method is used to read and deserialize aresource as part of an export of the transport service.

See Also:
Constant Field Values

J2EE_SCAN_PROFILE

static final String J2EE_SCAN_PROFILE
Defines the parameter name for the getValue(String) and setValue(String, String) method. If the virus scanning is enabled the parameter name is used to specify the scan profile name which is used for virus scanning when creating or reading a file. If the returned value is null the default kmc_Default profile is set for virus scanning.

See Also:
Constant Field Values
Method Detail

setValue

void setValue(String name,
              String value)
              throws ResourceException
Add/update a name/value pair

Parameters:
name - A unique name
value - The value
Throws:
ResourceException - If the name paramater is invalid

getValue

String getValue(String name)
Returns the value for the specified name

Parameters:
name - TBD: Description of the incoming method parameter
Returns:
The value or null if the name was not found

setObjectValue

void setObjectValue(String name,
                    Object value)
                    throws ResourceException
Add/update a name/value pair

Parameters:
name - A unique name
value - An object
Throws:
ResourceException - If the name paramater is invalid

getObjectValue

Object getObjectValue(String name)
Returns the value for the specified name

Parameters:
name - TBD: Description of the incoming method parameter
Returns:
The result object or null if the name was not found

setValues

void setValues(HashMap properties)
Takes and sets the properties as is without copying them to be used and possibly modified as internal properties map.

Parameters:
properties - properties

getValues

HashMap getValues()
Returns the internal properties map as is without copying them to be used and possible modified from outside.

Returns:
properties

setLocale

void setLocale(Locale locale)
Set the locale for that context.

Parameters:
locale - locale to be set
See Also:
Locale

getLocale

Locale getLocale()
Get the locale for that context.

Returns:
Locale the locale to use.
See Also:
Locale

setUser

void setUser(com.sapportals.portal.security.usermanagement.IUser user)
Deprecated. As of NetWeaver 7.1, replaced by setUserUME(com.sap.security.api.IUser)

Set the current user for that context.

Parameters:
user - user to be set

setUserUME

void setUserUME(IUser user)
Set the current user for that context.

Parameters:
user - user to be set
Since:
NetWeaver 7.1

getUser

com.sapportals.portal.security.usermanagement.IUser getUser()
Deprecated. As of NetWeaver 7.1, replaced by getUserUME()

Get the current user for that context.

Returns:
IUser the user.

getUserUME

IUser getUserUME()
Get the current user for that context.

Returns:
IUser the user.
Since:
NetWeaver 7.1

getVariantContext

IPropertyMap getVariantContext()
Returns a map of context properties used for variant handling - may be null.

Returns:
a map of context properties used for variant handling - may be null.
Since:
NetWeaver 7.1

setVariantContext

void setVariantContext(IPropertyMap variantContext)
Sets a map of context properties used for variant handling - may be null.

Since:
NetWeaver 7.1

getTuccId

String getTuccId()
Returns the TUCC transaction identifier - can be null.

Returns:
the TUCC transaction identifier - can be null.
Since:
NetWeaver 7.1
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice