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 ObjectconvertSimpleValue(IJobDescriptor.IJobParameterType type, Object value) Simple conversion to given type.convertValue(Object value) Helper method for conversion from arbitraryObjectto 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 isnullIllegalArgumentException- if name isnullIllegalArgumentException- if label isnullIllegalArgumentException- 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.IJobParameterHelper method for conversion from arbitraryObjectto desired class.It is not required that
nullis converted tonullor that non-nullis not converted tonull.- Parameters:
value- arbitrary value (may benull)- Returns:
- converted value or
null
-