Interface AttachmentEvents.Changing
- Enclosing class:
AttachmentEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A value is about to be added, changed or removed by code on this side (not by a sync from the server).
EventResultHolder.pass(): let it happen;deny(anything): cancel it;allow(value): storevalueinstead (it must be of the attachment's type).
Trackable value makes to itself can't be cancelled.-
Method Summary
Modifier and TypeMethodDescriptiononChanging(AttachmentHolder holder, Attachment<?> attachment, @Nullable Object oldValue, @Nullable Object newValue)
-
Method Details
-
onChanging
EventResultHolder<Object> onChanging(AttachmentHolder holder, Attachment<?> attachment, @Nullable @Nullable Object oldValue, @Nullable @Nullable Object newValue) - Parameters:
oldValue- the stored value,nullwhen there's none (an add)newValue- the value to store,nullfor a removal; for an in-placemodify, the same object asoldValue, not yet changed
-