Package com.taobao.zeus.store.mysql.persistence

Examples of com.taobao.zeus.store.mysql.persistence.PermissionPersistence


  }
  @Override
  public void addGroupAdmin(String user,String groupId) {
    boolean has=getGroupPermission(user, groupId)==null?false:true;
    if(!has){
      PermissionPersistence pp=new PermissionPersistence();
      pp.setType(PermissionPersistence.GROUP_TYPE);
      pp.setUid(user);
      pp.setTargetId(Long.valueOf(groupId));
      pp.setGmtModified(new Date());
      getHibernateTemplate().save(pp);
    }
  }
View Full Code Here


  }
  @Override
  public void addJobAdmin(String user, String jobId) {
    boolean has=getJobPermission(user, jobId)==null?false:true;
    if(!has){
      PermissionPersistence pp=new PermissionPersistence();
      pp.setType(PermissionPersistence.JOB_TYPE);
      pp.setUid(user);
      pp.setTargetId(Long.valueOf(jobId));
      pp.setGmtModified(new Date());
      getHibernateTemplate().save(pp);
    }
  }
View Full Code Here

    }
    return users.contains(user)?true:hasGroupPermission(user, groupManager.getJobDescriptor(jobId).getX().getGroupId());
  }
  @Override
  public void removeGroupAdmin(String user, String groupId) {
    PermissionPersistence pp=getGroupPermission(user, groupId);
    if(pp!=null){
      getHibernateTemplate().delete(pp);
    }
  }
View Full Code Here

      getHibernateTemplate().delete(pp);
    }
  }
  @Override
  public void removeJobAdmin(String user, String jobId) {
    PermissionPersistence pp=getJobPermission(user, jobId);
    if(pp!=null){
      getHibernateTemplate().delete(pp);
    }
  }
View Full Code Here

TOP

Related Classes of com.taobao.zeus.store.mysql.persistence.PermissionPersistence

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.