Package com.polarion.platform.jobs.spi
Class SimpleJobParameter
java.lang.Object
com.polarion.platform.jobs.spi.AbstractJobParameter
com.polarion.platform.jobs.spi.SimpleJobParameter
- All Implemented Interfaces:
IJobDescriptor.IJobParameter
Simple
IJobDescriptor.IJobParameter
.
Value passed to convertValue(Object)
can be one of these:
null
- class from associated
IJobDescriptor.IJobParameterType.getTypeClass()
or its subclass - arbitrary object
If arbitrary object is passed then single-string-argument constructor of associated
IJobDescriptor.IJobParameterType.getTypeClass()
is invoked with stringified object.
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleJobParameter
(IJobDescriptor.IJobParameterGroup group, String name, String label, IJobDescriptor.IJobParameterType type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
convertSimpleValue
(IJobDescriptor.IJobParameterType type, Object value) Simple conversion to given type.convertValue
(Object value) Helper method for conversion from arbitraryObject
to desired class.Methods inherited from class com.polarion.platform.jobs.spi.AbstractJobParameter
getDefaultValue, getDescription, getGroup, getLabel, getName, getType, isActive, isRequired, setActive, setDefaultValue, setDescription, setLabel, setRequired
-
Constructor Details
-
SimpleJobParameter
public SimpleJobParameter(IJobDescriptor.IJobParameterGroup group, String name, String label, IJobDescriptor.IJobParameterType type) Constructor.- Parameters:
group
- job parameter groupname
- job namelabel
- job labeltype
- parameter type- Throws:
IllegalArgumentException
- if group isnull
IllegalArgumentException
- if name isnull
IllegalArgumentException
- if label isnull
IllegalArgumentException
- if type isnull
-
-
Method Details
-
convertSimpleValue
Simple conversion to given type.- Parameters:
type
- target typevalue
- source value- Returns:
- converted value
- Since:
- 3.3.1
- See Also:
-
convertValue
Description copied from interface:IJobDescriptor.IJobParameter
Helper method for conversion from arbitraryObject
to desired class.It is not required that
null
is converted tonull
or that non-null
is not converted tonull
.- Parameters:
value
- arbitrary value (may benull
)- Returns:
- converted value or
null
-