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.String
NODE_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.boolean
getBooleanValue(RequestKeys requestKeys)
Returns the boolean value of a parameter.java.lang.String
getDefaultValue()
Get the default value associated with this parameter.java.lang.Object
getDefaultValueObject()
Get the default generic object associated with this parameter.java.lang.String
getDescription()
Returns the textual description of this Task parameter.int
getIntValue(RequestKeys requestKeys)
Returns the integer value of a parameter.protected java.lang.String
getKeyAttribute()
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 thegetKey
andsetKey
methods.long
getLongValue(RequestKeys requestKeys)
Returns the long value of a parameter.java.lang.String
getName()
Returns the name of this Task parameter.PostedFile
getPostedFile(TaskRequestContext context)
Returns data file uploaded by user via a "multipart/form-data" request form.java.lang.String
getType()
Returns the data type of this Task parameter.java.lang.String
getValidator()
Returns the data type validator of this Task parameter.java.lang.String
getValue(RequestKeys requestKeys)
Returns the value of a parameter, given the supplied input parameters.java.util.Enumeration
getValueObject(RequestKeys requestKeys)
Returns the enumeration of value objects of a parameter, given the supplied input parameters.boolean
isHidden()
boolean
isRequired()
Whether this Task parameter is required, and must be supplied in all Task invocations.void
setDefaultValue(java.lang.Object defValue)
Specifies a default value for this parameter.void
setDefaultValue(java.lang.String defValue)
Deprecated.UsesetDefaultValue(Object)
insteadvoid
setDescription(java.lang.String desc)
Sets the description for a task parameter.void
setHidden(boolean isHidden)
Sets whether this parameter is private or not.void
setName(java.lang.String name)
void
setRequired(boolean required)
Sets whether this parameter is required or not.void
setType(java.lang.String type)
void
setValidator(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:TaskParameterMetadata
Returns the name of this Task parameter.- Specified by:
getName
in interfaceTaskParameterMetadata
- Returns:
- The name of this Task parameter.
-
isRequired
public boolean isRequired()
Description copied from interface:TaskParameterMetadata
Whether this Task parameter is required, and must be supplied in all Task invocations.- Specified by:
isRequired
in interfaceTaskParameterMetadata
- Returns:
- True, if this parameter is required; otherwise, false.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TaskParameterMetadata
Returns the textual description of this Task parameter.- Specified by:
getDescription
in interfaceTaskParameterMetadata
- Returns:
- The textual description of this Task parameter.
-
isHidden
public boolean isHidden()
- Specified by:
isHidden
in interfaceTaskParameterMetadata
-
getDefaultValue
public java.lang.String getDefaultValue()
Description copied from interface:TaskParameterMetadata
Get the default value associated with this parameter.- Specified by:
getDefaultValue
in interfaceTaskParameterMetadata
- Returns:
- The default value, or null, if no default value is specified.
-
getDefaultValueObject
public java.lang.Object getDefaultValueObject()
Description copied from interface:TaskParameterMetadata
Get the default generic object associated with this parameter.- Specified by:
getDefaultValueObject
in 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:TaskParameterMetadata
Returns 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:
getValue
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns 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:
getValueObject
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns the boolean value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getBooleanValue
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns the integer value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getIntValue
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns the long value of a parameter. If not specified, a parameter's default value may be used.- Specified by:
getLongValue
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns an array of string values by parsing the parameter value and using the specified delimiter.- Specified by:
getArrayValue
in interfaceTaskParameterMetadata
- Parameters:
requestKeys
- ARequestKeys
object 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:TaskParameterMetadata
Returns an array of string values by parsing the parameter value. It assumes that array elements are separated (delimited) by commas.- Specified by:
getArrayValue
in 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:TaskParameterMetadata
Returns the data type of this Task parameter.- Specified by:
getType
in interfaceTaskParameterMetadata
- Returns:
- The data type of this Task parameter.
-
getValidator
public java.lang.String getValidator()
Description copied from interface:TaskParameterMetadata
Returns the data type validator of this Task parameter.- Specified by:
getValidator
in 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
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:AbstractConfigurationElement
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
-
getPostedFile
public PostedFile getPostedFile(TaskRequestContext context)
Description copied from interface:TaskParameterMetadata
Returns data file uploaded by user via a "multipart/form-data" request form. Note thatPostedFile
is always returned even if the user uploaded nothing -PostedFile.getLength()
should be checked for non-zero to indicate existence of data.- Specified by:
getPostedFile
in 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)
-
-