Class CsticModelImpl
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
Default implementation of the
CsticModel-
Field Summary
Fields inherited from class de.hybris.platform.sap.productconfig.runtime.interf.model.impl.BaseModelImpl
DEFAULT_ARRAY_LIST_CAPACITYFields inherited from interface de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel
AUTHOR_DEFAULT, AUTHOR_NOAUTHOR, AUTHOR_SYSTEM, AUTHOR_USER, TYPE_BOOLEAN, TYPE_CLASS, TYPE_CURRENCY, TYPE_DATE, TYPE_FLOAT, TYPE_INTEGER, TYPE_STRING, TYPE_TIME, TYPE_UNDEFINED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssigns the given value to the characteristic, while keeping any previous value assignments.
This is a typical operation for multi valued characteristics.voidclears all assigned Values, same as setting an empty List as assigned value listbooleanGet the long text description for a cstic, which will be displayed under the cstic name in the UIgetName()intGets the first value of the assigned Values if existing, or null otherwise.intintprotected CsticValueModelgetValueModelForValue(String valueName) intinthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprotected booleanisValueNameMatching(String value, CsticValueModel valueModel) booleanbooleanremoveAssignableValue(String valueName) voidremoveValue(String valueName) Remove the given value from the assigned values, while keeping the other value assignments.
This is a typical operation for multi valued characteristics.voidsetAllowsAdditionalValues(boolean allowsAdditionalValues) voidsetAssignableValues(List<CsticValueModel> assignableValues) voidsetAssignedValues(List<CsticValueModel> assignedValues) voidsetAssignedValuesWithoutCheckForChange(List<CsticValueModel> assignedValues) sets assigned value without to check whether the characteristic was changedvoidvoidsetChangedByFrontend(boolean changedByFrontend) voidsetComplete(boolean complete) voidsetConsistent(boolean consistent) voidsetConstrained(boolean constrained) voidsetEntryFieldMask(String entryFieldMask) voidsetInstanceId(String instanceId) voidsetInstanceName(String instanceName) Sets name of hosting instance.voidsetIntervalInDomain(boolean intervalInDomain) voidsetLanguageDependentName(String languageDependentName) voidsetLongText(String longText) Set the long text, which will be displayed under the Cstic name in the UIvoidsetMessages(Set<ProductConfigMessage> messages) voidsetMultivalued(boolean multivalued) voidvoidsetNumberScale(int numberScale) voidsetPlaceholder(String placeHolder) voidsetReadonly(boolean readonly) voidsetRequired(boolean required) voidsetRetractTriggered(boolean b) voidsetSingleValue(String value) Assigns the given value to the characteristic, overwriting any previous value assignments.
This is a typical operation for single valued characteristics.voidsetStaticDomainLength(int staticDomainLength) voidsetTypeLength(int typeLength) voidsetValueType(int valueType) voidsetVisible(boolean visible) toString()
-
Constructor Details
-
CsticModelImpl
public CsticModelImpl()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceCsticModel- Returns:
- the characteristic name
-
setName
- Specified by:
setNamein interfaceCsticModel- Parameters:
name- characteristic name
-
getLanguageDependentName
- Specified by:
getLanguageDependentNamein interfaceCsticModel- Returns:
- the characteristic language dependent name
-
setLanguageDependentName
- Specified by:
setLanguageDependentNamein interfaceCsticModel- Parameters:
languageDependentName- characteristic language dependent name
-
getLongText
Description copied from interface:CsticModelGet the long text description for a cstic, which will be displayed under the cstic name in the UI- Specified by:
getLongTextin interfaceCsticModel- Returns:
- The long text value
-
setLongText
Description copied from interface:CsticModelSet the long text, which will be displayed under the Cstic name in the UI- Specified by:
setLongTextin interfaceCsticModel- Parameters:
longText- Description for the cstic
-
getAssignableValues
- Specified by:
getAssignableValuesin interfaceCsticModel- Returns:
- an unmodifiable list of all assignable values
-
setAssignableValues
- Specified by:
setAssignableValuesin interfaceCsticModel- Parameters:
assignableValues- list of all assignable values
-
getAssignedValues
- Specified by:
getAssignedValuesin interfaceCsticModel- Returns:
- an unmodifiable list of all assigned values
-
setAssignedValues
- Specified by:
setAssignedValuesin interfaceCsticModel- Parameters:
assignedValues- list of all assigned values
-
setAssignedValuesWithoutCheckForChange
Description copied from interface:CsticModelsets assigned value without to check whether the characteristic was changed- Specified by:
setAssignedValuesWithoutCheckForChangein interfaceCsticModel- Parameters:
assignedValues- list of all assigned values
-
getValueType
public int getValueType()- Specified by:
getValueTypein interfaceCsticModel- Returns:
- the value type
-
setValueType
public void setValueType(int valueType) - Specified by:
setValueTypein interfaceCsticModel- Parameters:
valueType- value type
-
getTypeLength
public int getTypeLength()- Specified by:
getTypeLengthin interfaceCsticModel- Returns:
- the length of the characteristic value type
-
setTypeLength
public void setTypeLength(int typeLength) - Specified by:
setTypeLengthin interfaceCsticModel- Parameters:
typeLength- length of the characteristic value type
-
getNumberScale
public int getNumberScale()- Specified by:
getNumberScalein interfaceCsticModel- Returns:
- the number scale
-
setNumberScale
public void setNumberScale(int numberScale) - Specified by:
setNumberScalein interfaceCsticModel- Parameters:
numberScale- the number scale
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceCsticModel- Returns:
- true if the characteristic is visible
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisiblein interfaceCsticModel- Parameters:
visible- flag indicating whether the characteristic is visible
-
isConsistent
public boolean isConsistent()- Specified by:
isConsistentin interfaceCsticModel- Returns:
- true if the characteristic is consistent
-
setConsistent
public void setConsistent(boolean consistent) - Specified by:
setConsistentin interfaceCsticModel- Parameters:
consistent- flag indicating whether the characteristic is consistent
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfaceCsticModel- Returns:
- true if the characteristic is complete
-
setComplete
public void setComplete(boolean complete) - Specified by:
setCompletein interfaceCsticModel- Parameters:
complete- flag indicating whether the characteristic is complete
-
isReadonly
public boolean isReadonly()- Specified by:
isReadonlyin interfaceCsticModel- Returns:
- true if the characteristic is read only
-
setReadonly
public void setReadonly(boolean readonly) - Specified by:
setReadonlyin interfaceCsticModel- Parameters:
readonly- flag indicating whether the characteristic is read only
-
isRequired
public boolean isRequired()- Specified by:
isRequiredin interfaceCsticModel- Returns:
- true if the characteristic is required
-
setRequired
public void setRequired(boolean required) - Specified by:
setRequiredin interfaceCsticModel- Parameters:
required- flag indicating whether the characteristic is required
-
isMultivalued
public boolean isMultivalued()- Specified by:
isMultivaluedin interfaceCsticModel- Returns:
- true if the characteristic is multivalued
-
setMultivalued
public void setMultivalued(boolean multivalued) - Specified by:
setMultivaluedin interfaceCsticModel- Parameters:
multivalued- flag indicating whether the characteristic is multivalued
-
isChangedByFrontend
public boolean isChangedByFrontend()- Specified by:
isChangedByFrontendin interfaceCsticModel- Returns:
- true if the characteristic is changed by front end
-
setChangedByFrontend
public void setChangedByFrontend(boolean changedByFrontend) - Specified by:
setChangedByFrontendin interfaceCsticModel- Parameters:
changedByFrontend- flag indicating whether the characteristic is changed by front end
-
toString
-
hashCode
public int hashCode() -
equals
-
setSingleValue
Description copied from interface:CsticModelAssigns the given value to the characteristic, overwriting any previous value assignments.
This is a typical operation for single valued characteristics.- Specified by:
setSingleValuein interfaceCsticModel- Parameters:
value- the value to set
-
getValueModelForValue
-
isValueNameMatching
-
addValue
Description copied from interface:CsticModelAssigns the given value to the characteristic, while keeping any previous value assignments.
This is a typical operation for multi valued characteristics.- Specified by:
addValuein interfaceCsticModel- Parameters:
valueName- the value to add
-
removeValue
Description copied from interface:CsticModelRemove the given value from the assigned values, while keeping the other value assignments.
This is a typical operation for multi valued characteristics.- Specified by:
removeValuein interfaceCsticModel- Parameters:
valueName- the value to add
-
getSingleValue
Description copied from interface:CsticModelGets the first value of the assigned Values if existing, or null otherwise. This is a typical operation for single valued characteristics.- Specified by:
getSingleValuein interfaceCsticModel- Returns:
- first value of assigned values
-
clearValues
public void clearValues()Description copied from interface:CsticModelclears all assigned Values, same as setting an empty List as assigned value list- Specified by:
clearValuesin interfaceCsticModel
-
isAllowsAdditionalValues
public boolean isAllowsAdditionalValues()- Specified by:
isAllowsAdditionalValuesin interfaceCsticModel- Returns:
- true only if this characteristic allow additional values
-
getEntryFieldMask
- Specified by:
getEntryFieldMaskin interfaceCsticModel- Returns:
- the characteristic entry field mask for user input
-
isIntervalInDomain
public boolean isIntervalInDomain()- Specified by:
isIntervalInDomainin interfaceCsticModel- Returns:
- true if the characteristic values are intervals in domain
-
setAllowsAdditionalValues
public void setAllowsAdditionalValues(boolean allowsAdditionalValues) - Specified by:
setAllowsAdditionalValuesin interfaceCsticModel- Parameters:
allowsAdditionalValues-true, only if this characteristic allow additional values
-
setEntryFieldMask
- Specified by:
setEntryFieldMaskin interfaceCsticModel- Parameters:
entryFieldMask- characteristic entry field mask for user input
-
setIntervalInDomain
public void setIntervalInDomain(boolean intervalInDomain) - Specified by:
setIntervalInDomainin interfaceCsticModel- Parameters:
intervalInDomain- flag indicating whether the characteristic values are intervals in domain
-
getAuthor
- Specified by:
getAuthorin interfaceCsticModel- Returns:
- the characteristic author
-
setAuthor
- Specified by:
setAuthorin interfaceCsticModel- Parameters:
author- haracteristic author
-
isConstrained
public boolean isConstrained()- Specified by:
isConstrainedin interfaceCsticModel- 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:
setConstrainedin interfaceCsticModel- 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:
getStaticDomainLengthin interfaceCsticModel- Returns:
- the length of the characteristic static domain
-
setStaticDomainLength
public void setStaticDomainLength(int staticDomainLength) - Specified by:
setStaticDomainLengthin interfaceCsticModel- Parameters:
staticDomainLength- length of the characteristic static domain
-
getPlaceholder
- Specified by:
getPlaceholderin interfaceCsticModel- Returns:
- the place holder for input field
-
setPlaceholder
- Specified by:
setPlaceholderin interfaceCsticModel- Parameters:
placeHolder- place holder for input field
-
setInstanceId
- Specified by:
setInstanceIdin interfaceCsticModel- Parameters:
instanceId- ID of corresponding instance. SeeInstanceModel.getId()
-
getInstanceId
- Specified by:
getInstanceIdin interfaceCsticModel- Returns:
- ID of corresponding instance. See
InstanceModel.getId()
-
setRetractTriggered
public void setRetractTriggered(boolean b) - Specified by:
setRetractTriggeredin interfaceCsticModel- Parameters:
b- This characteristic is supposed to be retracted i.e. the user inputs are withdrawn
-
isRetractTriggered
public boolean isRetractTriggered()- Specified by:
isRetractTriggeredin interfaceCsticModel- Returns:
- Is this characteristic supposed to be retracted?
-
removeAssignableValue
- Specified by:
removeAssignableValuein interfaceCsticModel- 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
- Specified by:
getMessagesin interfaceCsticModel- Returns:
- messages valid for this characteristic
-
setMessages
- Specified by:
setMessagesin interfaceCsticModel- Parameters:
messages- valid for this characteristic
-
setInstanceName
Description copied from interface:CsticModelSets name of hosting instance. This can be a product key or a class identifier- Specified by:
setInstanceNamein interfaceCsticModel
-
getInstanceName
- Specified by:
getInstanceNamein interfaceCsticModel- Returns:
- Name of hosting instance. This can be a product key or a class identifier
-