com.beasys.commerce.user.jsp.beans
Class LocalProfileBean
java.lang.Object
|
+--com.beasys.commerce.axiom.p13n.http.HttpConfigurableEntity
|
+--com.beasys.commerce.user.jsp.beans.LocalProfileBean
- All Implemented Interfaces:
- BusinessPolicyManager, ConfigurableEntity, java.io.Serializable
- Direct Known Subclasses:
- AnonymousProfileBean, CachedProfileBean
- public class LocalProfileBean
- extends HttpConfigurableEntity
- implements java.io.Serializable
Bean used to hold the local user profile. This is used behind
any bean that caches user profile values at the JSP layer, such
as the AnonymousProfileBean.
- Version:
- $Revision:$, $Date:$
- Author:
- original: Tim Breeden, latest: $Author: Tim Breeden$
- See Also:
- Serialized Form
Method Summary |
void |
clearValues()
Clears the values in the anonymous profile. |
java.lang.Object |
getProperty(java.lang.String scope,
java.lang.String propertyName)
Retrieves the property value for the given scope. |
java.lang.Object |
getProperty(java.lang.String aScopeName,
java.lang.String aKey,
ConfigurableEntity successor,
java.lang.Object aDefault)
Retrieves a property value. |
java.lang.String |
getPropertyAsString(java.lang.String scope,
java.lang.String propertyName)
Retrieves the property value for the given scope, cast to a String
by calling the value's toString() method. |
java.lang.Object |
removeProperty(java.lang.String scope,
java.lang.String propertyName)
Removes the specified property from the profile. |
protected void |
setProperties(java.util.HashMap properties)
Resets all locally-held properties to the given values. |
void |
setProperty(java.lang.String scope,
java.lang.String propertyName,
java.lang.Object value)
Sets a property in the profile. |
void |
transferProperties(User knownProfile)
Moves the properties from this profile into a concrete profile. |
Methods inherited from class com.beasys.commerce.axiom.p13n.http.HttpConfigurableEntity |
addBusinessPolicy, addPropertyValue, addPropertyValueMapped, get__classIdentifier, get__containingBelonging, get__containingEntity, get__mapKey, get__sequenceNumber, getBusinessPolicy, getDefaultValueFromSchema, getEJBHome, getHandle, getPersistableHandle, getPrimaryKey, getProperty, getPropertyAsString, getPropertyDefault, getPropertyNoDefault, getSuccessor, getUniqueId, isIdentical, remove, removeBusinessPolicy, removeProperty, r
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalProfileBean
public LocalProfileBean()
setProperty
public void setProperty(java.lang.String scope,
java.lang.String propertyName,
java.lang.Object value)
- Sets a property in the profile.
- Overrides:
setProperty
in class HttpConfigurableEntity
- Parameters:
scope
- the scope to which the property is set.propertyName
- the name of the property to setvalue
- the new property value
getProperty
public java.lang.Object getProperty(java.lang.String scope,
java.lang.String propertyName)
- Retrieves the property value for the given scope.
- Parameters:
the
- scope in which the property value is to be looked uppropertyName
- the name of the property whose value is sought- Returns:
- the value of the property,
null
if the value is
not found
getPropertyAsString
public java.lang.String getPropertyAsString(java.lang.String scope,
java.lang.String propertyName)
- Retrieves the property value for the given scope, cast to a String
by calling the value's toString() method.
- Overrides:
getPropertyAsString
in class HttpConfigurableEntity
- Parameters:
the
- scope in which the property value is to be looked uppropertyName
- the name of the property whose value is sought- Returns:
- the value of the property,
null
if the value is
not found
removeProperty
public java.lang.Object removeProperty(java.lang.String scope,
java.lang.String propertyName)
- Removes the specified property from the profile.
- Overrides:
removeProperty
in class HttpConfigurableEntity
- Parameters:
scope
- the scope in which to find the profilepropertyName
- the name of the property to remove from the profile
transferProperties
public void transferProperties(User knownProfile)
- Moves the properties from this profile into a concrete profile.
- Parameters:
knownProfile
- the profile into which properties are transferred
clearValues
public void clearValues()
- Clears the values in the anonymous profile.
getProperty
public java.lang.Object getProperty(java.lang.String aScopeName,
java.lang.String aKey,
ConfigurableEntity successor,
java.lang.Object aDefault)
- Retrieves a property value.
- Overrides:
getProperty
in class HttpConfigurableEntity
- Parameters:
scopeName
- The name of the scope for which the property is
sought. The scope is only used if no property is found in the request
and we use the scope to look up the default value in the Schema for the
request. This parameter can be null.key
- The property namesuccessor
- The successor. Must be null. It is not used in this
method and will be ignored.defaultValue
- the default value to return if the property is
not found anywhere.- Returns:
- the property value
setProperties
protected void setProperties(java.util.HashMap properties)
- Resets all locally-held properties to the given values.
- Parameters:
properties
- a Map of key->value pairs
Copyright © 2000 BEA Systems, Inc. All Rights Reserved