Class BasicJobDescriptor
- All Implemented Interfaces:
IJobDescriptor
IJobDescriptor implementation which is not hidden and presents only one (root) group.
Methods addParameter(com.polarion.platform.jobs.IJobDescriptor.IJobParameter)
and setDescription(String) must not be called after the descriptor is returned to the user
(because these values are protected from dynamic change).
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polarion.platform.jobs.IJobDescriptor
IJobDescriptor.IJobParameter, IJobDescriptor.IJobParameterChoice, IJobDescriptor.IJobParameterChoiceType, IJobDescriptor.IJobParameterGroup, IJobDescriptor.IJobParameterListType, IJobDescriptor.IJobParameterMultiChoiceType, IJobDescriptor.IJobParameterPrimitiveType, IJobDescriptor.IJobParameterStructureType, IJobDescriptor.IJobParameterType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new parameter.Human-readable job description (if any).Job unit used by dynamic descriptor.getLabel()Human-readable job label.getParameter(String name) Return parameter description of given name (if known).getParameterGroup(String name) Return parameter group of given name (if known).Root parameter group.booleanisHidden()Whether this job is hidden from user (not shown in UI).voidsetDescription(String description) Set description.
-
Constructor Details
-
BasicJobDescriptor
Constructor.- Parameters:
label- job labeljobUnit- job unit (may benull)- Throws:
IllegalArgumentException- if label isnull
-
-
Method Details
-
getDescription
Description copied from interface:IJobDescriptorHuman-readable job description (if any).Protected from dynamic change.
- Specified by:
getDescriptionin interfaceIJobDescriptor- Returns:
- description or
null
-
setDescription
Set description.- Parameters:
description- description ornull
-
getJobUnit
Description copied from interface:IJobDescriptorJob unit used by dynamic descriptor.Descriptor will not make any changes in this unit, it is fully under caller's control.
Protected from dynamic change.
- Specified by:
getJobUnitin interfaceIJobDescriptor- Returns:
- associated job unit or
null
-
getLabel
Description copied from interface:IJobDescriptorHuman-readable job label.Protected from dynamic change.
- Specified by:
getLabelin interfaceIJobDescriptor- Returns:
- label (not
null)
-
getParameter
Description copied from interface:IJobDescriptorReturn parameter description of given name (if known).Protected from dynamic change.
- Specified by:
getParameterin interfaceIJobDescriptor- Parameters:
name- parameter name- Returns:
- parameter or
nullif unknown
-
getParameterGroup
Description copied from interface:IJobDescriptorReturn parameter group of given name (if known).Protected from dynamic change.
- Specified by:
getParameterGroupin interfaceIJobDescriptor- Parameters:
name- group name- Returns:
- group or
nullif unknown
-
getRootParameterGroup
Description copied from interface:IJobDescriptorRoot parameter group.nullis returned only if there are no user-visible parameters.Although root group must have label, UI may choose to ignore it and skip this level.
Protected from dynamic change.
- Specified by:
getRootParameterGroupin interfaceIJobDescriptor- Returns:
- root parameter group or
null
-
isHidden
public boolean isHidden()Description copied from interface:IJobDescriptorWhether this job is hidden from user (not shown in UI).UI may decide to show hidden jobs for administration purposes.
Protected from dynamic change.
- Specified by:
isHiddenin interfaceIJobDescriptor- Returns:
trueif this job is hidden,falseotherwise
-
addParameter
Add new parameter.Parameters are presented in the order in which they were added.
- Parameters:
param- parameter- Throws:
IllegalArgumentException- if param isnull
-