|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tomp.ext.Base
This Base class a basic class for all EXT classes that do the "real" work:
Field Summary | |
protected Action |
action
|
protected Application |
application
|
protected int |
status
|
static java.lang.String[] |
STATUS
String representation of the object status: whether it is just created (not processed), processed (ready or aborted), processed (valid or invalid) |
static int |
STATUS_ABORTED
|
static int |
STATUS_IN_PROCESSING
|
static int |
STATUS_NOT_PROCESSED
Codes of the object status: whether it is just created (not processed), processed (ready or aborted), processed (valid or invalid) |
static int |
STATUS_READY
|
static int |
STATUS_READY_INVALID
|
static int |
STATUS_READY_VALID
|
protected Validator |
validator
|
Constructor Summary | |
Base(Action action,
java.lang.String id,
Validator validator)
The one and only constructor for Base objects |
Method Summary | |
void |
abortProcessing()
Called when processing is aborted (not OK). |
void |
commitProcessing()
Called when processing is committed (i.e. not aborted, OK). |
javax.xml.transform.Source |
getAsRawSource()
The getAsRawSource() is actually abstract in this abstract class. |
javax.xml.transform.Source |
getAsSource()
The getAsSource() provides a javax.xml.transform.Source object containing the content of this Base object. |
java.lang.String |
id()
Returns the identification. |
boolean |
isReady()
is this Base object ready? |
boolean |
isValid()
is this Base object ready and valid? |
void |
startProcessing()
Called when processing starts. |
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[] STATUS
String representation of the object status:
whether it is just created (not processed), processed (ready or aborted), processed (valid or invalid)
public static final int STATUS_NOT_PROCESSED
Codes of the object status:
whether it is just created (not processed), processed (ready or aborted), processed (valid or invalid)
public static final int STATUS_IN_PROCESSING
public static final int STATUS_ABORTED
public static final int STATUS_READY
public static final int STATUS_READY_INVALID
public static final int STATUS_READY_VALID
protected Application application
protected Action action
protected int status
protected Validator validator
Constructor Detail |
public Base(Action action, java.lang.String id, Validator validator)
action
- The Action object where this Base will be stored.
The action provides the Base objects some services, like
id
- an identifier of this object, must be unique in the whole application.
(actually not in WHOLE application, only is the actual scope on any action).
The Base object will be stored to the Action under this "id".validator
- must specify a validator object for validating
may be null, in such case no validation will be performed when getAsSource() is called.Method Detail |
public javax.xml.transform.Source getAsSource() throws EXTException
The getAsSource() provides a javax.xml.transform.Source object containing the content of this Base object. It performs validation of the content if the validator is presented (not null).
Typically, it is not overloaded, rather, the getAsRawSource() is overloaded in any subclass of Base.
EXTException
public javax.xml.transform.Source getAsRawSource() throws EXTException
The getAsRawSource() is actually abstract in this abstract class. It will return a source before validation.
Will be overloaded in any subclass.
EXTException
public java.lang.String id()
Returns the identification.
public void startProcessing()
public void commitProcessing()
public void abortProcessing()
public boolean isReady()
public boolean isValid() throws EXTException
EXTException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |