public RestRepository(Settings settings) { this.settings = settings; this.resources = new Resources(settings); // Check if we have a read resource first, and if not, THEN check the write resource // The write resource has more strict parsing rules, and if the process is only reading // with a resource that isn't good for writing, then eagerly parsing the resource as a // write resource can erroneously throw an error. Instead, we should just get the write // resource lazily as needed. Assert.isTrue(resources.getResourceRead() != null || resources.getResourceWrite() != null, "Invalid configuration - No read or write resource specified"); this.client = new RestClient(settings); }
public RestRepository(Settings settings) { this.settings = settings; this.resources = new Resources(settings); // Check if we have a read resource first, and if not, THEN check the write resource // The write resource has more strict parsing rules, and if the process is only reading // with a resource that isn't good for writing, then eagerly parsing the resource as a // write resource can erroneously throw an error. Instead, we should just get the write // resource lazily as needed. Assert.isTrue(resources.getResourceRead() != null || resources.getResourceWrite() != null, "Invalid configuration - No read or write resource specified"); this.client = new RestClient(settings); }
public RestRepository(Settings settings) { this.settings = settings; this.resources = new Resources(settings); // Check if we have a read resource first, and if not, THEN check the write resource // The write resource has more strict parsing rules, and if the process is only reading // with a resource that isn't good for writing, then eagerly parsing the resource as a // write resource can erroneously throw an error. Instead, we should just get the write // resource lazily as needed. Assert.isTrue(resources.getResourceRead() != null || resources.getResourceWrite() != null, "Invalid configuration - No read or write resource specified"); this.client = new RestClient(settings); }
public RestRepository(Settings settings) { this.settings = settings; this.resources = new Resources(settings); // Check if we have a read resource first, and if not, THEN check the write resource // The write resource has more strict parsing rules, and if the process is only reading // with a resource that isn't good for writing, then eagerly parsing the resource as a // write resource can erroneously throw an error. Instead, we should just get the write // resource lazily as needed. Assert.isTrue(resources.getResourceRead() != null || resources.getResourceWrite() != null, "Invalid configuration - No read or write resource specified"); this.client = new RestClient(settings); }