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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add 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.boolean
isHidden()
Whether this job is hidden from user (not shown in UI).void
setDescription
(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:IJobDescriptor
Human-readable job description (if any).Protected from dynamic change.
- Specified by:
getDescription
in interfaceIJobDescriptor
- Returns:
- description or
null
-
setDescription
Set description.- Parameters:
description
- description ornull
-
getJobUnit
Description copied from interface:IJobDescriptor
Job 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:
getJobUnit
in interfaceIJobDescriptor
- Returns:
- associated job unit or
null
-
getLabel
Description copied from interface:IJobDescriptor
Human-readable job label.Protected from dynamic change.
- Specified by:
getLabel
in interfaceIJobDescriptor
- Returns:
- label (not
null
)
-
getParameter
Description copied from interface:IJobDescriptor
Return parameter description of given name (if known).Protected from dynamic change.
- Specified by:
getParameter
in interfaceIJobDescriptor
- Parameters:
name
- parameter name- Returns:
- parameter or
null
if unknown
-
getParameterGroup
Description copied from interface:IJobDescriptor
Return parameter group of given name (if known).Protected from dynamic change.
- Specified by:
getParameterGroup
in interfaceIJobDescriptor
- Parameters:
name
- group name- Returns:
- group or
null
if unknown
-
getRootParameterGroup
Description copied from interface:IJobDescriptor
Root parameter group.null
is 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:
getRootParameterGroup
in interfaceIJobDescriptor
- Returns:
- root parameter group or
null
-
isHidden
public boolean isHidden()Description copied from interface:IJobDescriptor
Whether 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:
isHidden
in interfaceIJobDescriptor
- Returns:
true
if this job is hidden,false
otherwise
-
addParameter
Add new parameter.Parameters are presented in the order in which they were added.
- Parameters:
param
- parameter- Throws:
IllegalArgumentException
- if param isnull
-