Class AbstractPropertiesProvider

All Implemented Interfaces:
ExtensionPoint, Saveable, OnMaster
Direct Known Subclasses:
PropertiesConfig.PropertiesConfigProvider

public abstract class AbstractPropertiesProvider extends AbstractConfigProviderImpl
  • Constructor Details

    • AbstractPropertiesProvider

      public AbstractPropertiesProvider()
  • Method Details

    • getContentType

      public ContentType getContentType()
      Description copied from class: ConfigProvider
      The content type of the configs this provider manages. e.g. can be used to display the content in the UI (editor).
      Specified by:
      getContentType in class ConfigProvider
      Returns:
      the type. null if no specific formatting should be supported.
    • supplyContent

      public String supplyContent(Config configFile, Run<?,?> build, FilePath workDir, TaskListener listener, List<String> tempFiles) throws IOException
      Description copied from class: ConfigProvider
      Provide 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 override ConfigProvider.getSensitiveContentForMasking(Config, Run) to avoid accidental disclosure.
      Overrides:
      supplyContent in class ConfigProvider
      Parameters:
      configFile - the file content to be provided
      workDir - target workspace directory
      listener - the listener
      tempFiles - 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

      @NonNull public List<String> getSensitiveContentForMasking(Config configFile, Run<?,?> build)
      Description copied from class: ConfigProvider
      Obtain a list of sensitive Strings to mask for the given provider and build. For example if a UsernamePasswordCredentials is 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:
      getSensitiveContentForMasking in class ConfigProvider
      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.