Package com.polarion.platform.jobs.spi
Class AbstractJobParameter
java.lang.Object
com.polarion.platform.jobs.spi.AbstractJobParameter
- All Implemented Interfaces:
IJobDescriptor.IJobParameter
- Direct Known Subclasses:
ArrayJobParameter,BuildArtifactJobParameter,LocationJobParameter,PathJobParameter,PropertiesJobParameter,SimpleJobParameter
Abstract
IJobDescriptor.IJobParameter.
Parameter is by default active and required, has no default value and no description.
Allows to modify all values which are not protected by dynamic change.
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractJobParameter(IJobDescriptor.IJobParameterGroup group, String name, String label, IJobDescriptor.IJobParameterType type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionDefault value.Human-readable description (if any).getGroup()Parent group.getLabel()Human-readable label.getName()Name.getType()Type.booleanisActive()Whether this parameter is active.booleanWhether this parameter is required.setActive(boolean active) Set active flag.setDefaultValue(Object defaultValue) Set default value.setDescription(String description) Set description;Set label.setRequired(boolean required) Set required flag.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.polarion.platform.jobs.IJobDescriptor.IJobParameter
convertValue
-
Constructor Details
-
AbstractJobParameter
public AbstractJobParameter(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
-
getDefaultValue
Description copied from interface:IJobDescriptor.IJobParameterDefault value.- Specified by:
getDefaultValuein interfaceIJobDescriptor.IJobParameter- Returns:
- default value or
null
-
getDescription
Description copied from interface:IJobDescriptor.IJobParameterHuman-readable description (if any).- Specified by:
getDescriptionin interfaceIJobDescriptor.IJobParameter- Returns:
- description or
null
-
getGroup
Description copied from interface:IJobDescriptor.IJobParameterParent group.Protected from dynamic change.
- Specified by:
getGroupin interfaceIJobDescriptor.IJobParameter- Returns:
- parameter group (not
null)
-
getLabel
Description copied from interface:IJobDescriptor.IJobParameterHuman-readable label.- Specified by:
getLabelin interfaceIJobDescriptor.IJobParameter- Returns:
- label (not
null)
-
getName
Description copied from interface:IJobDescriptor.IJobParameterName.Unique within one job descriptor.
Protected from dynamic change.
- Specified by:
getNamein interfaceIJobDescriptor.IJobParameter- Returns:
- name (not
null)
-
getType
Description copied from interface:IJobDescriptor.IJobParameterType.Protected from dynamic change.
- Specified by:
getTypein interfaceIJobDescriptor.IJobParameter- Returns:
- type (not
null)
-
isActive
public boolean isActive()Description copied from interface:IJobDescriptor.IJobParameterWhether this parameter is active.(In)activity is used in dynamic descriptors to mark configuration currently unnecessary.
- Specified by:
isActivein interfaceIJobDescriptor.IJobParameter- Returns:
trueif this parameter is active,falseotherwise
-
isRequired
public boolean isRequired()Description copied from interface:IJobDescriptor.IJobParameterWhether this parameter is required.Only relevant if
IJobDescriptor.IJobParameter.isActive()istrue.- Specified by:
isRequiredin interfaceIJobDescriptor.IJobParameter- Returns:
trueif parameter is required,falseotherwise
-
setActive
Set active flag.- Parameters:
active- active flag- Returns:
- this
- See Also:
-
setDefaultValue
Set default value.- Parameters:
defaultValue- default value (can benull)- Returns:
- this
- See Also:
-
setDescription
Set description;- Parameters:
description- description (can benull)- Returns:
- this
- See Also:
-
setLabel
Set label.- Parameters:
label- label- Returns:
- this
- Throws:
IllegalArgumentException- if label isnull- See Also:
-
setRequired
Set required flag.- Parameters:
required- required flag- Returns:
- this
- See Also:
-