Package com.uc4.api.objects
Class VariableAttributes
- java.lang.Object
-
- com.uc4.api.objects.VariableAttributes
-
public class VariableAttributes extends java.lang.ObjectThis class represents variable attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVariableAttributes.SourceVariable source.
-
Constructor Summary
Constructors Modifier Constructor Description protectedVariableAttributes(com.uc4.util.XMLDocument doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDateFormat()Returns the output format of a date.java.lang.StringgetHostType()Returns the host type.DateTimegetMaximumDate()Returns the maximum date ornullif not set.intgetMaximumLength()Returns the maximum number of characters for the first value in variable.java.math.BigDecimalgetMaximumNumber()Returns the maximum number.TimegetMaximumTime()Returns the maximum time ornullif not set.DateTimegetMaximumTimestamp()Returns the maximum timestamp ornullif not set.DateTimegetMinimumDate()Returns the minimum date ornullif not set.java.math.BigDecimalgetMinimumNumber()Returns the minimum number.TimegetMinimumTime()Returns the minimum time ornullif not set.DateTimegetMinimumTimestamp()Returns the minimum timestamp ornullif not set.java.lang.StringgetNumberFormat()Returns the number format for variable values with the type number.intgetSortColumn()Returns the column for sorting.VariableAttributes.SourcegetSource()Returns the source of this variable.java.lang.StringgetSourceLabel()Returns the label source of this variable.java.lang.StringgetTimeFormat()Returns the output format of a time.java.lang.StringgetTimestampFormat()Returns the output format of timestamps.ValidityKeywordTypegetValidityKeywordType()Returns the type of the validity keyword.booleanisCheckMaxDate()Returnstrueif maximum value is checked.booleanisCheckMaxLength()Returnstrueif maximum length of characters is checked.booleanisCheckMaxNumber()Returnstrueif maximum value is checked.booleanisCheckMaxTime()Returnstrueif maximum value is checked.booleanisCheckMaxTimestamp()Returnstrueif maximum value is checked.booleanisCheckMinDate()Returnstrueif minimum value is checked.booleanisCheckMinNumber()Returnstrueif minimum value is checked.booleanisCheckMinTime()Returnstrueif minimum value is checked.booleanisCheckMinTimestamp()Returnstrueif minimum value is checked.booleanisDataTypeCharacter()Returnstrueif the value type is character.booleanisDataTypeDate()Returnstrueif the value type is date.booleanisDataTypeNumber()Returnstrueif the value type is number.booleanisDataTypeTime()Returnstrueif the value type is time.booleanisDataTypeTimeStamp()Returnstrueif the value type is time stamp.booleanisNotFoundError()Returnstrueif an error should occur when the key is not found.booleanisNotFoundInitial()Returnstrueif the inital value will be returned when the key is not found.booleanisReadOnly()Returnstrueif the variable attributes cannot be modified.booleanisSortOrderAscending()booleanisSortOrderDescending()booleanisUppercase()Returnstrueif the checkbox for upper case is set.booleanisVariableNotShareable()Returnstrueif the variable is can not be shared.booleanisVariableReadOnly()Returnstrueif the variable can be accessed from other clients in "reading" mode.booleanisVariableReferenceable()Returnstrueif the variable is referenceable form other clients.voidsetDataTypeCharacter()Sets the value type to character.voidsetDataTypeDate()Sets the value type to date.voidsetDataTypeNumber()Sets the value type to number.voidsetDataTypeTime()Sets the value type to time.voidsetDataTypeTimeStamp()Sets the value type to time stamp.voidsetNotFoundError()Set the variable to return an error if the key is not found.voidsetNotFoundInitial()Set the variable to return initial values if the key is not found.voidsetOutputFormatCharacter(java.lang.Integer max, boolean upperCase)Sets the output format parameters for the type character.voidsetOutputFormatDate(DateTime min, DateTime max, java.lang.String format)Sets the output format for the datatype date.voidsetOutputFormatNumber(java.math.BigDecimal min, java.math.BigDecimal max, java.lang.String format)Sets the output format parameters for the type number.voidsetOutputFormatTime(Time min, Time max, java.lang.String format)Sets the output format for the datatype time.voidsetOutputFormatTimestamp(DateTime min, DateTime max, java.lang.String format)Sets the output format for the datatype timestamp.voidsetSortColumn(int column)Sets the column for sorting.voidsetSortOrder(boolean ascending)Sets the sort order.voidsetValidityKeywordType(ValidityKeywordType validityKeywordType)Sets the type of the validity keyword.voidsetVariableNotShareable()Sets the variable type to "Not shareable".voidsetVariableReadOnly()Sets the variable type to read only.voidsetVariableReferenceable()Sets the variable type to referenceable.protected voidstore(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()
Returnstrueif 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()
Returnstrueif 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()
Returnstrueif 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()
Returnstrueif the value type is character.- Returns:
trueif 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()
Returnstrueif the value type is number. All values are checked for the correct value type when the object is saved.- Returns:
trueif number
-
isDataTypeTime
public boolean isDataTypeTime()
Returnstrueif the value type is time. All values are checked for the correct value type when the object is saved.- Returns:
trueif time is selected as type of the values
-
isDataTypeDate
public boolean isDataTypeDate()
Returnstrueif the value type is date. All values are checked for the correct value type when the object is saved.- Returns:
trueif 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()
Returnstrueif the value type is time stamp.- Returns:
trueif 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()
Returnstrueif 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:
trueif 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()
Returnstrueif the variable can be accessed from other clients in "reading" mode. This is only supported in client 0.- Returns:
trueif 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()
Returnstrueif the variable is referenceable form other clients. This is only supported in client 0.- Returns:
trueif 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,nullis 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,nullis allowed in order to set no valuemax- Maximum value,nullis 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,nullis allowed in order to set no valuemax- Maximum value,nullis 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,nullis allowed in order to set no valuemax- Maximum value,nullis 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,nullis allowed in order to set no valuemax- Maximum time,nullis 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,nullis 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()
Returnstrueif 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 ornullif not set.- Returns:
- Timestamp
-
getMaximumTimestamp
public DateTime getMaximumTimestamp()
Returns the maximum timestamp ornullif not set.- Returns:
- Timestamp
-
getMinimumTime
public Time getMinimumTime()
Returns the minimum time ornullif not set.- Returns:
- Time
-
getMaximumTime
public Time getMaximumTime()
Returns the maximum time ornullif not set.- Returns:
- Time
-
getMinimumDate
public DateTime getMinimumDate()
Returns the minimum date ornullif not set.- Returns:
- Date
-
getMaximumDate
public DateTime getMaximumDate()
Returns the maximum date ornullif 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()
Returnstrueif 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()
Returnstrueif minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxNumber
public boolean isCheckMaxNumber()
Returnstrueif maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinTime
public boolean isCheckMinTime()
Returnstrueif minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxTime
public boolean isCheckMaxTime()
Returnstrueif maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinDate
public boolean isCheckMinDate()
Returnstrueif minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxDate
public boolean isCheckMaxDate()
Returnstrueif maximum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMinTimestamp
public boolean isCheckMinTimestamp()
Returnstrueif minimum value is checked.- Returns:
- true if the value is checked, false if the value will not be checked
-
isCheckMaxTimestamp
public boolean isCheckMaxTimestamp()
Returnstrueif 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)
-
-