Class MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<KnowledgeBase>
-
- com.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase.KnowledgeBaseDescriptor
-
- com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor
-
- Enclosing class:
- MongoDBKnowledgeBase
@Extension public static class MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor extends KnowledgeBase.KnowledgeBaseDescriptor
Descriptor forMongoDBKnowledgeBase
.
-
-
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 Constructor Description MongoDBKnowledgeBaseDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormValidation
doCheckDbName(String value)
Checks that the database name is not empty.FormValidation
doCheckHost(String value)
Checks that the host name is not empty.FormValidation
doCheckPort(String value)
Checks that the port number is not empty and is a number.FormValidation
doTestConnection(String host, int port, String dbName, String userName, String password, boolean tls, boolean retryWrites)
Tests if the provided parameters can connect to the Mongo database.int
getDefaultPort()
Convenience method for jelly.String
getDisplayName()
-
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase.KnowledgeBaseDescriptor
all
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, 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
-
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<KnowledgeBase>
-
getDefaultPort
public int getDefaultPort()
Convenience method for jelly.- Returns:
- the default port.
-
doCheckHost
public FormValidation doCheckHost(@QueryParameter("value") String value)
Checks that the host name is not empty.- Parameters:
value
- the pattern to check.- Returns:
FormValidation.ok()
if everything is well.
-
doCheckPort
public FormValidation doCheckPort(@QueryParameter("value") String value)
Checks that the port number is not empty and is a number.- Parameters:
value
- the port number to check.- Returns:
FormValidation.ok()
if everything is well.
-
doCheckDbName
public FormValidation doCheckDbName(@QueryParameter("value") String value)
Checks that the database name is not empty.- Parameters:
value
- the database name to check.- Returns:
FormValidation.ok()
if everything is well.
-
doTestConnection
@POST public FormValidation doTestConnection(@QueryParameter("host") String host, @QueryParameter("port") int port, @QueryParameter("dbName") String dbName, @QueryParameter("userName") String userName, @QueryParameter("password") String password, @QueryParameter("tls") boolean tls, @QueryParameter("retrywrites") boolean retryWrites)
Tests if the provided parameters can connect to the Mongo database.- Parameters:
host
- the host name.port
- the port.dbName
- the database name.userName
- the user name.password
- the password.tls
- the tls option.retryWrites
- the retry_writes option- Returns:
FormValidation.ok()
if can be done,FormValidation.error(java.lang.String)
otherwise.
-
-