| com.sun.ssoadapter.config.ClientAwareUserContext
All known Subclasses: com.sun.ssoadapter.config.PSClientAwareUserContext, com.sun.ssoadapter.config.PSClientAwareAuthlessContext,
ClientAwareUserContext | public interface ClientAwareUserContext (Code) | | Copied from hana_ws/ps/desktop/src/com/sun/portal/
desktop/context/DesktopContext.java
This object encapsulates objects with user session - ServiceUserContext,
SessionUserContext and (global) ClientContext, DebugContext
& FileLookupContext.
Till DSAME supports client-aware attribute storage and reteival,
the get*Attribute() & set*Attribute() methods of this object will get &
set attributes in a client-aware fashion.
The get and set methods depend on the schema definition of the attribute
to decide if the client-aware lookup needs to be done. The "any" attribute
of the attribute definition in the schema must contain the keyword
"client-aware". The "any" attribute now uses only "display", the new
definition will become "display,client-aware". Also the attribute must
be defined as a"list".
Assume a mailservice attribute for url requiring client specific attributes:
<AttributeSchema name="iplanet-mailservice-urls"
type="list" syntax="string" i18nKey="URLs" any="display,client-aware" >
<DefaultValues>
<Value> genericHTML|http://mail.com </Value>
<Value> WML|http://wap.mail.com </Value>
<Value> Nokia|http://wap.mail.com/Nokia </Value>
</DefaultValues>
</AttributeSchema >
get & set *Attributes() look at the clientType in the session.
get*Attribute() - Hierarchial lookup will not be done, if a clientType
specific attribute is not found, the value of genericHTML will be returned.
set*Attribute() - will always set the attribute for the clientType in the
session.
|
Method Summary | |
public Set | getAttribute(Map service, String clientType, String attrName) Gets the attributes multi-vals. | public Set | getAttribute(Map service, String attrName) Gets the attributes multi-vals. | public String | getStringAttribute(Map service, String clientType, String attrName) Gets the attribute. | public String | getStringAttribute(Map service, String attrName) Gets the attribute. | public void | init(SSOAdapterSession session, ClientAwareAppContext caAppContext) Initializes the session aware context for the user. | public void | removeAttribute(Map service, String attrName) Remove an attribute
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. | public void | setAttribute(Map service, String attrName, Set vals, boolean forceClientAwareness) Sets the attribute values.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. | public void | setAttribute(Map service, String clientType, String attrName, Set vals) Sets the attribute values.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. | public void | setAttribute(Map service, String attrName, Set vals) Sets the attribute value. | public void | setStringAttribute(Map service, String attrName, String val, boolean forceClientAwareness) Sets the attribute value. | public void | setStringAttribute(Map service, String clientType, String attrName, String val) Sets the attribute value. | public void | setStringAttribute(Map service, String attrName, String val) Sets the attribute value. | public void | store() Write out any modified data to the persistent store, if necessary. |
getAttribute | public Set getAttribute(Map service, String clientType, String attrName) throws IllegalStateException, IOException(Code) | | Gets the attributes multi-vals. 'Attributes' are service attributes
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to get any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". Note: If service is null or if the serviceNameis not specified in the Map, then the implementation for DSAMEassumes a scope of User/Dynamic. Parameters: clientType - The clientType specific attribute to look for. If thisis null, the session's clientType value is used. Parameters: attrName - The attribute name. The attribute values as Set. If property isnot found, return null. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be retrieved from thedata store. |
getAttribute | public Set getAttribute(Map service, String attrName) throws IllegalStateException, IOException(Code) | | Gets the attributes multi-vals. 'Attributes' are service attributes
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to get any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". Note: If service is null or if the serviceNameis not specified in the Map, then the implementation for DSAMEassumes a scope of User/Dynamic. Parameters: attrName - The attribute name. The attribute values as Set. If property isnot found, return null. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be retrieved from thedata store. |
getStringAttribute | public String getStringAttribute(Map service, String clientType, String attrName) throws IllegalStateException, IOException(Code) | | Gets the attribute. 'Attributes' are service attributes
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to get any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". Note: If service is null or if the serviceNameis not specified in the Map, then the implementation for DSAMEassumes a scope of User/Dynamic. Parameters: clientType - The clientType specific attribute to look for. If thisis null, the session's clientType value is used. Parameters: attrName - The attribute name. The attribute value in String format. If property isnot found, return null. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be retrieved from thedata store. |
getStringAttribute | public String getStringAttribute(Map service, String attrName) throws IllegalStateException, IOException(Code) | | Gets the attribute. 'Attributes' are service attributes
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to get any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". Note: If service is null or if the serviceNameis not specified in the Map, then the implementation for DSAMEassumes a scope of User/Dynamic. Parameters: attrName - The attribute name. The attribute value in String format. If property isnot found, return null. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be retrieved from thedata store. |
removeAttribute | public void removeAttribute(Map service, String attrName) throws IllegalStateException, MissingResourceException, IOException(Code) | | Remove an attribute
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: attrName - The attribute name. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
setAttribute | public void setAttribute(Map service, String attrName, Set vals, boolean forceClientAwareness) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute values.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: attrName - The attribute name. Parameters: vals - The attribute values. Parameters: forceClientAwareness - If true and existing attributes are notclient-aware, modifies the old values with "default|" and stores thenew values as "clienttype|value" exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
setAttribute | public void setAttribute(Map service, String clientType, String attrName, Set vals) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute values.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: clientType - The value is to be set for this clientType. Implicitlyturns forceClientAwareness to TRUE Parameters: attrName - The attribute name. Parameters: vals - The attribute values. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
setAttribute | public void setAttribute(Map service, String attrName, Set vals) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute value. New data is persisted immediately.
The implicit value for forceClientAwareness is FALSE and the clientType
in the sesion will be used if necessary.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: attrName - The attribute name. Parameters: vals - The attribute values. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
setStringAttribute | public void setStringAttribute(Map service, String attrName, String val, boolean forceClientAwareness) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute value. New data is persisted immediately.
Uses the clientType of the session if necessary.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: attrName - The attribute name. Parameters: val - The attribute value. Parameters: forceClientAwareness - If true and existing attributes are notclient-aware, modifies the old values with "default|" and stores thenew values as "clienttype|value" exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by the backend service were missing the the service MAP |
setStringAttribute | public void setStringAttribute(Map service, String clientType, String attrName, String val) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute value. New data is persisted immediately.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: clientType - The value is to be set for this clientType. Implicitlyturns forceClientAwareness to TRUE Parameters: attrName - The attribute name. Parameters: val - The attribute value. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
setStringAttribute | public void setStringAttribute(Map service, String attrName, String val) throws IllegalStateException, MissingResourceException, IOException(Code) | | Sets the attribute value. New data is persisted immediately.
The implicit value for forceClientAwareness is FALSE and the clientType
in the sesion will be used if necessary.
Parameters: service - A list of properties required by the backend service.Ex: DSAME requires a name of the service to set any attributes in theGlobal/Organization scope. The name of the service is referenced by the keyword "serviceName". The Map "must" contain this property to work with DSAME. If this property is not found in the map, theDSAME implementation throws a MissingResourceException. Parameters: attrName - The attribute name. Parameters: val - The attribute value. exception: IllegalStateException - If the session is not valid exception: IOException - If the value could not be set in thedata store. exception: MissingResourceException - If any of the properties required by thebackend service were missing the the service MAP |
store | public void store()(Code) | | Write out any modified data to the persistent store, if necessary.
|
|
|