public interface UpdatableItemStateManager extends ItemStateManager
ItemStateManager
that allows updating
items.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel an update operation.
|
PropertyState |
createNew(Name propName,
NodeId parentId)
Creates a
PropertyState instance representing new,
i.e. |
NodeState |
createNew(NodeId id,
Name nodeTypeName,
NodeId parentId)
Creates a
NodeState instance representing new,
i.e. |
void |
destroy(ItemState state)
Destroy an item state.
|
void |
dispose()
Disposes this
UpdatableItemStateManager and frees resources. |
void |
edit()
Start an edit operation on items inside this manager.
|
boolean |
inEditMode()
Returns
true if this manager is in edit mode i.e. |
void |
store(ItemState state)
Store an item state.
|
void |
update()
End an update operation.
|
getItemState, getNodeReferences, hasItemState, hasNodeReferences
void edit() throws IllegalStateException
update()
or cancel()
must be invoked.IllegalStateException
- if the manager is already in edit mode.boolean inEditMode()
true
if this manager is in edit mode i.e.
if an edit operation has been started by invoking edit()
,
otherwise returns false
.true
if this manager is in edit mode, otherwise
false
NodeState createNew(NodeId id, Name nodeTypeName, NodeId parentId) throws RepositoryException
NodeState
instance representing new,
i.e. not yet existing state. Call store(org.apache.jackrabbit.core.state.ItemState)
on the returned object to make it persistent.id
- the id of the node, or null
for a new node idnodeTypeName
- The node type nameparentId
- parent node's idRepositoryException
- if the node state can not be createdPropertyState createNew(Name propName, NodeId parentId) throws IllegalStateException
PropertyState
instance representing new,
i.e. not yet existing state. Call store(org.apache.jackrabbit.core.state.ItemState)
on the returned object to make it persistent.propName
- property nameparentId
- parent node IdIllegalStateException
- if the manager is not in edit mode.void store(ItemState state) throws IllegalStateException
state
- item state that should be storedIllegalStateException
- if the manager is not in edit mode.void destroy(ItemState state) throws IllegalStateException
state
- item state that should be destroyedIllegalStateException
- if the manager is not in edit mode.void cancel() throws IllegalStateException
IllegalStateException
- if the manager is not in edit mode.void update() throws ReferentialIntegrityException, StaleItemStateException, ItemStateException, IllegalStateException
ReferentialIntegrityException
- if a new or modified REFERENCE
property refers to a non-existent
target or if a removed node is still
being referencedStaleItemStateException
- if at least one of the affected items
has become stale in the meantimeItemStateException
- if the operation failed for another reasonIllegalStateException
- if the manager is not in edit mode.void dispose()
UpdatableItemStateManager
and frees resources.Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.