public MSentryGroup(String groupName, long createTime, Set<MSentryRole> roles) { this.groupName = MSentryUtil.safeIntern(groupName); this.createTime = createTime; this.roles = roles; }
public MSentryGroup(String groupName, long createTime, Set<MSentryRole> roles) { this.setGroupName(groupName); this.createTime = createTime; this.roles = roles; }
public static boolean isNULL(String s) { return !notNULL(s); }
public MSentryGMPrivilege(String componentName, String serviceName, List<? extends Authorizable> authorizables, String action, Boolean grantOption) { this.componentName = MSentryUtil.safeIntern(componentName); this.serviceName = MSentryUtil.safeIntern(serviceName); this.action = MSentryUtil.safeIntern(action); this.grantOption = grantOption; this.roles = new HashSet<>(); this.createTime = System.currentTimeMillis(); setAuthorizables(authorizables); }
public void appendGMPrivilege(MSentryGMPrivilege gmPrivilege) { if (gmPrivileges.add(gmPrivilege)) { gmPrivilege.appendRole(this); } }
private boolean isPrivilegeStale(MSentryGMPrivilege privilege) { if (privilege.getRoles().isEmpty()) { return true; } return false; }
public void removeGroup(MSentryGroup group) { if (groups.remove(group)) { group.removeRole(this); } }
public void appendPrivilege(MSentryPrivilege privilege) { if (privileges.add(privilege)) { privilege.appendPrincipal(this); } }
public void appendGroup(MSentryGroup group) { if (groups.add(group)) { group.appendRole(this); } }
public void removeRole(MSentryRole role) { if (roles.remove(role)) { role.removeGroup(this); } }
public void appendRole(MSentryRole role) { if (roles.add(role)) { role.appendGMPrivilege(this); } }
public void appendRole(MSentryRole role) { if (roles.add(role)) { role.appendGroup(this); } }
public void appendPrivilege(MSentryPrivilege privilege) { if (privileges.add(privilege)) { privilege.appendRole(this); } }
public void removeRole(MSentryRole role) { if (roles.remove(role)) { role.removeUser(this); } }
public void removeUser(MSentryUser user) { if (users.remove(user)) { user.removeRole(this); } }
public void appendGMPrivilege(MSentryGMPrivilege gmPrivilege) { if (gmPrivileges.add(gmPrivilege)) { gmPrivilege.appendRole(this); } }
public static boolean isNULL(String s) { return !notNULL(s); }
public MPathToPersist(long authzObjectId, String path) { this.authzObjectId = authzObjectId; this.path = MSentryUtil.safeIntern(path); }
public MPath(String path) { this.path = MSentryUtil.safeIntern(path); }
public MSentryRole(String roleName, long createTime) { this.roleName = MSentryUtil.safeIntern(roleName); this.createTime = createTime; privileges = new HashSet<>(); gmPrivileges = new HashSet<>(); groups = new HashSet<>(); users = new HashSet<>(); }