com.bowstreet.webapp
Interface WebApp

All Superinterfaces:
WebAppEventContainer

public interface WebApp
extends WebAppEventContainer

Interface for WebApp. A WebApp is the main executable object in the WebEngine, with collections of pages, methods, variables, and links to other models.


Field Summary
static int BUILTIN_ACTION
          Returned value from getActionType for built-in Factory-defined action
static java.lang.String CACHE_CONTROL_MAP_PROPERTY
          WebApp Property name used for Map of CacheControl
static java.lang.String DEBUG_TRACING_MAP_PROPERTY
          WebApp Property name used for DebugTracing
static java.lang.String ENABLE_FAILOVER_PROPERTY
          WebApp Property name for enabling failover.
static java.lang.String EVENT_ONERROR_ALL_ACTIONS
          Pseudo-action name meaning to watch all actions
static java.lang.String EVENT_ONERROR_PREFIX
          Prefix for individual action error handlers
static java.lang.String EVENT_ONLOAD
          Name of event fired each time an instance of the WebApp is loaded
static java.lang.String EVENT_ONREQUEST
          Name of event fired for every external request to the WebApp
static java.lang.String EVENT_ONREQUEST_COMPLETE
          Name of event fired for every external request complete to the WebApp
static java.lang.String EVENT_UNHANDLED_ERROR
          Name of Error handler event, fired if an error is unhandled
static java.lang.String GENERATION_ERRORS
          WebApp Property name for List of generation errors, if any
static java.lang.String GENERATION_WARNINGS
          WebApp Property name for List of generation warnings, if any
static int LINKED_MODEL_ACTION
          Returned value from getActionType for Linked Model action
static int LJO_METHOD_ACTION
          Returned value from getActionType for LJO action
static int METHOD_ACTION
          Returned value from getActionType for Method action
static java.lang.String METHOD_CLASS_INSTANCE
          Property name used by system
static java.lang.String MULTI_REQUEST_LOCK_ENABLE_PROPERTY
          WebApp Property name for enabling multi-request lock of WebApp instance.
static int PAGE_ACTION
          Returned value from getActionType for Page action
static java.lang.String SYSTEM_EVENT_PREFIX
          prefix for System events
static int UNKNOWN_ACTION
          Returned value from getActionType for unknown action
 
