Package org.apache.abdera.protocol.server.context

Examples of org.apache.abdera.protocol.server.context.ResponseContextException


                         RequestContext request) throws ResponseContextException {
        Session session = getSession(request);
        try {
            mapEntryToNode(entry, title, summary, updated, authors, content, session);
        } catch (RepositoryException e) {
            throw new ResponseContextException(500, e);
        }
    }
View Full Code Here


    public static String getStringOrNull(Node node, String propName) throws ResponseContextException {
        try {
            Value v = getValueOrNull(node, propName);
            return (v != null) ? v.getString() : null;
        } catch (RepositoryException e) {
            throw new ResponseContextException(500, e);
        }
    }
View Full Code Here

    public static Calendar getDateOrNull(Node node, String propName) throws ResponseContextException {
        try {
            Value v = getValueOrNull(node, propName);
            return (v != null) ? v.getDate() : null;
        } catch (RepositoryException e) {
            throw new ResponseContextException(500, e);
        }
    }
View Full Code Here

    Document<Entry> entry_doc;
    try {
      entry_doc = (Document<Entry>)request.getDocument(parser).clone();
    } catch (ParseException e) {
      throw new ResponseContextException(500, e);
    } catch (IOException e) {
      throw new ResponseContextException(500, e);
    }
    if (entry_doc == null) {
      return null;
    }
    return entry_doc.getRoot();
View Full Code Here

  }

  private Integer getIdFromResourceName(String resourceName) throws ResponseContextException {
    int idx = resourceName.indexOf("-");
    if (idx == -1) {
      throw new ResponseContextException(404);
    }
    Integer id = new Integer(resourceName.substring(0, idx));
    return id;
  }
View Full Code Here

    MimeType contentType,
    String slug,
    InputStream inputStream,
    RequestContext request)
      throws ResponseContextException {
    throw new ResponseContextException(ProviderHelper.notallowed(request));
  }
View Full Code Here

   */
  public void deleteMedia(
    String resourceName,
    RequestContext request)
      throws ResponseContextException {
    throw new ResponseContextException(ProviderHelper.notsupported(request));
  }
View Full Code Here

  }

  private Integer getIdFromResourceName(String resourceName) throws ResponseContextException {
    int idx = resourceName.indexOf("-");
    if (idx == -1) {
      throw new ResponseContextException(404);
    }
    return new Integer(resourceName.substring(0, idx));
  }
View Full Code Here

    try {
      Session session = (Session) sessionPool.get(request);

      request.setAttribute(Scope.REQUEST, SESSION_KEY, session);
    } catch (Exception e) {
      throw new ResponseContextException(500, e);
    }
  }
View Full Code Here

  @Override
  public boolean isMediaEntry(Node entry) throws ResponseContextException {
    try {
      return entry.hasProperty(MEDIA);
    } catch (RepositoryException e) {
      throw new ResponseContextException(500, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.server.context.ResponseContextException

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.