Interface DataObjectModification<T extends DataObject>
- Type Parameters:
T
- Type of modified object
public interface DataObjectModification<T extends DataObject>
Modified Data Object. Represents a modification of DataObject, which has a few kinds as indicated by
getModificationType()
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Represents type of modification which has occurred. -
Method Summary
Modifier and TypeMethodDescription@Nullable T
Returns after-state of top level container.@Nullable T
Returns before-state of top level container.dataType()
Returns type of modified object.default @Nullable T
Deprecated, for removal: This API element is subject to removal in a future version.default @Nullable T
Deprecated, for removal: This API element is subject to removal in a future version.UsedataBefore()
instead.Deprecated, for removal: This API element is subject to removal in a future version.UsedataType()
instead.default @NonNull ExactDataObjectStep<T>
Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull DataObjectModification.ModificationType
Deprecated, for removal: This API element is subject to removal in a future version.<C extends Augmentation<T> & DataObject>
@Nullable DataObjectModification<C>getModifiedAugmentation
(@NonNull Class<C> augmentation) Returns augmentation child modification ifaugmentation
was modified by this modification.@Nullable DataObjectModification<? extends DataObject>
getModifiedChild
(ExactDataObjectStep<?> childArgument) Returns a child modification if a node identified bychildArgument
was modified by this modification.<C extends ChildOf<? super T>>
@Nullable DataObjectModification<C>getModifiedChildContainer
(@NonNull Class<C> child) Returns container child modification ifchild
was modified by this modification.<H extends ChoiceIn<? super T> & DataObject,
C extends ChildOf<? super H>>
@Nullable DataObjectModification<C>getModifiedChildContainer
(@NonNull Class<H> caseType, @NonNull Class<C> child) Returns container child modification ifchild
was modified by this modification.<H extends ChoiceIn<? super T> & DataObject,
C extends KeyAware<K> & ChildOf<? super H>, K extends Key<C>>
@Nullable DataObjectModification<C>getModifiedChildListItem
(@NonNull Class<H> caseType, @NonNull Class<C> listItem, @NonNull K listKey) Returns child list item modification ifchild
was modified by this modification.<N extends KeyAware<K> & ChildOf<? super T>,
K extends Key<N>>
@Nullable DataObjectModification<N>getModifiedChildListItem
(@NonNull Class<N> listItem, @NonNull K listKey) Returns child list item modification ifchild
was modified by this modification.default @NonNull Collection<? extends DataObjectModification<? extends DataObject>>
Deprecated, for removal: This API element is subject to removal in a future version.UsemodifiedChildren()
instead.<C extends ChildOf<? super T>>
Collection<DataObjectModification<C>>getModifiedChildren
(@NonNull Class<C> childType) Returns child list item modification ifchild
was modified by this modification.<H extends ChoiceIn<? super T> & DataObject,
C extends ChildOf<? super H>>
Collection<DataObjectModification<C>>getModifiedChildren
(@NonNull Class<H> caseType, @NonNull Class<C> childType) Returns child list item modification ifchild
was modified by this modification.Returns type of modification.@NonNull Collection<? extends DataObjectModification<? extends DataObject>>
Returns unmodifiable collection of modified direct children.@NonNull ExactDataObjectStep<T>
step()
Return theInstanceIdentifier
step this modification corresponds to.
-
Method Details
-
getIdentifier
@Deprecated(since="13.0.0", forRemoval=true) default @NonNull ExactDataObjectStep<T> getIdentifier()Deprecated, for removal: This API element is subject to removal in a future version. -
step
@NonNull ExactDataObjectStep<T> step()Return theInstanceIdentifier
step this modification corresponds to.- Returns:
- the
InstanceIdentifier
step this modification corresponds to
-
dataType
Returns type of modified object.- Returns:
- type of modified object.
-
getDataType
Deprecated, for removal: This API element is subject to removal in a future version.UsedataType()
instead.Returns type of modified object.- Returns:
- type of modified object.
-
modificationType
@NonNull DataObjectModification.ModificationType modificationType()Returns type of modification.- Returns:
- type of performed modification.
-
getModificationType
@Deprecated(since="13.0.0", forRemoval=true) default @NonNull DataObjectModification.ModificationType getModificationType()Deprecated, for removal: This API element is subject to removal in a future version.Returns type of modification.- Returns:
- type Type of performed modification.
-
dataBefore
@Nullable T dataBefore()Returns before-state of top level container. Implementations are encouraged, but not required to provide this state.- Returns:
- State of object before modification. Null if subtree was not present, or the implementation cannot provide the state.
-
getDataBefore
Deprecated, for removal: This API element is subject to removal in a future version.UsedataBefore()
instead.Returns before-state of top level container. Implementations are encouraged, but not required to provide this state.- Returns:
- State of object before modification. Null if subtree was not present, or the implementation cannot provide the state.
-
dataAfter
@Nullable T dataAfter()Returns after-state of top level container.- Returns:
- State of object after modification. Null if subtree is not present.
-
getDataAfter
Deprecated, for removal: This API element is subject to removal in a future version.UsedataAfter()
instead.Returns after-state of top level container.- Returns:
- State of object after modification. Null if subtree is not present.
-
modifiedChildren
@NonNull Collection<? extends DataObjectModification<? extends DataObject>> modifiedChildren()Returns unmodifiable collection of modified direct children.- Returns:
- unmodifiable collection of modified direct children.
-
getModifiedChildren
@Deprecated(since="13.0.0", forRemoval=true) default @NonNull Collection<? extends DataObjectModification<? extends DataObject>> getModifiedChildren()Deprecated, for removal: This API element is subject to removal in a future version.UsemodifiedChildren()
instead.Returns unmodifiable collection of modified direct children.- Returns:
- unmodifiable collection of modified direct children.
-
getModifiedChildren
<C extends ChildOf<? super T>> Collection<DataObjectModification<C>> getModifiedChildren(@NonNull Class<C> childType) Returns child list item modification ifchild
was modified by this modification.- Parameters:
childType
- Type of list item - must be list item with key- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedchildType
class is not valid child according to generated model.
-
getModifiedChildren
<H extends ChoiceIn<? super T> & DataObject,C extends ChildOf<? super H>> Collection<DataObjectModification<C>> getModifiedChildren(@NonNull Class<H> caseType, @NonNull Class<C> childType) Returns child list item modification ifchild
was modified by this modification. This method should be used if the child is defined in a grouping brought into a case inside this object.- Parameters:
caseType
- Case type classchildType
- Type of list item - must be list item with key- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedchildType
class is not valid child according to generated model.
-
getModifiedChildContainer
<H extends ChoiceIn<? super T> & DataObject,C extends ChildOf<? super H>> @Nullable DataObjectModification<C> getModifiedChildContainer(@NonNull Class<H> caseType, @NonNull Class<C> child) Returns container child modification ifchild
was modified by this modification. This method should be used if the child is defined in a grouping brought into a case inside this object.For accessing all modified list items consider iterating over
getModifiedChildren()
.- Parameters:
caseType
- Case type classchild
- Type of child - must be only container- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedchild
class is not valid child according to generated model.
-
getModifiedChildContainer
<C extends ChildOf<? super T>> @Nullable DataObjectModification<C> getModifiedChildContainer(@NonNull Class<C> child) Returns container child modification ifchild
was modified by this modification.For accessing all modified list items consider iterating over
getModifiedChildren()
.- Parameters:
child
- Type of child - must be only container- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedchild
class is not valid child according to generated model.
-
getModifiedAugmentation
<C extends Augmentation<T> & DataObject> @Nullable DataObjectModification<C> getModifiedAugmentation(@NonNull Class<C> augmentation) Returns augmentation child modification ifaugmentation
was modified by this modification.For accessing all modified list items consider iterating over
getModifiedChildren()
.- Parameters:
augmentation
- Type of augmentation - must be only container- Returns:
- Modification of
augmentation
ifaugmentation
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedaugmentation
class is not valid augmentation according to generated model.
-
getModifiedChildListItem
<N extends KeyAware<K> & ChildOf<? super T>,K extends Key<N>> @Nullable DataObjectModification<N> getModifiedChildListItem(@NonNull Class<N> listItem, @NonNull K listKey) Returns child list item modification ifchild
was modified by this modification.- Parameters:
listItem
- Type of list item - must be list item with keylistKey
- List item key- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedlistItem
class is not valid child according to generated model.
-
getModifiedChildListItem
<H extends ChoiceIn<? super T> & DataObject,C extends KeyAware<K> & ChildOf<? super H>, @Nullable DataObjectModification<C> getModifiedChildListItemK extends Key<C>> (@NonNull Class<H> caseType, @NonNull Class<C> listItem, @NonNull K listKey) Returns child list item modification ifchild
was modified by this modification.- Parameters:
listItem
- Type of list item - must be list item with keylistKey
- List item key- Returns:
- Modification of
child
ifchild
was modified, null otherwise. - Throws:
IllegalArgumentException
- If suppliedlistItem
class is not valid child according to generated model.
-
getModifiedChild
@Nullable DataObjectModification<? extends DataObject> getModifiedChild(ExactDataObjectStep<?> childArgument) Returns a child modification if a node identified bychildArgument
was modified by this modification.- Parameters:
childArgument
-ExactDataObjectStep
of child node- Returns:
- Modification of child identified by
childArgument
ifchildArgument
was modified,null
otherwise - Throws:
IllegalArgumentException
- If supplied step is not valid child according to generated model
-
dataAfter()
instead.