|
||||||||||
| 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.MapNode<Object>
org.mmbase.bridge.mock.MockNode
public class MockNode
MockNodes belong to a MockCloud. They represent data in memory of a MockCloudContext. An even simpler
Node mocker is MapNode. This one is a bit more sophisticated because it does actually
implement methods commit() and isNew too.
| Field Summary | |
|---|---|
protected MockCloud |
cloud
|
| Fields inherited from class org.mmbase.bridge.util.MapNode |
|---|
nodeManager, originals, sizes, values, wrapper |
| Fields inherited from interface org.mmbase.bridge.Node |
|---|
CLOUD_COMMITNODE_KEY |
| Constructor Summary | |
|---|---|
MockNode(MockCloudContext.NodeDescription nodeDescription,
MockCloud cloud,
boolean isNew)
|
|
| Method Summary | |
|---|---|
void |
commit()
Commit the node to the database. |
void |
createAlias(String aliasName)
Create an alias for this node. |
void |
delete(boolean deleteRelations)
Removes the Node. |
void |
deleteAlias(String aliasName)
Delete an alias for this node. |
StringList |
getAliases()
Returns all aliases for this node. |
String |
getContext()
Get the security context of the current Node |
StringList |
getPossibleContexts()
Contacts the security implementation to find out to which other possible contexts the context of this node may be set. |
Object |
getValueWithoutProcess(String fieldName)
Like getObjectValue, but skips any processing that MMBase would normally perform on a field. |
boolean |
isNew()
Whether this Node is new (not yet committed). |
void |
setContext(String c)
Sets the security context of this Node (AKA the 'owner' field) |
String |
toString()
Converts the node to a string |
| Methods inherited from class org.mmbase.bridge.util.MapNode |
|---|
cancel, countRelatedNodes, countRelatedNodes, createRelation, createVirtualNodeManager, deleteRelations, edit, getCloud, getNodeManager, getNumber, getRelatedNodes, getRelations, getRelations, getSize, hasRelations, isChanged, isChanged, isNull, mayChangeContext, mayWrite, setNodeManager, setSize, setValueWithoutChecks, setValueWithoutProcess |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected final MockCloud cloud
| Constructor Detail |
|---|
MockNode(MockCloudContext.NodeDescription nodeDescription,
MockCloud cloud,
boolean isNew)
| Method Detail |
|---|
public void commit()
Node
commit in interface Nodecommit in class MapNode<Object>public Object getValueWithoutProcess(String fieldName)
Node
getValueWithoutProcess in interface NodegetValueWithoutProcess in class MapNode<Object>fieldName - name of field
public String getContext()
Node
getContext in interface NodegetContext in class AbstractNodepublic void setContext(String c)
Node
setContext in interface NodesetContext in class AbstractNodec - The security context to which this node should belong,public StringList getPossibleContexts()
Node
getPossibleContexts in interface NodegetPossibleContexts in class AbstractNodepublic boolean isNew()
Node
isNew in interface NodeisNew in class MapNode<Object>true when newpublic String toString()
Node
toString in interface NodetoString in class MapNode<Object>public StringList getAliases()
Node
getAliases in interface NodegetAliases in class MapNode<Object>public void createAlias(String aliasName)
Node
createAlias in interface NodecreateAlias in class AbstractNodealiasName - the alias to be created for this nodepublic void deleteAlias(String aliasName)
Node
deleteAlias in interface NodedeleteAlias in class AbstractNodealiasName - the alias to be removed for this nodepublic void delete(boolean deleteRelations)
Node
delete in interface Nodedelete in class MapNode<Object>deleteRelations - a boolean. If true, then first all
existing relations with this node will be removed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||