Package com.exedio.cope
Class DefaultChangeHook
java.lang.Object
com.exedio.cope.DefaultChangeHook
- All Implemented Interfaces:
ChangeHook
Implements a
ChangeHook that calls
static beforeNewCopeItem(SetValue[]),
Item.afterNewCopeItem,
Item.beforeSetCopeItem, and
Item.beforeDeleteCopeItem
according to their specifications.
Without this hook, these methods are not called at all.
If ModelBuilder.changeHooks
is not called, this hook is installed by default.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.exedio.cope.ChangeHook
ChangeHook.Factory -
Method Summary
Modifier and TypeMethodDescriptionvoidIs called after any item creation.voidbeforeDelete(Item item) Is called before any item deletion.SetValue<?>[]Is called before any item creation.SetValue<?>[]Is called before any item modification.static ChangeHook.Factoryfactory()toString()
-
Method Details
-
factory
-
beforeNew
Description copied from interface:ChangeHookIs called before any item creation. You may change the values of the newly created item by returning changedsetValues. The default implementation does nothing and returnssetValuesunmodified.- Specified by:
beforeNewin interfaceChangeHook
-
afterNew
Description copied from interface:ChangeHookIs called after any item creation. The default implementation does nothing.- Specified by:
afterNewin interfaceChangeHook- See Also:
-
beforeSet
Description copied from interface:ChangeHookIs called before any item modification. The default implementation does nothing.- Specified by:
beforeSetin interfaceChangeHooksetValues- is never null and never empty- Returns:
- must not return null
- See Also:
-
beforeDelete
Description copied from interface:ChangeHookIs called before any item deletion. The default implementation does nothing.- Specified by:
beforeDeletein interfaceChangeHook- See Also:
-
toString
-