Package org.apache.hadoop.chukwa.rest.bean

Examples of org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean


    } catch(Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("User does not exist.").build());
    }
    return new ReturnCodeBean(ReturnCodeBean.SUCCESS,"Saved.");
  }
View Full Code Here


    } catch (IllegalAccessException e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("View save failed.").build());
    }
    return new ReturnCodeBean(ReturnCodeBean.SUCCESS,"Saved");
  }
View Full Code Here

    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR)
          .entity("View save failed.").build());     
    }
    return new ReturnCodeBean(ReturnCodeBean.SUCCESS,"Saved");
  }
View Full Code Here

    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR)
          .entity("View save failed.").build());     
    }
    return new ReturnCodeBean(ReturnCodeBean.SUCCESS,"Saved");
  }
View Full Code Here

    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR)
          .entity("View delete failed.").build());     
    }
    return new ReturnCodeBean(ReturnCodeBean.SUCCESS,"Deleted");
  }
View Full Code Here

    user.setProperty("testKey", "testValue");
    JSONArray ja = new JSONArray();
    user.setViews(ja);
    client = Client.create();
    resource = client.resource("http://localhost:"+restPort);
    ReturnCodeBean result = resource.path("/hicc/v1/user").
    header("Content-Type","application/json").
    header("Authorization", authorization).
    put(ReturnCodeBean.class, user);
    assertEquals(1, result.getCode());
    } catch (Exception e) {
      fail(ExceptionUtil.getStackTrace(e));
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean

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.