Class TaskParameterMetadataImpl
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.tasks.config.TaskParameterMetadataImpl
-
- All Implemented Interfaces:
ConfigurationElement,ConfigurationFile,TaskParameterMetadata,java.lang.Cloneable
public class TaskParameterMetadataImpl extends AbstractConfigurationElement implements TaskParameterMetadata
THIS CLASS IS NOT SUPPORTED FOR USE IN CUSTOM APPLICATION DEVELOPMENT. THE CLASS IS SUBJECT TO CHANGE IN FUTURE RELEASES AND SOME METHODS AND PROPERTIES MAY NOT BE SUITABLE FOR CUSTOM DEVELOPMENT.- Since:
- MicroStrategy Web 9.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNODE_PARAMETER-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description TaskParameterMetadataImpl()Constructs a TaskParameterMetadataImpl object.TaskParameterMetadataImpl(java.lang.String name)Constructs a TaskParameterMetadataImpl object.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String[]getArrayValue(RequestKeys requestKeys)Returns an array of string values by parsing the parameter value.java.lang.String[]getArrayValue(RequestKeys requestKeys, java.lang.String delim)Returns an array of string values by parsing the parameter value and using the specified delimiter.booleangetBooleanValue(RequestKeys requestKeys)Returns the boolean value of a parameter.java.lang.StringgetDefaultValue()Get the default value associated with this parameter.java.lang.ObjectgetDefaultValueObject()Get the default generic object associated with this parameter.java.lang.StringgetDescription()Returns the textual description of this Task parameter.intgetIntValue(RequestKeys requestKeys)Returns the integer value of a parameter.protected java.lang.StringgetKeyAttribute()This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKeyandsetKeymethods.longgetLongValue(RequestKeys requestKeys)Returns the long value of a parameter.java.lang.StringgetName()Returns the name of this Task parameter.PostedFilegetPostedFile(TaskRequestContext context)Returns data file uploaded by user via a "multipart/form-data" request form.java.lang.StringgetType()Returns the data type of this Task parameter.java.lang.StringgetValidator()Returns the data type validator of this Task parameter.java.lang.StringgetValue(RequestKeys requestKeys)Returns the value of a parameter, given the supplied input parameters.java.util.EnumerationgetValueObject(RequestKeys requestKeys)Returns the enumeration of value objects of a parameter, given the supplied input parameters.booleanisHidden()booleanisRequired()Whether this Task parameter is required, and must be supplied in all Task invocations.voidsetDefaultValue(java.lang.Object defValue)Specifies a default value for this parameter.voidsetDefaultValue(java.lang.String defValue)Deprecated.UsesetDefaultValue(Object)insteadvoidsetDescription(java.lang.String desc)Sets the description for a task parameter.voidsetHidden(boolean isHidden)Sets whether this parameter is private or not.voidsetName(java.lang.String name)voidsetRequired(boolean required)Sets whether this parameter is required or not.voidsetType(java.lang.String type)voidsetValidator(java.lang.String validator)-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getKey, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initDefaultAttributes, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reload, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
-
-
-
Field Detail
-
NODE_PARAMETER
public static final java.lang.String NODE_PARAMETER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TaskParameterMetadataImpl
public TaskParameterMetadataImpl()
Constructs a TaskParameterMetadataImpl object.
-
TaskParameterMetadataImpl
public TaskParameterMetadataImpl(java.lang.String name)
Constructs a TaskParameterMetadataImpl object.- Parameters:
name- The name of the task parameter.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:TaskParameterMetadataReturns the name of this Task parameter.- Specified by:
getNamein interfaceTaskParameterMetadata- Returns:
- The name of this Task parameter.
-
isRequired
public boolean isRequired()
Description copied from interface:TaskParameterMetadataWhether this Task parameter is required, and must be supplied in all Task invocations.- Specified by:
isRequiredin interfaceTaskParameterMetadata- Returns:
- True, if this parameter is required; otherwise, false.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TaskParameterMetadataReturns the textual description of this Task parameter.- Specified by:
getDescriptionin interfaceTaskParameterMetadata- Returns:
- The textual description of this Task parameter.
-
isHidden
public boolean isHidden()
- Specified by:
isHiddenin interfaceTaskParameterMetadata
-
getDefaultValue
public java.lang.String getDefaultValue()
Description copied from interface:TaskParameterMetadataGet the default value associated with this parameter.- Specified by:
getDefaultValuein interfaceTaskParameterMetadata- Returns:
- The default value, or null, if no default value is specified.
-
getDefaultValueObject
public java.lang.Object getDefaultValueObject()
Description copied from interface:TaskParameterMetadataGet the default generic object associated with this parameter.- Specified by:
getDefaultValueObjectin interfaceTaskParameterMetadata- Returns:
- The default value object, or null, if no default value is specified.
-
getValue
public java.lang.String getValue(RequestKeys requestKeys)
Description copied from interface:TaskParameterMetadataReturns the value of a parameter, given the supplied input parameters. If the parameter has been explicitly specified in the input parameters, it is returned. If not, and the default value is non-null, then that is returned. Otherwise, null is returned.- Specified by:
getValuein interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.- Returns:
- The computed value of the parameter for a specific request.
-
getValueObject
public java.util.Enumeration getValueObject(RequestKeys requestKeys)
Description copied from interface:TaskParameterMetadataReturns the enumeration of value objects of a parameter, given the supplied input parameters. If the parameter has been explicitly specified in the input parameters, it is returned. If not, and the default value is non-null, then that is returned. Otherwise, null is returned.- Specified by:
getValueObjectin interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.- Returns:
- The computed value of the parameter for a specific request.
-
getBooleanValue
public boolean getBooleanValue(RequestKeys requestKeys) throws TaskRequestMalformedException
Description copied from interface:TaskParameterMetadataReturns the boolean value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getBooleanValuein interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.- Returns:
- A boolean value for the parameter.
- Throws:
TaskRequestMalformedException- If the value cannot be converted to a boolean value. This condition indicates that the caller did not make a valid Task invocation.
-
getIntValue
public int getIntValue(RequestKeys requestKeys) throws TaskRequestMalformedException
Description copied from interface:TaskParameterMetadataReturns the integer value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getIntValuein interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.- Returns:
- An integer value for the parameter.
- Throws:
TaskRequestMalformedException- If the value cannot be converted to an integer. This condition indicates that the caller did not make a valid Task invocation.- See Also:
TaskParameterMetadata.getValue(RequestKeys)
-
getLongValue
public long getLongValue(RequestKeys requestKeys) throws TaskRequestMalformedException
Description copied from interface:TaskParameterMetadataReturns the long value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getLongValuein interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.- Returns:
- A long (integer) value for the parameter.
- Throws:
TaskRequestMalformedException- If the value cannot be converted to a long. This condition indicates that the caller did not make a valid Task invocation.- See Also:
TaskParameterMetadata.getValue(RequestKeys)
-
getArrayValue
public java.lang.String[] getArrayValue(RequestKeys requestKeys, java.lang.String delim)
Description copied from interface:TaskParameterMetadataReturns an array of string values by parsing the parameter value and using the specified delimiter.- Specified by:
getArrayValuein interfaceTaskParameterMetadata- Parameters:
requestKeys- ARequestKeysobject that contains the input parameters.delim- The String delimiter used to separate array elements.- Returns:
- An array of Strings (without delimiters included).
- See Also:
TaskParameterMetadata.getValue(RequestKeys)
-
getArrayValue
public java.lang.String[] getArrayValue(RequestKeys requestKeys)
Description copied from interface:TaskParameterMetadataReturns an array of string values by parsing the parameter value. It assumes that array elements are separated (delimited) by commas.- Specified by:
getArrayValuein interfaceTaskParameterMetadata- Returns:
- An array of Strings (without delimiters included).
- See Also:
TaskParameterMetadata.getArrayValue(RequestKeys, String)
-
getType
public java.lang.String getType()
Description copied from interface:TaskParameterMetadataReturns the data type of this Task parameter.- Specified by:
getTypein interfaceTaskParameterMetadata- Returns:
- The data type of this Task parameter.
-
getValidator
public java.lang.String getValidator()
Description copied from interface:TaskParameterMetadataReturns the data type validator of this Task parameter.- Specified by:
getValidatorin interfaceTaskParameterMetadata- Returns:
- The the data type validator of this Task parameter.
-
setName
public void setName(java.lang.String name)
-
setDescription
public void setDescription(java.lang.String desc)
Sets the description for a task parameter.- Parameters:
desc- The description to associate with this task parameter.
-
setRequired
public void setRequired(boolean required)
Sets whether this parameter is required or not.- Parameters:
required- Whether this parameter is required or not.
-
setHidden
public void setHidden(boolean isHidden)
Sets whether this parameter is private or not.- Parameters:
private- Whether this parameter is private or not.
-
setDefaultValue
public void setDefaultValue(java.lang.Object defValue)
Specifies a default value for this parameter.- Parameters:
defValue- The value to use if none is supplied.
-
setDefaultValue
@Deprecated public void setDefaultValue(java.lang.String defValue)
Deprecated.UsesetDefaultValue(Object)insteadSpecifies a default value for this parameter.- Parameters:
defValue- The value to use if none is supplied.
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElementThis method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKeyandsetKeymethods.- Specified by:
getKeyAttributein classAbstractConfigurationElement
-
getPostedFile
public PostedFile getPostedFile(TaskRequestContext context)
Description copied from interface:TaskParameterMetadataReturns data file uploaded by user via a "multipart/form-data" request form. Note thatPostedFileis always returned even if the user uploaded nothing -PostedFile.getLength()should be checked for non-zero to indicate existence of data.- Specified by:
getPostedFilein interfaceTaskParameterMetadata- Returns:
- the data uploaded with "multipart/form-data".
-
setType
public void setType(java.lang.String type)
-
setValidator
public void setValidator(java.lang.String validator)
-
-