|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oberon.ooql.sdk.OBBase
com.oberon.ooql.sdk.AdminBase
com.oberon.ooql.sdk.Form
public class Form
Form Admin Object: defines a web form.
| Field Summary | |
|---|---|
static int |
SEARCHFORM_OPTION
The Search-Form flag index inside the Option Set |
| Fields inherited from class com.oberon.ooql.sdk.AdminBase |
|---|
bsOptions, HIDDEN_OPTION |
| Constructor Summary | |
|---|---|
Form()
|
|
Form(java.lang.String name)
|
|
| Method Summary | |
|---|---|
Framework |
action(Framework framework,
java.util.Vector<java.lang.Object> args)
Execute the Action program |
void |
addItem(Item item)
Appends a new Item to the Form |
void |
addItemAfter(Item item,
java.lang.String refItem)
Add a Item after another reference Item |
void |
addItemBefore(Item item,
java.lang.String refItem)
Add a Item before another reference Item |
Framework |
check(Framework framework,
java.util.Vector<java.lang.Object> args)
Execute the Check program |
java.lang.String |
compareUpdate(Form refForm,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this Form object and let it become equals to another reference object. |
void |
compose(ObjectBase objlink,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
Compose the Form for the current User and for a specific Object or Link instance |
java.util.Vector<java.lang.String> |
computeProgramRanges(java.lang.String fieldName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Execute the range Program to compute the ranges for a specific field |
void |
create(boolean overwrite,
boolean force,
Framework framework)
Create a new Form object on the database |
void |
create(Framework framework)
Create a new Form object on the database |
java.lang.String |
createTextForm(ObjectBase objlink,
java.lang.String language,
Framework framework)
Generates a text (generally for mail body) according to the Form definition and the object/link values |
void |
destroy(Framework framework)
Remove the Form object from the database |
void |
fromXML(org.jdom.Element rootElement)
Load the Form object properties from XML element tree |
void |
fromXML(org.jdom.Element rootElement,
boolean loadItems)
Load the Form object properties from XML element tree |
java.util.Vector<java.lang.String> |
getAccessItemNames(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all Form Item names for which the framework User has access |
java.util.Vector<Item> |
getAccessItems(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all Form Item for which the framework User has access |
java.lang.String |
getAccessItemsAsString(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework,
java.lang.String delim)
Get all Form Item names for which the framework User has access as a single string |
java.lang.String |
getActionProgram()
Get the Form action Program |
java.lang.String |
getCheckProgram()
Get the Form validation Program |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this Form object with the settled properties |
java.lang.String |
getCreateCommand(boolean force,
boolean overwrite)
Return the OOQL command to create this Form object with the settled properties |
java.lang.String |
getFilterParameters()
Get the list of parameters used by Item extraction Programs |
java.lang.String |
getFormat()
Get the Form format |
Item |
getItem(int itemId)
Get a Form Item with the given internal id |
Item |
getItem(java.lang.String itemName)
Get a Form Item with the given name |
Item |
getItemAt(int index)
Get a Form Item at given position index |
Item |
getItemField(java.lang.String fieldName)
Get a Form Item field with the given name |
java.util.Vector<java.lang.String> |
getItemFields()
Get all fields included in the Form |
java.util.Vector<java.lang.String> |
getItemIDs()
Get all Form Item internal ids |
java.util.Vector<java.lang.String> |
getItemNames()
Get all Form Item names |
int |
getItemPos(java.lang.String itemName)
Get the Item position index in the Form |
java.util.Vector<Item> |
getItems()
Get all Form Items |
java.lang.String |
getItemsAsString(java.lang.String delim)
Get all Form Item names as a single string |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this Form object by its OOQL identifier |
java.lang.String |
getRangeProgram()
Get the range Program |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this Form object with the modified properties. |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
static java.lang.String |
getTranslatedValue(FormUserItem item,
java.lang.String section,
java.lang.String value,
Framework framework)
|
java.util.Vector<FormUserItem> |
getUserFieldItems(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all FormUserItem of Field type for which the framework User has the visibility |
java.util.Vector<FormUserItem> |
getUserItems(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all FormUserItem for which the framework User has the visibility |
java.util.Vector<FormUserItem> |
getUserItemsWithData(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get data related to Form-Item fields |
boolean |
isSearchForm()
Check if the Form is for searching objects. |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the Form object: connect the memory instance with the database instance |
void |
moveItem(java.lang.String itemName,
boolean after)
Move a Form Item |
static Form |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
org.jdom.Element |
rangesToXML(java.lang.String fieldName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return Item-field Ranges as XML element tree |
void |
removeItem(Item item)
Remove a Item from the Form |
void |
removeItem(java.lang.String itemName)
Remove a Item from the Form |
void |
setActionProgram(java.lang.String programName)
Set a method to run after the Form is committed |
void |
setCheckProgram(java.lang.String programName)
Set a method to validate the Form values |
void |
setFilterParameters(java.lang.String parameters)
Set a list of parameters used by Item extraction Programs |
void |
setFormat(java.lang.String format)
Set the Form format. |
void |
setItems(java.util.Vector<Item> items)
Set all Form Items |
void |
setRangeProgram(java.lang.String programName)
Set a method to generate range values for field/basic items |
void |
setSearchForm(boolean searchFlag)
Set if Form is for searching objects. |
java.lang.String |
toString()
Return the Form object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the Form object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the Form object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the Form object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateItems(java.util.Vector<Item> items)
Update the items on the basis of a given list |
void |
write(boolean force,
Framework framework)
Update the Form object to the database |
void |
write(Framework framework)
Update the Form object to the database |
| Methods inherited from class com.oberon.ooql.sdk.OBBase |
|---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SEARCHFORM_OPTION
| Constructor Detail |
|---|
public Form()
public Form(java.lang.String name)
throws OberonException
name - the name of the administrative object
OberonException - if the name contains invalid characters| Method Detail |
|---|
public static Form open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
name - the object nameframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
link in class AdminBaseframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void create(Framework framework)
throws OberonException
create in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void create(boolean overwrite,
boolean force,
Framework framework)
throws OberonException
overwrite - if true destroy and recreate the Form when it existsforce - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(Framework framework)
throws OberonException
write in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(boolean force,
Framework framework)
throws OberonException
force - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public Framework check(Framework framework,
java.util.Vector<java.lang.Object> args)
throws OberonException
framework - the current frameworkargs - vector of input arguments
Form-item input values should be placed into the framework environment: Framework.setEnv(String, String)
OberonException - due to execution errors or programmatically raised exceptions
public Framework action(Framework framework,
java.util.Vector<java.lang.Object> args)
throws OberonException
framework - the current frameworkargs - vector of Program input arguments
Form-item committed values should be placed into the framework environment: Framework.setEnv(String, String)
OberonException - due to execution errors or programmatically raised exceptions
public void compose(ObjectBase objlink,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
throws java.io.IOException,
OberonException
objlink - the ObjectObj or Link instance ( only the Class / Linktype may be specified )selector - selection parameters and input argumentsoutStream - the stream for the results (if null the result is stored into the framework)framework - the current framework
java.io.IOException - when the output stream return an exception
OberonException - for all other problemsgetUserItems(ObjectBase, Vector, Framework),
getUserFieldItems(ObjectBase, Vector, Framework),
getUserItemsWithData(ObjectBase, Vector, Framework),
Framework.getResult()
public void unlink(Framework framework)
throws OberonException
unlink in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions
public void destroy(Framework framework)
throws OberonException
destroy in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rightspublic void setSearchForm(boolean searchFlag)
searchFlag - true to define the Form for searchingpublic boolean isSearchForm()
public void addItem(Item item)
throws OberonException
OberonException
public void addItemBefore(Item item,
java.lang.String refItem)
throws OberonException
item - the Item to addrefItem - the reference Item name
OberonException - when the reference Item is not found
public void addItemAfter(Item item,
java.lang.String refItem)
throws OberonException
item - the Item to addrefItem - the reference Item name
OberonException - when the reference Item is not found
public void moveItem(java.lang.String itemName,
boolean after)
itemName - the Item nameafter - if true move the Item after else move it before the current positionpublic void removeItem(Item item)
public void removeItem(java.lang.String itemName)
Item from the Form
public void setItems(java.util.Vector<Item> items)
items - a vector of Items
public void updateItems(java.util.Vector<Item> items)
throws OberonException
items - list of Items
OberonExceptionpublic int getItemPos(java.lang.String itemName)
Item position index in the Form
public java.util.Vector<Item> getItems()
Itemspublic Item getItemAt(int index)
Item at given position index
public Item getItem(java.lang.String itemName)
Item with the given name
public Item getItem(int itemId)
Item with the given internal id
public java.util.Vector<java.lang.String> getItemNames()
Item namespublic Item getItemField(java.lang.String fieldName)
Item field with the given name
public java.util.Vector<java.lang.String> getItemFields()
Item field namespublic java.util.Vector<java.lang.String> getItemIDs()
Item internal ids
public java.lang.String getItemsAsString(java.lang.String delim)
Item names as a single string
delim - the item name separator
public java.util.Vector<Item> getAccessItems(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Item for which the framework User has access
accessType - the access type ( Item.ITEMACCESS_VISIBLE / Item.ITEMACCESS_EDITABLE )filterArgs - input arguments used by the Item access Program
public java.util.Vector<java.lang.String> getAccessItemNames(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Item names for which the framework User has access
accessType - the access type ( Item.ITEMACCESS_VISIBLE / Item.ITEMACCESS_EDITABLE )filterArgs - input arguments used by the Item access Program
public java.lang.String getAccessItemsAsString(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework,
java.lang.String delim)
Item names for which the framework User has access as a single string
accessType - the access type ( Item.ITEMACCESS_VISIBLE / Item.ITEMACCESS_EDITABLE )filterArgs - input arguments used by the Item access Programdelim - the Item name separator
public java.util.Vector<FormUserItem> getUserFieldItems(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
throws OberonException
FormUserItem of Field type for which the framework User has the visibility
objlink - instance of ObjectObj or Link (can be null)filterArgs - input arguments used by the Item access Programframework - the current framework
OberonException
public java.util.Vector<FormUserItem> getUserItems(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
throws OberonException
FormUserItem for which the framework User has the visibility
objlink - instance of ObjectObj or Link (can be null)filterArgs - input arguments used by the Item access Programframework - the current framework
OberonException
public java.util.Vector<FormUserItem> getUserItemsWithData(ObjectBase objlink,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
throws OberonException
objlink - instance of ObjectObj or LinkfilterArgs - input arguments used by the Item access Program in addition to the form parametersframework - the User framework
FormUserItem
OberonException - usually due to DB SQL exceptionspublic void setCheckProgram(java.lang.String programName)
programName - the Program namepublic java.lang.String getCheckProgram()
Program namepublic void setActionProgram(java.lang.String programName)
programName - the Program namepublic java.lang.String getActionProgram()
Program namepublic void setRangeProgram(java.lang.String programName)
programName - the Program namepublic java.lang.String getRangeProgram()
Program name
public java.util.Vector<java.lang.String> computeProgramRanges(java.lang.String fieldName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
fieldName - the field namefilterArgs - extra argumentsframework - the current framework
public void setFilterParameters(java.lang.String parameters)
Item extraction Programs
parameters - OOQL parameters space separatedpublic java.lang.String getFilterParameters()
Item extraction Programs
public void setFormat(java.lang.String format)
throws OberonException
OberonExceptionpublic java.lang.String getFormat()
public java.lang.String createTextForm(ObjectBase objlink,
java.lang.String language,
Framework framework)
objlink - the ObjectObj or Link objectlanguage - the language for the textframework - the user Framework
public static java.lang.String getTranslatedValue(FormUserItem item,
java.lang.String section,
java.lang.String value,
Framework framework)
throws java.lang.Exception
java.lang.Exception
public java.lang.String getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
getProperty in class OBBasepropertyName - OOQL property identifier/name (example: item , program ...)filterArgs - extra arguments used to compute propertiestoken - separator token for complex propertiesframework - the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
getTargetNames in class OBBasecomposedName - OOQL property identifier/name (example: item , item.visible .. )filterArgs - extra arguments used to compute propertiesframework - the current framework
public java.lang.String toString()
toString in class AdminBasepublic java.lang.String toString(Framework framework)
toString in class AdminBaseframework - the current framework
public org.jdom.Element rangesToXML(java.lang.String fieldName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Item-field Ranges as XML element tree
fieldName - the Field namefilterArgs - extra arguments used to compute the field rangesframework - the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML in class AdminBaseframework - the current framework
public org.jdom.Element toXML(boolean getImage,
boolean fullDump,
Framework framework)
toXML in class AdminBasegetImage - true to include "imagedata" element with the base64 encoded image datafullDump - true to include detailed informationframework - the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML in class AdminBase
public void fromXML(org.jdom.Element rootElement,
boolean loadItems)
loadItems - if true load the Form itemspublic java.lang.String getCreateCommand(boolean force)
getCreateCommand in class AdminBaseforce - if true append the "force" options at the end
public java.lang.String getCreateCommand(boolean force,
boolean overwrite)
public java.lang.String getSaveCommand(boolean force)
getSaveCommand in class AdminBaseforce - if true append the "force" options at the end
public java.lang.String compareUpdate(Form refForm,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
throws OberonException
refForm - the reference Form objectcheckImage - if true compare also the image iconoverwrite - if true update the database object instanceforce - if true ignores optional propertiesframework - the current framework
OberonExceptionfromXML(Element)
|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||