Class BaseAIProvider.BaseProviderDescriptor
java.lang.Object
hudson.model.Descriptor<BaseAIProvider>
io.jenkins.plugins.explain_error.provider.BaseAIProvider.BaseProviderDescriptor
- Direct Known Subclasses:
AnthropicProvider.DescriptorImpl,AzureOpenAIProvider.DescriptorImpl,BedrockProvider.DescriptorImpl,CustomOktaAIProvider.DescriptorImpl,DeepSeekProvider.DescriptorImpl,GeminiProvider.DescriptorImpl,LangGraphProvider.DescriptorImpl,MicrosoftFoundryProvider.DescriptorImpl,OllamaProvider.DescriptorImpl,OpenAICompatibleProvider.DescriptorImpl,OpenAIProvider.DescriptorImpl,QwenProvider.DescriptorImpl
- Enclosing class:
BaseAIProvider
public abstract static class BaseAIProvider.BaseProviderDescriptor
extends Descriptor<BaseAIProvider>
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckConfigurePermission(AccessControlled context) Check that the user has permission to configure the plugin.doCheckUrl(String value) abstract Stringprotected final FormValidationrunConfigurationTest(AccessControlled context, BaseAIProvider provider) Template for the "Test Configuration" button: checks the caller's permission, sends a canned prompt through the fully-constructed provider, and renders either the standard success message or the failure response with connection diagnostics.protected final FormValidationtestConfigurationFailed(BaseAIProvider provider, Exception failure) Builds the failure response for a "Test Configuration" call: the provider error plus a layer-by-layer connection diagnostics report (proxy decision, DNS, TCP, HTTP probe, error cause chain) so admins can see where the connection breaks.Methods 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, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
BaseProviderDescriptor
public BaseProviderDescriptor()
-
-
Method Details
-
getDefaultModel
-
checkConfigurePermission
Check that the user has permission to configure the plugin. When called from an item context (folder, job), checksItem.CONFIGURE. When called from a global context, checksJenkins.ADMINISTER.- Parameters:
context- the access-controlled context, ornullfor global context
-
runConfigurationTest
protected final FormValidation runConfigurationTest(@CheckForNull AccessControlled context, BaseAIProvider provider) Template for the "Test Configuration" button: checks the caller's permission, sends a canned prompt through the fully-constructed provider, and renders either the standard success message or the failure response with connection diagnostics. Descriptors only construct the provider from their form fields and delegate here.- Parameters:
context- the item context of the form, ornullfor global configurationprovider- the provider instance built from the submitted form values- Returns:
- the outcome to render next to the button
-
testConfigurationFailed
Builds the failure response for a "Test Configuration" call: the provider error plus a layer-by-layer connection diagnostics report (proxy decision, DNS, TCP, HTTP probe, error cause chain) so admins can see where the connection breaks.- Parameters:
provider- the provider instance the test was run againstfailure- the exception the test failed with- Returns:
- a form validation error carrying the diagnostics report
-
doCheckUrl
-