private MappingPrincipalImpl(final PrincipalType type, final String name, final String realm) { this.type = type; this.name = name; this.realm = realm; hashCode = type.ordinal() * name.hashCode() * (realm == null ? 31 : realm.hashCode()); }
private void validateUniqueness(final OperationContext context, final String roleName, final PathAddress roleAddress, final AuthorizerConfiguration.PrincipalType principalType, final String realm, final String name) throws OperationFailedException { Resource roleResource = context.readResourceFromRoot(roleAddress); ModelNode model = Resource.Tools.readModel(roleResource); int matchesFound = 0; for (Property current : getIncludeExclude(model)) { if (matches(context, current.getValue(), principalType, realm, name)) { if (++matchesFound > 1) { throw DomainManagementLogger.ROOT_LOGGER.duplicateIncludeExclude(roleName, matchType.toString(), principalType.toString(), name, realm != null ? realm : "undefined"); } } } }
private void validateUniqueness(final OperationContext context, final String roleName, final PathAddress roleAddress, final AuthorizerConfiguration.PrincipalType principalType, final String realm, final String name) throws OperationFailedException { Resource roleResource = context.readResourceFromRoot(roleAddress); ModelNode model = Resource.Tools.readModel(roleResource); int matchesFound = 0; for (Property current : getIncludeExclude(model)) { if (matches(context, current.getValue(), principalType, realm, name)) { if (++matchesFound > 1) { throw DomainManagementLogger.ROOT_LOGGER.duplicateIncludeExclude(roleName, matchType.toString(), principalType.toString(), name, realm != null ? realm : "undefined"); } } } }
static AuthorizerConfiguration.PrincipalType getPrincipalType(final OperationContext context, final ModelNode model) throws OperationFailedException { return AuthorizerConfiguration.PrincipalType.valueOf(TYPE.resolveValue(context, model.get(TYPE.getName())).asString()); }
static AuthorizerConfiguration.PrincipalType getPrincipalType(final OperationContext context, final ModelNode model) throws OperationFailedException { return AuthorizerConfiguration.PrincipalType.valueOf(TYPE.resolveValue(context, model.get(TYPE.getName())).asString()); }
private MappingPrincipalImpl(final PrincipalType type, final String name, final String realm) { this.type = type; this.name = name; this.realm = realm; hashCode = type.ordinal() * name.hashCode() * (realm == null ? 31 : realm.hashCode()); }
private MappingPrincipalImpl(final PrincipalType type, final String name, final String realm) { this.type = type; this.name = name; this.realm = realm; hashCode = type.ordinal() * name.hashCode() * (realm == null ? 31 : realm.hashCode()); }