Class AggregateChange<T>
- java.lang.Object
-
- net.officefloor.model.impl.change.AggregateChange<T>
-
-
Constructor Summary
Constructors Constructor Description AggregateChange(T target, java.lang.String changeDescription, Change<?>... changes)Initiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Change<T>aggregate(Change<T> change, Change<?>... changes)voidapply()Applies thisChange.booleancanApply()Indicates if can apply thisChange.java.lang.StringgetChangeDescription()Obtains a description of theChange.Conflict[]getConflicts()TgetTarget()Obtains the target to which thisChangeapplies.voidrevert()Reverts thisChange(after being applied).
-
-
-
Method Detail
-
getTarget
public T getTarget()
Description copied from interface:ChangeObtains the target to which thisChangeapplies.
-
getChangeDescription
public java.lang.String getChangeDescription()
Description copied from interface:ChangeObtains a description of theChange.- Specified by:
getChangeDescriptionin interfaceChange<T>- Returns:
- Description of the
Change.
-
canApply
public boolean canApply()
Description copied from interface:ChangeIndicates if can apply this
Change.Typically there will be
Conflictinstances providing detail on why theChangecan not be applied.- Specified by:
canApplyin interfaceChange<T>- Returns:
trueif can apply thisChange.- See Also:
Change.getConflicts()
-
revert
public void revert()
Description copied from interface:ChangeReverts this
Change(after being applied).This enables do/undo functionality.
-
getConflicts
public Conflict[] getConflicts()
Description copied from interface:ChangeObtains the
Conflictinstances preventing thisChangefrom being applied.A
Changecan only be applied if this returns an empty array.- Specified by:
getConflictsin interfaceChange<T>- Returns:
- Any
Conflictinstances preventing applying thisChange.
-
-