Examples of EmptyRepresentation


Examples of org.restlet.client.representation.EmptyRepresentation

     * @throws NumberFormatException
     * @see HeaderUtils#copyResponseTransportHeaders(Series, Response)
     */
    public static Representation extractEntityHeaders(Iterable<Header> headers,
            Representation representation) throws NumberFormatException {
        Representation result = (representation == null) ? new EmptyRepresentation()
                : representation;
        boolean entityHeaderFound = false;

        if (headers != null) {
            for (Header header : headers) {
View Full Code Here

Examples of org.restlet.client.representation.EmptyRepresentation

     * @see HeaderUtils#copyResponseTransportHeaders(Series, Response)
     */
    public static Representation extractEntityHeaders(
            Iterable<Parameter> headers, Representation representation)
            throws NumberFormatException {
        Representation result = (representation == null) ? new EmptyRepresentation()
                : representation;
        boolean entityHeaderFound = false;

        if (headers != null) {
            for (Parameter header : headers) {
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

  {
    String pgtId = getQuery().getFirstValue("pgtId");
    String pgtIou = getQuery().getFirstValue("pgtIou");

    if (pgtId != null && pgtIou != null) {
      return new EmptyRepresentation();
    }
    else {
      getResponse().setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
      return null;
    }
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

  public Representation logData(String data)
  {
    if (logService != null)
      logService.log(LogService.LOG_INFO, data);

    return new EmptyRepresentation();
  }
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

    @Override
    protected Representation head() throws ResourceException {
        getLogger().info("IN head() OpenIDResource");
        setXRDSHeader();
        getLogger().info("Sending empty representation.");
        return new EmptyRepresentation();
    }
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

                // option1: GET HTTP-redirect to the return_to URL
                // return new
                // StringRepresentation(response.getDestinationUrl(true));
                redirectSeeOther(response.getDestinationUrl(true));
                return new EmptyRepresentation();

                // option2: HTML FORM Redirection
                // RequestDispatcher dispatcher =
                // getServletContext().getRequestDispatcher("formredirection.jsp");
                // httpReq.setAttribute("prameterMap",
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

            if (requestStream != null) {
                result = new InputRepresentation(requestStream, null,
                        contentLength);
            } else {
                result = new EmptyRepresentation();
            }

            result.setSize(contentLength);
        } else {
            result = new EmptyRepresentation();
        }

        // Extract some interesting header values
        for (Parameter header : getRequestHeaders()) {
            if (header.getName().equalsIgnoreCase(
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

     * @see HeaderUtils#copyResponseTransportHeaders(Series, Response)
     */
    public static Representation extractEntityHeaders(
            Iterable<Parameter> headers, Representation representation)
            throws NumberFormatException {
        Representation result = (representation == null) ? new EmptyRepresentation()
                : representation;
        boolean entityHeaderFound = false;

        if (headers != null) {
            for (Parameter header : headers) {
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

                        accMediaTypes);
            repr = new JaxRsOutputRepresentation<Object>(entity,
                    genericReturnType, respMediaType, methodAnnotations, mbw,
                    httpResponseHeaders);
        } else { // entity == null
            repr = new EmptyRepresentation();
            repr.setMediaType(determineMediaType(jaxRsResponseMediaType,
                    resourceMethod, entityClass, genericReturnType));
        }
        repr.setCharacterSet(getSupportedCharSet(httpResponseHeaders));
        return repr;
View Full Code Here

Examples of org.restlet.representation.EmptyRepresentation

        String error = query.getFirstValue(OAuthServerResource.ERROR);

        if (error != null && error.length() > 0) {
            // Failed in initial auth resource request
            Representation repr = new EmptyRepresentation();
            String desc = query.getFirstValue(OAuthServerResource.ERROR_DESC);
            String uri = query.getFirstValue(OAuthServerResource.ERROR_URI);

            if (desc != null || uri != null) {
                StringBuilder sb = new StringBuilder();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.