java.lang.Object
de.hybris.platform.sap.productconfig.runtime.interf.model.impl.BaseModelImpl
de.hybris.platform.sap.productconfig.runtime.interf.model.impl.CsticModelImpl
All Implemented Interfaces:
BaseModel, CsticModel, Cloneable

public class CsticModelImpl extends BaseModelImpl implements CsticModel
Default implementation of the CsticModel
  • Constructor Details

    • CsticModelImpl

      public CsticModelImpl()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface CsticModel
      Returns:
      the characteristic name
    • setName

      public void setName(String name)
      Specified by:
      setName in interface CsticModel
      Parameters:
      name - characteristic name
    • getLanguageDependentName

      public String getLanguageDependentName()
      Specified by:
      getLanguageDependentName in interface CsticModel
      Returns:
      the characteristic language dependent name
    • setLanguageDependentName

      public void setLanguageDependentName(String languageDependentName)
      Specified by:
      setLanguageDependentName in interface CsticModel
      Parameters:
      languageDependentName - characteristic language dependent name
    • getLongText

      public String getLongText()
      Description copied from interface: CsticModel
      Get the long text description for a cstic, which will be displayed under the cstic name in the UI
      Specified by:
      getLongText in interface CsticModel
      Returns:
      The long text value
    • setLongText

      public void setLongText(String longText)
      Description copied from interface: CsticModel
      Set the long text, which will be displayed under the Cstic name in the UI
      Specified by:
      setLongText in interface CsticModel
      Parameters:
      longText - Description for the cstic
    • getAssignableValues

      public List<CsticValueModel> getAssignableValues()
      Specified by:
      getAssignableValues in interface CsticModel
      Returns:
      an unmodifiable list of all assignable values
    • setAssignableValues

      public void setAssignableValues(List<CsticValueModel> assignableValues)
      Specified by:
      setAssignableValues in interface CsticModel
      Parameters:
      assignableValues - list of all assignable values
    • getAssignedValues

      public List<CsticValueModel> getAssignedValues()
      Specified by:
      getAssignedValues in interface CsticModel
      Returns:
      an unmodifiable list of all assigned values
    • setAssignedValues

      public void setAssignedValues(List<CsticValueModel> assignedValues)
      Specified by:
      setAssignedValues in interface CsticModel
      Parameters:
      assignedValues - list of all assigned values
    • setAssignedValuesWithoutCheckForChange

      public void setAssignedValuesWithoutCheckForChange(List<CsticValueModel> assignedValues)
      Description copied from interface: CsticModel
      sets assigned value without to check whether the characteristic was changed
      Specified by:
      setAssignedValuesWithoutCheckForChange in interface CsticModel
      Parameters:
      assignedValues - list of all assigned values
    • getValueType

      public int getValueType()
      Specified by:
      getValueType in interface CsticModel
      Returns:
      the value type
    • setValueType

      public void setValueType(int valueType)
      Specified by:
      setValueType in interface CsticModel
      Parameters:
      valueType - value type
    • getTypeLength

      public int getTypeLength()
      Specified by:
      getTypeLength in interface CsticModel
      Returns:
      the length of the characteristic value type
    • setTypeLength

      public void setTypeLength(int typeLength)
      Specified by:
      setTypeLength in interface CsticModel
      Parameters:
      typeLength - length of the characteristic value type
    • getNumberScale

      public int getNumberScale()
      Specified by:
      getNumberScale in interface CsticModel
      Returns:
      the number scale
    • setNumberScale

      public void setNumberScale(int numberScale)
      Specified by:
      setNumberScale in interface CsticModel
      Parameters:
      numberScale - the number scale
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface CsticModel
      Returns:
      true if the characteristic is visible
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface CsticModel
      Parameters:
      visible - flag indicating whether the characteristic is visible
    • isConsistent

      public boolean isConsistent()
      Specified by:
      isConsistent in interface CsticModel
      Returns:
      true if the characteristic is consistent
    • setConsistent

      public void setConsistent(boolean consistent)
      Specified by:
      setConsistent in interface CsticModel
      Parameters:
      consistent - flag indicating whether the characteristic is consistent
    • isComplete

      public boolean isComplete()
      Specified by:
      isComplete in interface CsticModel
      Returns:
      true if the characteristic is complete
    • setComplete

      public void setComplete(boolean complete)
      Specified by:
      setComplete in interface CsticModel
      Parameters:
      complete - flag indicating whether the characteristic is complete
    • isReadonly

      public boolean isReadonly()
      Specified by:
      isReadonly in interface CsticModel
      Returns:
      true if the characteristic is read only
    • setReadonly

      public void setReadonly(boolean readonly)
      Specified by:
      setReadonly in interface CsticModel
      Parameters:
      readonly - flag indicating whether the characteristic is read only
    • isRequired

      public boolean isRequired()
      Specified by:
      isRequired in interface CsticModel
      Returns:
      true if the characteristic is required
    • setRequired

      public void setRequired(boolean required)
      Specified by:
      setRequired in interface CsticModel
      Parameters:
      required - flag indicating whether the characteristic is required
    • isMultivalued

      public boolean isMultivalued()
      Specified by:
      isMultivalued in interface CsticModel
      Returns:
      true if the characteristic is multivalued
    • setMultivalued

      public void setMultivalued(boolean multivalued)
      Specified by:
      setMultivalued in interface CsticModel
      Parameters:
      multivalued - flag indicating whether the characteristic is multivalued
    • isChangedByFrontend

      public boolean isChangedByFrontend()
      Specified by:
      isChangedByFrontend in interface CsticModel
      Returns:
      true if the characteristic is changed by front end
    • setChangedByFrontend

      public void setChangedByFrontend(boolean changedByFrontend)
      Specified by:
      setChangedByFrontend in interface CsticModel
      Parameters:
      changedByFrontend - flag indicating whether the characteristic is changed by front end
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • setSingleValue

      public void setSingleValue(String value)
      Description copied from interface: CsticModel
      Assigns the given value to the characteristic, overwriting any previous value assignments.
      This is a typical operation for single valued characteristics.
      Specified by:
      setSingleValue in interface CsticModel
      Parameters:
      value - the value to set
    • getValueModelForValue

      protected CsticValueModel getValueModelForValue(String valueName)
    • isValueNameMatching

      protected boolean isValueNameMatching(String value, CsticValueModel valueModel)
    • addValue

      public void addValue(String valueName)
      Description copied from interface: CsticModel
      Assigns the given value to the characteristic, while keeping any previous value assignments.
      This is a typical operation for multi valued characteristics.
      Specified by:
      addValue in interface CsticModel
      Parameters:
      valueName - the value to add
    • removeValue

      public void removeValue(String valueName)
      Description copied from interface: CsticModel
      Remove the given value from the assigned values, while keeping the other value assignments.
      This is a typical operation for multi valued characteristics.
      Specified by:
      removeValue in interface CsticModel
      Parameters:
      valueName - the value to add
    • getSingleValue

      public String getSingleValue()
      Description copied from interface: CsticModel
      Gets the first value of the assigned Values if existing, or null otherwise. This is a typical operation for single valued characteristics.
      Specified by:
      getSingleValue in interface CsticModel
      Returns:
      first value of assigned values
    • clearValues

      public void clearValues()
      Description copied from interface: CsticModel
      clears all assigned Values, same as setting an empty List as assigned value list
      Specified by:
      clearValues in interface CsticModel
    • isAllowsAdditionalValues

      public boolean isAllowsAdditionalValues()
      Specified by:
      isAllowsAdditionalValues in interface CsticModel
      Returns:
      true only if this characteristic allow additional values
    • getEntryFieldMask

      public String getEntryFieldMask()
      Specified by:
      getEntryFieldMask in interface CsticModel
      Returns:
      the characteristic entry field mask for user input
    • isIntervalInDomain

      public boolean isIntervalInDomain()
      Specified by:
      isIntervalInDomain in interface CsticModel
      Returns:
      true if the characteristic values are intervals in domain
    • setAllowsAdditionalValues

      public void setAllowsAdditionalValues(boolean allowsAdditionalValues)
      Specified by:
      setAllowsAdditionalValues in interface CsticModel
      Parameters:
      allowsAdditionalValues - true, only if this characteristic allow additional values
    • setEntryFieldMask

      public void setEntryFieldMask(String entryFieldMask)
      Specified by:
      setEntryFieldMask in interface CsticModel
      Parameters:
      entryFieldMask - characteristic entry field mask for user input
    • setIntervalInDomain

      public void setIntervalInDomain(boolean intervalInDomain)
      Specified by:
      setIntervalInDomain in interface CsticModel
      Parameters:
      intervalInDomain - flag indicating whether the characteristic values are intervals in domain
    • getAuthor

      public String getAuthor()
      Specified by:
      getAuthor in interface CsticModel
      Returns:
      the characteristic author
    • setAuthor

      public void setAuthor(String author)
      Specified by:
      setAuthor in interface CsticModel
      Parameters:
      author - haracteristic author
    • isConstrained

      public boolean isConstrained()
      Specified by:
      isConstrained in interface CsticModel
      Returns:
      True if the characteristic is constrained. This means for us: It carries a static domain (at runtime this domain might be gone due to restrictable characteristics!), and no additional values are allowed
    • setConstrained

      public void setConstrained(boolean constrained)
      Specified by:
      setConstrained in interface CsticModel
      Parameters:
      constrained - Flag indicating whether the characteristic is constrained. This means for us: It carries a static domain (at runtime this domain might be gone due to restrictable characteristics!), and no additional values are allowed
    • getStaticDomainLength

      public int getStaticDomainLength()
      Specified by:
      getStaticDomainLength in interface CsticModel
      Returns:
      the length of the characteristic static domain
    • setStaticDomainLength

      public void setStaticDomainLength(int staticDomainLength)
      Specified by:
      setStaticDomainLength in interface CsticModel
      Parameters:
      staticDomainLength - length of the characteristic static domain
    • getPlaceholder

      public String getPlaceholder()
      Specified by:
      getPlaceholder in interface CsticModel
      Returns:
      the place holder for input field
    • setPlaceholder

      public void setPlaceholder(String placeHolder)
      Specified by:
      setPlaceholder in interface CsticModel
      Parameters:
      placeHolder - place holder for input field
    • setInstanceId

      public void setInstanceId(String instanceId)
      Specified by:
      setInstanceId in interface CsticModel
      Parameters:
      instanceId - ID of corresponding instance. See InstanceModel.getId()
    • getInstanceId

      public String getInstanceId()
      Specified by:
      getInstanceId in interface CsticModel
      Returns:
      ID of corresponding instance. See InstanceModel.getId()
    • setRetractTriggered

      public void setRetractTriggered(boolean b)
      Specified by:
      setRetractTriggered in interface CsticModel
      Parameters:
      b - This characteristic is supposed to be retracted i.e. the user inputs are withdrawn
    • isRetractTriggered

      public boolean isRetractTriggered()
      Specified by:
      isRetractTriggered in interface CsticModel
      Returns:
      Is this characteristic supposed to be retracted?
    • removeAssignableValue

      public boolean removeAssignableValue(String valueName)
      Specified by:
      removeAssignableValue in interface CsticModel
      Parameters:
      valueName - value to be removed from the list of assignable values
      Returns:
      true if the value was removed from the list of assignable values
    • getMessages

      public Set<ProductConfigMessage> getMessages()
      Specified by:
      getMessages in interface CsticModel
      Returns:
      messages valid for this characteristic
    • setMessages

      public void setMessages(Set<ProductConfigMessage> messages)
      Specified by:
      setMessages in interface CsticModel
      Parameters:
      messages - valid for this characteristic
    • setInstanceName

      public void setInstanceName(String instanceName)
      Description copied from interface: CsticModel
      Sets name of hosting instance. This can be a product key or a class identifier
      Specified by:
      setInstanceName in interface CsticModel
    • getInstanceName

      public String getInstanceName()
      Specified by:
      getInstanceName in interface CsticModel
      Returns:
      Name of hosting instance. This can be a product key or a class identifier