Package io.jenkins.plugins.prism
Class PrismConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.util.GlobalConfigurationItem
io.jenkins.plugins.prism.PrismConfiguration
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,OnMaster
@Extension
@Symbol("prismConfiguration")
public class PrismConfiguration
extends io.jenkins.plugins.util.GlobalConfigurationItem
Global system configuration for Prism. These configuration options are used globally for all jobs and require
administrator permissions.
The following settings can be configured:
- Allowed source code directories: some plugins copy source code files to Jenkins' build folder so that these files can be rendered in the user interface together with build results (coverage, warnings, etc.). If these files are not part of the workspace of a build then Jenkins will not show them by default: otherwise sensitive files could be shown by accident. You can provide a list of additional source code directories that are allowed to be shown in Jenkins user interface here. Note, that such a directory must be an absolute path on the agent that executes the build.
- Theme: Prism supports several themes that can be used to adapt the look and feel. You can configure the default theme that is used for all Jenkins jobs.
- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
ConstructorsConstructorDescriptionCreates the global configuration of source code directories and loads the initial values from the corresponding XML file. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidReturns all available themes.static PrismConfigurationReturns the singleton instance of thisPrismConfiguration.Returns the list of allowed source code directories.getTheme()booleanisAllowedSourceDirectory(String sourceDirectory) Returns whether the specified director is registered as permitted source code directory.voidsetSourceDirectories(List<PermittedSourceCodeDirectory> sourceDirectories) Sets the list of source directories to the specified elements.voidsetTheme(PrismTheme theme) Sets the active theme to be used when rendering the source code with prism.Methods inherited from class io.jenkins.plugins.util.GlobalConfigurationItem
configure, load, readResolve, saveMethods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, 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, self, toArray, toList, toMap
-
Constructor Details
-
PrismConfiguration
public PrismConfiguration()Creates the global configuration of source code directories and loads the initial values from the corresponding XML file.
-
-
Method Details
-
clearRepeatableProperties
protected void clearRepeatableProperties()- Overrides:
clearRepeatablePropertiesin classio.jenkins.plugins.util.GlobalConfigurationItem
-
getInstance
Returns the singleton instance of thisPrismConfiguration.- Returns:
- the singleton instance
-
getSourceDirectories
Returns the list of allowed source code directories.- Returns:
- the source root folders
-
setSourceDirectories
@DataBoundSetter public void setSourceDirectories(List<PermittedSourceCodeDirectory> sourceDirectories) Sets the list of source directories to the specified elements. Previously set directories will be removed.- Parameters:
sourceDirectories- the source directories that contain the affected files
-
isAllowedSourceDirectory
Returns whether the specified director is registered as permitted source code directory.- Parameters:
sourceDirectory- the source directory to check- Returns:
trueif the specified director is registered,falseotherwise
-
setTheme
Sets the active theme to be used when rendering the source code with prism.- Parameters:
theme- the theme to use
-
getTheme
-
doFillThemeItems
Returns all available themes.- Returns:
- a model with all available themes
-