Package org.wymiwyg.wrhapi

Examples of org.wymiwyg.wrhapi.Method


  }

  @Override
  public String getMethod() {
    try {
            Method method = wrhapiRequest.getMethod();
            if (method != null) {
                return (method.toString()).substring(8);
            } else {
                return null;
            }
        } catch (HandlerException ex) {
            throw new RuntimeException(ex);
View Full Code Here


    localRequest.set(request);

    try {
      MethodResponse methodResponse;
      Type type = request.getWrhapiRequest().getRequestURI().getType();
      Method method = request.getWrhapiRequest().getMethod();
      if (Type.NO_RESOURCE.equals(type) && Method.OPTIONS.equals(method)) {
        ResponseBuilder builder = javax.ws.rs.core.Response.ok();
        StringWriter sw = new StringWriter();
        Iterator<HttpMethod> iter = httpMethods.iterator();
        if (iter.hasNext()) {
View Full Code Here

   * @see org.wymiwyg.rwcf.Handler#handle(org.wymiwyg.rwcf.Request,
   *      org.wymiwyg.rwcf.Response, org.wymiwyg.rwcf.HandlerChain)
   */
  public void handle(Request request, Response response, HandlerChain chain)
      throws HandlerException {
    Method method = request.getMethod();
    if (Method.POST.equals(method)) {
      doPost(request, response);
    } else {
      doGet(request, response);
    }
View Full Code Here

    Set resultSet = new HashSet();
    StmtIterator statements = handlerResource
        .listProperties(RWCF.supportedMethod);
    while (statements.hasNext()) {
      String currentObject = statements.nextStatement().getString();
      Method currentMethod = Method.get(currentObject);
      resultSet.add(currentMethod);
    }
    supportedMethods = (Method[]) resultSet.toArray(new Method[resultSet
        .size()]);
  }
View Full Code Here

            }
        }
        Method[] supportedMethods = descriptor.getSupportedMethods();
        if (supportedMethods.length > 0) {
            boolean methodSupported = false;
            Method requestMethod = request.getMethod();
            for (int i = 0; i < supportedMethods.length; i++) {
                Method method = supportedMethods[i];
                if (requestMethod.equals(method)) {
                    methodSupported = true;
                    break;
                }  
            }
View Full Code Here

  }
  /* (non-Javadoc)
   * @see org.wymiwyg.rwcf.Handler#handle(org.wymiwyg.rwcf.Request, org.wymiwyg.rwcf.Response, org.wymiwyg.rwcf.HandlerChain)
   */
  public void handle(Request request, Response response, HandlerChain chain) throws HandlerException {
    Method method = request.getMethod();
    if (Method.POST.equals(method)) {
      doPost(request, response);
    } else {
      doGet(request, response);
    }
View Full Code Here

TOP

Related Classes of org.wymiwyg.wrhapi.Method

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.