/** * Specifies the authentication type for clients created with a * DatabaseClientFactory.Bean object based on a string value. * @param authentication the authentication type */ public void setAuthenticationValue(String authentication) { this.authentication = Authentication.valueOfUncased(authentication); } /**
@Override public void destroy() throws Exception { if (client != null) { client.release(); } }
/** * Creates a client to access the database by means of a REST server * without any authentication. Such clients can be convenient for * experimentation but should not be used in production. * * @param host the host with the REST server * @param port the port for the REST server * @return a new client for making database requests */ static public DatabaseClient newClient(String host, int port) { return newClient(host, port, null, null, null, null, null); }
public static DatabaseClient newAdminClient() { return DatabaseClientFactory.newClient( Common.HOST, Common.PORT, new DigestAuthContext(Common.REST_ADMIN_USER, Common.REST_ADMIN_PASS), CONNECTION_TYPE); } public static DatabaseClient newServerAdminClient() {
private DatabaseClientFactory.Bean makeClientBeanFactory() { DatabaseClientFactory.Bean clientFactoryBean = new DatabaseClientFactory.Bean(); DatabaseClientFactory.DigestAuthContext clientFactoryContext = new DatabaseClientFactory.DigestAuthContext(Common.USER, Common.PASS); clientFactoryBean.setHost(Common.HOST); clientFactoryBean.setPort(Common.PORT); clientFactoryBean.setSecurityContext(clientFactoryContext); return clientFactoryBean; }
private DatabaseClientFactory.Bean makeClientFactory() { DatabaseClientFactory.Bean clientFactoryBean = new DatabaseClientFactory.Bean(); clientFactoryBean.setHost(Common.HOST); clientFactoryBean.setPort(Common.PORT); clientFactoryBean.setUser(Common.USER); clientFactoryBean.setPassword(Common.PASS); clientFactoryBean.setAuthentication(Authentication.DIGEST); return clientFactoryBean; }
public TestManager(DatabaseClient client, ServiceResponseUnmarshaller unitTestXmlParser) { super(); this.unitTestXmlParser = unitTestXmlParser; client.init("marklogic-unit-test", this); }
@Override public void verify(String hostname, String[] cns, String[] subjectAlts) throws SSLException { verifier.verify(hostname, cns, subjectAlts); } }
public void accept(Boolean resendable) { if (!isResendable) { checkFirstRequest(); throw new ResourceNotResendableException( "Cannot retry request for " + path); } } };
@Override public void verify(String hostname, String[] cns, String[] subjectAlts) throws SSLException { throw new MarkLogicInternalException( "SSLHostnameVerifier.Builtin called directly instead of passed as parameter"); } /**
@Override public <T extends StructureReadHandle> T readStatus(T handle) { return realTransaction.readStatus(handle); } @Override
public static DatabaseClient newClient(String databaseName) { return DatabaseClientFactory.newClient(Common.HOST, Common.PORT, databaseName, new DatabaseClientFactory.DigestAuthContext(Common.USER, Common.PASS), CONNECTION_TYPE); } public static DatabaseClient newAdminClient() {
/** * Creates a client to access the database by means of a REST server * without any authentication. Such clients can be convenient for * experimentation but should not be used in production. * * @param host the host with the REST server * @param port the port for the REST server * @return a new client for making database requests */ static public DatabaseClient newClient(String host, int port) { return newClient(host, port, null, null, null, null, null, null); }
@Override public void close() throws IOException { if (!settings.isReferencedConnectionUsed) { connectionClient.release(); } }
public JobDeleteResource(DatabaseClient srcClient) { super(); this.srcClient = srcClient; this.srcClient.init(DELETE_SERVICE, this); }
public void accept(Boolean resendable) { if (!isResendable) { checkFirstRequest(); throw new ResourceNotResendableException("Cannot retry request for " + path); } } };
public static DatabaseClient newReadOnlyClient() { return DatabaseClientFactory.newClient( Common.HOST, Common.PORT, new DigestAuthContext(Common.READ_ONLY_USER, Common.READ_ONLY_PASS), CONNECTION_TYPE); }
@Override public void close() throws IOException { if (!settings.isReferencedConnectionUsed) { connectionClient.release(); } }
public static DatabaseClient newServerAdminClient() { return DatabaseClientFactory.newClient( Common.HOST, Common.PORT, new DigestAuthContext(Common.SERVER_ADMIN_USER, Common.SERVER_ADMIN_PASS), CONNECTION_TYPE); } public static DatabaseClient newEvalClient() {
public static DatabaseClient newEvalClient(String databaseName) { return DatabaseClientFactory.newClient( Common.HOST, Common.PORT, databaseName, new DigestAuthContext(Common.EVAL_USER, Common.EVAL_PASS), CONNECTION_TYPE); } public static DatabaseClient newReadOnlyClient() {