com.bea.p13n.http
Class HttpConfigurableEntity

java.lang.Object
  extended by com.bea.p13n.http.HttpConfigurableEntity
All Implemented Interfaces
ConfigurableEntity
Direct Known Subclasses:
Request, Session

public abstract class HttpConfigurableEntity
extends Object
implements ConfigurableEntity

A default implementation for Http Request and Http Session objects mimick a ConfigurableEntity. This does not extend the new AbstractConfigurableEntity becuase it is not really storing values based on property sets, just implementing this interface to provide easy access to request and session attributes.


Field Summary
 
Fields inherited from interface com.bea.p13n.property.ConfigurableEntity
RESERVED_PROPERTY_SET
 
Constructor Summary
HttpConfigurableEntity()
           
 
Method Summary
 String getJndiName()
          This method is not supported.
 String getPkString()
          This method is not supported.
abstract  Object getProperty(String propertySet, String propertyName)
          Mimics the two argument getProperty method on the new com.bea.p13n.property.ConfigurableEntity interface.
 Object getProperty(String propertySet, String propertyName, Object defaultValue)
          Provided as convenience method so client code can still provide a default value
 String getPropertyAsString(String set, String prop)
          Provided as convenience method to always return a String or null.
static Object getPropertyDefault(String propertySetType, String propertySet, String propertyName)
          Utility method for retrievng the default value from the PropertySet for the specified type, set, and name.
abstract  Object getPropertyNoDefault(String propertySet, String propertyName)
          Mimics the two argument getPropertyNoDefault method on the new com.bea.p13n.property.ConfigurableEntity interface.
static PropertySetManager getPropertySetManager()
          Get a reference to the PropertySetManager session bean.
 long getUniqueId()
          This method is not supported.
 Object removeProperty(String aString, String aString2)
          This method is not supported.
 void setProperty(String aString, String aString2, Object anObject)
          This method is not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConfigurableEntity

public HttpConfigurableEntity()
Method Detail

getProperty

public abstract Object getProperty(String propertySet,
                                   String propertyName)
Mimics the two argument getProperty method on the new com.bea.p13n.property.ConfigurableEntity interface.

Specified by:
getProperty in interface ConfigurableEntity
Parameters
propertySet - The name of the property set to look in
propertyName - The name of the property to retrieve.
Returns
the value for this property, or null if all searches failed

getProperty

public Object getProperty(String propertySet,
                          String propertyName,
                          Object defaultValue)
Provided as convenience method so client code can still provide a default value


getPropertyAsString

public String getPropertyAsString(String set,
                                  String prop)
Provided as convenience method to always return a String or null.

Specified by:
getPropertyAsString in interface ConfigurableEntity
Parameters
set - The name of the property set to look in
prop - The name of the property to retrieve.
Returns
the value for this property as a String, or null if all searches failed

getPropertyNoDefault

public abstract Object getPropertyNoDefault(String propertySet,
                                            String propertyName)
Mimics the two argument getPropertyNoDefault method on the new com.bea.p13n.property.ConfigurableEntity interface.

Specified by:
getPropertyNoDefault in interface ConfigurableEntity
Parameters
propertySet - The name of the property set to look in
propertyName - The name of the property to retrieve.
Returns
the value for this property, or null if all searches failed

setProperty

public void setProperty(String aString,
                        String aString2,
                        Object anObject)
                 throws UnsupportedOperationException
This method is not supported.

Specified by:
setProperty in interface ConfigurableEntity
Parameters
aString - The name of the property set.
aString2 - The name of the property to assign
anObject - The value to associate with the property name
Throws
UnsupportedOperationException

removeProperty

public Object removeProperty(String aString,
                             String aString2)
                      throws UnsupportedOperationException
This method is not supported.

Specified by:
removeProperty in interface ConfigurableEntity
Parameters
aString - The name of the property set.
aString2 - The name of the property to remove.
Returns
the old value of the property, or null if there was none.
Throws
UnsupportedOperationException

getUniqueId

public long getUniqueId()
                 throws UnsupportedOperationException
This method is not supported.

Specified by:
getUniqueId in interface ConfigurableEntity
Returns
this entity's unique id
Throws
UnsupportedOperationException

getPkString

public final String getPkString()
                         throws UnsupportedOperationException
This method is not supported.

Specified by:
getPkString in interface ConfigurableEntity
Returns
the primary key string identifier for this entity
Throws
UnsupportedOperationException

getJndiName

public String getJndiName()
                   throws UnsupportedOperationException
This method is not supported.

Specified by:
getJndiName in interface ConfigurableEntity
Returns
the jndi name for this entity
Throws
UnsupportedOperationException

getPropertyDefault

public static Object getPropertyDefault(String propertySetType,
                                        String propertySet,
                                        String propertyName)
Utility method for retrievng the default value from the PropertySet for the specified type, set, and name. This version will swallow any exceptions and return null if there is a problem looking up the property set manager. Other ConfigurableEntity classes can use this method to get default values in a reasonable safe way.

Parameters
propertySetType - the property set type (e.g. USER, EVENT, REQUEST, SESSION).
propertySet - the property set to look in
propertyName - the name of the property
Returns
the default value of the property, or null if it was not defined

getPropertySetManager

public static PropertySetManager getPropertySetManager()
                                                throws NamingException,
                                                       javax.ejb.CreateException,
                                                       RemoteException,
                                                       ClassCastException
Get a reference to the PropertySetManager session bean.

Throws
NamingException
javax.ejb.CreateException
RemoteException
ClassCastException


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.