Package org.apache.abdera.protocol.server

Examples of org.apache.abdera.protocol.server.ResponseContext


        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional) adapter
                : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
            response = response != null ? response : processExtensionRequest(
                    request, adapter);
View Full Code Here


      }
     
      Transactional transaction =
        adapter instanceof Transactional ?
          (Transactional)adapter : null;
      ResponseContext response = null;
      try {
        if (transaction != null) transaction.start(request);
        if (type == TargetType.TYPE_CATEGORIES) {
          if (method.equalsIgnoreCase("GET"))
            response = adapter.getCategories(request);
View Full Code Here

  implements Filter {
 
  public ResponseContext filter(
    RequestContext request,
    FilterChain chain) {
      ResponseContext resp = chain.next(request);
      String format = request.getParameter("format");
      return jsonPreferred(request,resp.getContentType().toString()) ||
        (format != null && format.equalsIgnoreCase("json")) ?
        new JsonResponseContext(resp,request.getAbdera()) :
        resp;
  }
View Full Code Here

        .getParameter(AbstractManagedCollectionAdapter.PARAM_NAMESPACE));
  }

  @Override
  protected ResponseContext createErrorResponse(RequestContext request, Throwable t) {
    ResponseContext response = super.createErrorResponse(request, t);
    response.setStatusText(response.getStatusText() + ": " + t.getMessage());
    return response;
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.server.ResponseContext

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.