com.elasticpath.domain.skuconfiguration
Interface SkuOption

All Superinterfaces:
java.lang.Cloneable, Entity, EpDomain, Persistence, java.io.Serializable
All Known Implementing Classes:
SkuOptionImpl

public interface SkuOption
extends Entity, java.lang.Cloneable

Represents a SKU option that can be configured.


Field Summary
static java.lang.String LOCALIZED_PROPERTY_DISPLAY_NAME
          The name of localized property -- display name.
 
Method Summary
 void addOptionValue(SkuOptionValue optionValue)
          Add an option value to the set of available values.
 java.lang.Object clone()
          Create a shallow of this SkuOption.
 boolean contains(java.lang.String valueCode)
          Returns true if this SkuOption contains the given value code.
 SkuOptionValue getDefaultOptionValue()
          Get the option value that has been designated the default value if no option has yet been selected.
 LocalizedProperties getLocalizedProperties()
          Returns the LocalizedProperties.
 java.lang.String getOptionKey()
          Get the key of this SKU option (e.g.
 SkuOptionValue getOptionValue(java.lang.String valueCode)
          Returns the corresponding SkuOptionValue of the given value code.
 java.util.Map getOptionValueMap()
          Get the available values for this SKU option.
 java.util.Collection getOptionValues()
          Get the available values for this SKU option.
 int getOrdering()
          Get the order in which this SKU option should appear.
 void setDefaultOptionValue(SkuOptionValue defaultOptionValue)
          Set the option value that is to appear by default if no option has yet been selected.
 void setOptionKey(java.lang.String optionKey)
          Set the key of this SKU option.
 void setOptionValueMap(java.util.Map optionValueMap)
          Set the available values for this SKU option.
 void setOptionValues(java.util.Set optionValues)
          Sets the available values for this SKU option.
 void setOrdering(int order)
          Set the order in which this SKU option should appear.
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

LOCALIZED_PROPERTY_DISPLAY_NAME

static final java.lang.String LOCALIZED_PROPERTY_DISPLAY_NAME
The name of localized property -- display name.

See Also:
Constant Field Values
Method Detail

addOptionValue

void addOptionValue(SkuOptionValue optionValue)
Add an option value to the set of available values.

Parameters:
optionValue - an OptionValue

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Create a shallow of this SkuOption.

Returns:
a shallow copy
Throws:
java.lang.CloneNotSupportedException - if the object cannot be cloned

contains

boolean contains(java.lang.String valueCode)
Returns true if this SkuOption contains the given value code.

Parameters:
valueCode - the sku option value code
Returns:
true if this SkuOption contains the given value code

getDefaultOptionValue

SkuOptionValue getDefaultOptionValue()
Get the option value that has been designated the default value if no option has yet been selected. Note that the default option value is computed based on the default SKU and is not persisted

Returns:
the default SkuOptionValue

getLocalizedProperties

LocalizedProperties getLocalizedProperties()
Returns the LocalizedProperties.

Returns:
the LocalizedProperties

getOptionKey

java.lang.String getOptionKey()
Get the key of this SKU option (e.g. Color).

Returns:
the SKU option name.

getOptionValue

SkuOptionValue getOptionValue(java.lang.String valueCode)
Returns the corresponding SkuOptionValue of the given value code.

Parameters:
valueCode - the sku option value code
Returns:
the corresponding SkuOptionValue of the given value code

getOptionValueMap

java.util.Map getOptionValueMap()
Get the available values for this SKU option.

Returns:
a map of SkuValues

getOptionValues

java.util.Collection getOptionValues()
Get the available values for this SKU option.

Returns:
a collection of SkuValues

getOrdering

int getOrdering()
Get the order in which this SKU option should appear.

Returns:
the order number

setDefaultOptionValue

void setDefaultOptionValue(SkuOptionValue defaultOptionValue)
Set the option value that is to appear by default if no option has yet been selected. Note that the default option value is computed based on the default SKU and is not persisted

Parameters:
defaultOptionValue - the default SkuOptionValue

setOptionKey

void setOptionKey(java.lang.String optionKey)
Set the key of this SKU option.

Parameters:
optionKey - the key of the option (e.g. Color).

setOptionValueMap

void setOptionValueMap(java.util.Map optionValueMap)
Set the available values for this SKU option.

Parameters:
optionValueMap - the map of SkuValues.

setOptionValues

void setOptionValues(java.util.Set optionValues)
Sets the available values for this SKU option.

Parameters:
optionValues - a set of SkuOptionValues

setOrdering

void setOrdering(int order)
Set the order in which this SKU option should appear.

Parameters:
order - the ordering number