|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.PropsSchema
public class PropsSchema
This class contains static methods for parsing a Props Schema into a Vector of Props.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_SIZE
|
protected static java.lang.String |
EOL
|
protected java.util.List |
schema
|
| Constructor Summary | |
|---|---|
PropsSchema()
Constructs an empty schema. |
|
PropsSchema(java.util.List l)
Constructs a schema based on the specified List containing Props. |
|
PropsSchema(java.lang.String s)
Constructs a schema containing the parsed Props from the string. |
|
| Method Summary | |
|---|---|
void |
add(Props p)
Adds the specified Props to the schema. |
Props |
addBoolean(java.lang.String label,
java.lang.String key)
Adds a boolean type to the schema. |
Props |
addButton(java.lang.String key,
java.lang.String title,
java.lang.String description)
Adds a button type to the schema. |
Props |
addCaption(java.lang.String caption)
Adds a caption type to the schema. |
Props |
addChoice(java.lang.String label,
java.lang.String key,
java.lang.String options)
Adds a choice type to the schema. |
Props |
addInteger(java.lang.String label,
java.lang.String key)
Adds an integer type to the schema. |
Props |
addSpace()
Adds a space type to the schema. |
Props |
addString(java.lang.String label,
java.lang.String key)
Adds a string type to the schema. |
Props |
addString(java.lang.String label,
java.lang.String key,
int lines)
Adds a string type to the schema. |
Props |
getFieldSchema(java.lang.String key)
Returns the schema for the specified field. |
java.util.List |
getListSchema()
Returns a list of schema types that contain a list:true; property. |
java.lang.String |
getPrimaryKey()
Returns the name of the key that contains a primary:true; property. |
java.util.List |
getSchema()
Return a list of Props that define the schema. |
static java.util.List |
parse(java.lang.String schema)
Parses the formatted schema string and returns it as a List of Props. |
void |
setSchema(java.lang.String s)
Uses a schema containing the parsed Props from the string. |
java.lang.String |
toString()
Returns the schema as a parseable string. |
static java.lang.String |
toString(java.util.List schema)
Returns the specified List of Props as a formatted schema string. |
void |
writeForm(HTMLFormWriter w)
Writes the schema using the specified HTMLFormWriter. |
void |
writeForm(HTMLFormWriter w,
Props p)
Writes the schema using the specified HTMLFormWriter and Props values. |
void |
writeForm(HTMLFormWriter w,
Props p,
int defaultSize)
Writes the schema using the specified HTMLFormWriter and Props values. |
void |
writeFormElement(HTMLFormWriter w,
Props fieldProps,
Props p,
int defaultSize)
Writes the schema element using the specified HTMLFormWriter and Props values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String EOL
protected static final int DEFAULT_SIZE
protected java.util.List schema
| Constructor Detail |
|---|
public PropsSchema()
public PropsSchema(java.util.List l)
public PropsSchema(java.lang.String s)
throws PropsException
PropsException| Method Detail |
|---|
public void add(Props p)
public Props addBoolean(java.lang.String label,
java.lang.String key)
public Props addButton(java.lang.String key,
java.lang.String title,
java.lang.String description)
public Props addCaption(java.lang.String caption)
public Props addChoice(java.lang.String label,
java.lang.String key,
java.lang.String options)
public Props addInteger(java.lang.String label,
java.lang.String key)
public Props addString(java.lang.String label,
java.lang.String key)
public Props addString(java.lang.String label,
java.lang.String key,
int lines)
public Props addSpace()
public Props getFieldSchema(java.lang.String key)
public java.util.List getListSchema()
public java.lang.String getPrimaryKey()
public java.util.List getSchema()
public void setSchema(java.lang.String s)
throws PropsException
PropsExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public void writeForm(HTMLFormWriter w)
throws java.io.IOException
java.io.IOException
public void writeForm(HTMLFormWriter w,
Props p)
throws java.io.IOException
java.io.IOException
public void writeForm(HTMLFormWriter w,
Props p,
int defaultSize)
throws java.io.IOException
java.io.IOException
public void writeFormElement(HTMLFormWriter w,
Props fieldProps,
Props p,
int defaultSize)
throws java.io.IOException
java.io.IOException
public static java.util.List parse(java.lang.String schema)
throws PropsException
PropsExceptionpublic static java.lang.String toString(java.util.List schema)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||