Add profile roles from attributes.

@param profile       the profile
@param ldapAttribute the ldap attribute
@param prefix        the prefix
330763
protected void addProfileRolesFromAttributes(final CommonProfile profile,
                                                 final LdapAttribute ldapAttribute,
                                                 final String prefix) {
        ldapAttribute.getStringValues().forEach(value -> profile.addRole(prefix.concat(value.toUpperCase())));
    }
536686
public SpringApplicationBuilder profiles(String... profiles) {
		this.additionalProfiles.addAll(Arrays.asList(profiles));
		this.application.setAdditionalProfiles(
				StringUtils.toStringArray(this.additionalProfiles));
		return this;
	}
570355
public AccountHeaderBuilder withProfiles(@NonNull List<IProfile> profiles) {
        if (mDrawer != null) {
            mDrawer.mDrawerBuilder.idDistributor.checkIds(profiles);
        }
        this.mProfiles = profiles;
        return this;
    }
1199380
public function addProfile(\HarvestCloud\CoreBundle\Entity\Profile $profile)
    {
        if (!count($this->profiles))
        {
            $this->setCurrentProfile($profile);
            $this->setDefaultProfile($profile);
        }

        $this->profiles[] = $profile;
    }
138863
public void addAttributes(final Map<String, Object> attributes) {
        if (attributes != null) {
            for (final Map.Entry<String, Object> entry : attributes.entrySet()) {
                addAttribute(entry.getKey(), entry.getValue());
            }
        }
    }
596722
public void setProfile(OperaProfile profile) {
    options.get(PROFILE).setValue(PROFILE.sanitize(profile));
    supportsPd = true;
  }
64183
public void addProfile(Profile profile) {
        if (PROFILE_KIND.equals(profile.getKind())) {
            this.profileList.add(profile.getSettings());
        }
    }
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);
    }
1319116
@BasePortalJpaDao.PortalTransactional
    public void resetUserLayoutAllProfiles(final IPersonAttributes personAttributes) {
        final IPerson person = PersonFactory.createRestrictedPerson();
        person.setAttributes(personAttributes.getAttributes());
        // get the integer uid into the person object without creating any new person data
        int uid = userIdentityStore.getPortalUID(person, false);
        person.setID(uid);

        final Hashtable<Integer, UserProfile> map = userLayoutStore.getUserProfileList(person);
        for (UserProfile profile : map.values()) {
            resetUserLayoutForProfileByName(person, profile);
            resetStylesheetUserPreferencesForProfile(person, profile);
        }
    }
425681
def createProfile(self, profile=None, clearLayout=True):
        
        if profile:
            prof = profile
        elif not self.viewWidget() or clearLayout:
            prof = XViewProfile()
        else:
            prof = self.viewWidget().saveProfile()
        
        blocked = self.signalsBlocked()
        self.blockSignals(False)
        changed = self.editProfile(prof)
        self.blockSignals(blocked)
        
        if not changed:
            return
        
        act = self.addProfile(prof)
        act.setChecked(True)
        
        # update the interface
        if self.viewWidget() and (profile or clearLayout):
            self.viewWidget().restoreProfile(prof)
        
        if not self.signalsBlocked():
            self.profileCreated.emit(prof)
            self.profilesChanged.emit()
429224
protected function _setProfile() {
        $projectName = basename(dirname(realpath(APPLICATION_PATH)));
        $profileName = $projectName . '_' . APPLICATION_ENV;

        $this->_profile = $profileName;
    }
1332416
public static void addProviderProfileInfo(Profile profile, UserProfile providerProfile) {
        String email = providerProfile.getEmail();
        if (StringUtils.isEmpty(email)) {
            throw new IllegalStateException("No email included in provider profile");
        }

        String username = providerProfile.getUsername();
        if (StringUtils.isEmpty(username)) {
            username = email;
        }

        String firstName = providerProfile.getFirstName();
        String lastName = providerProfile.getLastName();

        profile.setUsername(username);
        profile.setEmail(email);
        profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName);
        profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName);
    }
235908
public LdapNameBuilder add(Name name) {
        Assert.notNull(name, "name must not be null");

        try {
            ldapName.addAll(ldapName.size(), name);
            return this;
        } catch (InvalidNameException e) {
            throw new org.springframework.ldap.InvalidNameException(e);
        }
    }
324927
public Governator addProfiles(Collection<String> profiles) {
        if (profiles != null) {
            this.profiles.addAll(profiles);
        }
        return this;
    }
417130
public Service setSupportedServiceProfiles(Iterable<ServiceProfile> profiles)
    {
        if (profiles == null)
        {
            this.supportedServiceProfiles = null;

            return this;
        }

        Set<ServiceProfile> set = new TreeSet<ServiceProfile>();

        for (ServiceProfile profile : profiles)
        {
            if (profile != null)
            {
                set.add(profile);
            }
        }

        int size = set.size();

        if (size == 0)
        {
            this.supportedServiceProfiles = null;

            return this;
        }

        ServiceProfile[] array = new ServiceProfile[size];
        this.supportedServiceProfiles = set.toArray(array);

        return this;
    }
992372
public void addProfile(@NonNull IProfile profile, int position) {
        if (mAccountHeaderBuilder.mProfiles == null) {
            mAccountHeaderBuilder.mProfiles = new ArrayList<>();
        }
        mAccountHeaderBuilder.mProfiles.add(position, profile);

        mAccountHeaderBuilder.updateHeaderAndList();
    }
684301
public final void setItsRole(final RoleJetty pRole) {
    this.itsRole = pRole;
    if (this.itsId == null) {
      this.itsId = new IdUserRoleJetty();
    }
    this.itsId.setItsRole(this.itsRole);
  }