public class Dove extends AbstractDove
put failed due to locking or invalid data.DESCENDANT, DESCENDANTS, DESCRIPTION, doc, DOCTYPE_REQUEST, DOCTYPE_RESPONSE, ELM_CONTEXT, ELM_CREATEDIR, ELM_DESTINATION, ELM_DESTINATIONTYPE, ELM_DIRECTIONS, ELM_ENCODING, ELM_HREF, ELM_ID, ELM_LANG, ELM_MAYDELETE, ELM_MAYWRITE, ELM_NAME, ELM_NUMBER, ELM_OLDNUMBER, ELM_ORDERBY, ELM_ROLE, ELM_SEARCHDIR, ELM_SEARCHTYPE, ELM_SIZE, ELM_SOURCE, ELM_SOURCETYPE, ELM_STATUS, ELM_TYPE, ELM_WHERE, ELM_XPATH, ERROR, FIELD, FIELDS, GETCONSTRAINTS, GETDATA, GETLIST, GETNEW, GETNEWRELATION, GETRELATIONS, GUINAME, GUITYPE, IS_CLIENT, IS_FALSE, IS_PARSER, IS_SERVER, IS_TRUE, MAXLENGTH, NEW, OBJECT, ORIGINAL, PARENT, PLURALNAME, PUT, QUERY, RELATION, RELATIONS, REQUEST, REQUIRED, RESPONSE, SECURITY, SECURITY_CLOUD, SECURITY_METHOD, SECURITY_NAME, SECURITY_PASSWORD, SINGULARNAME, TYPE_DESCRIPTIONS| Modifier and Type | Method and Description |
|---|---|
protected Element |
addField(Element out,
NodeManager nm,
Field f,
Node node) |
protected void |
addRelationNodes(Element relation,
Element out,
Node nd)
Retrieves the relations of a node and adds its content to a DOM element.
|
void |
doRequest(Element in,
Element out,
Cloud cloud,
Map<String,byte[]> repository)
Handles a request running one or more RPCs.
|
protected boolean |
fillFields(String alias,
Node node,
Element objectelement,
Map<String,Object> values)
Fills the fields of the specified node with the supplied values.
|
protected boolean |
fillFields(String alias,
Node node,
Element out,
Map<String,Object> values,
Map<String,Object> originalValues)
Fills the fields of the specified node with the supplied values.
|
void |
getConstraints(Element in,
Element out,
Cloud cloud)
Handles a getconstraints call.
|
void |
getData(Element in,
Element out,
Cloud cloud)
Handles a getdata call, by obtaining data for each node specified.
|
void |
getDataNode(Element in,
Element out,
Cloud cloud)
Handles a node by retrieving its data and storing its content in a
DOM element.
|
void |
getDataNode(Element in,
Element out,
Node node)
Handles a node storing its content in a DOM element.
|
void |
getList(Element in,
Element out,
Cloud cloud)
Handles a getlist call.
|
void |
getNew(Element in,
Element out,
Cloud cloud)
Handles a getnew call, by obtaining data for the new node of a specified type.
|
void |
getNewRelation(Element in,
Element out,
Cloud cloud)
Handles a getnewrelation call, by obtaining data for the new node of a specified type.
|
protected String |
getNodeReferenceFromValue(String name,
Map<String,Object> values,
Map<String,Integer> aliases)
Converts the value of a field to a node reference (either a temporary id or an object alias or number).
|
void |
getRelations(Element in,
Element out,
Cloud cloud)
Handles a getrelations call, by obtaining relations for each node specified.
|
void |
getRelationsNodes(Element in,
Element out,
Cloud cloud)
Handles a node by retrieving its relations and storing its content in a
DOM element.
|
protected boolean |
mergeClouds(Map<String,Map<String,Object>> originalNodes,
Map<String,Map<String,Object>> newNodes,
Map<String,Map<String,Object>> originalRelations,
Map<String,Map<String,Object>> newRelations,
Map<Node,Element> addedNodes,
Map<Relation,Element> addedRelations,
Element out,
Cloud cloud)
Performs the put within a transaction.
|
void |
put(Element in,
Element out,
Cloud cloud,
Map<String,byte[]> repository)
Handles a put call.
|
protected boolean |
putChangeNode(String alias,
Map<String,Object> values,
Map<String,Object> originalValues,
Map<String,Integer> aliases,
Element out,
Cloud cloud)
Changes a node.
|
protected boolean |
putChangeRelation(String alias,
Map values,
Map originalValues,
Map aliases,
Element out,
Cloud cloud)
Changes a relation
|
protected boolean |
putDeleteNode(String alias,
Map<String,Object> originalValues,
Element out,
Cloud cloud)
Deletes a node.
|
protected boolean |
putDeleteRelation(String alias,
Map<String,Object> originalValues,
Element out,
Cloud cloud)
Deletes a relation.
|
protected boolean |
putNewNode(String alias,
Map<String,Object> values,
Map<String,Integer> aliases,
Map<Node,Element> addedNodes,
Element out,
Cloud cloud)
Creates a new node.
|
protected boolean |
putNewRelation(String alias,
Map<String,Object> values,
Map<String,Integer> aliases,
Map<Relation,Element> addedRelations,
Element out,
Cloud cloud)
Creates a new relation.
|
addContentElement, doRequest, executeRequest, executeRequest, getFirstElement, getFirstElement, getNextElement, getNextElement, getTypeDescriptionpublic Dove(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.protected Element addField(Element out, NodeManager nm, Field f, Node node)
public void getDataNode(Element in, Element out, Node node)
in - the element that described the getdata call.
The childnodes should describe the nodes to retrieve.out - the element that described the getdata result.
Retrieved nodes should be added as childs to this element.node - The node to store in out.public void getDataNode(Element in, Element out, Cloud cloud)
in - the element that described the getdata call.
The childnodes should describe the nodes to retrieve.out - the element that described the getdata result.
Retrieved nodes should be added as childs to this element.cloud - the cloud to work onprotected void addRelationNodes(Element relation, Element out, Node nd)
relation - the element that described the relation
The childnodes (if present) should describe the fields to retrieve, and possibly
a description of the related object.out - the element that describes the source node.
Retrieved relations should be added as childs to this element.nd - the MMBase node that shoudl eb sued to query the relationspublic void getRelationsNodes(Element in, Element out, Cloud cloud)
in - the element that described the getdata call.
The childnodes should describe the nodes to retrieve.out - the element that described the getdata result.
Retrieved nodes should be added as childs to this element.cloud - the cloud to work onpublic void getData(Element in, Element out, Cloud cloud)
in - the element that described the getdata call.
The childnodes should describe the nodes to retrieve.out - the element that described the getdata result.
Retrieved nodes should be added as childs to this element.cloud - the cloud to work onpublic void getNew(Element in, Element out, Cloud cloud)
in - the element that described the getnew call.out - the element that described the getnew result.
The new node should be added as a child to this element.cloud - the cloud to work onpublic void getNewRelation(Element in, Element out, Cloud cloud)
in - the element that described the getnew call.out - the element that described the getnew result.
The new node should be added as a child to this element.cloud - the cloud to work onpublic void getRelations(Element in, Element out, Cloud cloud)
in - the element that described the getrelations call.
The childnodes should describe the nodes to retrieve the relations from.out - the element that described the getrelations result.
Retrieved nodes and their relations should be added as childs to this element.cloud - the cloud to work onpublic void getConstraints(Element in, Element out, Cloud cloud)
in - the element that described the getconstraints call.
The childnodes should describe the node types to retrieve the constraints of.out - the element that described the getconstraints result.
Retrieved constraints should be added as childs to this element.cloud - the cloud to work onpublic void getList(Element in, Element out, Cloud cloud)
in - the element that described the getlist call.
The childnodes should describe the queries to run.out - the element that described the getlist result.
Retrieved nodes should be added as childs to this element.cloud - the cloud to work onpublic void put(Element in, Element out, Cloud cloud, Map<String,byte[]> repository)
in - the element that described the put call.
The childnodes should describe the old and the new cloud.out - the element that described the put result.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onrepository - Repository that contains the blobsprotected String getNodeReferenceFromValue(String name, Map<String,Object> values, Map<String,Integer> aliases)
name - the name of the fieldvalues - a Map with field valuesaliases - a Map with mappings from XML aliases to node reference valuesprotected boolean fillFields(String alias, Node node, Element objectelement, Map<String,Object> values)
alias - the node alias in the put treenode - the node to fillobjectelement - the XML element to fill with the changed data for feedbackvalues - a Map with new node valuesprotected boolean fillFields(String alias, Node node, Element out, Map<String,Object> values, Map<String,Object> originalValues)
alias - the node alias in the put treenode - the node to fillout - the XML element to fill with the changed data for feedbackvalues - a Map with new node valuesoriginalValues - a Map with the original values of the node, needed for checking.
if null, no checking takes placeprotected boolean putNewNode(String alias, Map<String,Object> values, Map<String,Integer> aliases, Map<Node,Element> addedNodes, Element out, Cloud cloud)
alias - the node alias in the put treevalues - a Map with new node valuesaliases - a Map with mappings from XML aliases to node reference valuesaddedNodes - a Map used to keep associations between xml elements and newly created nodes,
needed for resolving new node numbersout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean putNewRelation(String alias, Map<String,Object> values, Map<String,Integer> aliases, Map<Relation,Element> addedRelations, Element out, Cloud cloud)
alias - the node alias in the put treevalues - a Map with new node valuesaliases - a Map with mappings from XML aliases to node reference valuesaddedRelations - a Map used to keep associations between xml elements and newly created relations,
needed for resolving new node numbers and referencesout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean putDeleteNode(String alias, Map<String,Object> originalValues, Element out, Cloud cloud)
alias - the node alias in the put treeoriginalValues - a Map with the original values of the nodeout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean putDeleteRelation(String alias, Map<String,Object> originalValues, Element out, Cloud cloud)
alias - the node alias in the put treeoriginalValues - a Map with the original values of the relationout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean putChangeRelation(String alias, Map values, Map originalValues, Map aliases, Element out, Cloud cloud)
alias - the node alias in the put treevalues - a Map with new node valuesoriginalValues - a Map with original node values, used for validationaliases - a Map with mappings from XML aliases to node reference valuesout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean putChangeNode(String alias, Map<String,Object> values, Map<String,Object> originalValues, Map<String,Integer> aliases, Element out, Cloud cloud)
alias - the node alias in the put treevalues - a Map with new node valuesoriginalValues - a Map with original node values, used for validationaliases - a Map with mappings from XML aliases to node reference valuesout - the element that describes 'new' cloud.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onprotected boolean mergeClouds(Map<String,Map<String,Object>> originalNodes, Map<String,Map<String,Object>> newNodes, Map<String,Map<String,Object>> originalRelations, Map<String,Map<String,Object>> newRelations, Map<Node,Element> addedNodes, Map<Relation,Element> addedRelations, Element out, Cloud cloud)
originalNodes - the nodes in the original cloud, used in validationnewNodes - the nodes in the new cloudoriginalRelations - the relations in the original cloud, used in validationnewRelations - the relations in the new cloudaddedNodes - a Map used to keep associations between xml elements and newly created nodes,
needed for resolving new node numbers and referencesaddedRelations - a Map used to keep associations between xml elements and newly created relations,
needed for resolving new node numbers and referencesout - the element that described the put result.
The result of the put (an error or the resulting cloud) should be added
as childs to this element.cloud - the cloud to work onpublic void doRequest(Element in, Element out, Cloud cloud, Map<String,byte[]> repository)
doRequest in class AbstractDovein - 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 cloud to work on - if null, a cloud will be created by the Dove classrepository - Repository that contains the blobsMMBase 1.9-SNAPSHOT - ${javadoctimestamp}