Class MongoDBKnowledgeBase.MongoDBKnowledgeBaseDescriptor

    • Constructor Detail

      • MongoDBKnowledgeBaseDescriptor

        public MongoDBKnowledgeBaseDescriptor()
    • Method Detail

      • 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.