Package org.ow2.clif.jenkins
Class ClifPlugin
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- org.ow2.clif.jenkins.ClifPlugin
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ROOT_DIR
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description ClifPlugin()
Just callsload()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description File
dir()
Returns the File object representing the configured clif root directory in its absolute path form.FormValidation
doCheckClifRootDir(String value)
Validates a CLIF root folder.static ClifPlugin
get()
Get the ClifPlugin singleton managing CLIF's global parametersString
getClifRootDir()
Gets current value of CLIF root directory where CLIF archives are unzipped.void
load()
Loads the currently configured valuesvoid
setClifRootDir(String clifRootDir)
Configures a new value for CLIF root directory where CLIF archives are unzipped.-
Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Field Detail
-
DEFAULT_ROOT_DIR
public static final String DEFAULT_ROOT_DIR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClifPlugin
public ClifPlugin()
Just callsload()
-
-
Method Detail
-
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- Overrides:
load
in classDescriptor<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.
-
-