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

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


  @Path("permission")
  public ReturnCodeBean changeViewPermission(@Context HttpServletRequest request, @FormParam("owner") String owner, @FormParam("view_vid") String vid, @FormParam("permission") String permission) {
    try {
      if(owner.intern()==request.getRemoteUser().intern()) {
        ViewStore vs = new ViewStore(owner, vid);
        ViewBean view = vs.get();
        view.setPermissionType(permission);
        vs.set(view);
      } else {
        throw new Exception("Permission denied.");
      }
    } catch (Exception e) {
View Full Code Here


      if(oldVid!=null) {
        vs = new ViewStore(owner, oldVid);
      } else {
        vs = new ViewStore(null, "default");
      }
      ViewBean view = vs.get();
      view.setOwner(request.getRemoteUser());
      view.setName(name);
      view.setDescription(name);
      if(oldVid==null) {
        view.setPermissionType("private");
      }
      vs = new ViewStore(request.getRemoteUser(), name);
      vs.set(view);
    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
View Full Code Here

TOP

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

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.