Package com.uc4.api.objects
Class VariableAttributes
java.lang.Object
com.uc4.api.objects.VariableAttributes
This class represents variable attributes.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the output format of a date.Returns the host type.Returns the maximum date ornull
if not set.int
Returns the maximum number of characters for the first value in variable.Returns the maximum number.Returns the maximum time ornull
if not set.Returns the maximum timestamp ornull
if not set.Returns the minimum date ornull
if not set.Returns the minimum number.Returns the minimum time ornull
if not set.Returns the minimum timestamp ornull
if not set.Returns the number format for variable values with the type number.int
Returns the column for sorting.Returns the source of this variable.Returns the label source of this variable.Returns the output format of a time.Returns the output format of timestamps.Returns the type of the validity keyword.boolean
Returnstrue
if maximum value is checked.boolean
Returnstrue
if maximum length of characters is checked.boolean
Returnstrue
if maximum value is checked.boolean
Returnstrue
if maximum value is checked.boolean
Returnstrue
if maximum value is checked.boolean
Returnstrue
if minimum value is checked.boolean
Returnstrue
if minimum value is checked.boolean
Returnstrue
if minimum value is checked.boolean
Returnstrue
if minimum value is checked.boolean
Returnstrue
if the value type is character.boolean
Returnstrue
if the value type is date.boolean
Returnstrue
if the value type is number.boolean
Returnstrue
if the value type is time.boolean
Returnstrue
if the value type is time stamp.boolean
Returnstrue
if an error should occur when the key is not found.boolean
Returnstrue
if the inital value will be returned when the key is not found.boolean
Returnstrue
if the variable attributes cannot be modified.boolean
boolean
boolean
Returnstrue
if the checkbox for upper case is set.boolean
Returnstrue
if the variable is can not be shared.boolean
Returnstrue
if the variable can be accessed from other clients in "reading" mode.boolean
Returnstrue
if the variable is referenceable form other clients.void
Sets the value type to character.void
Sets the value type to date.void
Sets the value type to number.void
Sets the value type to time.void
Sets the value type to time stamp.void
Set the variable to return an error if the key is not found.void
Set the variable to return initial values if the key is not found.void
setOutputFormatCharacter
(Integer max, boolean upperCase) Sets the output format parameters for the type character.void
setOutputFormatDate
(DateTime min, DateTime max, String format) Sets the output format for the datatype date.void
setOutputFormatNumber
(BigDecimal min, BigDecimal max, String format) Sets the output format parameters for the type number.void
setOutputFormatTime
(Time min, Time max, String format) Sets the output format for the datatype time.void
setOutputFormatTimestamp
(DateTime min, DateTime max, 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
Sets the variable type to "Not shareable".void
Sets the variable type to read only.void
Sets the variable type to referenceable.protected void
store
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo)
-
Constructor Details
-
VariableAttributes
protected VariableAttributes(com.uc4.util.XMLDocument doc)
-
-
Method Details
-
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
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
Returns the type of the validity keyword.- Returns:
- validity keyword type
-
setValidityKeywordType
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
-
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
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
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
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
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
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
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
Returns the minimum number.- Returns:
- Min value
-
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
Returns the output format of timestamps.- Returns:
- Time stamp format
-
getTimeFormat
Returns the output format of a time.- Returns:
- Time format
-
getDateFormat
Returns the output format of a date.- Returns:
- Date format
-
getMinimumTimestamp
Returns the minimum timestamp ornull
if not set.- Returns:
- Timestamp
-
getMaximumTimestamp
Returns the maximum timestamp ornull
if not set.- Returns:
- Timestamp
-
getMinimumTime
Returns the minimum time ornull
if not set.- Returns:
- Time
-
getMaximumTime
Returns the maximum time ornull
if not set.- Returns:
- Time
-
getMinimumDate
Returns the minimum date ornull
if not set.- Returns:
- Date
-
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
Returns the host type.- Returns:
- host type
-
store
protected void store(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo)
-