|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.FormItem
com.waveset.object.Form
A class used to describe data that may be gathered interactively and passed to another object.
This is currently used in the
TaskDefinition
object to describe data that must be
specified by the user before a task is launched. It is general enough
to have other uses.
It isn't a PersistentObject at the moment, since its always stored inside something else, though I suppose it could evolve into one if it made sense to reuse these.
Nested Class Summary | |
static class |
Form.Expansion
A class used to represent a expansion for a field value constraint. |
static class |
Form.ExpansionGroup
A class used to represent a a collection of expansions for a field value. |
static class |
Form.Expression
Inner class used to represent a top-level XPRESS node, normally a |
static class |
Form.Field
Inner class used to represent a single form field. |
static class |
Form.FieldMap
Class representing a FieldMap. |
static class |
Form.FieldRef
Inner class used to represent a reference to a Field, possibly defined in an included form. |
static class |
Form.FormRef
Inner class used to represent a reference to a Form. |
static class |
Form.InvalidFieldValue
|
static class |
Form.Loop
Inner class used to represent the dynamic duplication of a set of Fields based on inputs. |
static class |
Form.Page
Inner class used to represent a form page. |
static class |
Form.Reference
Inner class used to represent a form or field reference. |
static class |
Form.Value
A class used to represent a value constraint for a form field. |
Field Summary | |
static java.lang.String |
ATT_BASE
|
static java.lang.String |
ATT_DEFBUTTONS
|
static java.lang.String |
ATT_HELP
|
static java.lang.String |
ATT_NAME
|
static java.lang.String |
ATT_SUBTITLE
|
static java.lang.String |
ATT_TITLE
|
static java.lang.String |
ATT_TRACE
|
static java.lang.String |
ATT_VALUE
|
static java.lang.String |
code_id
|
static java.lang.String |
EL_COMMENTS
|
static java.lang.String |
EL_DESCRIPTION
|
static java.lang.String |
EL_INCLUDE
|
static java.lang.String |
EL_NAMESPACE
|
static java.lang.String |
EL_PROPERTIES
|
static java.lang.String |
ELEMENT
Our XML element name. |
Constructor Summary | |
Form()
Build an empty form object, ready for filling. |
|
Form(org.w3c.dom.Element e)
Build a form object by parsing its DOM representation. |
Method Summary | |
void |
addItem(FormItem item)
|
void |
addItem(int index,
FormItem item)
Add one item to the end of the item list. |
void |
addResolvedInclude(java.lang.Object o)
Add a resolved include object. |
void |
clearItems()
Clear all the items in the form. |
Form |
cloneNoFields()
|
WSAttribute |
getAttributeValues(java.lang.String attrName)
Allows the form to contribute any queryable or summary attribute. |
java.lang.String |
getBaseContext()
|
java.lang.String |
getDescription()
|
FieldDisplay |
getDisplay()
|
java.lang.String |
getElementName()
Return our XML element name, required by XmlObject. |
ExEnvironment |
getEnvironment()
Get the expression environment. |
Form.Field |
getField(java.lang.String name)
Locate a field by name. |
java.util.List |
getFields(java.lang.String name)
Locate fields by name. |
java.lang.String |
getFullname(java.lang.String name)
Expand a namespace qualified field name. |
java.lang.String |
getHelpCatalog()
|
java.util.List |
getIncludes()
Return the include list. |
Library |
getLibrary()
Gets the library. |
java.util.Map |
getNamespaces()
Get the namespace map. |
java.lang.Object |
getOwner()
|
java.util.List |
getProperties()
Get the entire propert list. |
java.lang.Object |
getProperty(ExState state,
java.lang.String name)
Get a form property value, computing if necessary. |
java.lang.Object |
getProperty(java.lang.String name)
Get a form property value, must be static. |
Property |
getPropertyObject(java.lang.String name)
Get a form property object. |
java.util.List |
getResolvedIncludes()
Return the resolved include list. |
java.lang.String |
getSubTitle()
Convenience method to get the subtitle property from the FieldDisplay |
java.lang.String |
getTitle()
Convenience method to get the title property from the FieldDisplay |
boolean |
hasFields()
Returns whether the form has any fields or not. |
boolean |
isNoDefaultButtons()
|
boolean |
isTrace()
|
void |
link(ExEnvironment env)
Perform a "link" traversal on this form. |
void |
listQueryableAttributes(java.util.List qattrs)
Allows the form to contribute defined attributes
that this type of extension may expose as queryable attributes. |
void |
listSummaryAttributes(java.util.List sattrs)
Allows the extension to contribute defined attributes
that this type of extension may expose as summary attributes. |
static void |
main(java.lang.String[] args)
|
void |
resolveExpressions()
Resolve references between nodes in the environment quietly. |
java.lang.String |
resolveNamespace(java.lang.String key)
Given a namespace name, return the expansion. |
void |
setBaseContext(java.lang.String s)
|
void |
setDescription(java.lang.String s)
|
void |
setDisplay(FieldDisplay d)
|
void |
setFields(java.util.List fields)
Set the list of field definitions. |
void |
setHelpCatalog(java.lang.String s)
|
void |
setIncludes(java.util.List l)
|
void |
setLibrary(Library lib)
Set the library we're within |
void |
setNoDefaultButtons(boolean b)
|
void |
setOwner(java.lang.Object o)
Allows the extension to keep a back pointer to its container. |
void |
setProperties(java.util.List props)
Set the entire propertylist, should only be called by the form editor. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set a static property. |
void |
setResolvedIncludes(java.util.List l)
Set the resolved include list. |
void |
setSubTitle(java.lang.String s)
Convenience method which sets the subTitle property of FieldDisplay |
void |
setTitle(java.lang.String s)
Convenience method which sets the title property of FieldDisplay |
void |
setTrace(boolean b)
|
java.lang.String |
toString()
|
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize the object to an XML buffer. |
void |
toXml(java.lang.StringBuffer b,
int indent,
boolean includeResolved)
Serialize the object to an XML buffer. |
void |
toXml(java.lang.StringBuffer b,
int indent,
boolean includeResolved,
boolean stripFields)
|
Methods inherited from class com.waveset.object.FormItem |
addCommonAttributes, addItems, getComments, getForm, getItemList, getItems, getLocation, getName, getParent, parseChild, parseCommonAttributes, setComments, setItems, setLocation, setName, setParent, toXmlChildren |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.waveset.object.Library.Member |
getName |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ELEMENT
public static final java.lang.String ATT_NAME
public static final java.lang.String ATT_HELP
public static final java.lang.String ATT_VALUE
public static final java.lang.String ATT_BASE
public static final java.lang.String ATT_DEFBUTTONS
public static final java.lang.String ATT_TRACE
public static final java.lang.String EL_INCLUDE
public static final java.lang.String EL_PROPERTIES
public static final java.lang.String EL_DESCRIPTION
public static final java.lang.String EL_COMMENTS
public static final java.lang.String EL_NAMESPACE
public static final java.lang.String ATT_TITLE
public static final java.lang.String ATT_SUBTITLE
Constructor Detail |
public Form()
public Form(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public java.lang.String toString()
public java.lang.Object getOwner()
getOwner
in interface Extension
public void setDescription(java.lang.String s)
public void setTitle(java.lang.String s)
public void setSubTitle(java.lang.String s)
public void setHelpCatalog(java.lang.String s)
public void setBaseContext(java.lang.String s)
public void setIncludes(java.util.List l)
public void addItem(int index, FormItem item)
Overload the two FormItem methods to do extra processing. !! Work to do Need to have "resolve" and "unresolve" node walkers so we can copy node trees around and re-resolve them in their new environment. This might be simpler if we treated function resolution like variable binding and maintained it in the ExState? !! Wait, we're probably just lucky in that resolved functions are carrying over when a field is moved from one form to another, even though the function doesn't exist in the target form. We shouldn't be doing this. ALL items need to be copied over. !! Now that we can have hierarchical items, there is potentially the same sort of work to do in each of the FormItem subclasses, think.
addItem
in class FormItem
public void addItem(FormItem item)
addItem
in class FormItem
public void clearItems()
clearItems
in class FormItem
public void setFields(java.util.List fields)
This does things strangely for temporary backward compatibility.
Originally, we kept expressions and fields on two different lists.
So, after the field list was filtered and assigned, the target form
would still have all the necessary
public void setNoDefaultButtons(boolean b)
public void setTrace(boolean b)
setTrace
in class AbstractXmlObject
public void setOwner(java.lang.Object o)
Extension
setOwner
in interface Extension
public void listQueryableAttributes(java.util.List qattrs)
defined attributes
that this type of extension may expose as queryable attributes.
listQueryableAttributes
in interface Extension
public void listSummaryAttributes(java.util.List sattrs)
defined attributes
that this type of extension may expose as summary attributes.
listSummaryAttributes
in interface Extension
public WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in interface Extension
attribute values
that the extension may have for the specified attribute.public void setLibrary(Library lib)
setLibrary
in interface Library.Member
public Library getLibrary()
Library.Member
getLibrary
in interface Library.Member
public void resolveExpressions()
public void link(ExEnvironment env)
link
in class FormItem
public java.lang.String getElementName()
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
public ExEnvironment getEnvironment()
public java.lang.String getDescription()
public boolean isNoDefaultButtons()
public boolean isTrace()
public java.util.List getIncludes()
public java.lang.String getBaseContext()
public java.util.List getResolvedIncludes()
public void setResolvedIncludes(java.util.List l)
public void addResolvedInclude(java.lang.Object o)
public boolean hasFields()
public Form.Field getField(java.lang.String name)
public java.util.List getFields(java.lang.String name)
public FieldDisplay getDisplay()
public void setDisplay(FieldDisplay d)
public java.lang.String getTitle()
public java.lang.String getSubTitle()
public java.lang.String getHelpCatalog()
public java.lang.String resolveNamespace(java.lang.String key)
public java.util.Map getNamespaces()
public java.lang.String getFullname(java.lang.String name)
public java.util.List getProperties()
public void setProperties(java.util.List props)
public Property getPropertyObject(java.lang.String name)
public java.lang.Object getProperty(ExState state, java.lang.String name) throws WavesetException
WavesetException
public java.lang.Object getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.Object value)
public void toXml(java.lang.StringBuffer b, int indent)
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
public Form cloneNoFields() throws WavesetException
WavesetException
public void toXml(java.lang.StringBuffer b, int indent, boolean includeResolved)
public void toXml(java.lang.StringBuffer b, int indent, boolean includeResolved, boolean stripFields)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |