org.nodal.model
Interface NodeContent.Editor
- All Superinterfaces:
- Content, Content.Editor, Node, NodeContent, NodeFactory, TxnMonitorable
- All Known Subinterfaces:
- MapNode.Editor, RecordNode.Editor, SequenceNode.Editor
- All Known Implementing Classes:
- BareContent.Editor
- Enclosing interface:
- NodeContent
- public static interface NodeContent.Editor
- extends NodeContent, NodeFactory, Content.Editor
Basic interface for modifying the contents of a Node.
Any instance of this is also one of a MapNode.Editor
,
RecordNode.Editor
or
SequenceNode.Editor
, depending on the content type.
This is also the normal way to access a NodeFactory
for creating
new Nodes. When treating a NodeEditor as a NodeFactory
, the new
Nodes created will inherit the non-content metadata from the Node
being edited, especially the Permission rules.
- Author:
- Lee Iverson
Method Summary |
NodeContent.Editor |
apply(Operator op)
Apply an Operator to modify this Node, or create a new Node. |
boolean |
commit()
Commit the current transaction to permanent storage. |
Txn |
txn()
Return the current Txn being managed by this Editor. |
Methods inherited from interface org.nodal.model.Node |
asAnchor, asMapNode, asRecordNode, asSequenceNode, bareNode, capability, content, edit, editMap, editRecord, editSequence, history, id, path, repository, type |
apply
public NodeContent.Editor apply(Operator op)
throws InvalidOperator,
ConstraintFailure
- Apply an Operator to modify this Node, or create a new Node.
- Throws:
InvalidOperator
ConstraintFailure
txn
public Txn txn()
- Return the current Txn being managed by this Editor.
- Returns:
- the current Txn being managed by this Editor
commit
public boolean commit()
- Commit the current transaction to permanent storage.
- Returns:
- true if successful