Class HiddenJobDescriptor

java.lang.Object
com.polarion.platform.jobs.spi.HiddenJobDescriptor
All Implemented Interfaces:
IJobDescriptor

public class HiddenJobDescriptor extends Object implements IJobDescriptor
IJobDescriptor implementation intended for hidden jobs (not shown to the user in scheduler UI and similar places).

Returns true from isHidden() and null from getParameterGroup(String).

Version:
$Revision$ $Date$
Author:
Stepan Roh, Polarion Software
  • Constructor Details

    • HiddenJobDescriptor

      public HiddenJobDescriptor(String label, IJobUnit jobUnit)
      Constructor.
      Parameters:
      label - job label
      jobUnit - job unit (may be null)
      Throws:
      IllegalArgumentException - if label is null
  • Method Details

    • getLabel

      public String getLabel()
      Description copied from interface: IJobDescriptor
      Human-readable job label.

      Protected from dynamic change.

      Specified by:
      getLabel in interface IJobDescriptor
      Returns:
      label (not null)
    • getDescription

      public String getDescription()
      Description copied from interface: IJobDescriptor
      Human-readable job description (if any).

      Protected from dynamic change.

      Specified by:
      getDescription in interface IJobDescriptor
      Returns:
      description 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 interface IJobDescriptor
      Returns:
      true if this job is hidden, false otherwise
    • getRootParameterGroup

      public IJobDescriptor.IJobParameterGroup 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 interface IJobDescriptor
      Returns:
      root parameter group or null
    • getParameterGroup

      public IJobDescriptor.IJobParameterGroup getParameterGroup(String name)
      Description copied from interface: IJobDescriptor
      Return parameter group of given name (if known).

      Protected from dynamic change.

      Specified by:
      getParameterGroup in interface IJobDescriptor
      Parameters:
      name - group name
      Returns:
      group or null if unknown
    • getParameter

      public IJobDescriptor.IJobParameter getParameter(String name)
      Description copied from interface: IJobDescriptor
      Return parameter description of given name (if known).

      Protected from dynamic change.

      Specified by:
      getParameter in interface IJobDescriptor
      Parameters:
      name - parameter name
      Returns:
      parameter or null if unknown
    • getJobUnit

      public IJobUnit 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 interface IJobDescriptor
      Returns:
      associated job unit or null