Package org.restlet.representation

Examples of org.restlet.representation.EmptyRepresentation


                headers.add(new Parameter(headerName, hValue));
            }
        }

        if (restletResponse.getEntity() == null) {
            restletResponse.setEntity(new EmptyRepresentation());
        }

        HeaderUtils.copyResponseTransportHeaders(headers, restletResponse);
        HeaderUtils.extractEntityHeaders(headers, restletResponse.getEntity());
View Full Code Here


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

        if (headers != null) {
            try {
                result = HeaderUtils.extractEntityHeaders(headers, result);
View Full Code Here

        }

        getPipelines().remove(id);

        setStatus(Status.SUCCESS_OK);
        return new EmptyRepresentation();
    }
View Full Code Here

        if (pipeconfig.defoutput != null) {
            return getOutput(pipeconfig, pipeconfig.defoutput);
        } else {
            setStatus(Status.SUCCESS_OK);
            return new EmptyRepresentation();
        }
    }
View Full Code Here

        }

        Vector<XdmNode> nodes = pipeconfig.outputs.get(port);
        if (nodes.size() == 0) {
            setStatus(Status.SUCCESS_NO_CONTENT);
            return new EmptyRepresentation();
        }

        XdmNode doc = nodes.firstElement();
        nodes.remove(0);
View Full Code Here

    private HandlerCommand invokeCommand( Reference ref, Method method, Object requestObject, ResponseHandler responseHandler, ResponseHandler processingErrorHandler )
    {
        Request request = new Request( method, ref );

        if (requestObject == null)
            requestObject = new EmptyRepresentation();

        contextResourceFactory.writeRequest( request, requestObject );

        contextResourceFactory.updateCommandRequest( request );
View Full Code Here

        {
            uow.discard();
            getResponse().setStatus( Status.CLIENT_ERROR_NOT_FOUND );
        }

        return new EmptyRepresentation();
    }
View Full Code Here

            throw new ResourceException( Status.CLIENT_ERROR_GONE );
        }

        getResponse().setStatus( Status.SUCCESS_RESET_CONTENT );

        return new EmptyRepresentation();
    }
View Full Code Here

{
    public Representation login( String name, String password )
    {
        context( Login.class ).login( name, password );

        EmptyRepresentation rep = new EmptyRepresentation();
        Response.getCurrent().getCookieSettings().add( "user", name );
        return rep;
    }
View Full Code Here

   public boolean writeRequest(Object requestObject, Request request) throws ResourceException
   {
      if (requestObject == null)
      {
         if (!Method.GET.equals(request.getMethod()))
            request.setEntity(new EmptyRepresentation());

         return true;
      }

      if (requestObject instanceof Representation)
View Full Code Here

TOP

Related Classes of org.restlet.representation.EmptyRepresentation

Copyright © 2018 www.massapicom. 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.