public synchronized void removeScopedRole(String toRemove) { Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); ScopedRole removed = newScopedRoles.remove(toRemove); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); if (removed != null) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleRemoved(removed); } } }
public synchronized void removeScopedRole(String toRemove) { Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); ScopedRole removed = newScopedRoles.remove(toRemove); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); if (removed != null) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleRemoved(removed); } } }
public synchronized void removeScopedRole(String toRemove) { Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); ScopedRole removed = newScopedRoles.remove(toRemove); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); if (removed != null) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleRemoved(removed); } } }
/** * Reset the internal state of this object back to what it originally was. * * Used then reloading a server or in a slave host controller following a post-boot reconnect * to the master. */ public synchronized void reset() { this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION; this.useIdentityRoles = this.nonFacadeMBeansSensitive = false; this.roleMappings = new HashMap<String, RoleMappingImpl>(); RoleMaps oldRoleMaps = this.roleMaps; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); for (ScopedRole role : oldRoleMaps.scopedRoles.values()) { for (ScopedRoleListener listener : scopedRoleListeners) { try { listener.scopedRoleRemoved(role); } catch (Exception ignored) { // TODO log an ERROR } } } }
/** * Reset the internal state of this object back to what it originally was. * * Used then reloading a server or in a slave host controller following a post-boot reconnect * to the master. */ public synchronized void reset() { this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION; this.useRealmRoles = this.nonFacadeMBeansSensitive = false; this.roleMappings = new HashMap<String, RoleMappingImpl>(); RoleMaps oldRoleMaps = this.roleMaps; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); for (ScopedRole role : oldRoleMaps.scopedRoles.values()) { for (ScopedRoleListener listener : scopedRoleListeners) { try { listener.scopedRoleRemoved(role); } catch (Exception ignored) { // TODO log an ERROR } } } }
/** * Reset the internal state of this object back to what it originally was. * * Used then reloading a server or in a slave host controller following a post-boot reconnect * to the master. */ public synchronized void reset() { this.authorizerDescription = StandardRBACAuthorizer.AUTHORIZER_DESCRIPTION; this.useIdentityRoles = this.nonFacadeMBeansSensitive = false; this.roleMappings = new HashMap<String, RoleMappingImpl>(); RoleMaps oldRoleMaps = this.roleMaps; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); for (ScopedRole role : oldRoleMaps.scopedRoles.values()) { for (ScopedRoleListener listener : scopedRoleListeners) { try { listener.scopedRoleRemoved(role); } catch (Exception ignored) { // TODO log an ERROR } } } }
synchronized void setAuthorizerDescription(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), roleMaps.scopedRoles); }
public WritableAuthorizerConfiguration(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); }
synchronized void setAuthorizerDescription(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), roleMaps.scopedRoles); }
public WritableAuthorizerConfiguration(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); }
synchronized void setAuthorizerDescription(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), roleMaps.scopedRoles); }
public synchronized void addScopedRole(ScopedRole toAdd) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleAdded(toAdd); } Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); newScopedRoles.put(toAdd.getName(), toAdd); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); }
public synchronized void addScopedRole(ScopedRole toAdd) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleAdded(toAdd); } Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); newScopedRoles.put(toAdd.getName(), toAdd); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); }
public synchronized void addScopedRole(ScopedRole toAdd) { for (ScopedRoleListener listener : scopedRoleListeners) { listener.scopedRoleAdded(toAdd); } Map<String, ScopedRole> newScopedRoles = new HashMap<String, ScopedRole>(roleMaps.scopedRoles); newScopedRoles.put(toAdd.getName(), toAdd); roleMaps = new RoleMaps(roleMaps.standardRoles, newScopedRoles); }
public WritableAuthorizerConfiguration(Authorizer.AuthorizerDescription authorizerDescription) { this.authorizerDescription = authorizerDescription; this.roleMaps = new RoleMaps(authorizerDescription.getStandardRoles(), Collections.<String, ScopedRole>emptyMap()); }