@Extension public static class HALMConnection.DescriptorImpl extends Descriptor<HALMConnection>
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Selfclazz| Constructor and Description |
|---|
DescriptorImpl()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static FormValidation |
compareVersions(int[] minimumVersion,
String versionToCheck)
Compares a string based version (ex: "2022.2.0" vs a numeric based minimum version, ex: [2022, 2, 0] to determine
if the string based version is equal to, or newer than, the minimum version.
|
FormValidation |
doCheckAddress(String halmAPIAddress)
Validates that the address provided by the user is valid.
|
FormValidation |
doCheckConnectionName(String connectionName)
Verifies that the connection name is not blank.
|
FormValidation |
doCheckCredentialsID(String credentialsID)
Checks that the credentials ID has been set.
|
ListBoxModel |
doFillCredentialsIDItems(Item context,
String remote)
Fills the 'Credentials' dropdown.
|
ListBoxModel |
doFillCredentialTypeValueItems()
Populates the 'credentialType' dropdown with appropriate values.
|
FormValidation |
doTestConnection(String connectionUUID,
String connectionName,
String halmAPIAddress,
String credentialTypeValue,
String credentialsID,
boolean acceptSSLCertificates)
Validates that the provided HALM connection information settings are valid.
|
static String |
encodeInputAsValidFilename(String input)
Returns an encoded version of the given string that will be a valid filename.
|
String |
getDisplayName() |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap@NonNull public String getDisplayName()
getDisplayName in class Descriptor<HALMConnection>public ListBoxModel doFillCredentialsIDItems(@AncestorInPath Item context, @QueryParameter String remote)
context - - used to determine if the user can get a list of usersremote - - the remote server in questionpublic ListBoxModel doFillCredentialTypeValueItems()
@POST public FormValidation doCheckAddress(@QueryParameter(value="value") String halmAPIAddress)
halmAPIAddress - HALM REST API address@POST public FormValidation doCheckConnectionName(@QueryParameter(value="connectionName") String connectionName)
connectionName - Connection name to verify@POST public FormValidation doCheckCredentialsID(@QueryParameter(value="credentialsID") String credentialsID)
credentialsID - The selection in the credentials dropdown@POST public FormValidation doTestConnection(@QueryParameter(value="connectionUUID") String connectionUUID, @QueryParameter(value="connectionName") String connectionName, @QueryParameter(value="halmAPIAddress") String halmAPIAddress, @QueryParameter(value="credentialTypeValue") String credentialTypeValue, @QueryParameter(value="credentialsID") String credentialsID, @QueryParameter(value="acceptSSLCertificates") boolean acceptSSLCertificates)
connectionUUID - the connection's UUID, if it exists.connectionName - the connection's name from the fieldhalmAPIAddress - HALM REST API addresscredentialTypeValue - Basic vs Auth from the dropdowncredentialsID - Credential ID from Credentials pluginacceptSSLCertificates - Should this accept invalid certs?public static String encodeInputAsValidFilename(String input) throws UnsupportedEncodingException
input - The input string to encodeUnsupportedEncodingException - File must be UTF-8 encodedpublic static FormValidation compareVersions(int[] minimumVersion, String versionToCheck)
minimumVersion - Minimum supported version, as a numeric array: Ex: [2022, 2, 0]versionToCheck - Current version, as text. Ex: "2022.2.0"Copyright © 2016–2023. All rights reserved.