Interface CloneModalFormAction<A extends CloneModalFormAction<A>>
- All Superinterfaces:
Action<A>,Comparable<A>,Copyable<A>,FormAction<A>,ModalFormAction<A>,Serializable
- All Known Implementing Classes:
DefaultCloneModalFormAction
Extension of
ModalFormAction that is used for the cloning of new entities.- Author:
- Nick Crum (ncrum)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classNested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys -
Method Summary
Modifier and TypeMethodDescriptiondefault AaddCloneEndpoint(Endpoint<?> endpoint) Adds theCloneModalFormAction.EndpointTypes.CLONEendpoint for the component.default AcloneEndpoint(UnaryOperator<Endpoint<?>> fn) Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint for the component.default AcloneScope(String scope) Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given scope.default AConfigures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given url.default AConfigures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given url and scope.Finds theCloneModalFormAction.EndpointTypes.CLONEendpoint for this component.default Endpoint<?>Retrieves theCloneModalFormAction.EndpointTypes.CLONEendpoint for this component.default AredirectLink(Link link) Defines a redirect to occur following a successful clone operation.default AredirectLinkById(String componentId) Defines a redirect to occur following a successful clone operation.default AredirectLinkByPath(String path) Defines a redirect to occur following a successful clone operation.default AtransformClone(Mapping<?>... mappings) Configure a set ofMappingto transform the cloned entity.default AtransformClone(UnaryOperator<List<Mapping<?>>> fn) Configure a set ofMappingto transform the cloned entity.default AtransformClone(List<Mapping<?>> mappings) Configure a set ofMappingto transform the cloned entity.Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Action
addComponent, addComponents, addEndpoint, addEndpoint, apply, attribute, clearEndpoints, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAttribute, getAttribute, getAttributes, getComponent, getComponent, getComponents, getComponentsList, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOperationType, getOrder, getPlacement, getScope, getType, hasAttribute, hasComponent, hasEndpoint, id, label, label, operationType, order, placement, removeAttribute, removeComponent, removeEndpoint, scope, self, setAttributes, setComponents, setEndpoints, setId, setLabel, setOperationType, setOrder, setPlacement, setScope, setType, typeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
addExternal, addExternal, addField, addField, addField, addFormComponents, addGroup, addGroup, external, field, findExternal, findField, findGroup, getExternal, getField, getGroup, group, removeExternal, removeField, removeGroupMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
submitLabel, submitLabel
-
Method Details
-
addCloneEndpoint
Adds theCloneModalFormAction.EndpointTypes.CLONEendpoint for the component.- Parameters:
endpoint- the endpoint- Returns:
- this
-
cloneEndpoint
Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint for the component.- Parameters:
fn- the function to configure the endpoint- Returns:
- this
-
cloneUrl
Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given url.- Parameters:
url- the url- Returns:
- this
-
cloneScope
Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given scope.- Parameters:
scope- the scope- Returns:
- this
-
cloneUrl
Configures theCloneModalFormAction.EndpointTypes.CLONEendpoint with the given url and scope.- Parameters:
url- the urlscope- the scope- Returns:
- this
-
getCloneEndpoint
Retrieves theCloneModalFormAction.EndpointTypes.CLONEendpoint for this component.- Returns:
- the endpoint if it exists
- See Also:
-
findCloneEndpoint
Finds theCloneModalFormAction.EndpointTypes.CLONEendpoint for this component.- Returns:
- an optional with the endpoint, or empty
-
redirectLink
Defines a redirect to occur following a successful clone operation.- Parameters:
link- the link to redirect to- Returns:
- this
-
redirectLinkByPath
Defines a redirect to occur following a successful clone operation.- Parameters:
path- the path to redirect to- Returns:
- this
-
redirectLinkById
Defines a redirect to occur following a successful clone operation.- Parameters:
componentId- the id of the component to redirect to- Returns:
- this
-
transformClone
Configure a set ofMappingto transform the cloned entity.A common use case is to transform the name of an entity, for example:
cloneAction.transformClone(Mappings.templateTransform("name", "Clone of ${name}"));- Returns:
- this
-
transformClone
Configure a set ofMappingto transform the cloned entity.A common use case is to transform the name of an entity, for example:
cloneAction.transformClone( Arrays.asList(Mappings.templateTransform("name", "Clone of ${name}")));- Returns:
- this
-
transformClone
Configure a set ofMappingto transform the cloned entity.A common use case is to transform the name of an entity, for example:
cloneAction.transformClone( mappings -> mappings.add(Mappings.templateTransform("name", "Clone of ${name}")));- Returns:
- this
-