com.sonyericsson.jenkins.plugins.bfa.db
Class MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor

java.lang.Object
  extended by hudson.model.Descriptor<KnowledgeBase>
      extended by com.sonyericsson.jenkins.plugins.bfa.db.KnowledgeBase.KnowledgeBaseDescriptor
          extended by com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
MongoDBKnowledgeBase

@Extension
public static class MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor
extends KnowledgeBase.KnowledgeBaseDescriptor

Descriptor for LocalFileKnowledgeBase.


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor()
           
 
Method Summary
 hudson.util.FormValidation doCheckDBName(String value)
          Checks that the database name is not empty.
 hudson.util.FormValidation doCheckHost(String value)
          Checks that the host name is not empty.
 hudson.util.FormValidation doCheckPort(String value)
          Checks that the port number is not empty and is a number.
 hudson.util.FormValidation doTestConnection(String host, int port, String dbName, String userName, String password)
          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, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor

public MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor()
Method Detail

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<KnowledgeBase>

getDefaultPort

public int getDefaultPort()
Convenience method for jelly.

Returns:
the default port.

doCheckHost

public hudson.util.FormValidation doCheckHost(@QueryParameter(value="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 hudson.util.FormValidation doCheckPort(@QueryParameter(value="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 hudson.util.FormValidation doCheckDBName(@QueryParameter(value="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

public hudson.util.FormValidation doTestConnection(@QueryParameter(value="host")
                                                   String host,
                                                   @QueryParameter(value="port")
                                                   int port,
                                                   @QueryParameter(value="dbName")
                                                   String dbName,
                                                   @QueryParameter(value="userName")
                                                   String userName,
                                                   @QueryParameter(value="password")
                                                   String password)
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.
Returns:
FormValidation.ok() if can be done, FormValidation.error(java.lang.String) otherwise.


Copyright © 2004-2014. All Rights Reserved.