|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.AbstractNode
org.mmbase.bridge.util.AbstractNodeManager
org.mmbase.bridge.mock.MockNodeManager
org.mmbase.bridge.mock.MockRelationManager
public class MockRelationManager
Straight-forward implementation of NodeManager based on a Map with DataType's.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.bridge.mock.MockNodeManager |
|---|
MockNodeManager.SystemField |
| Field Summary | |
|---|---|
protected String |
destination
|
protected String |
role
|
protected String |
source
|
| Fields inherited from class org.mmbase.bridge.mock.MockNodeManager |
|---|
context, functions, map, name, oType, parent, vcloud |
| Fields inherited from class org.mmbase.bridge.util.AbstractNodeManager |
|---|
cloud, values |
| Fields inherited from interface org.mmbase.bridge.RelationManager |
|---|
BIDIRECTIONAL, UNIDIRECTIONAL |
| Fields inherited from interface org.mmbase.bridge.NodeManager |
|---|
GUI_PLURAL, GUI_SINGULAR, ORDER_CREATE, ORDER_EDIT, ORDER_LIST, ORDER_NONE, ORDER_SEARCH |
| Fields inherited from interface org.mmbase.bridge.Node |
|---|
CLOUD_COMMITNODE_KEY |
| Constructor Summary | |
|---|---|
MockRelationManager(MockCloud cloud,
String r,
String source,
String destination)
|
|
| Method Summary | |
|---|---|
Relation |
createRelation(Node sourceNode,
Node destinationNode)
Adds a relation from this type. |
NodeManager |
getDestinationManager()
Retrieves the type of node that can act as the destination of a relation of this type. |
int |
getDirectionality()
Retrieves the directionality for this type (the default assigned to a new relation). |
String |
getForwardGUIName()
Retrieves the gui name (prompt) of the role from source to destination |
String |
getForwardRole()
Retrieves the role of the source to the destination |
String |
getReciprocalGUIName()
Retrieves the gui name (prompt) of the role from destination to source |
String |
getReciprocalRole()
Retrieves the role of the destination to the source |
RelationList |
getRelations(Node node)
Retrieves all the relations of this type from a given node. |
NodeManager |
getSourceManager()
Retrieves the NodeManager of node that can act as the source of a relation of this type. |
boolean |
mayCreateRelation(Node sourceNode,
Node destinationNode)
Check if the current user may create a new relation of this type between the specified nodes. |
| Methods inherited from class org.mmbase.bridge.mock.MockNodeManager |
|---|
createNode, getContext, getFieldTypes, getFunctions, getName, getParent, getProperties, mayCreateNode, setContext, setDefaultsWithCloud, toString |
| Methods inherited from class org.mmbase.bridge.util.AbstractNodeManager |
|---|
createFieldList, createNodeList, createQuery, createRelationList, edit, getAllowedRelations, getAllowedRelations, getAllowedRelations, getCloud, getDescendants, getDescription, getDescription, getField, getFields, getFields, getGUIName, getGUIName, getGUIName, getInfo, getInfo, getList, getList, getList, getList, getNodeManager, getProperty, getSize, getValueWithoutProcess, hasField, isNodeManager, setNodeManager, setSize, setValueWithoutChecks, toNodeManager |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mmbase.bridge.RelationManager |
|---|
createRelation |
| Methods inherited from interface org.mmbase.bridge.NodeManager |
|---|
createFieldList, createNode, createNodeList, createQuery, createRelationList, getAllowedRelations, getAllowedRelations, getAllowedRelations, getCloud, getDescendants, getDescription, getDescription, getField, getFields, getFields, getGUIName, getGUIName, getGUIName, getInfo, getInfo, getList, getList, getList, getList, getName, getParent, getProperties, getProperty, hasField, mayCreateNode |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected final String role
protected final String source
protected final String destination
| Constructor Detail |
|---|
public MockRelationManager(MockCloud cloud,
String r,
String source,
String destination)
| Method Detail |
|---|
public String getForwardRole()
RelationManager
getForwardRole in interface RelationManagerStringpublic String getReciprocalRole()
RelationManager
getReciprocalRole in interface RelationManagerStringpublic String getForwardGUIName()
RelationManager
getForwardGUIName in interface RelationManagerStringpublic String getReciprocalGUIName()
RelationManager
getReciprocalGUIName in interface RelationManagerStringpublic int getDirectionality()
RelationManager
getDirectionality in interface RelationManagerpublic NodeManager getSourceManager()
RelationManager
getSourceManager in interface RelationManagerpublic NodeManager getDestinationManager()
RelationManager
getDestinationManager in interface RelationManager
public Relation createRelation(Node sourceNode,
Node destinationNode)
RelationManager
createRelation in interface RelationManagersourceNode - the node from which you want to relatedestinationNode - the node to which you want to relate
public RelationList getRelations(Node node)
RelationManagerNode.getRelations(String, NodeManager, String).
getRelations in interface RelationManagernode - the node from which to give the relations
public boolean mayCreateRelation(Node sourceNode,
Node destinationNode)
RelationManager
mayCreateRelation in interface RelationManagersourceNode - source node of the relationdestinationNode - destination node of the relation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||