Class CsticModelImpl

    • Constructor Detail

      • CsticModelImpl

        public CsticModelImpl()
    • Method Detail

      • getName

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

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

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

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

        public java.lang.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​(java.lang.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
      • setAssignableValues

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

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

        public void setAssignedValuesWithoutCheckForChange​(java.util.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • setSingleValue

        public void setSingleValue​(java.lang.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​(java.lang.String valueName)
      • isValueNameMatching

        protected boolean isValueNameMatching​(java.lang.String value,
                                              CsticValueModel valueModel)
      • addValue

        public void addValue​(java.lang.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​(java.lang.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 java.lang.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 java.lang.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​(java.lang.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 java.lang.String getAuthor()
        Specified by:
        getAuthor in interface CsticModel
        Returns:
        the characteristic author
      • setAuthor

        public void setAuthor​(java.lang.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 java.lang.String getPlaceholder()
        Specified by:
        getPlaceholder in interface CsticModel
        Returns:
        the place holder for input field
      • setPlaceholder

        public void setPlaceholder​(java.lang.String placeHolder)
        Specified by:
        setPlaceholder in interface CsticModel
        Parameters:
        placeHolder - place holder for input field
      • 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​(java.lang.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
      • setInstanceName

        public void setInstanceName​(java.lang.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 java.lang.String getInstanceName()
        Specified by:
        getInstanceName in interface CsticModel
        Returns:
        Name of hosting instance. This can be a product key or a class identifier