public abstract class RAPPAction extends Object
It contains basic functionality to serialize a class instance to and from an XML document.
There is standard error mechanism built-in in order to provide useful information when an action hit a non-critical error in the server.
RAPPTransaction
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_CALL_CLASS
The value for a RAPPCallClass action.
|
static int |
ACTION_CALL_HOST
The value for a RAPPCallHost action.
|
static int |
ACTION_CALL_OBJECT
The value for a RAPPCallObject action.
|
static int |
ACTION_CALL_PANEL
The value for a RAPPCallPanel action.
|
static int |
ACTION_GLOB_VAR
The value for a RAPPGlobVar action.
|
static int |
ERROR_CALL_CLASS_RUN_ACTION |
static int |
ERROR_CONTROL_ID_NOT_FOUND |
static int |
ERROR_GLOB_VAR_NOT_FOUND |
static int |
ERROR_HOST_FIELD_NOT_FOUND |
static int |
ERROR_HOST_SESSION_NOT_CONNECTED |
static int |
ERROR_INSTANCIATING_CALLED_CLASS |
static int |
ERROR_INTERFACE_NOT_FOUND |
static int |
ERROR_NOT_CURRENT_HOST_SCREEN |
static int |
ERROR_OBJECT_NOT_FOUND |
static int |
ERROR_UNEXPECTED_RETURN_STRING |
protected int |
errorCode
The error code or zero for no error.
|
protected String |
errorDescription
The error description or null for no error.
|
Modifier | Constructor and Description |
---|---|
protected |
RAPPAction()
This constructor creates an empty action.
|
Modifier and Type | Method and Description |
---|---|
void |
appendReplyElement()
Creates the Element for a reply from server to client when
a Document has been serialized to this class (in the server
when processing the reply).
|
void |
appendReplyElement(RAPPElement owner)
Creates the Element for a reply from server to client.
|
void |
appendRequestElement(RAPPElement owner)
Creates the Element for a request from client to server.
|
abstract String |
getActionClass()
Gets the action class name associated with the extending
action class (of this class).
|
abstract int |
getActionType()
Gets the type of action for this class.
|
static Class<? extends RAPPAction> |
getClass(String actionclass)
Gets the corresponding Class from an action class name.
|
abstract String |
getComment()
Comment for action class tag when serialized from a request
the first time.
|
int |
getErrorCode()
Gets the error code that occurred in the server.
|
String |
getErrorDescription()
Gets the error description that occurred in the server.
|
abstract RAPPNameSpaceItem |
getNameSpaceItem()
Get the action depending namespace item or null if none.
|
void |
initialize(Element actionElement,
String actionclass)
Reads the actionclassRequest and actionclassReply elements
for available data.
|
String |
paramString()
Gets the parameter string for this class for testing purposes.
|
void |
removeAllElements(boolean isReply)
Removes all Elements for an action class request or reply.
|
abstract void |
serializeFromReply(RAPPElement reply)
Initializes the action class instance from a reply element.
|
abstract void |
serializeFromRequest(RAPPElement request)
Initializes the action class instance from a request element.
|
abstract void |
serializeToReply(RAPPElement reply)
Initializes the reply element with all attributes and
perhaps also child nodes/elements.
|
abstract void |
serializeToRequest(RAPPElement request)
Initializes the request element with all attributes and
perhaps also child nodes/elements.
|
void |
setError(int errorCode,
String errorDescription)
Sets the error code and message that occurred in the server.
|
String |
toString()
Converts this class into a string for testing purposes.
|
void |
updateReplyFromDocument(Element actionElement)
Updates this transaction instance with the reply from
the document.
|
public static final int ERROR_OBJECT_NOT_FOUND
public static final int ERROR_UNEXPECTED_RETURN_STRING
public static final int ERROR_CONTROL_ID_NOT_FOUND
public static final int ERROR_GLOB_VAR_NOT_FOUND
public static final int ERROR_HOST_SESSION_NOT_CONNECTED
public static final int ERROR_NOT_CURRENT_HOST_SCREEN
public static final int ERROR_HOST_FIELD_NOT_FOUND
public static final int ERROR_INSTANCIATING_CALLED_CLASS
public static final int ERROR_INTERFACE_NOT_FOUND
public static final int ERROR_CALL_CLASS_RUN_ACTION
public static final int ACTION_CALL_OBJECT
public static final int ACTION_CALL_HOST
public static final int ACTION_CALL_PANEL
public static final int ACTION_CALL_CLASS
public static final int ACTION_GLOB_VAR
protected int errorCode
protected String errorDescription
protected RAPPAction()
public static final Class<? extends RAPPAction> getClass(String actionclass)
public abstract int getActionType()
Current values are:
ACTION_CALL_OBJECT = 1 ACTION_CALL_HOST = 2 ACTION_CALL_PANEL = 3 ACTION_CALL_CLASS = 4 ACTION_GLOB_VAR = 5
public abstract String getActionClass()
Current values are:
callObject callHost callPanel callClass globVar
public final void appendRequestElement(RAPPElement owner)
The XML for the node looks like (replace parenthesis with less-more-than signs):
(action actionclass="callObject") (callObjectRequest [ action="something" attr="abc" ... ]) (optional/) (/callObjectRequest) (/action)
getActionClass()
public final void appendReplyElement(RAPPElement owner)
The XML for the node looks like (replace parenthesis with less-more-than signs):
(action actionclass="callObject") (callObjectReply [ action="something" attr="abc" ... ]) (optional/) (/callObjectReply) (/action)
getActionClass()
public final void appendReplyElement()
public final void removeAllElements(boolean isReply)
public final void initialize(Element actionElement, String actionclass) throws SAXException
SAXException
- for errors in the document.public final void updateReplyFromDocument(Element actionElement) throws SAXException
SAXException
- for errors in the document.public final int getErrorCode()
public final String getErrorDescription()
public final void setError(int errorCode, String errorDescription)
public abstract String getComment()
public abstract void serializeToRequest(RAPPElement request)
public abstract void serializeToReply(RAPPElement reply)
public abstract void serializeFromRequest(RAPPElement request) throws SAXException
SAXException
- for errors in the document.public abstract void serializeFromReply(RAPPElement reply) throws SAXException
SAXException
- for errors in the document.public String paramString()
public String toString()
public abstract RAPPNameSpaceItem getNameSpaceItem()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.