public interface BeforeModifyInstanceContext extends InstanceTriggerExecutionContext
InstanceTrigger.handleBeforeModify(BeforeModifyInstanceContext)
Modifier and Type | Method and Description |
---|---|
ValueChanges |
getChanges()
Returns the changes that will modify the current dataset.
|
Adaptation |
getDataset()
Returns the dataset to be modified.
|
ValueContext |
getDatasetContext()
Returns the dataset context for performing the update.
|
ValueContextForUpdate |
getDatasetContextForUpdate()
Returns the dataset context for performing the update.
|
boolean |
isAllPrivileges() |
void |
setAllPrivileges()
Disables all permission checks for all nodes
during the current operation.
|
getAdaptationHome
getSession
ValueChanges getChanges()
More precisely, the returned changes are those that are known just before entering
the trigger method handleBeforeModify
. If, during the execution
of this method, a ValueContextForUpdate.setValue...
is invoked,
it is not taken into account by the returned object. Such additional modifications are taken into
account after handleBeforeModify
, and the trigger can access them
(all changes) in handleAfterModify
.
ValueContextForUpdate getDatasetContextForUpdate()
read context
,
but allows setting additional data in the context.ValueContext getDatasetContext()
read context
,
but allows setting additional data in the context.Adaptation getDataset()
boolean isAllPrivileges()
setAllPrivileges()
void setAllPrivileges()
Using this method is not recommended, because the scope of the granted
privileges is very wide. It is instead recommended to use
ValueContextForUpdate.setPrivilegeForNode(com.orchestranetworks.schema.Path)
,
which allows to grant privilege to required nodes only.
As soon as these privileges are granted by this method, permission check for the specified node will be skipped during the whole operation.
For instance, given a user with read-only permission on the some updated nodes:
setAllPrivileges(false)
could still set a value for these nodes.The granted privilege will return to its previous state just after the update operation and before the invocation of after modify triggers.