|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Describes an object in the cloud.
| Method Summary | |
void |
cancel()
Cancel changes to a node This fails if the current node is not in edit mode. |
void |
commit()
Commit the node to the database. |
int |
countRelatedNodes(NodeManager otherNodeManager,
java.lang.String role,
java.lang.String searchDir)
|
int |
countRelatedNodes(java.lang.String type)
Returns the number of related nodes that have a specific node manager. |
int |
countRelations()
Returns the number of relations this node has with other nodes. |
int |
countRelations(java.lang.String relationManager)
Returns the number of relation nodes attached to this node that have a specific relation manager. |
void |
createAlias(java.lang.String alias)
Create an alias for this node. |
Relation |
createRelation(Node destinationNode,
RelationManager relationManager)
Adds a relation between this node and a specified node to the cloud. |
void |
delete()
Removes the Node. |
void |
delete(boolean deleteRelations)
Removes the Node. |
void |
deleteAlias(java.lang.String alias)
Delete an alias for this node. |
void |
deleteRelations()
Removes all relation nodes attached to this node. |
void |
deleteRelations(java.lang.String relationManager)
Removes all relation nodes with a certain relation manager that are attached to this node. |
StringList |
getAliases()
Returns all aliases for this node. |
boolean |
getBooleanValue(java.lang.String fieldName)
Returns the value of the specified field as a boolean. |
byte[] |
getByteValue(java.lang.String fieldName)
Returns the value of the specified field as a byte array. |
Cloud |
getCloud()
Returns the cloud this node belongs to. |
java.lang.String |
getContext()
Get the security context of the current Node |
double |
getDoubleValue(java.lang.String fieldName)
Returns the value of the specified field as a double. |
FieldValue |
getFieldValue(Field field)
Returns the value of the specified field as a FieldValue object. |
FieldValue |
getFieldValue(java.lang.String fieldName)
Returns the value of the specified field as a FieldValue object. |
float |
getFloatValue(java.lang.String fieldName)
Returns the value of the specified field as a float. |
FieldValue |
getFunctionValue(java.lang.String functionName,
java.util.List arguments)
Returns the value of the specified function on the node. |
int |
getIntValue(java.lang.String fieldName)
Returns the value of the specified field as an int. |
long |
getLongValue(java.lang.String fieldName)
Returns the value of the specified field as a long. |
NodeManager |
getNodeManager()
Returns the node manager for this node. |
Node |
getNodeValue(java.lang.String fieldName)
Returns the value of the specified field as a Node. |
int |
getNumber()
Returns the unique number for this node. |
java.lang.Object |
getObjectValue(java.lang.String fieldName)
Returns the field's value as an object. |
StringList |
getPossibleContexts()
Contacts the security implementation to find out to which other possible contextes the context of this node may be set. |
NodeList |
getRelatedNodes()
Returns all related nodes. |
NodeList |
getRelatedNodes(NodeManager nodeManager)
Returns all related nodes that have a specific node manager. |
NodeList |
getRelatedNodes(NodeManager nodeManager,
java.lang.String role,
java.lang.String searchDir)
Returns all related nodes that have a specific node manager and role. |
NodeList |
getRelatedNodes(java.lang.String nodeManager)
Returns all related nodes that have a specific node manager. |
NodeList |
getRelatedNodes(java.lang.String nodeManager,
java.lang.String role,
java.lang.String searchDir)
Returns all related nodes that have a specific node manager and role. |
RelationList |
getRelations()
Returns all relation nodes attached to this node. |
RelationList |
getRelations(java.lang.String role)
Returns all relation nodes attached to this node that have a specific role |
RelationList |
getRelations(java.lang.String role,
NodeManager nodeManager)
Returns all relation nodes attached to this node that have a specific role, or refer a node from a specific nodemanager |
RelationList |
getRelations(java.lang.String role,
NodeManager nodeManager,
java.lang.String searchDir)
|
RelationList |
getRelations(java.lang.String role,
java.lang.String nodeManager)
Returns all relation nodes attached to this node that have a specific role, or refer a node from a specific nodemanager |
java.lang.String |
getStringValue(java.lang.String fieldName)
Returns the value of the specified field as a String. |
java.lang.Object |
getValue(java.lang.String fieldName)
Returns the value of the specified field as an object. |
org.w3c.dom.Document |
getXMLValue(java.lang.String fieldName)
Returns the value of the specified field as a dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
org.w3c.dom.Element |
getXMLValue(java.lang.String fieldName,
org.w3c.dom.Document tree)
Returns the value of the specified field as a dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
boolean |
hasRelations()
Checks whether this node has any relations. |
boolean |
isNodeManager()
Determine whether this Node is a NodeManager. |
boolean |
isRelation()
Determine whether this Node is a Relation. |
boolean |
isRelationManager()
Determine whether this Node is a RelationManager. |
boolean |
mayChangeContext()
Check context-change rights on this node. |
boolean |
mayDelete()
Check delete rights on this node. |
boolean |
mayWrite()
Check write rights on this node. |
void |
setBooleanValue(java.lang.String fieldName,
boolean value)
Sets the value of the specified field using an boolean. |
void |
setByteValue(java.lang.String fieldName,
byte[] value)
Sets the value of the specified field using a byte array. |
void |
setContext(java.lang.String context)
Sets the security context of this Node (AKA the 'owner' field) |
void |
setDoubleValue(java.lang.String fieldName,
double value)
Sets the value of the specified field using a double. |
void |
setFloatValue(java.lang.String fieldName,
float value)
Sets the value of the specified field using a float. |
void |
setIntValue(java.lang.String fieldName,
int value)
Sets the value of the specified field using an int. |
void |
setLongValue(java.lang.String fieldName,
long value)
Sets the value of the specified field using a long. |
void |
setNodeValue(java.lang.String fieldName,
Node value)
Sets the value of the specified field using an Node. |
void |
setObjectValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of the specified field using an object. |
void |
setStringValue(java.lang.String fieldName,
java.lang.String value)
Sets the value of the specified field using a String. |
void |
setValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of the specified field using an object, but delegated to the right set--Value depending on the type of the field. |
void |
setXMLValue(java.lang.String fieldName,
org.w3c.dom.Document value)
Set's the value of the specified field as a dom.Element |
NodeManager |
toNodeManager()
Returns this as a NodeManager. |
Relation |
toRelation()
Returns this as a Relation. |
RelationManager |
toRelationManager()
Returns this as a RelationManager. |
java.lang.String |
toString()
Converts the node to a string |
| Method Detail |
public Cloud getCloud()
public NodeManager getNodeManager()
public int getNumber()
createAlias(String alias)public boolean isRelation()
true if this Node is a Relation.public Relation toRelation()
Relation object
ClasscastException - if the Node is not a Relationpublic boolean isNodeManager()
true if this Node is a NodeManager.public NodeManager toNodeManager()
NodeManager object
ClasscastException - if the Node is not a NodeManagerpublic boolean isRelationManager()
true if this Node is a RelationManager.public RelationManager toRelationManager()
NodeManager object
ClasscastException - if the Node is not a RelationManager
public void setValue(java.lang.String fieldName,
java.lang.Object value)
int can be set using an
Integer.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setObjectValue(java.lang.String fieldName,
java.lang.Object value)
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setBooleanValue(java.lang.String fieldName,
boolean value)
boolean.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setNodeValue(java.lang.String fieldName,
Node value)
Node.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setIntValue(java.lang.String fieldName,
int value)
int.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setFloatValue(java.lang.String fieldName,
float value)
float.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setDoubleValue(java.lang.String fieldName,
double value)
double.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setByteValue(java.lang.String fieldName,
byte[] value)
byte array.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setLongValue(java.lang.String fieldName,
long value)
long.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given field
public void setStringValue(java.lang.String fieldName,
java.lang.String value)
String.
This change will not be visible to the cloud until the commit method is
called.
fieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic java.lang.Object getValue(java.lang.String fieldName)
int is returned as an Integer.
The object type may vary and is dependent on how data was stored in a field.
I.e. It may be possible for an Integer field to return it's value as a String
if it was stored that way in the first place.
fieldName - the name of the field to be returned
public java.lang.Object getObjectValue(java.lang.String fieldName)
public boolean getBooleanValue(java.lang.String fieldName)
boolean.
If the actual value is numeric, this call returns true
if the value is a positive, non-zero, value. In other words, values '0'
and '-1' are concidered false.
If the value is a string, this call returns true if
the value is "true" or "yes" (case-insensitive).
In all other cases (including calling byte fields), false
is returned.
fieldName - the name of the field to be returned
public Node getNodeValue(java.lang.String fieldName)
Node.
If the value is not itself a Node, this call attempts to convert the
original field value to a Node, by trying to retrieve a Node using
the field value as a Node number or alias.null.
null lets the
Node return a reference to itself, regardless of the actual value of the
number field or status of the Node.
fieldName - the name of the field to be returned
Cloud.getList(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)public int getIntValue(java.lang.String fieldName)
int.
Numeric fields are simply converted. Double and float values may be truncated.
For Node values, the numeric key is returned.
Long values return -1 of the value is too large.
Boolean fields return 0 if false, and 1 if true.
String fields are parsed.
If a parsed string contains an error, ot the field value is not of a type that can be converted
(i.e. a byte array), this function returns -1
fieldName - the name of the field to be returned
public float getFloatValue(java.lang.String fieldName)
float.
This function attempts to convert the value to a float.
Numeric fields are simply converted.
Boolean fields return 0.0 if false, and 1.0 if true.
String fields are parsed.
If a parsed string contains an error, ot the field value is not of a type that can be converted
(i.e. a byte array), this function returns -1.0.
fieldName - the name of the field to be returned
public long getLongValue(java.lang.String fieldName)
long.
This function attempts to convert the value to a long.
Numeric fields are simply converted. Double and float values may be truncated.
Boolean fields return 0 if false, and 1 if true.
String fields are parsed.
If a parsed string contains an error, ot the field value is not of a type that can be converted
(i.e. a byte array), this function returns -1
fieldName - the name of the field to be returned
public double getDoubleValue(java.lang.String fieldName)
double.
This function attempts to convert the value to a double.
Numeric fields are simply converted. Double may be truncated.
Boolean fields return 0.0 if false, and 1.0 if true.
String fields are parsed.
If a parsed string contains an error, ot the field value is not of a type that can be converted
(i.e. a byte array), this function returns -1.0.
fieldName - the name of the field to be returned
public byte[] getByteValue(java.lang.String fieldName)
byte array.
This function returns either the value of a byte field, or the byte value of a string
(converted using the default encoding, i.e. UTF8)
Other types of values return an empty byte-array.
fieldName - the name of the field to be returned
public java.lang.String getStringValue(java.lang.String fieldName)
String.
Byte arrays are converted to string using the default encoding (UTF8).
Node values return a string representation of their numeric key.
For other values the result is calling the toString() method on the actual object.
fieldName - the name of the field to be returned
public FieldValue getFieldValue(java.lang.String fieldName)
throws NotFoundException
FieldValue object.
fieldName - the name of the field whose value to return
NotFoundException - is the field does not existpublic FieldValue getFieldValue(Field field)
FieldValue object.
field - the Field object whose value to return
public FieldValue getFunctionValue(java.lang.String functionName,
java.util.List arguments)
functionName - the name of the function to be executedarguments - parameters to the function
public void commit()
public void cancel()
public void delete()
public void delete(boolean deleteRelations)
deleteRelations - a boolean. If true, then first all
existing relations with this node will be removed.public java.lang.String toString()
public org.w3c.dom.Document getXMLValue(java.lang.String fieldName)
throws java.lang.IllegalArgumentException
dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
If the value cannot be converted, this method returns null
fieldName - the name of the field to be returned
null
java.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.
public org.w3c.dom.Element getXMLValue(java.lang.String fieldName,
org.w3c.dom.Document tree)
throws java.lang.IllegalArgumentException
dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
This method fails (throws a IllegalArgumentException) if the Field is not of type TYPE_XML.
If the value cannot be converted, this method returns null
fieldName - the name of the field to be returnedtree - the DOM Document to which the Element is added
(as the document root element)
null
java.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.
public void setXMLValue(java.lang.String fieldName,
org.w3c.dom.Document value)
dom.Element
fieldName - the name of the field to be returnedvalue - the DOM Document to has to be set, if not correct doc-type,
system will try to convert it to the wanted type.public boolean hasRelations()
true if the node has relationspublic void deleteRelations()
public void deleteRelations(java.lang.String relationManager)
relationManager - the name of the relation manager the removed
relation nodes should havepublic RelationList getRelations()
public RelationList getRelations(java.lang.String role)
role - the name of the role the returned
relation nodes should have
public RelationList getRelations(java.lang.String role,
java.lang.String nodeManager)
role - the name of the role the returned
relation nodes should havenodeManager - the name of the nodemanager for the nodes the returned
relation nodes should have a relation to
public RelationList getRelations(java.lang.String role,
NodeManager nodeManager)
role - the name of the role the returned
relation nodes should havenodeManager - the nodemanager for the nodes the returned
relation nodes should have a relation to (can be null)
public RelationList getRelations(java.lang.String role,
NodeManager nodeManager,
java.lang.String searchDir)
public int countRelations()
public int countRelations(java.lang.String relationManager)
public NodeList getRelatedNodes()
public NodeList getRelatedNodes(java.lang.String nodeManager)
nodeManager - the name of the node manager the returned nodes
should have
public NodeList getRelatedNodes(NodeManager nodeManager)
nodeManager - the node manager the returned nodes should have, can be null
public NodeList getRelatedNodes(java.lang.String nodeManager,
java.lang.String role,
java.lang.String searchDir)
nodeManager - the name of the node manager the returned nodes
should haverole - the role of the relationsearchDir - the direction of the relation
public NodeList getRelatedNodes(NodeManager nodeManager,
java.lang.String role,
java.lang.String searchDir)
nodeManager - the node manager the returned nodes should haverole - the role of the relationsearchDir - the direction of the relation
public int countRelatedNodes(java.lang.String type)
public int countRelatedNodes(NodeManager otherNodeManager,
java.lang.String role,
java.lang.String searchDir)
public StringList getAliases()
public void createAlias(java.lang.String alias)
alias - the alias to be created for this node
BridgeException - if the alias allready existspublic void deleteAlias(java.lang.String alias)
alias - the alias to be removed for this node
public Relation createRelation(Node destinationNode,
RelationManager relationManager)
destinationNode - the node to which you want to relate this noderelationManager - the relation manager you want to use
BridgeException - if the relation manager is not the right one
for this type of relationpublic void setContext(java.lang.String context)
context - The security context to which this node should belong,
java.lang.SecurityException - When appropriate rights to perform this are lacking (write / change context rights)public java.lang.String getContext()
java.lang.SecurityException - When appropriate rights to perform this are lacking (read rights)public StringList getPossibleContexts()
java.lang.SecurityException - When appropriate rights to perform this are lacking (read rights)public boolean mayWrite()
public boolean mayDelete()
public boolean mayChangeContext()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||