com.bowstreet.webapp
Interface Variable

All Superinterfaces:
IExemplar, WebAppObject

public interface Variable
extends WebAppObject

Interface that represents a Variable


Field Summary
static java.lang.String INITIALIZE_ONCE_PER_REQUEST
           
static java.lang.String METHOD_BASE_CLASS
           
static java.lang.String ONCHANGE_METHOD_PROPERTY
          Name of method to call when the top-level value of this variable changes.
static int PERSIST_NOTPERSISTED
          Variable value can be set per-session, but has no state that needs to be stored, e.g. for failover.
static int PERSIST_READONLY
          Variable value can be set only during regen, and the value is shared among all sessions.
static int PERSIST_REQUEST_SCOPE
          Variable is request scoped, which implies read-write and not persisted for failover.
static int PERSIST_STATEFUL
          Variable has session state that needs to be maintained.
static int SCOPE_APPLICATION
          Instance of this variable is stored in application (WAR) scope for use by all servlets/JSPs/code running withing the same web app.
static int SCOPE_NONE
          Instance of this variable is returned, but not stored in request/session
static int SCOPE_REQUEST
          Instance of this variable is stored as a request attribute.
static int SCOPE_SESSION
          Instance of this variable is stored as a session attribute.
static java.lang.String TYPE_BOOLEAN
           
static java.lang.String TYPE_DOUBLE
           
static java.lang.String TYPE_FLOAT
           
static java.lang.String TYPE_INTEGER
           
static java.lang.String TYPE_LONG
           
static java.lang.String TYPE_OBJECT
           
static java.lang.String TYPE_STRING
           
static java.lang.String TYPE_XML
           
 
Fields inherited from interface com.bowstreet.webapp.WebAppObject
ALWAYS_VISIBLE, INFORMATION_PROPERTY, NEVER_VISIBLE, SOMETIMES_VISIBLE
 
