Set the named roles which may be defined.

@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values
@since 1.10.0
557329
@Api
	public void setNamedRoles(Map<String, List<NamedRoleInfo>> namedRoles) {
		this.namedRoles = namedRoles;
		ldapRoleMapping = new HashMap<String, Set<String>>();
		for (String roleName : namedRoles.keySet()) {
			if (!ldapRoleMapping.containsKey(roleName)) {
				ldapRoleMapping.put(roleName, new HashSet<String>());
			}
			for (NamedRoleInfo role : namedRoles.get(roleName)) {
				ldapRoleMapping.get(roleName).add(role.getName());
			}
		}
	}
449331
public void setNames(java.util.Collection<String> names) {
        if (names == null) {
            this.names = null;
            return;
        }

        this.names = new java.util.ArrayList<String>(names);
    }
169124
def set_roles *roles
      raise ArgumentError, "A single role strategy can only allow setting a single role, was: #{roles}" if (roles.size > 1)
      set_role roles.flat_uniq.first
    end
957350
public function addRoles(Collection $roles)
    {
        foreach($roles as $role){
            $this->roles->add($role);
        }
        
    }
1074427
public void setRoleMembership(String subject, Set<String> roles) {
		validateStringValue(subject);
		Validate.notNull(roles);
		if(roles.isEmpty())
			return;
		Validate.noNullElements(roles);
		
		props.setProperty(String.format(ROLE_MEMBERSHIP_FORMAT, subject), ArrayUtils.toString(encapsulateValues(roles)));
	}
1273235
def set_roles *roles
      roles = roles.flatten
      raise ArgumentError, "For a single role strategy you can only set one role, was: #{roles.flatten}" if roles.empty? || (roles.size > 1)
      set_role roles.first
    end
962607
public void setRolePolicyList(java.util.Collection<PolicyDetail> rolePolicyList) {
        if (rolePolicyList == null) {
            this.rolePolicyList = null;
            return;
        }

        this.rolePolicyList = new com.amazonaws.internal.SdkInternalList<PolicyDetail>(rolePolicyList);
    }
959034
public void setIdentityAttributeValues(java.util.Collection<AttributeNameAndValue> identityAttributeValues) {
        if (identityAttributeValues == null) {
            this.identityAttributeValues = null;
            return;
        }

        this.identityAttributeValues = new java.util.ArrayList<AttributeNameAndValue>(identityAttributeValues);
    }
602588
public void setDomains(java.util.Collection<String> domains) {
        if (domains == null) {
            this.domains = null;
            return;
        }

        this.domains = new java.util.ArrayList<String>(domains);
    }
1364932
public void setNamedQueries(java.util.Collection<NamedQuery> namedQueries) {
        if (namedQueries == null) {
            this.namedQueries = null;
            return;
        }

        this.namedQueries = new java.util.ArrayList<NamedQuery>(namedQueries);
    }
1243768
public function setRoles($roles)
    {
        $allowedValues = $this->getRolesAllowableValues();
        if (!is_null($roles) && array_diff($roles, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'roles', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['roles'] = $roles;

        return $this;
    }
530124
public void setRoleService(
		com.liferay.portal.kernel.service.RoleService roleService) {
		this.roleService = roleService;
	}
1244855
public Iterable<DOAuth2User> queryByRoles(java.lang.Object roles) {
    return queryByField(null, DOAuth2UserMapper.Field.ROLES.getFieldName(), roles);
  }
865589
def set_roles *roles
      roles_to_set = make_valid_roles(*roles).flat_uniq
      return false if !roles_to_set || roles_to_set.empty?
      store.set_roles(roles_to_set) 
    end
1255695
public void setNamedBindings(Map<String, Object> namedBindings) {
    if (namedBindings == null) {
      throw new IllegalArgumentException("namedBindings cannot be null");
    }
    this.namedBindings = namedBindings;
  }
1306718
def roles(*roles)
      opts = roles.last.is_a?(Hash) ? roles.pop : {}
      self.valid_roles = roles.flatten.map(&:to_sym)
      unless (opts[:dynamic] == false)
        self.define_dynamic_queries(self.valid_roles)
      end
    end
428975
private void addRolesToSubject(Subject subject, Set<String> userRoles) {
        if (userRoles == null) {
            userRoles = Collections.emptySet();
        }

        Map<String, Set<String>> attributes =
                SubjectUtils.getAttributes(subject);

        Set<String> roles = attributes.get(ROLE_KEY);
        if (roles == null) {
            roles = new HashSet<String>(userRoles);
            attributes.put(ROLE_KEY, roles);
        } else {
            roles.addAll(userRoles);
        }
        if (logger.isDebugEnabled()) {
            for (String role : userRoles) {
                logger.debug("added role: {}", role);
            }
        }
    }