things.thinger.service.httptool
Class Action

java.lang.Object
  extended by things.thinger.service.httptool.Action
Direct Known Subclasses:
Action_Helper, Action_Main, Action_ProcessList, ActionIzer

public abstract class Action
extends java.lang.Object

A base action.

Version:
1.0

Version History

EPG - Initial - 17 NOV 07
 
Author:
Erich P. Gatejen

Field Summary
 ThingsPropertyView parameters
          This is what was passed in the command.
 SystemInterface si
          Working variables.
 ThingsPropertyView tags
          This is what will finally be merged to the result page.
 
Constructor Summary
Action()
           
 
Method Summary
static void ERROR(java.lang.String description, java.lang.String message)
          Call this if you get an error and just give up.
 ActionResult execute(ThingsPropertyView parameters, ThingsPropertyView tags, SystemInterface si)
          Call this, not process.
 Head head(ThingsPropertyView parameters, ThingsPropertyView tags, SystemInterface si)
          Overload this if you want to manage HEAD processing on your own.
protected abstract  ActionResult process()
          The implementation.
static void PUNT(java.lang.String message)
          Call this if you want to punt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

si

public SystemInterface si
Working variables. Since only one thread is allowed to process at a time, these variables will be properly set for the one running.


tags

public ThingsPropertyView tags
This is what will finally be merged to the result page.


parameters

public ThingsPropertyView parameters
This is what was passed in the command.

Constructor Detail

Action

public Action()
Method Detail

process

protected abstract ActionResult process()
                                 throws java.lang.Throwable
The implementation. Assume the DATA is available.

Throws:
java.lang.Throwable

head

public Head head(ThingsPropertyView parameters,
                 ThingsPropertyView tags,
                 SystemInterface si)
          throws java.lang.Throwable
Overload this if you want to manage HEAD processing on your own. Be careful with these! They will not render a default page if the head processing fails.

Parameters:
parameters - This is what comes from the commands.
tags - This is what will be merged to the result page.
si - The system interface.
Returns:
the head. The default implementation returns a null which will let the server manage it (and almost always invalidate the cache).
Throws:
java.lang.Throwable

execute

public ActionResult execute(ThingsPropertyView parameters,
                            ThingsPropertyView tags,
                            SystemInterface si)
                     throws java.lang.Throwable
Call this, not process.

Parameters:
parameters - This is what comes from the commands.
tags - This is what will be merged to the result page.
si - The system interface.
Returns:
the action result.
Throws:
java.lang.Throwable

ERROR

public static void ERROR(java.lang.String description,
                         java.lang.String message)
                  throws ActionException
Call this if you get an error and just give up. The system will render the error for you.

Parameters:
message - the full message.
description - the short description.
Throws:
ActionException - which will be trapped and processed by the service.

PUNT

public static void PUNT(java.lang.String message)
                 throws PuntException
Call this if you want to punt. This is usually something you want to catch before it makes it back to the action manager.

Parameters:
message - the full message.
Throws:
ActionException - which will be trapped and processed by the service.
PuntException
See Also:
PuntException


Things.