Method Summary
 DataDefinitionElement getDataDefinition()
          Get the DataDefinition (i.e. interpretation of the SchemaPath
 java.util.Iterator getInitializationProperties()
          Get an iterator over the initialization properties.
 InitializationProperty getInitializationProperty(java.lang.String propertyName)
          Get an initialization property for this variable, by property name.
 boolean getInitializeEveryFetch()
          Sets flag to require re-initialization on each fetch
 java.lang.String getInstantiateMethod()
          Gets method for instantiating object
 java.lang.Object getInternalValue()
          Get Object value for variable, without causing instantiation
 java.lang.String getObjectClassName()
          Gets the ObjectClassName of this variable.
 int getPersistFlag()
          Get persistence flag for object
 java.lang.String getSchemaPath()
          Get schemaPath associated with an XML Variable (null if not XML)
 java.lang.String getType()
          Gets the type of this variable.
 java.lang.Object getValue()
          Get Object value for variable
 InitializationProperty setInitializationProperty(java.lang.String propertyName, java.lang.Object value)
          Set an initialization property for this variable.
 void setInitializeEveryFetch(boolean everyTime)
          Sets flag to require re-initialization on each fetch
 void setInstantiateMethod(java.lang.String methodName)
          Sets method for instantiating object
 void setObjectClassName(java.lang.String objectClassName)
          Sets the ObjectClassName of this variable.
 void setPersistFlag(int persistFlag)
          Sets persistence flag for object
 void setSchemaPath(java.lang.String schemaPath)
          Set the schemaPath for a schema type/element associated with an XML Variable.
 void setType(java.lang.String type)
          Sets the type of this variable.
 void setValue(java.lang.Object value)
          Sets value
 void setValueFromString(java.lang.String valueString)
          Set value from String (for XML, will parse)
 
Methods inherited from interface com.bowstreet.webapp.WebAppObject
clone, getBuilderCall, getName, getProperties, getProperty, getVisibility, isHidden, putProperty, setBuilderCall, setHidden, setName, setVisibility
 
Methods inherited from interface com.bowstreet.util.IExemplar
newInstance
 

Field Detail

INITIALIZE_ONCE_PER_REQUEST

static final java.lang.String INITIALIZE_ONCE_PER_REQUEST
See Also:
Constant Field Values

METHOD_BASE_CLASS

static final java.lang.String METHOD_BASE_CLASS
See Also:
Constant Field Values

ONCHANGE_METHOD_PROPERTY

static final java.lang.String ONCHANGE_METHOD_PROPERTY
Name of method to call when the top-level value of this variable changes. Note that internal changes (e.g., XML sub-elements, bean properties) are not tracked by this mechanism.

See Also:
Constant Field Values

PERSIST_NOTPERSISTED

static final int PERSIST_NOTPERSISTED
Variable value can be set per-session, but has no state that needs to be stored, e.g. for failover. Used by the Factory Web Application domain runtime.

See Also:
Constant Field Values

PERSIST_READONLY

static final int PERSIST_READONLY
Variable value can be set only during regen, and the value is shared among all sessions. Used by the Factory Web Application domain runtime.

See Also:
Constant Field Values

PERSIST_REQUEST_SCOPE

static final int PERSIST_REQUEST_SCOPE
Variable is request scoped, which implies read-write and not persisted for failover. Used by the Factory Web Application domain runtime.

See Also:
Constant Field Values

PERSIST_STATEFUL

static final int PERSIST_STATEFUL
Variable has session state that needs to be maintained. Used by the Factory Web Application domain runtime.

See Also:
Constant Field Values

SCOPE_APPLICATION

static final int SCOPE_APPLICATION
Instance of this variable is stored in application (WAR) scope for use by all servlets/JSPs/code running withing the same web app.

See Also:
Constant Field Values

SCOPE_NONE

static final int SCOPE_NONE
Instance of this variable is returned, but not stored in request/session

See Also:
Constant Field Values

SCOPE_REQUEST

static final int SCOPE_REQUEST
Instance of this variable is stored as a request attribute.

See Also:
Constant Field Values

SCOPE_SESSION

static final int SCOPE_SESSION
Instance of this variable is stored as a session attribute.

See Also:
Constant Field Values

TYPE_BOOLEAN

static final java.lang.String TYPE_BOOLEAN
See Also:
Constant Field Values

TYPE_DOUBLE

static final java.lang.String TYPE_DOUBLE
See Also:
Constant Field Values

TYPE_FLOAT

static final java.lang.String TYPE_FLOAT
See Also:
Constant Field Values

TYPE_INTEGER

static final java.lang.String TYPE_INTEGER
See Also:
Constant Field Values

TYPE_LONG

static final java.lang.String TYPE_LONG
See Also:
Constant Field Values

TYPE_OBJECT

static final java.lang.String TYPE_OBJECT
See Also:
Constant Field Values

TYPE_STRING

static final java.lang.String TYPE_STRING
See Also:
Constant Field Values

TYPE_XML

static final java.lang.String TYPE_XML
See Also:
Constant Field Values
Method Detail

getDataDefinition

DataDefinitionElement getDataDefinition()
Get the DataDefinition (i.e. interpretation of the SchemaPath

Returns:
DataDefinitionElement, or null

getInitializationProperties

java.util.Iterator getInitializationProperties()
Get an iterator over the initialization properties. Note - While this method is available to the Builders at generation time there is no support in the Factory WebApp runtime for generating artifacts related to it.

Returns:
Iterator over InitializationProperty objects.

getInitializationProperty

InitializationProperty getInitializationProperty(java.lang.String propertyName)
Get an initialization property for this variable, by property name. Note - While this method is available to the Builders at generation time there is no support in the Factory WebApp runtime for generating artifacts related to it.

Parameters:
propertyName - naming the property value to retrieve
Returns:
InitializationProperty holding the value and reference type.

getInitializeEveryFetch

boolean getInitializeEveryFetch()
Sets flag to require re-initialization on each fetch


getInstantiateMethod

java.lang.String getInstantiateMethod()
Gets method for instantiating object


getInternalValue

java.lang.Object getInternalValue()
Get Object value for variable, without causing instantiation


getObjectClassName

java.lang.String getObjectClassName()
Gets the ObjectClassName of this variable.

Returns:
The ObjectClassName of this variable.

getPersistFlag

int getPersistFlag()
Get persistence flag for object

Returns:
flag (PERSIST_STATEFUL, PERSIST_NOTPERSISTED, PERSIST_READONLY)

getSchemaPath

java.lang.String getSchemaPath()
Get schemaPath associated with an XML Variable (null if not XML)

Returns:
schemaPath string, or null

getType

java.lang.String getType()
Gets the type of this variable.

Returns:
The type of this variable.

getValue

java.lang.Object getValue()
Get Object value for variable


setInitializationProperty

InitializationProperty setInitializationProperty(java.lang.String propertyName,
                                                 java.lang.Object value)
Set an initialization property for this variable. Note - While this method is available to the Builders at generation time there is no support in the Factory WebApp runtime for generating artifacts related to it.

Parameters:
propertyName - String that names the initialization property
value - (eg, String, Map or List)
Returns:
InitializationProperty, on which you can set reference type.

setInitializeEveryFetch

void setInitializeEveryFetch(boolean everyTime)
Sets flag to require re-initialization on each fetch


setInstantiateMethod

void setInstantiateMethod(java.lang.String methodName)
Sets method for instantiating object


setObjectClassName

void setObjectClassName(java.lang.String objectClassName)
Sets the ObjectClassName of this variable.

Parameters:
objectClassName - The name of the Java class to use with this variable.

setPersistFlag

void setPersistFlag(int persistFlag)
Sets persistence flag for object

Parameters:
persistFlag - One of the PERSIST_ values.

setSchemaPath

void setSchemaPath(java.lang.String schemaPath)
Set the schemaPath for a schema type/element associated with an XML Variable. (Not applicable for non-XML built-in types).

Parameters:
schemaPath - string represenation (eg, "/" )

setType

void setType(java.lang.String type)
Sets the type of this variable.

Parameters:
type - The type of this variable.

setValue

void setValue(java.lang.Object value)
Sets value


setValueFromString

void setValueFromString(java.lang.String valueString)
                        throws java.lang.Exception
Set value from String (for XML, will parse)

Throws:
java.lang.Exception


Copyright © 2009 IBM. All Rights Reserved.