Class AbstractPropertiesProvider
java.lang.Object
hudson.model.Descriptor<Config>
org.jenkinsci.lib.configprovider.ConfigProvider
org.jenkinsci.lib.configprovider.AbstractConfigProviderImpl
org.jenkinsci.plugins.configfiles.properties.AbstractPropertiesProvider
- All Implemented Interfaces:
ExtensionPoint,Saveable,Loadable,OnMaster
- Direct Known Subclasses:
PropertiesConfig.PropertiesConfigProvider
-
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 org.jenkinsci.lib.configprovider.AbstractConfigProviderImpl
configsFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe content type of the configs this provider manages.getSensitiveContentForMasking(Config configFile, Run<?, ?> build) Obtain a list of sensitive Strings to mask for the given provider and build.supplyContent(Config configFile, Run<?, ?> build, FilePath workDir, TaskListener listener, List<String> tempFiles) Provide the given content file.Methods inherited from class org.jenkinsci.lib.configprovider.AbstractConfigProviderImpl
clearOldDataStorage, convert, getConfigs, getConfigXml, getProviderId, getXmlFileName, load, saveMethods inherited from class org.jenkinsci.lib.configprovider.ConfigProvider
all, configExists, getAllConfigs, getByIdOrNull, getConfigById, newConfig, newConfig, newConfig, remove, save, supportsFolderMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, self, toArray, toList, toMap
-
Constructor Details
-
AbstractPropertiesProvider
public AbstractPropertiesProvider()
-
-
Method Details
-
getContentType
Description copied from class:ConfigProviderThe content type of the configs this provider manages. e.g. can be used to display the content in the UI (editor).- Specified by:
getContentTypein classConfigProvider- Returns:
- the type.
nullif no specific formatting should be supported.
-
supplyContent
public String supplyContent(Config configFile, Run<?, ?> build, FilePath workDir, TaskListener listener, List<String> tempFiles) throws IOExceptionDescription copied from class:ConfigProviderProvide the given content file. Implementation Note:If this is overridden in a sub class and credentials are injected into the content - then the implementation must also overrideConfigProvider.getSensitiveContentForMasking(Config, Run)to avoid accidental disclosure.- Overrides:
supplyContentin classConfigProvider- Parameters:
configFile- the file content to be providedworkDir- target workspace directorylistener- the listenertempFiles- temp files created by this method, these files will be deleted by the caller- Returns:
- file content
- Throws:
IOException- in case an exception occurs when providing the content or other needed files- See Also:
-
getSensitiveContentForMasking
Description copied from class:ConfigProviderObtain a list of sensitive Strings to mask for the given provider and build. For example if aUsernamePasswordCredentialsis being injected into a file then the password (and possibly the username) from the resolved credential would need to be masked and should be returned here.- Overrides:
getSensitiveContentForMaskingin classConfigProvider- Parameters:
configFile- the file content to provide sensitive strings for.build- the build for which the configFile applies.- Returns:
- List of Strings that need to be masked in the console.
-