Interface CloneModalFormAction<A extends CloneModalFormAction<A>>
-
- All Superinterfaces:
Action<A>
,Comparable<A>
,Copyable<A>
,FormAction<A>
,ModalFormAction<A>
,Serializable
- All Known Implementing Classes:
DefaultCloneModalFormAction
public interface CloneModalFormAction<A extends CloneModalFormAction<A>> extends ModalFormAction<A>
Extension ofModalFormAction
that is used for the cloning of new entities.- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CloneModalFormAction.Attributes
static class
CloneModalFormAction.EndpointTypes
-
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default A
addCloneEndpoint(Endpoint<?> endpoint)
Adds theCloneModalFormAction.EndpointTypes.CLONE
endpoint for the component.default A
cloneEndpoint(UnaryOperator<Endpoint<?>> fn)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint for the component.default A
cloneScope(String scope)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given scope.default A
cloneUrl(String url)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given url.default A
cloneUrl(String url, String scope)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given url and scope.default Optional<Endpoint<?>>
findCloneEndpoint()
Finds theCloneModalFormAction.EndpointTypes.CLONE
endpoint for this component.default Endpoint<?>
getCloneEndpoint()
Retrieves theCloneModalFormAction.EndpointTypes.CLONE
endpoint for this component.default A
redirectLink(Link link)
Defines a redirect to occur following a successful clone operation.default A
redirectLinkById(String componentId)
Defines a redirect to occur following a successful clone operation.default A
redirectLinkByPath(String path)
Defines a redirect to occur following a successful clone operation.default A
transformClone(Mapping<?>... mappings)
Configure a set ofMapping
to transform the cloned entity.default A
transformClone(UnaryOperator<List<Mapping<?>>> fn)
Configure a set ofMapping
to transform the cloned entity.default A
transformClone(List<Mapping<?>> mappings)
Configure a set ofMapping
to 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, type
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods 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, removeGroup
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
submitLabel, submitLabel
-
-
-
-
Method Detail
-
addCloneEndpoint
default A addCloneEndpoint(Endpoint<?> endpoint)
Adds theCloneModalFormAction.EndpointTypes.CLONE
endpoint for the component.- Parameters:
endpoint
- the endpoint- Returns:
- this
-
cloneEndpoint
default A cloneEndpoint(UnaryOperator<Endpoint<?>> fn)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint for the component.- Parameters:
fn
- the function to configure the endpoint- Returns:
- this
-
cloneUrl
default A cloneUrl(String url)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given url.- Parameters:
url
- the url- Returns:
- this
-
cloneScope
default A cloneScope(String scope)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given scope.- Parameters:
scope
- the scope- Returns:
- this
-
cloneUrl
default A cloneUrl(String url, String scope)
Configures theCloneModalFormAction.EndpointTypes.CLONE
endpoint with the given url and scope.- Parameters:
url
- the urlscope
- the scope- Returns:
- this
-
getCloneEndpoint
default Endpoint<?> getCloneEndpoint()
Retrieves theCloneModalFormAction.EndpointTypes.CLONE
endpoint for this component.- Returns:
- the endpoint if it exists
- See Also:
for null-safe operation
-
findCloneEndpoint
default Optional<Endpoint<?>> findCloneEndpoint()
Finds theCloneModalFormAction.EndpointTypes.CLONE
endpoint for this component.- Returns:
- an optional with the endpoint, or empty
-
redirectLink
default A redirectLink(Link link)
Defines a redirect to occur following a successful clone operation.- Parameters:
link
- the link to redirect to- Returns:
- this
-
redirectLinkByPath
default A redirectLinkByPath(String path)
Defines a redirect to occur following a successful clone operation.- Parameters:
path
- the path to redirect to- Returns:
- this
-
redirectLinkById
default A redirectLinkById(String componentId)
Defines a redirect to occur following a successful clone operation.- Parameters:
componentId
- the id of the component to redirect to- Returns:
- this
-
transformClone
default A transformClone(Mapping<?>... mappings)
Configure a set ofMapping
to 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
default A transformClone(List<Mapping<?>> mappings)
Configure a set ofMapping
to 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
default A transformClone(UnaryOperator<List<Mapping<?>>> fn)
Configure a set ofMapping
to 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
-
-