Method Summary
 ActionList addActionList(java.lang.String actionListName)
          Add a ActionList
 ClassInfo addClass(java.lang.String name)
          Adds a Java source class (ClassInfo) object to the WebApp.
 ConfigInfo addConfigInfo(java.lang.String name, java.lang.Object configObject)
          Adds a configuration (ConfigInfo) object to the WebApp.
 DataService addDataService(java.lang.String name)
          Adds a DataService to the WebApp.
 LinkedModel addLinkedModel(java.lang.String linkedModelName, java.lang.String modelName)
          Add a Linked Model to model
 Variable addLinkedObjectVariable(java.lang.String name, java.lang.String className)
          Add a Java Linked Object variable to the list.
 Method addMethod(java.lang.String methodName)
          Add a Java method
 ActionListAction addMethodCall(java.lang.String methodCallName, java.lang.String methodName)
          Add a method call (internally an ActionList with a single Action)
 Page addPage(java.lang.String pageName)
          Add a Page to model
 Schema addSchema(java.lang.String name, java.lang.String schemaSource, java.lang.String importsLoc)
          Add a Schema to the webapp, the schema source being supplied in the call.
 Schema addSchema(java.lang.String name, java.lang.String schemaSource, java.lang.String importsLoc, java.util.List otherSchemas)
          Add a Schema to the webapp, the schema source being supplied in the call.
 Schema addSchema(java.lang.String name, java.net.URL url)
          Add a Schema to the webapp, the schema being identified by the supplied URL.
 Variable addVariable(java.lang.String name, java.lang.String type)
          Add a variable to the WebApp.
 java.lang.String generateIndirectReference(java.lang.String input, java.lang.String runtimeType)
          Create Java source expression for a builder input which can be an indirect reference, for example: ${Variables/strVar} is resolved to: webAppAccess.getVariables().getString("strVar") If "input" is a literal (does not use ${ syntax) it is returned as-is
 java.lang.String generateUniqueName(java.lang.String base)
          Generate a name which will not conflict with any existing Variable, LinkedModel, or Action names.
 WebAppObject getAction(java.lang.String name)
          Get any "action" in model (Page, ActionList, Method).
 ActionList getActionList(java.lang.String actionListName)
          Look up ActionList by name
 java.util.Iterator getActionLists()
          Get list of all the ActionLists in the WebApp.
 int getActionType(java.lang.String actionName)
          Gets the Action type for the specified name.
 ClassInfo getClass(java.lang.String name)
          Gets the specifed ClassInfo by name.
 java.util.Iterator getClasses()
          Gets an Iterator of the ClassInfo objects on this WebApp.
 java.util.Iterator getConfigInfo()
          Gets an Iterator of the ConfigInfo objects on this WebApp.
 ConfigInfo getConfigInfo(java.lang.String name)
          Gets the specifed ConfigInfo by name.
 com.bowstreet.webapp.DataDefinitionManager getDataDefinitionManager()
          Get the DataDefinitionManager which has been set as the default one.
 DataService getDataService(java.lang.String name)
          Gets DataService by name.
 java.util.Iterator getDataServices()
          Get an iterator over the list of DataService objects in this WebApp.
 LinkedModel getLinkedModel(java.lang.String linkedModelName)
          Look up a linked model by name
 java.util.Iterator getLinkedModels()
          Get list of all the linked models in this WebApp.
 Method getMethod(java.lang.String methodName)
          Look up a Method by name.
 java.util.Iterator getMethods()
          Get list of all the Methods in the WebApp.
 java.lang.String getModelName()
          Gets the name of the Model
 Page getPage(java.lang.String pageName)
          Look up a Page by name
 java.util.Iterator getPages()
          Get list of all the Pages in the WebApp.
 java.util.Iterator getProperties()
          Gets an iterator to the keys of the properties.
 java.lang.Object getProperty(java.lang.String key)
          Gets the specified WebApp property.
 RegenSettings getRegenSettings()
          Get RegenSettings used to create this WebApp.
 Schema getSchema(java.lang.String name)
          Get the Schema object corresponding to the supplied name in this webapp.
 java.util.Iterator getSchemas()
          Returns an Iterator over the list of the Schemas in this WebApp.
 java.lang.String getUniqueKey()
          Gets the unique "key" for this generated version of the WebApp.
 Variable getVariable(java.lang.String name)
          Get a variable by name
 java.util.Iterator getVariables()
          Get an iterator over the list of all the variables in this WebApp.
 void putProperty(java.lang.String key, java.lang.Object value)
          Sets the specified WebApp property.
 boolean renameWebAppObject(java.lang.String name, java.lang.String newName)
          Change the name of a WebApp object, returning true if this was possible.
 void setBaseDataDefinitionFile(java.lang.String fileName, BuilderCall builderCall)
          Creates the default DataDefinitionManager from a Rich Data Definition file (usually .xml).
 boolean variableExists(java.lang.String variableName)
          See if the specified name is already in use as a Variable or LinkedModel (since these must share a namespace).
 
Methods inherited from interface com.bowstreet.webapp.WebAppEventContainer
addEventListener, getEventListeners, getEventListeners
 

Field Detail

BUILTIN_ACTION

static final int BUILTIN_ACTION
Returned value from getActionType for built-in Factory-defined action

See Also:
Constant Field Values

CACHE_CONTROL_MAP_PROPERTY

static final java.lang.String CACHE_CONTROL_MAP_PROPERTY
WebApp Property name used for Map of CacheControl

See Also:
Constant Field Values

DEBUG_TRACING_MAP_PROPERTY

static final java.lang.String DEBUG_TRACING_MAP_PROPERTY
WebApp Property name used for DebugTracing

See Also:
Constant Field Values

ENABLE_FAILOVER_PROPERTY

static final java.lang.String ENABLE_FAILOVER_PROPERTY
WebApp Property name for enabling failover. Values can be "true" or "false" (defaults to false). This property is deprecated. By default failover is enabled for all models. You can globally disable model level failover by setting the "bowstreet.failover.disable" property to "true" in the property override file.

See Also:
Constant Field Values

EVENT_ONERROR_ALL_ACTIONS

static final java.lang.String EVENT_ONERROR_ALL_ACTIONS
Pseudo-action name meaning to watch all actions

See Also:
Constant Field Values

EVENT_ONERROR_PREFIX

static final java.lang.String EVENT_ONERROR_PREFIX
Prefix for individual action error handlers

See Also:
Constant Field Values

EVENT_ONLOAD

static final java.lang.String EVENT_ONLOAD
Name of event fired each time an instance of the WebApp is loaded

See Also:
Constant Field Values

EVENT_ONREQUEST

static final java.lang.String EVENT_ONREQUEST
Name of event fired for every external request to the WebApp

See Also:
Constant Field Values

EVENT_ONREQUEST_COMPLETE

static final java.lang.String EVENT_ONREQUEST_COMPLETE
Name of event fired for every external request complete to the WebApp

See Also:
Constant Field Values

EVENT_UNHANDLED_ERROR

static final java.lang.String EVENT_UNHANDLED_ERROR
Name of Error handler event, fired if an error is unhandled

See Also:
Constant Field Values

GENERATION_ERRORS

static final java.lang.String GENERATION_ERRORS
WebApp Property name for List of generation errors, if any

See Also:
Constant Field Values

GENERATION_WARNINGS

static final java.lang.String GENERATION_WARNINGS
WebApp Property name for List of generation warnings, if any

See Also:
Constant Field Values

LINKED_MODEL_ACTION

static final int LINKED_MODEL_ACTION
Returned value from getActionType for Linked Model action

See Also:
Constant Field Values

LJO_METHOD_ACTION

static final int LJO_METHOD_ACTION
Returned value from getActionType for LJO action

See Also:
Constant Field Values

METHOD_ACTION

static final int METHOD_ACTION
Returned value from getActionType for Method action

See Also:
Constant Field Values

METHOD_CLASS_INSTANCE

static final java.lang.String METHOD_CLASS_INSTANCE
Property name used by system

See Also:
Constant Field Values

MULTI_REQUEST_LOCK_ENABLE_PROPERTY

static final java.lang.String MULTI_REQUEST_LOCK_ENABLE_PROPERTY
WebApp Property name for enabling multi-request lock of WebApp instance. Values can be "true" or "false". Defaults to "false"

See Also:
Constant Field Values

PAGE_ACTION

static final int PAGE_ACTION
Returned value from getActionType for Page action

See Also:
Constant Field Values

SYSTEM_EVENT_PREFIX

static final java.lang.String SYSTEM_EVENT_PREFIX
prefix for System events

See Also:
Constant Field Values

UNKNOWN_ACTION

static final int UNKNOWN_ACTION
Returned value from getActionType for unknown action

See Also:
Constant Field Values
Method Detail

addActionList

ActionList addActionList(java.lang.String actionListName)
Add a ActionList

Parameters:
actionListName - The name for the ActionList
Returns:
The ActionList object
Example:
Create a "main" Action List that calls page1.
 ActionList al = webApp.addActionList("main");
 al.addPageAction("page1");

addClass

ClassInfo addClass(java.lang.String name)
Adds a Java source class (ClassInfo) object to the WebApp. 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:
name - The name of the ClassInfo object to create and add.

addConfigInfo

ConfigInfo addConfigInfo(java.lang.String name,
                         java.lang.Object configObject)
Adds a configuration (ConfigInfo) object to the WebApp. 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:
configObject - The configuration object to store.

addDataService

DataService addDataService(java.lang.String name)
Adds a DataService to the WebApp.

Parameters:
name - Name of the operation.
Returns:
DataService

addLinkedModel

LinkedModel addLinkedModel(java.lang.String linkedModelName,
                           java.lang.String modelName)
Add a Linked Model to model

Parameters:
linkedModelName - Local name used in this model
modelName - Model name (fully-qualified)
Returns:
The added LinkedModel.
Example:
Add a Linked Model called "customerInfo" that links in /acme/portal/editCustomerInfo
 LinkedModel lm = webApp.addLinkedModel("customerInfo", "/acme/portal/editCustomerInfo");

addLinkedObjectVariable

Variable addLinkedObjectVariable(java.lang.String name,
                                 java.lang.String className)
Add a Java Linked Object variable to the list.

Parameters:
name - The name for the variable
className - The Java class for the variable
Returns:
The Variable object
Example:
Add a linked object to java.util.Date class:
 Variable dateVar = webApp.addLinkedObjectVariable("dateLJO","java.util.Date");

addMethod

Method addMethod(java.lang.String methodName)
Add a Java method

Parameters:
methodName - Name for method
Returns:
Method object
Example:
Create a method that simply returns an argument value:
 Method method = webApp.addMethod("sampleMethod");
 method.setReturnType("Object");
 method.addArgument("dataSource", "Object");
 method.setBody("{\nreturn dataSource;\n}");

addMethodCall

ActionListAction addMethodCall(java.lang.String methodCallName,
                               java.lang.String methodName)
Add a method call (internally an ActionList with a single Action)

Parameters:
methodCallName - Name to give to the ActionList created
methodName - Name of method to call
Returns:
The ActionListAction, where argument assignments can be done
Example:
Add a method call to "sampleMethod" passing an indirect reference Object argument:
 ActionListAction action = webApp.addMethodCall("callSampleMethod", "sampleMethod");
 action.addArgumentSource(webApp.generateIndirectReference(dataSource, Variable.TYPE_OBJECT));

addPage

Page addPage(java.lang.String pageName)
Add a Page to model

Parameters:
pageName - Unique name of page
Returns:
The Page object
Example:
Add a page with some very simple contents:
 Page page = webApp.addPage("StartingPage");
 IXml html = XmlUtil.create("HTML");
 IXml body = html.addChildElement("BODY");
 body.addText("This is a simple HTML page");
 page.addContents(html);

addSchema

Schema addSchema(java.lang.String name,
                 java.lang.String schemaSource,
                 java.lang.String importsLoc)
Add a Schema to the webapp, the schema source being supplied in the call. If the source contains import statements with relative paths, the importsLoc can be supplied to provide the base URI for that.

Parameters:
name - name of the schema, typically the builder name
schemaSource - the schema source
importsLoc - base path for any relative import statements
Returns:
the Schema object constructed and added or returned from cache

addSchema

Schema addSchema(java.lang.String name,
                 java.lang.String schemaSource,
                 java.lang.String importsLoc,
                 java.util.List otherSchemas)
Add a Schema to the webapp, the schema source being supplied in the call.

Parameters:
name - name of the schema, typically the builder name
schemaSource - the schema source
importsLoc - if available (maybe null) the URL to this schema source that can be used to pull in imported schemas with relative paths.
otherSchemas - an optional List of already successfully parsed com.bowstreet.xml.schema.Schema objects that can be used to resolve references in this schema source.
Returns:
the Schema object constructed and added or returned from cache

addSchema

Schema addSchema(java.lang.String name,
                 java.net.URL url)
Add a Schema to the webapp, the schema being identified by the supplied URL.

Parameters:
name - name of the schema, typically the builder name
url - URL to the schema source, or null if you just want to create the schema object and add DataDefinition elements yourself
Returns:
the Schema object constructed and added or returned from cache

addVariable

Variable addVariable(java.lang.String name,
                     java.lang.String type)
Add a variable to the WebApp.

Parameters:
name - The name for the variable
type - The type for the variable (e.g. Variable.TYPE_STRING)
Returns:
The Variable object
Example:
Add a String variable with initial value
   Variable messageVar = webApp.addVariable("message", Variable.TYPE_STRING);
   messageVar.setValue("This is a test");

 Add XML variable with no initial value:
   Variable dataVar = webApp.addVariable("data", Variable.TYPE_XML);

 Add XML variable with initial value:
   Variable city = webApp.addVariable("location", Variable.TYPE_XML);
   IXml data = XmlUtil.create("Location");
   data.addChildWithText("City", "Portsmouth");
   data.addChildWithText("State", "NH");
   city.setValue(data);

 Add a read-only XML variable:
   Variable defaultCity = webApp.addVariable("defaultLocation", Variable.TYPE_XML);
   IXml data = XmlUtil.create("Location");
   data.addChildWithText("City", "New York");
   data.addChildWithText("State", "NY");
   defaultCity.setValue(data);
   defaultCity.setPersistFlag(Variable.PERSIST_READONLY);

generateIndirectReference

java.lang.String generateIndirectReference(java.lang.String input,
                                           java.lang.String runtimeType)
Create Java source expression for a builder input which can be an indirect reference, for example: ${Variables/strVar} is resolved to: webAppAccess.getVariables().getString("strVar") If "input" is a literal (does not use ${ syntax) it is returned as-is

Parameters:
input - The indirect literal or reference, e.g. ${Variables/foo}
runtimeType - The runtime type expected (must be one of the Variable.TYPE_ values)
Returns:
The Java expression for the runtime value
Example:
Add a method call to "sampleMethod" passing an indirect reference Object argument:
   ActionListAction action = webApp.addMethodCall("callSampleMethod", "sampleMethod");
   action.addArgumentSource(webApp.generateIndirectReference(dataSource, Variable.TYPE_OBJECT));
 Add a method that returns the value for a builder input that can be an indirect reference:
   String builderName = builderInputs.getString("Name", null);
   String referenceInput = builderInputs.getString("Value", "");
   String javaExpression = webApp.generateIndirectReference(referenceInput, "Object");
   String methodName = builderName + "_getValue";
   Method method = webApp.addMethod(methodName);
   method.setReturnType("Object");
   method.setBody("{\n return " + javaExpression + ";\n}");
   method.setHidden(true);  // optional - hide this generated method in Designer
   // Builder can now generate other code that references the "methodName" method

generateUniqueName

java.lang.String generateUniqueName(java.lang.String base)
Generate a name which will not conflict with any existing Variable, LinkedModel, or Action names.

Parameters:
base - Beginning portion of name
Returns:
String made up of base and, perhaps, one or more digits, which can safely be used in addVariable, addMethod, etc. without fear of conflict.

getAction

WebAppObject getAction(java.lang.String name)
Get any "action" in model (Page, ActionList, Method). This will only get actions local to this WebApp, not Linked Object or Linked Model actions.

Parameters:
name - The unique ID of the Page, ActionList, or Method
Returns:
The Page, ActionList, or Method.

getActionList

ActionList getActionList(java.lang.String actionListName)
Look up ActionList by name

Parameters:
actionListName - The unique name of ActionList
Returns:
ActionList object

getActionLists

java.util.Iterator getActionLists()
Get list of all the ActionLists in the WebApp. Note, this is an iterator over the collection of WebApp actions of type ActionList in this WebApp. Modification of the collection of WebApp actions (ActionList, Page or Method) directly or by invoking another builder which adds a WebApp action while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the ActionLists.
Example:
Print the names of all the ActionLists:
 Iterator i = webApp.getActionLists();
 System.out.println("ActionLists:");
 while (i.hasNext()) {
     ActionList al = (ActionList)i.next();
     System.out.println("Action List name: " + al.getName());
 }

getActionType

int getActionType(java.lang.String actionName)
Gets the Action type for the specified name.

Parameters:
actionName - The local name of the action in the webApp.
Returns:
The Action type for the specified name. Can be WebApp.PAGE_ACTION or WebApp.METHOD_ACTION

getClass

ClassInfo getClass(java.lang.String name)
Gets the specifed ClassInfo by 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:
name - The name of the ClassInfo object to get.
Returns:
ClassInfo The ClassInfo who's name matches the specified name, or null if not found.

getClasses

java.util.Iterator getClasses()
Gets an Iterator of the ClassInfo objects on this WebApp. Note, this is an iterator over the collection of ClassInfo objects in the WebApp. Modification of the collection of ClassInfo objects in this WebApp directly or by invoking another builder which adds a ClassInfo to the WebApp while traversing this iterator will result in a ConcurrentModificationException. 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 of the ClassInfo objects on this WebApp

getConfigInfo

java.util.Iterator getConfigInfo()
Gets an Iterator of the ConfigInfo objects on this WebApp. Note, this is an iterator over the collection of ConfigInfo objects in this WebApp. Modification of the collection of ConfigInfo objects in this WebApp directly or by invoking another builder which adds a ConfigInfo to this WebApp while traversing this iterator will result in a ConcurrentModificationException. 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 of the ConfigInfo objects on this WebApp

getConfigInfo

ConfigInfo getConfigInfo(java.lang.String name)
Gets the specifed ConfigInfo by 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:
name - The name of the ConfigInfo object to get.
Returns:
ConfigInfo The ConfigInfo who's name matches the specified name, or null if not found.

getDataDefinitionManager

com.bowstreet.webapp.DataDefinitionManager getDataDefinitionManager()
Get the DataDefinitionManager which has been set as the default one. PageAutomation will use this automatically based on SchemaTypeMappings declared in the associated RDD file.

Returns:
DataDefinitionManager or null if none have been defined.

getDataService

DataService getDataService(java.lang.String name)
Gets DataService by name.

Parameters:
name - Name of DataService.
Returns:
DataService, or null if not present.

getDataServices

java.util.Iterator getDataServices()
Get an iterator over the list of DataService objects in this WebApp. Note, this is an iterator over the collection of DataService objects in WebApp. Modification of the collection of DataService this WebApp directly or by invoking another builder which adds a DataService to this WebApp while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the DataService objects.

getLinkedModel

LinkedModel getLinkedModel(java.lang.String linkedModelName)
Look up a linked model by name

Parameters:
linkedModelName - Name of linked model
Returns:
The LinkedModel object

getLinkedModels

java.util.Iterator getLinkedModels()
Get list of all the linked models in this WebApp. Note, this is an iterator over the collection of LinkedModels in this WebApp. Modification of the collection of LinkedModels in this WebApp directly or by invoking another builder which adds a LinkedModel while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the LinkedModels.
Example:
Print the names of all the Linked Models:
 Iterator i = webApp.getLinkedModels();
 System.out.println("Linked Models:");
 while (i.hasNext()) {
     LinkedModel lm = (LinkedModel)i.next();
     System.out.println("Linked Model name: " + lm.getName());
 }

getMethod

Method getMethod(java.lang.String methodName)
Look up a Method by name. This will only return a Method defined in this WebApp and will not return a method from a Linked Object or Linked Model.

Parameters:
methodName - The unique name of method
Returns:
Method object

getMethods

java.util.Iterator getMethods()
Get list of all the Methods in the WebApp. Note, this is an iterator over the collection of WebApp actions of type Method in this WebApp. Modification of the collection of WebApp actions (ActionList, Page or Method) directly or by invoking another builder which adds a WebApp action while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the Methods.
Example:
Iterator i = webApp.getMethods();
 System.out.println("Methods:");
 while (i.hasNext()) {
     Method m = (Method)i.next();
     System.out.println("Method name: " + m.getName());
 }

getModelName

java.lang.String getModelName()
Gets the name of the Model

Returns:
the Model name

getPage

Page getPage(java.lang.String pageName)
Look up a Page by name

Parameters:
pageName - The unique ID of the page
Returns:
The Page object

getPages

java.util.Iterator getPages()
Get list of all the Pages in the WebApp. Note, this is an iterator over the collection of WebApp actions of type Page in this WebApp. Modification of the collection of WebApp actions (ActionList, Page or Method) directly or by invoking another builder which adds a WebApp action while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the Pages.
Example:
Print the names of all the Pages:
 Iterator i = webApp.getPages();
 System.out.println("Pages:");
 while (i.hasNext()) {
     Page p = (Page)i.next();
     System.out.println("Page name: " + p.getName());
 }

getProperties

java.util.Iterator getProperties()
Gets an iterator to the keys of the properties. Note, this is an iterator over the keys of the properties set on this WebApp. Modification of the set of properties on this WebApp directly or by invoking another builder which adds a WebApp property while traversing this iterator will result in a ConcurrentModificationException.

Returns:
Iterator of String property keys.

getProperty

java.lang.Object getProperty(java.lang.String key)
Gets the specified WebApp property. WebApp properties are a String-keyed map of Object, and can be used during generation or at execution time. They are available for use by builders, for example for communicating between some cooperating builders. System-defined property names start with "bowstreet.".

Parameters:
key - The String key.
Returns:
The value of the specified property.

getRegenSettings

RegenSettings getRegenSettings()
Get RegenSettings used to create this WebApp.

Returns:
RegenSettings

getSchema

Schema getSchema(java.lang.String name)
Get the Schema object corresponding to the supplied name in this webapp.

Returns:
the Schema (or null if not found)

getSchemas

java.util.Iterator getSchemas()
Returns an Iterator over the list of the Schemas in this WebApp. Note, this is an iterator over the collection of Schemas in this WebApp. Modification of the collection of Schemas in this WebApp directly or by invoking another builder which adds a Schema to this WebApp while traversing this iterator will result in a ConcurrentModificationException.

Returns:
an Iterator across all of the Schemas in the WebApp

getUniqueKey

java.lang.String getUniqueKey()
Gets the unique "key" for this generated version of the WebApp. The key will be unique for a given WebApp - if a model is unprofiled, it will be the model name; if a model is profiled, it will be a unique value for this model/profile combination. It could be used, for example, to generate a unique temporary filename for a WebApp.

Returns:
The unique WebApp key.

getVariable

Variable getVariable(java.lang.String name)
Get a variable by name

Parameters:
name - The name for the variable
Returns:
The Variable object

getVariables

java.util.Iterator getVariables()
Get an iterator over the list of all the variables in this WebApp. Note, this is an iterator over the collection of Variables (including Linked Java Objects) in this WebApp. Modification of the collection of Variables (e.g. adding a Variable or Linked Java Object) directly or by invoking another builder which adds a WebApp Variable or LJO while traversing this iterator will result in a ConcurrentModificationException.

Returns:
All the variables.
Example:
Print the names of all the Variables:
 Iterator i = webApp.getVariables();
 System.out.println("Variables:");
 while (i.hasNext()) {
     Variable v = (Variable)i.next();
     System.out.println("Variable name: " + v.getName());
 }

putProperty

void putProperty(java.lang.String key,
                 java.lang.Object value)
Sets the specified WebApp property. WebApp properties are a String-keyed map of Object, and can be used during generation or at execution time. They are available for use by builders, for example for communicating between some cooperating builders. System-defined property names start with "bowstreet.".

Parameters:
key - The String key.
value - The Object value to store with WebApp.

renameWebAppObject

boolean renameWebAppObject(java.lang.String name,
                           java.lang.String newName)
Change the name of a WebApp object, returning true if this was possible.

Parameters:
name - the name of the existing WebAppObject
newName - the new name for this object.
Returns:
boolean true if the operation was successful

setBaseDataDefinitionFile

void setBaseDataDefinitionFile(java.lang.String fileName,
                               BuilderCall builderCall)
Creates the default DataDefinitionManager from a Rich Data Definition file (usually .xml). The filename argument may be a semi-colon separated list and first found will be used. This is useful if, for instance, you want one base RDD used if some particular feature set (i.e Dojo) is installed, and another used if it is not.

Parameters:
fileName - The filename, relative from WebContent, if null, bowstreet.properties value will be used; may be a semi-colon separated list
builderCall - The builderCall invoking this; It can be null, but some RDD operations will not be supported.

variableExists

boolean variableExists(java.lang.String variableName)
See if the specified name is already in use as a Variable or LinkedModel (since these must share a namespace).

Parameters:
variableName - The name of a Linked Model or Variable.
Returns:
true if there is a Variable or Linked Model of that name.


Copyright © 2009 IBM. All Rights Reserved.