|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.foundation.property.DirectPropertyManagerBean
A session bean that provides ConfigurableEntity functionality with minimal access through entity beans. This is accomplished by accessing the EntityPropertyManager directly, and reduces ejb locks so that there is less of a risk of deadlock.
Field Summary | |
static java.lang.String |
DIRECT_PROPERTY_MANAGER
|
static java.lang.String |
ENTITY_PROPERTY_MANAGER_HOME
|
static java.lang.String |
GROUP_JNDI_HOME_NAME
|
static java.lang.String |
USER_JNDI_HOME_NAME
|
Constructor Summary | |
DirectPropertyManagerBean()
|
Method Summary | |
void |
ejbActivate()
This method is required by the EJB Specification, but is not used by this class. |
void |
ejbCreate()
Creates the session bean. |
void |
ejbPassivate()
This method is required by the EJB Specification, but is not used by this class. |
void |
ejbRemove()
This method is required by the EJB Specification, but is not used by this class. |
java.lang.Object |
getDefaultValue(java.lang.String propertySet,
java.lang.String propertyName)
Retrieves the default value of a property |
ConfigurableEntity |
getEntity(java.lang.String profileKey,
java.lang.String profileType)
Instantiates a ConfigurableEntity based on the pk and profileType, and returns it cast as a ConfigurableEntity. |
long |
getEntityId(java.lang.String pk,
java.lang.String profileType)
Retrieves the unique numeric id of a configurable entity |
java.lang.Object |
getExplicitProperty(java.lang.String profileKey,
java.lang.String profileType,
java.lang.String propertyName)
Retrieve an explicit property from a configurable entity, if it exists. |
java.util.Map |
getProperties(java.lang.String pk,
java.lang.String profileType,
java.lang.String successorPk,
java.lang.String successorProfileType)
Retrieve all set properties for a particular ConfigurableEntity, following the successor chains as necessary. |
java.lang.Object |
getProperty(java.lang.String pk,
java.lang.String profileType,
java.lang.String successorPk,
java.lang.String successorProfileType,
java.lang.String propertySet,
java.lang.String propertyName,
java.lang.Object defaultValue)
Retrieve a property from a configurable entity. |
protected java.lang.Object |
getProperty(java.lang.String pk,
java.lang.String profileType,
java.lang.String successorPk,
java.lang.String successorProfileType,
java.lang.String propertySet,
java.lang.String propertyName,
java.lang.Object defaultValue,
boolean useDefault)
Just like the public direct property except it takes an extra parameter to determine whether or not to return the property's default value, if there is one. |
java.lang.Object |
getPropertyFromCache(java.lang.String profileKey,
java.lang.String profileType,
java.lang.String propertyName)
Get a value out of the cache |
protected java.lang.Object |
getPropertyFromSuccessorHandle(PersistableHandle handle,
java.lang.String propertySet,
java.lang.String propertyName)
Try to retrieve a property from a ConfigurableEntity that is referred to by a PersistableHandle |
protected com.beasys.commerce.foundation.property.external.SharedProperty |
getSharedProperty(java.lang.String pk,
java.lang.String propertySet,
java.lang.String propertyName)
Try to retrieve a property from a shared profile provider. |
protected java.util.Map |
mergeWithSuccessor(java.util.Map props,
java.util.Map successorProps,
java.lang.String propertySet)
Merge an entity's properties with its successor's properties. |
protected java.util.Map |
mergeWithSuccessorFromHandle(java.util.Map profileProperties,
PersistableHandle handle,
java.lang.String scopeName,
java.lang.String explicitSuccessorPk,
java.lang.String explicitSuccessorType)
Get the properties for a ConfigurableEntity by calling reallyGetProperties with the information contained in the given handle, and then merge the two property maps. |
protected java.util.Map |
reallyGetProperties(java.lang.String pk,
java.lang.String profileType,
java.lang.String successorPk,
java.lang.String successorProfileType)
Recursive helper method for getProperties |
java.lang.Object |
removeProperty(java.lang.String pk,
java.lang.String profileType,
java.lang.String propertySet,
java.lang.String propertyName)
Removes the property from the given configurable entity. |
void |
removePropertyFromCache(java.lang.String profileKey,
java.lang.String profileType,
java.lang.String propertyName)
Remove a value from the cache |
void |
setProperty(java.lang.String pk,
java.lang.String profileType,
java.lang.String propertySet,
java.lang.String propertyName,
java.lang.Object value)
Sets a property for a configurable entity. |
void |
setPropertyIntoCache(java.lang.String profileKey,
java.lang.String profileType,
java.lang.String propertyName,
java.lang.Object value)
Set a value into a cache |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context. |
static java.lang.String |
upcaseFirst(java.lang.String s)
Make the first letter of a string uppercase |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String USER_JNDI_HOME_NAME
public static final java.lang.String GROUP_JNDI_HOME_NAME
public static final java.lang.String DIRECT_PROPERTY_MANAGER
public static final java.lang.String ENTITY_PROPERTY_MANAGER_HOME
Constructor Detail |
public DirectPropertyManagerBean()
Method Detail |
public java.lang.Object getDefaultValue(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- the property set to look inpropertyName
- the name of the propertypublic java.util.Map getProperties(java.lang.String pk, java.lang.String profileType, java.lang.String successorPk, java.lang.String successorProfileType) throws java.rmi.RemoteException
pk
- the profile key of the entityprofileType
- the profile type of the entitysuccessorPk
- the profile key of an explicit successor to use (can be null)successorProfileType
- the profile type for an explicity successor (can be null)protected java.util.Map reallyGetProperties(java.lang.String pk, java.lang.String profileType, java.lang.String successorPk, java.lang.String successorProfileType) throws java.rmi.RemoteException
protected java.util.Map mergeWithSuccessorFromHandle(java.util.Map profileProperties, PersistableHandle handle, java.lang.String scopeName, java.lang.String explicitSuccessorPk, java.lang.String explicitSuccessorType) throws java.rmi.RemoteException
profileProperties
- the current set of properties, to merge intohandle
- the handle representing a successorscopeName
- the scope to stay within (can be null for all scopes)explicitSuccessorPk
- the key of the explicit successorexplicitSuccessorType
- the type of the explicit successorprotected java.util.Map mergeWithSuccessor(java.util.Map props, java.util.Map successorProps, java.lang.String propertySet)
props
- the entity's propertiessuccessorProps
- the successor's propertiespropertySet
- the propertySet to stay within (can be null for all sets)public java.lang.Object getProperty(java.lang.String pk, java.lang.String profileType, java.lang.String successorPk, java.lang.String successorProfileType, java.lang.String propertySet, java.lang.String propertyName, java.lang.Object defaultValue) throws java.rmi.RemoteException
pk
- the profile key of the entityprofileType
- the profile type of the entitysuccessorPk
- the profile key of the explicit successorsuccessorProfileType
- the type of the explicit successorpropertySet
- the property set to look inpropertyName
- the name of the property to retrievedefaultValue
- a value to return if none is foundpublic java.lang.Object getPropertyFromCache(java.lang.String profileKey, java.lang.String profileType, java.lang.String propertyName)
public void setPropertyIntoCache(java.lang.String profileKey, java.lang.String profileType, java.lang.String propertyName, java.lang.Object value)
public void removePropertyFromCache(java.lang.String profileKey, java.lang.String profileType, java.lang.String propertyName)
public java.lang.Object getExplicitProperty(java.lang.String profileKey, java.lang.String profileType, java.lang.String propertyName) throws java.rmi.RemoteException
profileKey
- the profile key of the entityprofileType
- the profile type of the entitypropertyName
- the name of the property to retrieveprotected com.beasys.commerce.foundation.property.external.SharedProperty getSharedProperty(java.lang.String pk, java.lang.String propertySet, java.lang.String propertyName)
protected java.lang.Object getProperty(java.lang.String pk, java.lang.String profileType, java.lang.String successorPk, java.lang.String successorProfileType, java.lang.String propertySet, java.lang.String propertyName, java.lang.Object defaultValue, boolean useDefault) throws java.rmi.RemoteException
protected java.lang.Object getPropertyFromSuccessorHandle(PersistableHandle handle, java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
public void setProperty(java.lang.String pk, java.lang.String profileType, java.lang.String propertySet, java.lang.String propertyName, java.lang.Object value) throws java.rmi.RemoteException
pk
- the key of the entity to updateprofileType
- the profile type of the entitypropertySet
- the property set of the property to setpropertyName
- the name of the property to setvalue
- the value to setpublic java.lang.Object removeProperty(java.lang.String pk, java.lang.String profileType, java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
pk
- the key of the entity to updateprofileType
- the profile type of the entitypropertySet
- the property set of the property to setpropertyName
- the name of the property to setpublic long getEntityId(java.lang.String pk, java.lang.String profileType) throws java.rmi.RemoteException
pk
- the key of the entityprofileType
- the type of entitypublic ConfigurableEntity getEntity(java.lang.String profileKey, java.lang.String profileType) throws java.rmi.RemoteException
pk
- the key of the entity to retrieveprofileType
- the type to retrieve it aspublic static java.lang.String upcaseFirst(java.lang.String s)
public void ejbCreate()
public void ejbActivate()
public void ejbRemove()
public void ejbPassivate()
public final void setSessionContext(javax.ejb.SessionContext ctx)
ctx
- Context for session
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |