|
SAP NetWeaver 7.40 SP 07 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.repository.ResourceContext
public class ResourceContext
IResourceContext,
Serialized Form| Field Summary | |
|---|---|
protected Locale |
locale
the locale object |
protected Properties |
placeholders
URI placeholder used by resource factory |
protected HashMap |
properties
Properties used by setValue()/getValue() |
protected static String |
SESSION
|
AccessContext |
transformedAccessContext
Used for an optimization in ContextTransformer class. |
protected IUser |
user
the current user in that context |
| Fields inherited from interface com.sapportals.wcm.repository.IResourceContext |
|---|
J2EE_SCAN_PROFILE, NO_KEYWORD_SUBSTITUTION, TRANSPORT_EXPORT, TRANSPORT_IMPORT |
| Constructor Summary | |
|---|---|
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user)
Deprecated. As of NetWeaver 7.1, replaced by getInstance(com.sap.security.api.IUser) |
|
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
Locale fallbackLocale)
Deprecated. As of NetWeaver 7.1, replaced by getInstance(com.sap.security.api.IUser, Locale) |
|
ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
Locale locale,
boolean isPrimaryLocale)
Deprecated. As of NetWeaver 7.1, replaced by getInstance(IUser, Locale, boolean) |
|
| Method Summary | |
|---|---|
IResourceContext |
cloneContext()
Clone resource context. |
boolean |
equals(Object other)
|
long |
getCreationTime()
|
static ResourceContext |
getInstance(IUser user)
Returns a new resource context instance. |
static ResourceContext |
getInstance(IUser user,
Locale fallbackLocale)
Returns a new resource context instance. |
static ResourceContext |
getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale)
Returns a new resource context instance. |
static ResourceContext |
getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale,
IPropertyMap variantContext)
Returns a new resource context instance that contains a variant context. |
static ResourceContext |
getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale,
IPropertyMap variantContext,
String tuccId)
Returns a new resource context instance that contains a TUCC transaction identifier. |
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. |
int |
hashCode()
|
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)
Assigns a new user object to the 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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String SESSION
protected HashMap properties
setValue()/getValue()
protected Locale locale
protected transient IUser user
protected Properties placeholders
public AccessContext transformedAccessContext
| Constructor Detail |
|---|
public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user)
getInstance(com.sap.security.api.IUser)
public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
Locale fallbackLocale)
getInstance(com.sap.security.api.IUser, Locale)
public ResourceContext(com.sapportals.portal.security.usermanagement.IUser user,
Locale locale,
boolean isPrimaryLocale)
getInstance(IUser, Locale, boolean)
| Method Detail |
|---|
public static ResourceContext getInstance(IUser user)
user - The user object to assign to the context. The user should be authenticated. Use null to
assign the (automatically authenticated) ANONYMOUS user.
public static ResourceContext getInstance(IUser user,
Locale fallbackLocale)
user - The user object to assign to the context. The user should be authenticated. Use null to
assign the (automatically authenticated) ANONYMOUS user.fallbackLocale - The locale to be used when no locale is assigned to the user object.
public static ResourceContext getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale)
user - The user object to assign to the context. The user should be authenticated. Use null to
assign the (automatically authenticated) ANONYMOUS user.locale - The user's locale.isPrimaryLocale - true: The locale parameter overwrites the locale assigned to the user object, false: vice versa
public static final ResourceContext getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale,
IPropertyMap variantContext)
throws WcmException
user - The user object to assign to the context. The user should be authenticated. Use null to
assign the (automatically authenticated) ANONYMOUS user.locale - The user's locale.isPrimaryLocale - true: The locale parameter overwrites the locale assigned to the user object, false: vice versavariantContext - A map of context properties which are user for variant handling - may be null. The map may
contain properties of any type but multi-value and multi-language properties are not allowed.
WcmException - If at least one of the properties is a multi-value ot multi-language property.
public static final ResourceContext getInstance(IUser user,
Locale locale,
boolean isPrimaryLocale,
IPropertyMap variantContext,
String tuccId)
user - locale - isPrimaryLocale - variantContext - tuccId -
public long getCreationTime()
public void setObjectValue(String name,
Object value)
throws ResourceException
IResourceContext
setObjectValue in interface IResourceContextname - A unique namevalue - An object
ResourceException - If the name paramater is invalidpublic Object getObjectValue(String name)
IResourceContext
getObjectValue in interface IResourceContextname - TBD: Description of the incoming method parameter
public void setValue(String name,
String value)
throws ResourceException
IResourceContext
setValue in interface IResourceContextname - A unique namevalue - The value
ResourceException - If the name paramater is invalidpublic String getValue(String name)
IResourceContext
getValue in interface IResourceContextname - TBD: Description of the incoming method parameter
public void setValues(HashMap properties)
IResourceContext
setValues in interface IResourceContextproperties - propertiespublic HashMap getValues()
IResourceContext
getValues in interface IResourceContextpublic Locale getLocale()
IResourceContext
getLocale in interface IResourceContextLocale the locale to use.Localepublic void setLocale(Locale locale)
IResourceContext
setLocale in interface IResourceContextlocale - locale to be setLocalepublic void setUser(com.sapportals.portal.security.usermanagement.IUser user)
setUserUME(com.sap.security.api.IUser)
IResourceContext
setUser in interface IResourceContextuser - user to be setpublic void setUserUME(IUser user)
setUserUME in interface IResourceContextuser - user to be setpublic com.sapportals.portal.security.usermanagement.IUser getUser()
getUserUME()
IResourceContext
getUser in interface IResourceContextIUser the user.public IUser getUserUME()
IResourceContext
getUserUME in interface IResourceContextIUser the user.public IPropertyMap getVariantContext()
IResourceContextnull.
getVariantContext in interface IResourceContextnull.IResourceContext.getVariantContext()public void setVariantContext(IPropertyMap variantContext)
IResourceContextnull.
setVariantContext in interface IResourceContextpublic String getTuccId()
IResourceContextnull.
getTuccId in interface IResourceContextnull.public IResourceContext cloneContext()
public String toString()
toString in class Objectpublic final boolean equals(Object other)
equals in class Objectpublic final int hashCode()
hashCode in class Object| Access Rights |
|---|
| 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
|
|
SAP NetWeaver 7.40 SP 07 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||