public class ComposedFlowActionHandler extends Object implements FlowActionHandler
FlowActionHandler
Sub handler should be defined in params using "handler:" prefix
<wz:parameter>
<wz:name>handler:savePicture</wz:name>
<wz:value>mediaReferenceCreateHandler</wz:value>
</wz:parameter>
Every handler will be invoked with paramsAll sub handlers will be called withFlowActionHandler.perform(CustomType, FlowActionHandlerAdapter, Map)which are prefixed with it's name e.g.<wz:parameter> <wz:name>savePicture:mediaProperty</wz:name> <wz:value>newProduct.picture</wz:value> </wz:parameter>
ProxyFlowActionHandlerAdapter which records actions invoked by all sub
handlers.| Modifier and Type | Field and Description |
|---|---|
static String |
HANDLER_NAME_POSTFIX |
static String |
PREFIX_HANDLER |
| Constructor and Description |
|---|
ComposedFlowActionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected ProxyFlowActionHandlerAdapter |
createProxyFlowActionAdapter(FlowActionHandlerAdapter handler) |
protected Map<String,String> |
extractHandlerParams(String handlerPrefix,
Map<String,String> parameters) |
protected Map<String,String> |
getHandlers(Map<String,String> parameters) |
String |
getProxyAdapterName() |
protected ProxyFlowActionHandlerAdapter |
loadAdapterBean(FlowActionHandlerAdapter handler) |
protected Optional<FlowActionHandler> |
loadHandler(String beanName) |
protected FlowActionHandler |
loadHandlerBean(String beanName) |
void |
perform(CustomType customType,
FlowActionHandlerAdapter adapter,
Map<String,String> parameters)
Method that is invoked when the custom button in the configurable flow widget is clicked - this method should
contain custom logic.
|
void |
setProxyAdapterName(String proxyAdapterName) |
public static final String PREFIX_HANDLER
public static final String HANDLER_NAME_POSTFIX
public void perform(CustomType customType, FlowActionHandlerAdapter adapter, Map<String,String> parameters)
FlowActionHandlerperform in interface FlowActionHandlercustomType - given step configurationadapter - adapter that controls the configurable widget flowparameters - current parametersprotected Optional<FlowActionHandler> loadHandler(String beanName)
protected FlowActionHandler loadHandlerBean(String beanName)
protected Map<String,String> extractHandlerParams(String handlerPrefix, Map<String,String> parameters)
protected ProxyFlowActionHandlerAdapter createProxyFlowActionAdapter(FlowActionHandlerAdapter handler)
protected ProxyFlowActionHandlerAdapter loadAdapterBean(FlowActionHandlerAdapter handler)
public void setProxyAdapterName(String proxyAdapterName)
public String getProxyAdapterName()
Copyright © 2018. All rights reserved.