Class ClifPlugin

All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Symbol("clifGlobalConfig") public class ClifPlugin extends GlobalConfiguration
Global configuration parameters for the Clif plugin. As of today, there is a single parameter: clifRootDir. It specifies the folder where to unzip imported CLIF project archives. Such imported archives will possibly result is having multiple jobs (one per imported test plan) sharing a single workspace containing all files extracted from one CLIF project archive. Each imported archive gets its own sub-folder created in the configured root folder. This sub-folder is named according to the CLIF project folder's name in the archive.
Author:
Julien Coste, Bruno Dillenseger
  • Field Details

  • Constructor Details

    • ClifPlugin

      public ClifPlugin()
      Just calls load()
  • Method Details

    • get

      @CheckForNull public static ClifPlugin get()
      Get the ClifPlugin singleton managing CLIF's global parameters
      Returns:
      the ClifPlugin singleton
    • load

      public void load()
      Loads the currently configured values
      Specified by:
      load in interface Loadable
      Overrides:
      load in class Descriptor<GlobalConfiguration>
    • getClifRootDir

      public String getClifRootDir()
      Gets current value of CLIF root directory where CLIF archives are unzipped.
      Returns:
      The configured Clif root directory.
    • setClifRootDir

      public void setClifRootDir(String clifRootDir)
      Configures a new value for CLIF root directory where CLIF archives are unzipped.
      Parameters:
      clifRootDir - the new root directory for imported CLIF projects. If blank, the new value is set to the default value "clif"
    • dir

      @Nonnull public File dir()
      Returns the File object representing the configured clif root directory in its absolute path form. When the configured root folder is a relative path, it is resolved from the Jenkins' installation root directory.
      Returns:
      A file object representing the configured Clif root parameter
    • doCheckClifRootDir

      public FormValidation doCheckClifRootDir(@QueryParameter String value)
      Validates a CLIF root folder. The folder is valid either if it exists, is actually a folder and is writable, or if the closest existing parent file in its absolute path is a writable folder. In other words, validation relies on the availability of the CLIF root folder or the ability to create it.
      Parameters:
      value - the new value for CLIF root folder
      Returns:
      validation result (ok or error) with an explicit, localized message.