|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.applications.dove.AbstractDove
This class handles Remote Procedure Calls described using a DOM model.
The original data is received in xml, likely through a specialized servlet such
as the DoveServlet (but this is not required. it may, for instance, be
possible to use this class in conjunction with SOAP or even outside a servlet
context).
The call should result in a new DOM tree (see the EditWizard API for details).
XXX: Currently, this class performs some type of validation on the xml received.
If errors occur, they are included in the response, at the place where they
occur. This means that the <error > tag can occur anywhere in the
response, which is not very neat.
Errors have three types:
parser : the xml given is invalid or does not follow the grammar.
This likely means there is a bug in the client code.
server : the code invoked is either not yet implemented or another,
server-related, error occurred (such as no memory, bad configuration,
etc.).
Server errors entirely fail a request.
client : The data requested could not be retrieved or values specified
were invalid. I.e. a requested node does not exist (any more), or a
put failed due to locking or invalid data.
This is ONLY for debugging purposes!
XML validation should occur at the parser and be captured early.
If we reach consensus that we must always validate, the xml-checking can be left
out, as we can then assumes a correct model. This will optimize processing.
| Field Summary | |
static java.lang.String |
DESCRIPTION
|
protected org.w3c.dom.Document |
doc
The document that is being constructed. |
static java.lang.String |
DOCTYPE_REQUEST
|
static java.lang.String |
DOCTYPE_RESPONSE
|
static java.lang.String |
ELM_DESTINATION
|
static java.lang.String |
ELM_DESTINATIONTYPE
|
static java.lang.String |
ELM_HREF
|
static java.lang.String |
ELM_ID
|
static java.lang.String |
ELM_LANG
|
static java.lang.String |
ELM_NAME
|
static java.lang.String |
ELM_NUMBER
|
static java.lang.String |
ELM_OLDNUMBER
|
static java.lang.String |
ELM_ROLE
|
static java.lang.String |
ELM_SOURCE
|
static java.lang.String |
ELM_STATUS
|
static java.lang.String |
ELM_TYPE
|
static java.lang.String |
ELM_WHERE
|
static java.lang.String |
ELM_XPATH
|
static java.lang.String |
ERROR
|
static java.lang.String |
FIELD
|
static java.lang.String |
FIELDS
|
static java.lang.String |
GETCONSTRAINTS
|
static java.lang.String |
GETDATA
|
static java.lang.String |
GETLIST
|
static java.lang.String |
GETNEW
|
static java.lang.String |
GETNEWRELATION
|
static java.lang.String |
GETRELATIONS
|
static java.lang.String |
GUINAME
|
static java.lang.String |
GUITYPE
|
static java.lang.String |
IS_CLIENT
|
static java.lang.String |
IS_FALSE
|
static java.lang.String |
IS_PARSER
|
static java.lang.String |
IS_SERVER
|
static java.lang.String |
IS_TRUE
|
static java.lang.String |
MAXLENGTH
|
static java.lang.String |
NEW
|
static java.lang.String |
OBJECT
|
static java.lang.String |
ORIGINAL
|
static java.lang.String |
PLURALNAME
|
static java.lang.String |
PUT
|
static java.lang.String |
QUERY
|
static java.lang.String |
RELATION
|
static java.lang.String |
RELATIONS
|
static java.lang.String |
REQUEST
|
static java.lang.String |
REQUIRED
|
static java.lang.String |
RESPONSE
|
static java.lang.String |
SECURITY
|
static java.lang.String |
SECURITY_CLOUD
|
static java.lang.String |
SECURITY_METHOD
|
static java.lang.String |
SECURITY_NAME
|
static java.lang.String |
SECURITY_PASSWORD
|
static java.lang.String |
SINGULARNAME
|
| Constructor Summary | |
AbstractDove(org.w3c.dom.Document doc)
Constructor |
|
| Method Summary | |
protected org.w3c.dom.Element |
addContentElement(java.lang.String tagname,
java.lang.String content,
org.w3c.dom.Element out)
Creates a DOM element which contains a Text Node, and adds it to the specified node as a child. |
void |
doRequest(org.w3c.dom.Element in,
org.w3c.dom.Element out)
Handles a request running one or more RPCs. |
abstract void |
doRequest(org.w3c.dom.Element in,
org.w3c.dom.Element out,
Cloud cloud,
java.util.Map repository)
Handles a request running one or more RPCs. |
org.w3c.dom.Element |
executeRequest(org.w3c.dom.Element in)
This method executes the request from the editors, it can be invoked directly |
org.w3c.dom.Element |
executeRequest(org.w3c.dom.Element in,
Cloud cloud,
java.util.Map repository)
This method executes the request from the editors, it can be invoked directly |
protected org.w3c.dom.Element |
getFirstElement(org.w3c.dom.Node item)
Retrieves the first child node of an element that is itself an element. |
protected org.w3c.dom.Element |
getNextElement(org.w3c.dom.Node item)
Retrieves the next sibling of an element that is itself an element. |
| 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 DOCTYPE_REQUEST
public static final java.lang.String DOCTYPE_RESPONSE
public static final java.lang.String REQUEST
public static final java.lang.String RESPONSE
public static final java.lang.String SECURITY
public static final java.lang.String GETDATA
public static final java.lang.String GETNEW
public static final java.lang.String GETNEWRELATION
public static final java.lang.String GETRELATIONS
public static final java.lang.String GETCONSTRAINTS
public static final java.lang.String GETLIST
public static final java.lang.String PUT
public static final java.lang.String SECURITY_NAME
public static final java.lang.String SECURITY_PASSWORD
public static final java.lang.String SECURITY_CLOUD
public static final java.lang.String SECURITY_METHOD
public static final java.lang.String OBJECT
public static final java.lang.String FIELD
public static final java.lang.String ORIGINAL
public static final java.lang.String NEW
public static final java.lang.String RELATIONS
public static final java.lang.String RELATION
public static final java.lang.String ERROR
public static final java.lang.String QUERY
public static final java.lang.String SINGULARNAME
public static final java.lang.String PLURALNAME
public static final java.lang.String DESCRIPTION
public static final java.lang.String FIELDS
public static final java.lang.String GUINAME
public static final java.lang.String GUITYPE
public static final java.lang.String MAXLENGTH
public static final java.lang.String REQUIRED
public static final java.lang.String ELM_ID
public static final java.lang.String ELM_NUMBER
public static final java.lang.String ELM_OLDNUMBER
public static final java.lang.String ELM_TYPE
public static final java.lang.String ELM_STATUS
public static final java.lang.String ELM_NAME
public static final java.lang.String ELM_ROLE
public static final java.lang.String ELM_DESTINATION
public static final java.lang.String ELM_DESTINATIONTYPE
public static final java.lang.String ELM_LANG
public static final java.lang.String ELM_XPATH
public static final java.lang.String ELM_WHERE
public static final java.lang.String ELM_SOURCE
public static final java.lang.String ELM_HREF
public static final java.lang.String IS_PARSER
public static final java.lang.String IS_SERVER
public static final java.lang.String IS_CLIENT
public static final java.lang.String IS_TRUE
public static final java.lang.String IS_FALSE
protected org.w3c.dom.Document doc
| Constructor Detail |
public AbstractDove(org.w3c.dom.Document doc)
doc - the Document that is constructed. This should only be used to
construct new DOM elements. New (child) nodes should not be added
to this document, but to the out element.| Method Detail |
protected org.w3c.dom.Element addContentElement(java.lang.String tagname,
java.lang.String content,
org.w3c.dom.Element out)
tagname - name of the new elementcontent - content of the new element as a stringout - the element to which to add the new Element.protected org.w3c.dom.Element getFirstElement(org.w3c.dom.Node item)
null.item - the element to find the first child element ofprotected org.w3c.dom.Element getNextElement(org.w3c.dom.Node item)
null.item - the element to find the sibling element of
public abstract void doRequest(org.w3c.dom.Element in,
org.w3c.dom.Element out,
Cloud cloud,
java.util.Map repository)
in - the element that described the request (or input).
The childnodes should describe the calls to perform.out - the element that described the response (or return value).
Results of calls should be added as childs to this element.cloud - the MMCI cloud to use, if applicable.repository - Repository that contains the blobs
public void doRequest(org.w3c.dom.Element in,
org.w3c.dom.Element out)
in - the element that described the request (or input).
The childnodes should describe the calls to perform.out - the element that described the response (or return value).
Results of calls should be added as childs to this element.
public org.w3c.dom.Element executeRequest(org.w3c.dom.Element in,
Cloud cloud,
java.util.Map repository)
in - the element that described the request (or input).
The childnodes should describe the calls to perform.cloud - the MMCI cloud to use, if applicable.repository - Repository that contains the blobspublic org.w3c.dom.Element executeRequest(org.w3c.dom.Element in)
in - the element that described the request (or input).
The childnodes should describe the calls to perform.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||