| java.lang.Object org.mmbase.bridge.util.AbstractNode
All known Subclasses: org.mmbase.bridge.util.AbstractNodeManager, org.mmbase.bridge.implementation.BasicNode, org.mmbase.bridge.implementation.VirtualNode, org.mmbase.bridge.util.MapNode,
AbstractNode | abstract public class AbstractNode implements Node(Code) | | Abstract implementation of Node.
All methods which are based on other methods are implemented
here, to minimalize the implementation effort of fully implemented Nodes.
author: Michiel Meeuwissen version: $Id: AbstractNode.java,v 1.22 2007/10/17 12:48:14 michiel Exp $ See Also: org.mmbase.bridge.Node since: MMBase-1.8 |
Method Summary | |
public void | cancel() | protected void | checkWrite() | public void | commit() | final public int | compareTo(Node o) Compares this node to the passed object.
Returns 0 if they are equal, -1 if the object passed is a NodeManager and larger than this manager,
and +1 if the object passed is a NodeManager and smaller than this manager.
This is used to sort Nodes.
A node is 'larger' than another node if its GUI() result is larger (alphabetically, case sensitive)
than that of the other node. | public int | countRelatedNodes(NodeManager otherNodeManager, String role, String direction) | public int | countRelatedNodes(String type) | final public int | countRelations() | final public int | countRelations(String type) | public void | createAlias(String aliasName) | protected FieldValue | createFunctionValue(Object result) | public Parameters | createParameters(String functionName) | public Relation | createRelation(Node destinationNode, RelationManager relationManager) | final public void | delete() | public void | delete(boolean deleteRelations) | public void | deleteAlias(String aliasName) | final public void | deleteRelations() | public void | deleteRelations(String type) | final public boolean | equals(Object o) Compares two nodes, and returns true if they are equal. | public StringList | getAliases() | public boolean | getBooleanValue(String fieldName) | public byte[] | getByteValue(String fieldName) | public Set<String> | getChanged() | public String | getContext() | public Date | getDateValue(String fieldName) | public double | getDoubleValue(String fieldName) | final public FieldValue | getFieldValue(String fieldName) | final public FieldValue | getFieldValue(Field field) | public float | getFloatValue(String fieldName) | final public Function> | getFunction(String functionName) | public FieldValue | getFunctionValue(String functionName, List parameters) | public java.io.InputStream | getInputStreamValue(String fieldName) | public int | getIntValue(String fieldName) | public List | getListValue(String fieldName) | public long | getLongValue(String fieldName) | protected Function> | getNodeFunction(String functionName) | public Node | getNodeValue(String fieldName) | public int | getNumber() | final public Object | getObjectValue(String fieldName) | public StringList | getPossibleContexts() | final public NodeList | getRelatedNodes() | final public NodeList | getRelatedNodes(String type) | final public NodeList | getRelatedNodes(NodeManager nodeManager) | final public NodeList | getRelatedNodes(String type, String role, String searchDir) | public NodeList | getRelatedNodes(NodeManager nodeManager, String role, String searchDir) | final public RelationList | getRelations() | final public RelationList | getRelations(String role) | final public RelationList | getRelations(String role, NodeManager nodeManager) | public RelationList | getRelations(String role, NodeManager nodeManager, String searchDir) | public RelationList | getRelations(String role, String nodeManager) | public String | getStringValue(String fieldName) | final public Object | getValue(String fieldName) | public Document | getXMLValue(String fieldName) | final public Element | getXMLValue(String fieldName, Document tree) | public boolean | hasRelations() | final public int | hashCode() | public boolean | isChanged(String fieldName) | public boolean | isChanged() | public boolean | isNew() | public boolean | isNodeManager() | public boolean | isNull(String fieldName) | public boolean | isRelation() | public boolean | isRelationManager() | public boolean | mayChangeContext() | public boolean | mayDelete() | public boolean | mayWrite() | final public void | processCommit() | protected Object | processNull(int type, Field field) | final public void | setBooleanValue(String fieldName, boolean value) | final public void | setByteValue(String fieldName, byte[] value) | public void | setContext(String context) | final public void | setDateValue(String fieldName, Date value) | final public void | setDoubleValue(String fieldName, double value) | final public void | setFloatValue(String fieldName, float value) | final public void | setInputStreamValue(String fieldName, InputStream value, long size) | final public void | setIntValue(String fieldName, int value) | final public void | setListValue(String fieldName, List value) | final public void | setLongValue(String fieldName, long value) | final public void | setNodeValue(String fieldName, Node value) | final public void | setObjectValue(String fieldName, Object value) | abstract protected void | setSize(String fieldName, long size) | final public void | setStringValue(String fieldName, String value) | final public void | setValue(String fieldName, Object value) | abstract protected void | setValueWithoutChecks(String fieldName, Object value) | public void | setValueWithoutProcess(String fieldName, Object value) Like setObjectValue, but without processing, this is called by the other set-values. | final public void | setXMLValue(String fieldName, Document value) | public NodeManager | toNodeManager() | protected Integer | toNodeNumber(Object v) A method to convert an object to an node number. | public Relation | toRelation() | public RelationManager | toRelationManager() | public Collection<String> | validate() |
cancel | public void cancel()(Code) | | |
checkWrite | protected void checkWrite()(Code) | | Throws exception if may not write current node
since: MMBase-1.9 |
commit | public void commit()(Code) | | |
compareTo | final public int compareTo(Node o)(Code) | | Compares this node to the passed object.
Returns 0 if they are equal, -1 if the object passed is a NodeManager and larger than this manager,
and +1 if the object passed is a NodeManager and smaller than this manager.
This is used to sort Nodes.
A node is 'larger' than another node if its GUI() result is larger (alphabetically, case sensitive)
than that of the other node. If the GUI() results are the same, the nodes are compared on number,
and (if needed) on their owning clouds.
Parameters: o - the object to compare it with 0 if they are equal, -1 if the object passed is a NodeManager and larger than this manager,and +1 if the object passed is a NodeManager and smaller than this manager. |
countRelatedNodes | public int countRelatedNodes(String type)(Code) | | |
countRelations | final public int countRelations()(Code) | | |
countRelations | final public int countRelations(String type)(Code) | | |
delete | final public void delete()(Code) | | |
delete | public void delete(boolean deleteRelations)(Code) | | |
deleteRelations | final public void deleteRelations()(Code) | | |
equals | final public boolean equals(Object o)(Code) | | Compares two nodes, and returns true if they are equal.
This effectively means that both objects are nodes, and they both have the same number and cloud
Parameters: o - the object to compare it with See Also: java.lang.Object.equals(java.lang.Object) |
getBooleanValue | public boolean getBooleanValue(String fieldName)(Code) | | |
getByteValue | public byte[] getByteValue(String fieldName)(Code) | | |
getDoubleValue | public double getDoubleValue(String fieldName)(Code) | | |
getFloatValue | public float getFloatValue(String fieldName)(Code) | | |
getLongValue | public long getLongValue(String fieldName)(Code) | | |
getNumber | public int getNumber()(Code) | | |
hasRelations | public boolean hasRelations()(Code) | | |
hashCode | final public int hashCode()(Code) | | |
isChanged | public boolean isChanged()(Code) | | |
isNew | public boolean isNew()(Code) | | |
isNodeManager | public boolean isNodeManager()(Code) | | |
isRelation | public boolean isRelation()(Code) | | |
isRelationManager | public boolean isRelationManager()(Code) | | |
mayChangeContext | public boolean mayChangeContext()(Code) | | |
mayDelete | public boolean mayDelete()(Code) | | |
mayWrite | public boolean mayWrite()(Code) | | |
processCommit | final public void processCommit()(Code) | | |
processNull | protected Object processNull(int type, Field field)(Code) | | since: MMBase-1.8.5 |
setBooleanValue | final public void setBooleanValue(String fieldName, boolean value)(Code) | | |
setByteValue | final public void setByteValue(String fieldName, byte[] value)(Code) | | |
setDoubleValue | final public void setDoubleValue(String fieldName, double value)(Code) | | |
setFloatValue | final public void setFloatValue(String fieldName, float value)(Code) | | |
setIntValue | final public void setIntValue(String fieldName, int value)(Code) | | |
setLongValue | final public void setLongValue(String fieldName, long value)(Code) | | |
setSize | abstract protected void setSize(String fieldName, long size)(Code) | | |
setValue | final public void setValue(String fieldName, Object value)(Code) | | Setting value with default method (depending on field's type)
Parameters: fieldName - name of the field Parameters: value - set value |
setValueWithoutChecks | abstract protected void setValueWithoutChecks(String fieldName, Object value)(Code) | | |
setValueWithoutProcess | public void setValueWithoutProcess(String fieldName, Object value)(Code) | | Like setObjectValue, but without processing, this is called by the other set-values.
Parameters: fieldName - name of field Parameters: value - new value of the field since: MMBase-1.7 |
toNodeNumber | protected Integer toNodeNumber(Object v)(Code) | | A method to convert an object to an node number.
Default impelmentation is reasonable, but does not support core objects.
|
|
|