|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.thinger.service.httptool.Action
things.thinger.service.httptool.ActionIzer
public abstract class ActionIzer
ActionIzer helper wrapper for Actions.
Version History
EPG - Initial - 2 NOV 08 EPG - Make Save and Load files man-readable. - 11 Oct 09
Field Summary | |
---|---|
static java.lang.String |
CHECKED_VALUE
|
static java.lang.String |
COMMENT_LINE
|
static char |
NAME_VALUE_SNAP
|
static java.lang.String |
PROP_LINE_END
|
static java.lang.String |
PROP_LINE_START
|
static java.lang.String |
VERSION_NOTE
|
Fields inherited from class things.thinger.service.httptool.Action |
---|
parameters, si, tags |
Constructor Summary | |
---|---|
ActionIzer()
Constructor. |
Method Summary | |
---|---|
abstract void |
declarations()
Give the sub class a chance to make declarations. |
protected void |
DECLARE_BOOLEAN(java.lang.String name,
boolean defaultValue,
boolean required,
java.lang.String trueValue,
java.lang.String falseValue,
java.lang.String trueTag,
java.lang.String falseTag,
java.lang.String propertyName)
Declare a checked boolean parameter. |
protected void |
DECLARE_PROPS(java.lang.String name,
boolean defaultValue,
boolean required,
java.lang.String tag)
Declare a property parameter. |
ActionIzerItem |
DECLARE_TYPED(java.lang.String name,
java.lang.String defaultValue,
boolean required,
ActionIzerItem.Type type,
java.lang.String tag,
java.lang.String propertyName)
Declare by type. |
protected void |
DECLARE(java.lang.String name,
java.lang.String defaultValue,
boolean required,
java.lang.String tag,
java.lang.String propertyName)
Declare a string parameter. |
protected abstract ActionResult |
defaultAction()
Get the default action. |
protected abstract ActionResult |
doAction(java.lang.String action,
ThingsPropertyView localProperties,
java.util.HashMap<java.lang.String,ActionIzerItemValue> values,
ThingsExceptionBundle<ThingsException> exceptions)
Do the action. |
Head |
head(ThingsPropertyView parameters,
ThingsPropertyView tags,
SystemInterface si)
Overload this if you want to manage HEAD processing on your own. |
protected abstract void |
manageErrors(ThingsExceptionBundle<ThingsException> exceptions,
ActionResult result)
Manage errors. |
protected ActionResult |
process()
The implementation. |
protected abstract void |
processUndeclaredParameters(ThingsPropertyView actualParameters,
ThingsPropertyView localProperties,
ThingsPropertyView saveParameter,
ThingsExceptionBundle<ThingsException> exceptions)
Allow the subclass to process undeclared parameters. |
protected abstract ActionResult |
renderLoad(ThingsExceptionBundle<ThingsException> exceptions)
Render any message for a load. |
protected abstract ActionResult |
renderSave(ThingsExceptionBundle<ThingsException> exceptions)
Render any message for a save. |
protected abstract void |
renderUndeclared()
Allow the subclass render undeclared. |
protected abstract void |
renderUndeclaredDefault()
Allow the subclass render undeclared default values. |
void |
SET_ACTION_LOAD(java.lang.String actionValue,
java.lang.String universe,
java.lang.String pathParam,
java.lang.String tag)
Set the action parameter value to indicate a save as well as the name of the parameter that holds the path for the save. |
void |
SET_ACTION_PARAM(java.lang.String action,
boolean errorOnUnknown,
java.lang.String... actions)
Set the action parameter. |
void |
SET_ACTION_SAVE(java.lang.String actionValue,
java.lang.String universe,
java.lang.String pathParam,
java.lang.String tag)
Set the action parameter value to indicate a save as well as the name of the parameter that holds the path for the save. |
Methods inherited from class things.thinger.service.httptool.Action |
---|
ERROR, execute, PUNT |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CHECKED_VALUE
public static final java.lang.String VERSION_NOTE
public static final java.lang.String COMMENT_LINE
public static final java.lang.String PROP_LINE_START
public static final java.lang.String PROP_LINE_END
public static final char NAME_VALUE_SNAP
Constructor Detail |
---|
public ActionIzer() throws java.lang.Throwable
java.lang.Throwable
- if the declarations failed.Method Detail |
---|
public abstract void declarations() throws java.lang.Throwable
java.lang.Throwable
protected abstract void processUndeclaredParameters(ThingsPropertyView actualParameters, ThingsPropertyView localProperties, ThingsPropertyView saveParameter, ThingsExceptionBundle<ThingsException> exceptions) throws java.lang.Throwable
actualParameters
- Use this instead of the superclass 'parameter's so that load functionality will work.localProperties
- local properties.saveParameters
- all parameters that may be saved should be set here. Remember, these are PARAMETERS, as found in actualParameters, not Properties, as found in localProperties.exceptions
- Add non-fatal exceptions here, things you'd rather have rendered within the page rather than given to the platform.
java.lang.Throwable
- an fatal exceptions. It'll let the platform give the error screen,protected abstract void renderUndeclared() throws java.lang.Throwable
java.lang.Throwable
- any exception (exception interruptions) will be trapped in the bundle for later examination. Exceptions that aren't ThingsException will be promoted to a FAULT.protected abstract void renderUndeclaredDefault() throws java.lang.Throwable
java.lang.Throwable
- any exception (exception interruptions) will be trapped in the bundle for later examination. Exceptions that aren't ThingsException will be promoted to a FAULT.protected abstract ActionResult renderSave(ThingsExceptionBundle<ThingsException> exceptions)
exceptions
- problems that may have happened during automated processing.
protected abstract ActionResult renderLoad(ThingsExceptionBundle<ThingsException> exceptions)
exceptions
- problems that may have happened during automated processing.
protected abstract ActionResult doAction(java.lang.String action, ThingsPropertyView localProperties, java.util.HashMap<java.lang.String,ActionIzerItemValue> values, ThingsExceptionBundle<ThingsException> exceptions) throws java.lang.Throwable
action
- The action parameter's value. Null if it wasn't set or found in the post.localProperties
- local properties derived from the items.values
- the values of the declared items.exceptions
- problems that may have happened during automated processing.
java.lang.Throwable
- these exceptions will not be trapped.protected abstract ActionResult defaultAction() throws java.lang.Throwable
java.lang.Throwable
- any exception (exception interruptions) will be trapped in the bundle for later examination.protected abstract void manageErrors(ThingsExceptionBundle<ThingsException> exceptions, ActionResult result) throws java.lang.Throwable
exceptions
- the final exception bundle.result
- the current result.
java.lang.Throwable
- unlike the other methods, this will let exceptions fly back to the Action.protected void DECLARE(java.lang.String name, java.lang.String defaultValue, boolean required, java.lang.String tag, java.lang.String propertyName) throws java.lang.Throwable
name.
- it just be unique per ActionIzer class.defaultValue
- required
- tag
- tag name. If null, there is no associated tag name.propertyName
- property name. If null, there is no associated property name.
java.lang.Throwable
protected void DECLARE_BOOLEAN(java.lang.String name, boolean defaultValue, boolean required, java.lang.String trueValue, java.lang.String falseValue, java.lang.String trueTag, java.lang.String falseTag, java.lang.String propertyName) throws java.lang.Throwable
name.
- it just be unique per ActionIzer class.defaultValue
- required
- trueValue
- the text value that indicates truefalseValue
- the text value that indicates truetrueTag
- associated tag name for the true valuefalseTag
- associated tag name for the false valuetag
- tag name. If null, there is no associated tag name.propertyName
- property name. If null, there is no associated property name.
java.lang.Throwable
protected void DECLARE_PROPS(java.lang.String name, boolean defaultValue, boolean required, java.lang.String tag) throws java.lang.Throwable
name.
- it just be unique per ActionIzer class.defaultValue
- required
- tag
- tag name. If null, there is no associated tag name.
java.lang.Throwable
public ActionIzerItem DECLARE_TYPED(java.lang.String name, java.lang.String defaultValue, boolean required, ActionIzerItem.Type type, java.lang.String tag, java.lang.String propertyName) throws java.lang.Throwable
name
- the name. it just be unique per ActionIzer class.defaultValue
- required
- type
- the type.tag
- tag name. If null, there is no associated tag name.propertyName
- property name. If null, there is no associated property name.
java.lang.Throwable
public void SET_ACTION_PARAM(java.lang.String action, boolean errorOnUnknown, java.lang.String... actions) throws java.lang.Throwable
action
- the action parametererrorOnUnknown
- if true, it will generate an error if it encounters and unknown param.actions
- possible values.
java.lang.Throwable
public void SET_ACTION_SAVE(java.lang.String actionValue, java.lang.String universe, java.lang.String pathParam, java.lang.String tag) throws java.lang.Throwable
actionValue
- the value to indicate the save action.universe
- name of the universe in which we will save. This will overlap with SET_ACTION_LOAD, so keep them in sync.pathParam
- the parameter with the path information. This will overlap with SET_ACTION_LOAD, so keep them in sync.tag
- the tag for rendering the path information. . This will overlap with SET_ACTION_LOAD, so keep them in sync.
java.lang.Throwable
public void SET_ACTION_LOAD(java.lang.String actionValue, java.lang.String universe, java.lang.String pathParam, java.lang.String tag) throws java.lang.Throwable
actionValue
- the value to indicate the save action.universe
- name of the universe in which we will save. This will overlap with SET_ACTION_LOAD, so keep them in sync.pathParam
- the parameter with the path information. This will overlap with SET_ACTION_SAVE, so keep them in sync.tag
- the tag for rendering the path information. . This will overlap with SET_ACTION_SAVE, so keep them in sync.
java.lang.Throwable
protected ActionResult process() throws java.lang.Throwable
process
in class Action
java.lang.Throwable
public Head head(ThingsPropertyView parameters, ThingsPropertyView tags, SystemInterface si) throws java.lang.Throwable
head
in class Action
parameters
- This is what comes from the commands.tags
- This is what will be merged to the result page.si
- The system interface.
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |