Class CustomContentField
java.lang.Object
com.broadleafcommerce.content.domain.CustomContentField
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class CustomContentField
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents the definition of a
FieldData. This includes its type and other metadata.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAdditional attributes needed to further define this fieldcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.Configures the hydration endpoint for the lookup.getId()A unique id for the field.Sets the name of the label key.getName()A unique name for the custom content field.The options for the field.getType()The type of this custom content fieldgetUrl()Configure the read endpoint for the lookup.Sets the name of the value key.inthashCode()booleanisMulti()Configures whether the field supports multi-selection.voidsetAttributes(Map<String, Object> attributes) Additional attributes needed to further define this fieldvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetHydrateUrl(String hydrateUrl) Configures the hydration endpoint for the lookup.voidA unique id for the field.voidsetLabelKey(String labelKey) Sets the name of the label key.voidsetMulti(boolean multi) Configures whether the field supports multi-selection.voidA unique name for the custom content field.voidsetOptions(List<CustomContentFieldOption> options) The options for the field.voidThe type of this custom content fieldvoidConfigure the read endpoint for the lookup.voidsetValueKey(String valueKey) Sets the name of the value key.toString()
-
Constructor Details
-
CustomContentField
public CustomContentField()
-
-
Method Details
-
getId
A unique id for the field.- Returns:
- the unique id for the field
-
getName
A unique name for the custom content field.- Returns:
- a unique name for the custom content field
-
getType
The type of this custom content field- Returns:
- the type of this field
-
getUrl
Configure the read endpoint for the lookup. This endpoint tells the lookup where it can go to retrieve the options the user chooses from.- Returns:
- the read endpoint for the lookup
-
getHydrateUrl
Configures the hydration endpoint for the lookup. This endpoint tells the lookup where to can go to retrieve the hydrated option for the current value. This endpoint is used when the component mounts to hydrate the option associated with the stored value.- Returns:
- the hydration endpoint for the lookup
-
getLabelKey
Sets the name of the label key. It can contain the template to create more complicated labels. For example to display the label like `Name (id)` the template like `${name} - (${id})` can be used.- Returns:
- the label key
-
getValueKey
Sets the name of the value key.- Returns:
- this
-
isMulti
public boolean isMulti()Configures whether the field supports multi-selection.- Returns:
- whether the field supports multi-selection
-
getOptions
The options for the field. This is used when the type is ENUM. -
getAttributes
Additional attributes needed to further define this field- Returns:
- additional attributes needed to further define this field
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
A unique id for the field.- Parameters:
id- the unique id for the field
-
setName
A unique name for the custom content field.- Parameters:
name- a unique name for the custom content field
-
setType
The type of this custom content field- Parameters:
type- the type of this field
-
setUrl
Configure the read endpoint for the lookup. This endpoint tells the lookup where it can go to retrieve the options the user chooses from.- Parameters:
url- the read endpoint for the lookup
-
setHydrateUrl
Configures the hydration endpoint for the lookup. This endpoint tells the lookup where to can go to retrieve the hydrated option for the current value. This endpoint is used when the component mounts to hydrate the option associated with the stored value.- Parameters:
hydrateUrl- the hydration endpoint for the lookup
-
setLabelKey
Sets the name of the label key. It can contain the template to create more complicated labels. For example to display the label like `Name (id)` the template like `${name} - (${id})` can be used.- Parameters:
labelKey- the label key
-
setValueKey
Sets the name of the value key.- Parameters:
valueKey- the label key
-
setMulti
public void setMulti(boolean multi) Configures whether the field supports multi-selection.- Parameters:
multi- whether the field supports multi-selection
-
setOptions
The options for the field. This is used when the type is ENUM. -
setAttributes
Additional attributes needed to further define this field- Parameters:
attributes- additional information used by this field
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-