public class AccessContext extends Object implements IAccessContext, Serializable
Modifier and Type | Field and Description |
---|---|
protected long |
allowedStaleDataTimespan
Time the repository data may not be older than.
|
protected String |
clientId
Current client identity operating on the resouce.
|
static long |
DEFAULT_ALLOWED_STALE_DATA_TIMESPAN |
protected Locale |
locale
Locale of current user operating on the resouce.
|
protected Map |
properties
Client defined property map.
|
Object |
transformedResourceContext
Used for an optimization in ContextTransformer class.
|
protected IUser |
user
Current user operating on the resouce.
|
protected Map |
variantContext |
TRANSPORT_EXPORT, TRANSPORT_IMPORT
Constructor and Description |
---|
AccessContext(String clientId,
IUser user,
Locale locale,
long allowedStaleDataTimespan)
Construct instance just with the current user and a locale to be used.
|
AccessContext(String clientId,
IUser user,
Locale locale,
Map properties,
long allowedStaleDataTimespan)
Construct instance with the current user, a locale to be used and client defined properties.
|
AccessContext(String clientId,
IUser user,
Locale locale,
Map properties,
Map variantContext,
long allowedStaleDataTimespan)
Construct instance with the current user, a locale to be used and client defined properties.
|
AccessContext(String clientId,
IUser user,
Locale locale,
Map properties,
Map variantContext,
long allowedStaleDataTimespan,
String tuccID)
Construct instance with the current user, a locale to be used and client defined properties.
|
AccessContext(String clientId,
IUser user,
long allowedStaleDataTimespan)
Construct instance just with the current user.
|
AccessContext(String clientId,
IUser user,
Map properties,
long allowedStaleDataTimespan)
Construct instance just with the current user and client defined properties.
|
Modifier and Type | Method and Description |
---|---|
IAccessContext |
cloneContext()
Clone access context.
|
long |
getAllowedStaleDataTimespan()
Get time the repository data may not be older than.
|
Map |
getClientDefinedProperties()
Returns a map containing all client defined properties
|
Object |
getClientDefinedProperty(String name)
Get a client defined property from the context.
|
String |
getClientId()
Get id of the current client operating on the resouce.
|
Locale |
getLocale()
Get locale of the current user.
|
String |
getTuccId()
Returns the TUCC transaction identifier - can be
null . |
IUser |
getUser()
Get current user operating on the resouce.
|
Map |
getVariantContext()
Returns a map of context properties used for variant handling - may be
null . |
void |
setAllowedStaleDataTimespan(long allowedStaleDataTimespan)
Set time the repository data may not be older than.
|
void |
setClientDefinedProperty(String name,
Object value)
Set a client defined property in the context.
|
void |
setClientId(String clientId)
Set id of the current client operating on the resouce.
|
void |
setLocale(Locale locale)
Set locale of the current user.
|
void |
setUser(IUser user)
Set current user operating on the resouce.
|
public static long DEFAULT_ALLOWED_STALE_DATA_TIMESPAN
protected transient String clientId
protected transient IUser user
protected Locale locale
protected long allowedStaleDataTimespan
protected Map properties
protected Map variantContext
public Object transformedResourceContext
public AccessContext(String clientId, IUser user, long allowedStaleDataTimespan)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resouceallowedStaleDataTimespan
- time the repository data may not be older thanpublic AccessContext(String clientId, IUser user, Map properties, long allowedStaleDataTimespan)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resouceallowedStaleDataTimespan
- time the repository data may not be older thanproperties
- initial client defined properties to be used or null for no client defined propertiespublic AccessContext(String clientId, IUser user, Locale locale, long allowedStaleDataTimespan)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resoucelocale
- locale to be associated or null to use user resp. default localeallowedStaleDataTimespan
- time the repository data may not be older thanpublic AccessContext(String clientId, IUser user, Locale locale, Map properties, Map variantContext, long allowedStaleDataTimespan)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resoucelocale
- locale to be associated or null to use user resp. default localeproperties
- initial client defined properties to be used or null for no client defined propertiesvariantContext
- A map with context properties used for variant handling.allowedStaleDataTimespan
- time the repository data may not be older thanpublic AccessContext(String clientId, IUser user, Locale locale, Map properties, Map variantContext, long allowedStaleDataTimespan, String tuccID)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resoucelocale
- locale to be associated or null to use user resp. default localeproperties
- initial client defined properties to be used or null for no client defined propertiesvariantContext
- A map with context properties used for variant handling.allowedStaleDataTimespan
- time the repository data may not be older thanpublic AccessContext(String clientId, IUser user, Locale locale, Map properties, long allowedStaleDataTimespan)
clientId
- id of the current client operating on the resouceuser
- current user operating on the resoucelocale
- locale to be associated or null to use user resp. default localeproperties
- initial client defined properties to be used or null for no client defined propertiesallowedStaleDataTimespan
- time the repository data may not be older thanpublic String getClientId()
getClientId
in interface IAccessContext
public void setClientId(String clientId)
setClientId
in interface IAccessContext
clientId
- id of the current client operating on the resoucepublic Map getClientDefinedProperties()
getClientDefinedProperties
in interface IAccessContext
public IUser getUser()
getUser
in interface IAccessContext
public void setUser(IUser user)
setUser
in interface IAccessContext
user
- current user operating on the resoucepublic Locale getLocale()
getLocale
in interface IAccessContext
public void setLocale(Locale locale)
setLocale
in interface IAccessContext
locale
- locale of the current userpublic long getAllowedStaleDataTimespan()
getAllowedStaleDataTimespan
in interface IAccessContext
public void setAllowedStaleDataTimespan(long allowedStaleDataTimespan)
setAllowedStaleDataTimespan
in interface IAccessContext
allowedStaleDataTimespan
- time the repository data may not be older thanpublic String getTuccId()
IAccessContext
null
.getTuccId
in interface IAccessContext
null
.public Object getClientDefinedProperty(String name)
getClientDefinedProperty
in interface IAccessContext
name
- name of the client defined propertypublic void setClientDefinedProperty(String name, Object value) throws RepositoryException
setClientDefinedProperty
in interface IAccessContext
name
- name of the client defined propertyvalue
- value of the client defined propertyRepositoryException
- Exception raised in failure situationpublic IAccessContext cloneContext()
cloneContext
in interface IAccessContext
public Map getVariantContext()
IAccessContext
null
.getVariantContext
in interface IAccessContext
null
.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
|
Copyright 2018 SAP AG Complete Copyright Notice