|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.enterprise.BasicTemplateProcessor
wt.templateutil.processor.DefaultTemplateProcessor
wt.templateutil.processor.GenerateFormProcessor
wt.csm.html.query.CSMQueryFormProcessor
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static boolean |
debug
|
static String[] |
DISPLAY_COUNTS
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
static String |
QUERYLIST_KEY
|
protected ResourceBundle |
resource
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private NavigationService |
service
|
private URL |
urlCodebase
|
Fields inherited from class wt.templateutil.processor.GenerateFormProcessor |
DEFAULT_LIFECYCLE, ON_CHANGE_EVENT_NAME, TEAMTEMPLATE_INPUT_NAME |
Fields inherited from class wt.templateutil.processor.DefaultTemplateProcessor |
ACTION, CLASS, CODEBASE, LINE_FEED_DELIMITER, MESSAGE_SEPARATOR, OID, VERBOSE |
Fields inherited from interface wt.templateutil.processor.ContextTranslator |
CONTEXT_LIST_IN, CONTEXT_LIST_OUT |
Fields inherited from interface wt.templateutil.processor.ContextHolder |
CONTEXT_ACTION, CONTEXT_CLASS_NAME, CONTEXT_OBJ, CONTEXT_PROPERTIES, FORM_DATA, QUERY_DATA, RESPONSE_EXCEPTIONS, RESPONSE_FOOTERS, RESPONSE_HEADERS, RESPONSE_MESSAGES, RESPONSE_STRING, STATUS |
Constructor Summary | |
CSMQueryFormProcessor()
|
Method Summary | |
private String |
addHiddenString(String name,
String value)
Generate html hidden form value from this name and value pair. |
void |
copyQueryData(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
private String |
createBooleanQFElement(QueryFormElementDefaultView qfedv,
String nameID)
Create the boolean query form element html |
private String |
createNodeNavigationBar()
Create the node navigation control panel |
private String |
createNumberQFElement(QueryFormElementDefaultView qfedv,
String nameID)
Create the number (Integer/Float) query form element html |
private void |
createQueryFormElements(AbstractQueryTargetView target,
AbstractQueryFormView queryForm,
PrintWriter out)
Create the query form elements table |
private void |
createQueryFormTable(AbstractQueryTargetView target,
AbstractQueryFormView queryForm,
PrintWriter out)
Create the query form table |
private String |
createRatioQFElement(QueryFormElementDefaultView qfedv,
String nameID)
Create the ratio query form element html |
private String |
createStringQFElement(QueryFormElementDefaultView qfedv,
String nameID)
Create the string/url query form element html |
private String |
createTimestampQFElement(QueryFormElementDefaultView qfedv,
String nameID)
Create the timestamp query form element html |
private String |
createUnitQFElement(QueryFormElementDefaultView qfedv,
UnitDefView def,
String nameID)
Create the unit query form element html |
void |
generateControlPanel(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
void |
generateFindNavigationNode(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
void |
generateNodeNavigation(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
void |
generateNodeQueryForm(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
void |
generatePageDescription(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
private AbstractNavStructView |
getAbstractNavStructView()
Get the AbstractNavStructView from properties |
private AbstractNodeNodeView |
getAbstractNodeNodeView()
Get the AbstractNodeNodeView from properties |
private String |
getAttributeName(AttributeDefDefaultView def)
|
private String |
getDisplayResults()
Create the display results (html/text) link on the control panel |
private String |
getDisplayUnits(UnitDefView definition)
Get the display units for this definition |
private String |
getGraphicsLink()
Create the graphics on/off link on the control panel |
private String |
getImageLink(String src,
String alternative,
String parameters)
Generate the image link |
private String |
getLocalizedString(String key,
String default_value)
Get the localized message from the resource bundle with the key |
private String[] |
getMeasurementSystemNames()
Get all measurement system names from database |
private AbstractNodeNodeView[] |
getNavigationChildren(AbstractNavStructView structure,
AbstractNodeNodeView currentNode)
Get All navigation children for this node/structure |
private String |
getOldFormDataValue(String key)
Get the value of this key from the form data if any. |
private String[] |
getParentNodesLinks(AbstractNavStructView structure,
AbstractNodeNodeView[] nodes)
Generate String[] for parent nodes |
private String |
getQueryFormLink()
Create the query form on/off link on the control panel |
private String |
getRankingContext()
Create the ranking context selection link on the control panel |
private String |
getResultsCount()
Create the results count selection link on the control panel |
private String |
getResultsObject()
Create the results object link on the control panel |
private String |
getTaskDelegateLink(String action_name,
String label,
String addition)
Generate javascript link for task delegate |
private String |
getUnitsChoices()
Create the units selection and change units link on the control panel |
private boolean |
isGraphicsOn()
Get the graphics on/off property from query data |
private boolean |
isQueryFormOn()
Get the query form on/off property from query data |
private Properties |
newProperties(String action,
String className,
String struct,
String node,
String graphics,
String queryForm,
String units,
String rankingContext,
String displayCount,
String displayResults)
Generate a new properties from the query data with any additional changes |
void |
processAttributes(Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(CSMQueryFormProcessor thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
private String |
replace(String str,
String tok,
String rep)
|
private void |
sortTheQueryFormElements(AbstractQueryFormElementView[] queryFormElements)
|
static String |
timestampToString(Timestamp timestamp)
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final String QUERYLIST_KEY
public static final String[] DISPLAY_COUNTS
protected ResourceBundle resource
private URL urlCodebase
private NavigationService service
private static boolean debug
Constructor Detail |
public CSMQueryFormProcessor()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class GenerateFormProcessor
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class GenerateFormProcessor
input
-
IOException
ClassNotFoundException
protected boolean readVersion(CSMQueryFormProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void processAttributes(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void generateControlPanel(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void generatePageDescription(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void generateFindNavigationNode(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void generateNodeNavigation(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void generateNodeQueryForm(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
public void copyQueryData(Properties parameters, Locale locale, OutputStream os) throws WTException
parameters
- locale
- os
-
WTException
private String getGraphicsLink() throws WTException
WTException
private String getQueryFormLink() throws WTException
WTException
private String createNodeNavigationBar() throws WTException
WTException
private String getUnitsChoices() throws WTException
WTException
private String getRankingContext() throws WTException
WTException
private String getResultsCount() throws WTException
WTException
private String getDisplayResults() throws WTException
WTException
private String getResultsObject() throws WTException
WTException
private void createQueryFormTable(AbstractQueryTargetView target, AbstractQueryFormView queryForm, PrintWriter out) throws WTException
target
- The direct/indirect target for this query formqueryForm
- The query form to be processedout
- The PrintWriter for output stream
WTException
private void createQueryFormElements(AbstractQueryTargetView target, AbstractQueryFormView queryForm, PrintWriter out) throws WTException
queryForm
- The query form to be processedout
- The PrintWriter for output stream
WTException
private String createBooleanQFElement(QueryFormElementDefaultView qfedv, String nameID)
qfedv
- QueryFormElementDefaultView representing the boolean valuenameID
- String for the name of the input elementprivate String createNumberQFElement(QueryFormElementDefaultView qfedv, String nameID)
qfedv
- QueryFormElementDefaultView representing the integer/float valuenameID
- String for the name of the input elementprivate String createRatioQFElement(QueryFormElementDefaultView qfedv, String nameID)
qfedv
- QueryFormElementDefaultView representing the ratio valuenameID
- String for the name of the input elementprivate String createUnitQFElement(QueryFormElementDefaultView qfedv, UnitDefView def, String nameID)
qfedv
- QueryFormElementDefaultView representing the unit valuedef
- Definition the representing the unit valuenameID
- String for the name of the input elementprivate String createStringQFElement(QueryFormElementDefaultView qfedv, String nameID)
qfedv
- QueryFormElementDefaultView representing the string/url valuenameID
- String for the name of the input elementprivate String createTimestampQFElement(QueryFormElementDefaultView qfedv, String nameID)
qfedv
- QueryFormElementDefaultView representing the timestamp valuenameID
- String for the name of the input elementpublic static String timestampToString(Timestamp timestamp)
private String getOldFormDataValue(String key)
key
- Key to find in the form data
private String getDisplayUnits(UnitDefView definition)
definition
- Definition to find the display units
private String[] getParentNodesLinks(AbstractNavStructView structure, AbstractNodeNodeView[] nodes) throws WTException
structure
- Structure (the first element in the return array)nodes
- Nodes to generate in sorted order
WTException
private AbstractNavStructView getAbstractNavStructView() throws WTException
WTException
private AbstractNodeNodeView getAbstractNodeNodeView() throws WTException
WTException
private String[] getMeasurementSystemNames() throws WTException
WTException
private AbstractNodeNodeView[] getNavigationChildren(AbstractNavStructView structure, AbstractNodeNodeView currentNode) throws WTException
structure
- if currentNode is null, then we get root nodes from this structurecurrentNode
- the node to get the children. Maybe null
WTException
private boolean isGraphicsOn()
private boolean isQueryFormOn()
private String getTaskDelegateLink(String action_name, String label, String addition) throws WTException
action_name
- The action for the tasklabel
- The label for the linkaddition
- Any addition parameters to pass to the link
WTException
private String getImageLink(String src, String alternative, String parameters) throws WTException
src
- image srcalternative
- alternative for the image
WTException
private Properties newProperties(String action, String className, String struct, String node, String graphics, String queryForm, String units, String rankingContext, String displayCount, String displayResults)
action
- New action for the property
private String getLocalizedString(String key, String default_value)
key
- Key to the resource bundledefault_value
- Used when any exception occurred
private String addHiddenString(String name, String value)
name
- value
-
private void sortTheQueryFormElements(AbstractQueryFormElementView[] queryFormElements)
private String getAttributeName(AttributeDefDefaultView def)
private String replace(String str, String tok, String rep)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |