Class VariableAttributes


  • public class VariableAttributes
    extends java.lang.Object
    This class represents variable attributes.
    • Constructor Detail

      • VariableAttributes

        protected VariableAttributes​(com.uc4.util.XMLDocument doc)
    • Method Detail

      • getSourceLabel

        public java.lang.String getSourceLabel()
        Returns the label source of this variable.
        Returns:
        labelSource
      • isReadOnly

        public boolean isReadOnly()
        Returns true if the variable attributes cannot be modified. The attributes of referenceable Variables can only be changed in the system client.
        Returns:
        attributes read only
      • isNotFoundError

        public boolean isNotFoundError()
        Returns true if an error should occur when the key is not found.
        Returns:
        error if key not found
      • setNotFoundError

        public void setNotFoundError()
        Set the variable to return an error if the key is not found.
      • setNotFoundInitial

        public void setNotFoundInitial()
        Set the variable to return initial values if the key is not found.
      • isNotFoundInitial

        public boolean isNotFoundInitial()
        Returns true if the inital value will be returned when the key is not found.
        Returns:
        initial values if not found
      • setDataTypeCharacter

        public void setDataTypeCharacter()
        Sets the value type to character. Maximum 255 alphanumeric characters. Blanks at the end of the string are truncated. Leading blanks remain.
      • isDataTypeCharacter

        public boolean isDataTypeCharacter()
        Returns true if the value type is character.
        Returns:
        true if character
      • setDataTypeNumber

        public void setDataTypeNumber()
        Sets the value type to number.
         Valid range: 0 to 2147483647
         
        All values are checked for the correct value type when the object is saved.
      • setDataTypeDate

        public void setDataTypeDate()
        Sets the value type to date.
         Format: yymmdd
         
        All values are checked for the correct value type when the object is saved.
      • setDataTypeTime

        public void setDataTypeTime()
        Sets the value type to time.
         Format: hhmmss
         
        All values are checked for the correct value type when the object is saved.
      • isDataTypeNumber

        public boolean isDataTypeNumber()
        Returns true if the value type is number. All values are checked for the correct value type when the object is saved.
        Returns:
        true if number
      • isDataTypeTime

        public boolean isDataTypeTime()
        Returns true if the value type is time. All values are checked for the correct value type when the object is saved.
        Returns:
        true if time is selected as type of the values
      • isDataTypeDate

        public boolean isDataTypeDate()
        Returns true if the value type is date. All values are checked for the correct value type when the object is saved.
        Returns:
        true if date is selected as type of the values
      • setDataTypeTimeStamp

        public void setDataTypeTimeStamp()
        Sets the value type to time stamp.
         Format: YYYY-MM-DD [hh:mm:ss]
         
        All values are checked for the correct value type when the object is saved.
      • isDataTypeTimeStamp

        public boolean isDataTypeTimeStamp()
        Returns true if the value type is time stamp.
        Returns:
        true if time stamp.
      • getValidityKeywordType

        public ValidityKeywordType getValidityKeywordType()
        Returns the type of the validity keyword.
        Returns:
        validity keyword type
      • setValidityKeywordType

        public void setValidityKeywordType​(ValidityKeywordType validityKeywordType)
        Sets the type of the validity keyword. When the object is saved all entries in this variable are checked against the correct type of the validity keyword.
        Parameters:
        validityKeywordType - validity keyword type
      • setVariableNotShareable

        public void setVariableNotShareable()
        Sets the variable type to "Not shareable". This method has no effect if the client is not 0.
      • isVariableNotShareable

        public boolean isVariableNotShareable()
        Returns true if the variable is can not be shared. The Variable can only be accessed in the system client. Variables of the same name which are stored in a different client, however, are not connected to the Variable in the system client.
        Returns:
        true if the variable is can not be shared
      • setVariableReadOnly

        public void setVariableReadOnly()
        Sets the variable type to read only. This method has no effect if the client is not 0.
      • isVariableReadOnly

        public boolean isVariableReadOnly()
        Returns true if the variable can be accessed from other clients in "reading" mode. This is only supported in client 0.
        Returns:
        true if the variable is read only
      • setVariableReferenceable

        public void setVariableReferenceable()
        Sets the variable type to referenceable. This method has no effect if the client is not 0.
      • isVariableReferenceable

        public boolean isVariableReferenceable()
        Returns true if the variable is referenceable form other clients. This is only supported in client 0.
        Returns:
        true if the variable is referenceable
      • setOutputFormatCharacter

        public void setOutputFormatCharacter​(java.lang.Integer max,
                                             boolean upperCase)
        Sets the output format parameters for the type character.
        Parameters:
        max - Maximum length, integer between 1 and 1024, null is allowed in order to set no value
        upperCase - if true the value is converted to upper case
      • setOutputFormatNumber

        public void setOutputFormatNumber​(java.math.BigDecimal min,
                                          java.math.BigDecimal max,
                                          java.lang.String format)
        Sets the output format parameters for the type number.
        Parameters:
        min - Minimum value, null is allowed in order to set no value
        max - Maximum value, null is allowed in order to set no value
        format - Format string, can be one of: "0.00","+0.00","-0.00","0","-0","+0","0000000000000000"
      • setOutputFormatTimestamp

        public void setOutputFormatTimestamp​(DateTime min,
                                             DateTime max,
                                             java.lang.String format)
        Sets the output format for the datatype timestamp.
        Parameters:
        min - Minimum value, null is allowed in order to set no value
        max - Maximum value, null is allowed in order to set no value
        format - Output format of the timestamp, allowed values are "yyyy-mm-dd hh:mm:ss" or "yyyymmddhh24miss"
      • setOutputFormatDate

        public void setOutputFormatDate​(DateTime min,
                                        DateTime max,
                                        java.lang.String format)
        Sets the output format for the datatype date.
        Parameters:
        min - Minimum value, null is allowed in order to set no value
        max - Maximum value, null is allowed in order to set no value
        format - Output format, one of: "dd-mon-yyyy","dd-mon-rr","mm-dd-yyyy","yyyymmdd","mmddrr","ddmmrr","mm-dd-rr","mm/dd/rr","yyyy-mm-dd"
      • setOutputFormatTime

        public void setOutputFormatTime​(Time min,
                                        Time max,
                                        java.lang.String format)
        Sets the output format for the datatype time.
        Parameters:
        min - Minimum time, null is allowed in order to set no value
        max - Maximum time, null is allowed in order to set no value
        format - Output format, allowed value: "hhmmss", "hhmmss", "hh:mm:ss", "hhmm", "hh:mm", "mmss", "mm:ss"
      • getMaximumLength

        public int getMaximumLength()
        Returns the maximum number of characters for the first value in variable.
        Returns:
        Maximum length or -1 if not set
      • getNumberFormat

        public java.lang.String getNumberFormat()
        Returns the number format for variable values with the type number. An empty String is returned if no format has been set, null is never returned
        Returns:
        Format for numbers or an empty String if not set
      • getMinimumNumber

        public java.math.BigDecimal getMinimumNumber()
        Returns the minimum number.
        Returns:
        Min value
      • getMaximumNumber

        public java.math.BigDecimal getMaximumNumber()
        Returns the maximum number.
        Returns:
        Max value
      • isUppercase

        public boolean isUppercase()
        Returns true if the checkbox for upper case is set.
        Returns:
        true if the value is converted to upper case.
      • getTimestampFormat

        public java.lang.String getTimestampFormat()
        Returns the output format of timestamps.
        Returns:
        Time stamp format
      • getTimeFormat

        public java.lang.String getTimeFormat()
        Returns the output format of a time.
        Returns:
        Time format
      • getDateFormat

        public java.lang.String getDateFormat()
        Returns the output format of a date.
        Returns:
        Date format
      • getMinimumTimestamp

        public DateTime getMinimumTimestamp()
        Returns the minimum timestamp or null if not set.
        Returns:
        Timestamp
      • getMaximumTimestamp

        public DateTime getMaximumTimestamp()
        Returns the maximum timestamp or null if not set.
        Returns:
        Timestamp
      • getMinimumTime

        public Time getMinimumTime()
        Returns the minimum time or null if not set.
        Returns:
        Time
      • getMaximumTime

        public Time getMaximumTime()
        Returns the maximum time or null if not set.
        Returns:
        Time
      • getMinimumDate

        public DateTime getMinimumDate()
        Returns the minimum date or null if not set.
        Returns:
        Date
      • getMaximumDate

        public DateTime getMaximumDate()
        Returns the maximum date or null if not set.
        Returns:
        Date
      • setSortColumn

        public void setSortColumn​(int column)
        Sets the column for sorting.
        • 0 ... Key
        • 1 ... Value1
        • 2 ... Value2
        • 3 ... Value3
        • 4 ... Value4
        • 5 ... Value5
        Parameters:
        column - Column index
      • getSortColumn

        public int getSortColumn()
        Returns the column for sorting.
        • 0 ... Key
        • 1 ... Value1
        • 2 ... Value2
        • 3 ... Value3
        • 4 ... Value4
        • 5 ... Value5
        Returns:
        Sort column
      • setSortOrder

        public void setSortOrder​(boolean ascending)
        Sets the sort order.
        Parameters:
        ascending - true for ascending sort order, false for descending order.
      • isSortOrderAscending

        public boolean isSortOrderAscending()
        Returns:
        true if the sort order is ascending.
      • isSortOrderDescending

        public boolean isSortOrderDescending()
        Returns:
        true if the sort order is descending.
      • isCheckMaxLength

        public boolean isCheckMaxLength()
        Returns true if maximum length of characters is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMinNumber

        public boolean isCheckMinNumber()
        Returns true if minimum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMaxNumber

        public boolean isCheckMaxNumber()
        Returns true if maximum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMinTime

        public boolean isCheckMinTime()
        Returns true if minimum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMaxTime

        public boolean isCheckMaxTime()
        Returns true if maximum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMinDate

        public boolean isCheckMinDate()
        Returns true if minimum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMaxDate

        public boolean isCheckMaxDate()
        Returns true if maximum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMinTimestamp

        public boolean isCheckMinTimestamp()
        Returns true if minimum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • isCheckMaxTimestamp

        public boolean isCheckMaxTimestamp()
        Returns true if maximum value is checked.
        Returns:
        true if the value is checked, false if the value will not be checked
      • getHostType

        public java.lang.String getHostType()
        Returns the host type.
        Returns:
        host type
      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element request,
                             ConnectionAttributes sessionInfo)