Class TemplateMapping
- java.lang.Object
-
- com.broadleafcommerce.metadata.dsl.core.Mapping<TemplateMapping>
-
- com.broadleafcommerce.metadata.dsl.core.extension.mappings.TemplateMapping
-
- All Implemented Interfaces:
Copyable<TemplateMapping>
,Serializable
public class TemplateMapping extends Mapping<TemplateMapping> implements Serializable
An implementation ofMapping
for transforming a text property with a template.- Author:
- Nick Crum (ncrum)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TemplateMapping()
TemplateMapping(TemplateMapping mapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
TemplateMapping
copy()
boolean
equals(Object o)
String
getPath()
The name of the text property to transform.String
getTemplate()
The template to apply to the text property.int
hashCode()
TemplateMapping
path(String path)
Sets the text property path to transform.TemplateMapping
template(String template)
Sets the template to apply to the text property, for example, "Clone {name}"TemplateMapping
templateTransform(String path, String template)
Sets the text property path and the template value.
-
-
-
Constructor Detail
-
TemplateMapping
public TemplateMapping()
-
TemplateMapping
public TemplateMapping(TemplateMapping mapping)
-
-
Method Detail
-
copy
public TemplateMapping copy()
- Specified by:
copy
in interfaceCopyable<TemplateMapping>
- Returns:
- a deep copy of this instance
-
path
public TemplateMapping path(String path)
Sets the text property path to transform.- Parameters:
path
- the property path- Returns:
- the mapping
-
template
public TemplateMapping template(String template)
Sets the template to apply to the text property, for example, "Clone {name}"- Parameters:
template
- the template- Returns:
- the mapping
-
templateTransform
public TemplateMapping templateTransform(String path, String template)
Sets the text property path and the template value.- Parameters:
path
- the property pathtemplate
- the template- Returns:
- the mapping
-
getPath
public String getPath()
The name of the text property to transform.
-
getTemplate
public String getTemplate()
The template to apply to the text property.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classMapping<TemplateMapping>
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqual
in classMapping<TemplateMapping>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMapping<TemplateMapping>
-
-