Class ExplainErrorFolderProperty

java.lang.Object
hudson.model.AbstractDescribableImpl<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<com.cloudbees.hudson.plugins.folder.AbstractFolder<?>>
io.jenkins.plugins.explain_error.ExplainErrorFolderProperty
All Implemented Interfaces:
ExtensionPoint, Describable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>, ReconfigurableDescribable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>

public class ExplainErrorFolderProperty extends com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<com.cloudbees.hudson.plugins.folder.AbstractFolder<?>>
Folder property for folder-level AI provider configuration. Allows teams to configure their own AI provider settings at the folder level.
  • Constructor Details

    • ExplainErrorFolderProperty

      @DataBoundConstructor public ExplainErrorFolderProperty()
  • Method Details

    • getAiProvider

      @CheckForNull public BaseAIProvider getAiProvider()
      Get the AI provider configured for this folder.
      Returns:
      the AI provider, or null if not configured
    • setAiProvider

      @DataBoundSetter public void setAiProvider(BaseAIProvider aiProvider)
      Set the AI provider for this folder.
      Parameters:
      aiProvider - the AI provider to use
    • isEnableExplanation

      public boolean isEnableExplanation()
      Check if error explanation is enabled for this folder.
      Returns:
      true if enabled, false otherwise
    • setEnableExplanation

      @DataBoundSetter public void setEnableExplanation(boolean enableExplanation)
      Set whether error explanation is enabled for this folder. When disabled, also clears the AI provider to ensure fallback to global configuration.
      Parameters:
      enableExplanation - true to enable, false to disable
    • findFolderProvider

      @CheckForNull public static BaseAIProvider findFolderProvider(@CheckForNull ItemGroup<?> itemGroup)
      Recursively search for folder-level AI provider configuration. Walks up the folder hierarchy until a configuration is found.
      Parameters:
      itemGroup - the item group to search from
      Returns:
      the AI provider if found at folder level, null otherwise
    • isFolderExplanationEnabled

      public static boolean isFolderExplanationEnabled(@CheckForNull ItemGroup<?> itemGroup)
      Check if error explanation is enabled at folder level. Walks up the folder hierarchy to find the configuration.
      Parameters:
      itemGroup - the item group to search from
      Returns:
      true if enabled at folder level (default true if not configured)