T
- as core event objectpublic class FlowStatusChangeListenerWrapperTransformer<T> extends ChangeListenerWrapperTransformer<SynchronousFlowStatusChange<T,List<Status>>>
ChangeListenerWrapperTransformer
that accepts only SynchronousOperationChange
type events
and if the ChangeListenerWrapperTransformer.getTransformer()
transformation is successful then adds a Status
INFO level or ERROR level to the feedback.predicate, transformer
Constructor and Description |
---|
FlowStatusChangeListenerWrapperTransformer() |
FlowStatusChangeListenerWrapperTransformer(org.apache.commons.collections.Transformer t) |
Modifier and Type | Method and Description |
---|---|
Object |
getErrorMessage()
If not null will be used to provide Feedback error message as
Status , String or Transformer on int (level of error).If null, then the actual Throwable.getMessage() will be used. |
Object |
getSuccessMessage()
If not null will be used to provide Feedback success message as
Status , String or Transformer on int (level of error) |
void |
onChange(ChangeGenerator<SynchronousFlowStatusChange<T,List<Status>>> changeGenerator,
SynchronousFlowStatusChange<T,List<Status>> modelObject) |
void |
setErrorMessage(Object errorMessage)
If not null will be used to provide Feedback error message as
Status , String or Transformer on int (level of error).If null, then the actual Throwable.getMessage() will be used. |
void |
setSuccessMessage(Object successMessage)
If not null will be used to provide Feedback success message as
Status , String or Transformer on int (level of error) |
getPredicate, getTransformer, setPredicate, setTransformer, transform
public FlowStatusChangeListenerWrapperTransformer()
public FlowStatusChangeListenerWrapperTransformer(org.apache.commons.collections.Transformer t)
public void onChange(ChangeGenerator<SynchronousFlowStatusChange<T,List<Status>>> changeGenerator, SynchronousFlowStatusChange<T,List<Status>> modelObject)
onChange
in interface ChangeListener<SynchronousFlowStatusChange<T,List<Status>>>
onChange
in class ChangeListenerWrapperTransformer<SynchronousFlowStatusChange<T,List<Status>>>
changeGenerator
- as the generator that caused the change. Specially useful if the Listener is subscribing to multiple ChangeGenerator
smodelObject
- as the model change communicatedpublic Object getSuccessMessage()
Status
, String or Transformer
on int (level of error)public void setSuccessMessage(Object successMessage)
Status
, String or Transformer
on int (level of error)public Object getErrorMessage()
Status
, String or Transformer
on int (level of error).Throwable.getMessage()
will be used.public void setErrorMessage(Object errorMessage)
Status
, String or Transformer
on int (level of error).Throwable.getMessage()
will be used.Copyright © 2018. All rights reserved.