Codota Logo
RESTServices$ResponseStatus
Code IndexAdd Codota to your IDE (free)

How to use
RESTServices$ResponseStatus
in
com.marklogic.client.impl

Best Java code snippets using com.marklogic.client.impl.RESTServices$ResponseStatus (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: marklogic/java-client-api

private void checkStatus(Response response, int status, String operation, String entityType,
             String path, ResponseStatus expected)
{
 if (!expected.isExpected(status)) {
  FailedRequest failure = extractErrorFields(response);
  if (status == STATUS_NOT_FOUND) {
   throw new ResourceNotFoundException("Could not " + operation
    + " " + entityType + " at " + path,
    failure);
  }
  if ("RESTAPI-CONTENTNOVERSION".equals(failure.getMessageCode())) {
   throw new FailedRequestException("Content version required to " +
    operation + " " + entityType + " at " + path, failure);
  } else if (status == STATUS_FORBIDDEN) {
   throw new ForbiddenUserException("User is not allowed to "
    + operation + " " + entityType + " at " + path,
    failure);
  }
  throw new FailedRequestException("failed to " + operation + " "
   + entityType + " at " + path + ": "
   + getReasonPhrase(response), failure);
 }
}
origin: com.marklogic/client-api-java

private void checkStatus(ClientResponse response,
    ClientResponse.Status status, String operation, String entityType,
    String path, ResponseStatus expected) {
  if (!expected.isExpected(status)) {
    if (status == ClientResponse.Status.NOT_FOUND) {
      throw new ResourceNotFoundException("Could not " + operation
          + " " + entityType + " at " + path,
          extractErrorFields(response));
    }
    if (status == ClientResponse.Status.FORBIDDEN) {
      throw new ForbiddenUserException("User is not allowed to "
          + operation + " " + entityType + " at " + path,
          extractErrorFields(response));
    }
    throw new FailedRequestException("failed to " + operation + " "
        + entityType + " at " + path + ": "
        + status.getReasonPhrase(), extractErrorFields(response));
  }
}
com.marklogic.client.implRESTServices$ResponseStatus

Most used methods

  • isExpected

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now