Package com.uc4.api.objects
Class VariableAttributes
- java.lang.Object
-
- com.uc4.api.objects.VariableAttributes
-
public class VariableAttributes extends java.lang.Object
This class represents variable attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VariableAttributes.Source
Variable source.
-
Constructor Summary
Constructors Modifier Constructor Description protected
VariableAttributes(com.uc4.util.XMLDocument doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDateFormat()
Returns the output format of a date.java.lang.String
getHostType()
Returns the host type.DateTime
getMaximumDate()
Returns the maximum date ornull
if not set.int
getMaximumLength()
Returns the maximum number of characters for the first value in variable.java.math.BigDecimal
getMaximumNumber()
Returns the maximum number.Time
getMaximumTime()
Returns the maximum time ornull
if not set.DateTime
getMaximumTimestamp()
Returns the maximum timestamp ornull
if not set.DateTime
getMinimumDate()
Returns the minimum date ornull
if not set.java.math.BigDecimal
getMinimumNumber()
Returns the minimum number.Time
getMinimumTime()
Returns the minimum time ornull
if not set.DateTime
getMinimumTimestamp()
Returns the minimum timestamp ornull
if not set.java.lang.String
getNumberFormat()
Returns the number format for variable values with the type number.int
getSortColumn()
Returns the column for sorting.VariableAttributes.Source
getSource()
Returns the source of this variable.java.lang.String
getSourceLabel()
Returns the label source of this variable.java.lang.String
getTimeFormat()
Returns the output format of a time.java.lang.String
getTimestampFormat()
Returns the output format of timestamps.ValidityKeywordType
getValidityKeywordType()
Returns the type of the validity keyword.boolean
isCheckMaxDate()
Returnstrue
if maximum value is checked.boolean
isCheckMaxLength()
Returnstrue
if maximum length of characters is checked.boolean
isCheckMaxNumber()
Returnstrue
if maximum value is checked.boolean
isCheckMaxTime()
Returnstrue
if maximum value is checked.boolean
isCheckMaxTimestamp()
Returnstrue
if maximum value is checked.boolean
isCheckMinDate()
Returnstrue
if minimum value is checked.boolean
isCheckMinNumber()
Returnstrue
if minimum value is checked.boolean
isCheckMinTime()
Returnstrue
if minimum value is checked.boolean
isCheckMinTimestamp()
Returnstrue
if minimum value is checked.boolean
isDataTypeCharacter()
Returnstrue
if the value type is character.boolean
isDataTypeDate()
Returnstrue
if the value type is date.boolean
isDataTypeNumber()
Returnstrue
if the value type is number.boolean
isDataTypeTime()
Returnstrue
if the value type is time.boolean
isDataTypeTimeStamp()
Returnstrue
if the value type is time stamp.boolean
isNotFoundError()
Returnstrue
if an error should occur when the key is not found.boolean
isNotFoundInitial()
Returnstrue
if the inital value will be returned when the key is not found.boolean
isReadOnly()
Returnstrue
if the variable attributes cannot be modified.boolean
isSortOrderAscending()
boolean
isSortOrderDescending()
boolean
isUppercase()
Returnstrue
if the checkbox for upper case is set.boolean
isVariableNotShareable()
Returnstrue
if the variable is can not be shared.boolean
isVariableReadOnly()
Returnstrue
if the variable can be accessed from other clients in "reading" mode.boolean
isVariableReferenceable()
Returnstrue
if the variable is referenceable form other clients.void
setDataTypeCharacter()
Sets the value type to character.void
setDataTypeDate()
Sets the value type to date.void
setDataTypeNumber()
Sets the value type to number.void
setDataTypeTime()
Sets the value type to time.void
setDataTypeTimeStamp()
Sets the value type to time stamp.void
setNotFoundError()
Set the variable to return an error if the key is not found.void
setNotFoundInitial()
Set the variable to return initial values if the key is not found.void
setOutputFormatCharacter(java.lang.Integer max, boolean upperCase)
Sets the output format parameters for the type character.void
setOutputFormatDate(DateTime min, DateTime max, java.lang.String format)
Sets the output format for the datatype date.void
setOutputFormatNumber(java.math.BigDecimal min, java.math.BigDecimal max, java.lang.String format)
Sets the output format parameters for the type number.void
setOutputFormatTime(Time min, Time max, java.lang.String format)
Sets the output format for the datatype time.void
setOutputFormatTimestamp(DateTime min, DateTime max, java.lang.String format)
Sets the output format for the datatype timestamp.void
setSortColumn(int column)
Sets the column for sorting.void
setSortOrder(boolean ascending)
Sets the sort order.void
setValidityKeywordType(ValidityKeywordType validityKeywordType)
Sets the type of the validity keyword.void
setVariableNotShareable()
Sets the variable type to "Not shareable".void
setVariableReadOnly()
Sets the variable type to read only.void
setVariableReferenceable()
Sets the variable type to referenceable.protected void
store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
-
-
-
Method Detail
-
getSourceLabel
public java.lang.String getSourceLabel()
Returns the label source of this variable.- Returns:
- labelSource
-
isReadOnly
public boolean isReadOnly()
Returnstrue
if the variable attributes cannot be modified. The attributes of referenceable Variables can only be changed in the system client.- Returns:
- attributes read only
-
getSource
public VariableAttributes.Source getSource()
Returns the source of this variable.- Returns:
- Source
-
isNotFoundError
public boolean isNotFoundError()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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 valueupperCase
- 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 valuemax
- Maximum value,null
is allowed in order to set no valueformat
- 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 valuemax
- Maximum value,null
is allowed in order to set no valueformat
- 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 valuemax
- Maximum value,null
is allowed in order to set no valueformat
- 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 valuemax
- Maximum time,null
is allowed in order to set no valueformat
- 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()
Returnstrue
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 ornull
if not set.- Returns:
- Timestamp
-
getMaximumTimestamp
public DateTime getMaximumTimestamp()
Returns the maximum timestamp ornull
if not set.- Returns:
- Timestamp
-
getMinimumTime
public Time getMinimumTime()
Returns the minimum time ornull
if not set.- Returns:
- Time
-
getMaximumTime
public Time getMaximumTime()
Returns the maximum time ornull
if not set.- Returns:
- Time
-
getMinimumDate
public DateTime getMinimumDate()
Returns the minimum date ornull
if not set.- Returns:
- Date
-
getMaximumDate
public DateTime getMaximumDate()
Returns the maximum date ornull
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()
Returnstrue
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()
Returnstrue
if minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxNumber
public boolean isCheckMaxNumber()
Returnstrue
if maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinTime
public boolean isCheckMinTime()
Returnstrue
if minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxTime
public boolean isCheckMaxTime()
Returnstrue
if maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinDate
public boolean isCheckMinDate()
Returnstrue
if minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxDate
public boolean isCheckMaxDate()
Returnstrue
if maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinTimestamp
public boolean isCheckMinTimestamp()
Returnstrue
if minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxTimestamp
public boolean isCheckMaxTimestamp()
Returnstrue
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)
-
-