Tabnine Logo
Status.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.restlet.data.Status

Best Java code snippets using org.restlet.data.Status.getName (Showing top 9 results out of 315)

origin: org.restlet/org.restlet

/**
 * Constructor.
 * 
 * @param status
 *            The status to copy.
 * @param throwable
 *            The related error or exception.
 */
public Status(final Status status, final Throwable throwable) {
  this(status.getCode(), throwable, status.getName(),
      (throwable == null) ? null : throwable.getMessage(), status
          .getUri());
}
origin: org.restlet/org.restlet

/**
 * Constructor.
 * 
 * @param status
 *            The status to copy.
 * @param description
 *            The description to associate.
 */
public Status(final Status status, final String description) {
  this(status.getCode(), status.getName(), description, status.getUri());
}
origin: org.restlet/org.restlet

/**
 * Returns the name of the status followed by its HTTP code.
 * 
 * @return The name of the status followed by its HTTP code.
 */
@Override
public String toString() {
  return getName() + " (" + this.code + ")"
      + ((getDescription() == null) ? "" : " - " + getDescription());
}
origin: org.restlet/org.restlet

/**
 * Constructor.
 * 
 * @param status
 *            The status to copy.
 * @param throwable
 *            The related error or exception.
 * @param description
 *            The description to associate.
 */
public Status(final Status status, final Throwable throwable,
    final String description) {
  this(status.getCode(), throwable, status.getName(), description, status
      .getUri());
}
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

 public Representation getRepresentation(final Status status, final Request request, final Response response) {
  final HashMap<String, Object> dataModel = new HashMap<String, Object>();

  final SystemStatus systemStatus = applicationStatusSource.getSystemStatus();
  dataModel.put("request", request);
  dataModel.put("nexusVersion", systemStatus.getVersion());
  dataModel.put("nexusRoot", BaseUrlHolder.get());

  dataModel.put("statusCode", status.getCode());
  dataModel.put("statusName", status.getName());
  dataModel.put("errorDescription", StringEscapeUtils.escapeHtml(status.getDescription()));

  if (null != status.getThrowable()) {
   dataModel.put("errorStackTrace",
     StringEscapeUtils.escapeHtml(ExceptionUtils.getStackTrace(status.getThrowable())));
  }

  final VelocityRepresentation representation =
    new VelocityRepresentation(Context.getCurrent(), "/templates/errorPageContentHtml.vm",
      getClass().getClassLoader(), dataModel, MediaType.TEXT_HTML);

  return representation;
 }
}
origin: org.sonatype.nexus/nexus-rest-api

  public Representation getRepresentation( final Status status, final Request request, final Response response )
  {
    final HashMap<String, Object> dataModel = new HashMap<String, Object>();

    dataModel.put( "request", request );
    dataModel.put( "nexusVersion", nexus.getSystemStatus().getVersion() );
    dataModel.put( "nexusRoot", referenceFactory.getContextRoot( request ).toString() );

    dataModel.put( "statusCode", status.getCode() );
    dataModel.put( "statusName", status.getName() );
    dataModel.put( "errorDescription", StringEscapeUtils.escapeHtml( status.getDescription() ) );

    if ( null != status.getThrowable() )
    {
      dataModel.put( "errorStackTrace",
        StringEscapeUtils.escapeHtml( ExceptionUtils.getStackTrace( status.getThrowable() ) ) );
    }
    
    // Load up the template, and pass in the data
    VelocityRepresentation representation =
      new VelocityRepresentation( Context.getCurrent(), "/templates/errorPageContentHtml.vm", dataModel, MediaType.TEXT_HTML );

    return representation;
  }
}
origin: org.sonatype.nexus/nexus-rest-client-java

errorMessage = response.getStatus().getName();
origin: org.sonatype.nexus/nexus-test-harness-launcher

assertThat("Could not unblock proxy: " + repoId + ", status: " + response.getStatus().getName() + " ("
  + response.getStatus().getCode() + ") - " + response.getStatus().getDescription(), response,
  isSuccessful());
origin: org.sonatype.nexus/nexus-test-utils

assertThat( "Could not unblock proxy: " + repoId + ", status: " + response.getStatus().getName() + " ("
        + response.getStatus().getCode() + ") - " + response.getStatus().getDescription(), response,
      isSuccessful() );
org.restlet.dataStatusgetName

Javadoc

Returns the name of this status.

Popular methods of Status

  • getCode
    Returns the corresponding code (HTTP or WebDAV or custom code).
  • isSuccess
    Indicates if the status is a success status, meaning "The action was successfully received, understo
  • equals
    Indicates if the status is equal to a given one.
  • isError
    Indicates if the status is an error (client or server) status.
  • getDescription
    Returns the description. This value is typically used by the org.restlet.service.StatusService to bu
  • <init>
    Constructor.
  • isClientError
    Indicates if the status is a client error status, meaning "The request contains bad syntax or cannot
  • valueOf
    Returns the status associated to a code. If an existing constant exists then it is returned, otherwi
  • getThrowable
    Returns the related error or exception.
  • toString
    Returns the reason phrase of the status followed by its HTTP code.
  • getReasonPhrase
    Returns the reason phrase of this status. When supported by the HTTP server connector, this is retur
  • isConnectorError
    Indicates if the status is a connector error status, meaning "The connector failed to send or receiv
  • getReasonPhrase,
  • isConnectorError,
  • isRedirection,
  • isServerError,
  • isInformational,
  • getUri,
  • checkReasonPhrase,
  • isGlobalError,
  • checkDescription

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now