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
ConstructorDescriptionAbstractJobParameter
(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.boolean
isActive()
Whether this parameter is active.boolean
Whether 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, wait
Methods 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 isnull
IllegalArgumentException
- if name isnull
IllegalArgumentException
- if label isnull
IllegalArgumentException
- if type isnull
-
-
Method Details
-
getDefaultValue
Description copied from interface:IJobDescriptor.IJobParameter
Default value.- Specified by:
getDefaultValue
in interfaceIJobDescriptor.IJobParameter
- Returns:
- default value or
null
-
getDescription
Description copied from interface:IJobDescriptor.IJobParameter
Human-readable description (if any).- Specified by:
getDescription
in interfaceIJobDescriptor.IJobParameter
- Returns:
- description or
null
-
getGroup
Description copied from interface:IJobDescriptor.IJobParameter
Parent group.Protected from dynamic change.
- Specified by:
getGroup
in interfaceIJobDescriptor.IJobParameter
- Returns:
- parameter group (not
null
)
-
getLabel
Description copied from interface:IJobDescriptor.IJobParameter
Human-readable label.- Specified by:
getLabel
in interfaceIJobDescriptor.IJobParameter
- Returns:
- label (not
null
)
-
getName
Description copied from interface:IJobDescriptor.IJobParameter
Name.Unique within one job descriptor.
Protected from dynamic change.
- Specified by:
getName
in interfaceIJobDescriptor.IJobParameter
- Returns:
- name (not
null
)
-
getType
Description copied from interface:IJobDescriptor.IJobParameter
Type.Protected from dynamic change.
- Specified by:
getType
in interfaceIJobDescriptor.IJobParameter
- Returns:
- type (not
null
)
-
isActive
public boolean isActive()Description copied from interface:IJobDescriptor.IJobParameter
Whether this parameter is active.(In)activity is used in dynamic descriptors to mark configuration currently unnecessary.
- Specified by:
isActive
in interfaceIJobDescriptor.IJobParameter
- Returns:
true
if this parameter is active,false
otherwise
-
isRequired
public boolean isRequired()Description copied from interface:IJobDescriptor.IJobParameter
Whether this parameter is required.Only relevant if
IJobDescriptor.IJobParameter.isActive()
istrue
.- Specified by:
isRequired
in interfaceIJobDescriptor.IJobParameter
- Returns:
true
if parameter is required,false
otherwise
-
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:
-