use of com.sun.identity.policy.InvalidNameException in project OpenAM by OpenRock.
the class LDAPRoles method setValues.
/**
* Sets the names for the instance of the <code>LDAPRoles</code>
* object. The names are obtained from the policy object,
* usually configured when a policy is created.
*
* @param names names selected for the instance of
* the user collection object.
*
* @exception InvalidNameException if the given names are not valid
*/
public void setValues(Set names) throws InvalidNameException {
if (names == null) {
debug.error("LDAPRoles.setValues() Invalid names");
throw (new InvalidNameException(ResBundleUtils.rbName, "ldaproles_subject_invalid_group_names", null, null, PolicyException.USER_COLLECTION));
}
selectedRoleDNs = new HashSet<>();
selectedRoleDNs.addAll(names);
if (debug.messageEnabled()) {
debug.message("LDAPRoles.setValues(): selected role names=" + selectedRoleDNs);
}
selectedRFCRoleDNs = new HashSet<>();
// add to the RFC Set now
Iterator it = names.iterator();
while (it.hasNext()) {
selectedRFCRoleDNs.add(DN.valueOf((String) it.next()).toString().toLowerCase());
}
}
use of com.sun.identity.policy.InvalidNameException in project OpenAM by OpenRock.
the class LDAPGroups method setValues.
/**
* Sets the names for the instance of the <code>LDAPGroups</code>
* object. The names are obtained from the policy object,
* usually configured when a policy is created.
*
* @param names names selected for the instance of
* the user collection object.
*
* @exception InvalidNameException if the given names are not valid
*/
public void setValues(Set names) throws InvalidNameException {
if (names == null) {
debug.error("LDAPGroups.setValues(): Invalid names");
throw (new InvalidNameException(ResBundleUtils.rbName, "ldapgroups_subject_invalid_group_names", null, null, PolicyException.USER_COLLECTION));
}
selectedGroupDNs = new HashSet();
selectedGroupDNs.addAll(names);
if (debug.messageEnabled()) {
debug.message("LDAPGroups.setValues(): selected group names=" + selectedGroupDNs);
}
// add to the RFC Set now
selectedRFCGroupDNs = new HashSet();
Iterator it = names.iterator();
while (it.hasNext()) {
selectedRFCGroupDNs.add(DN.valueOf((String) it.next()).toString().toLowerCase());
}
}
use of com.sun.identity.policy.InvalidNameException in project OpenAM by OpenRock.
the class LDAPUsers method setValues.
/**
* Sets the names for the instance of the <code>LDAPUsers</code>
* object. The names are obtained from the policy object,
* usually configured when a policy is created.
*
* @param names names selected for the instance of
* the user collection object.
*
* @exception InvalidNameException if the given names are not valid
*/
public void setValues(Set names) throws InvalidNameException {
if (names == null) {
debug.error("LDAPUsers.setValues(): Invalid names");
throw (new InvalidNameException(ResBundleUtils.rbName, "ldapusers_subject_invalid_user_names", null, "null", PolicyException.USER_COLLECTION));
}
selectedUserDNs = new HashSet<>();
selectedUserDNs.addAll(names);
if (debug.messageEnabled()) {
debug.message("LDAPUsers.setValues(): selected user names=" + selectedUserDNs);
}
selectedRFCUserDNs = new HashSet<>();
// add to the RFC Set now
for (Object name : names) {
selectedRFCUserDNs.add(DN.valueOf((String) name).toString().toLowerCase());
}
}
use of com.sun.identity.policy.InvalidNameException in project OpenAM by OpenRock.
the class Organization method setValues.
/**
* Sets the names for the instance of the <code>Organization</code>
* object. The names are obtained from the policy object,
* usually configured when a policy is created.
*
* @param names names selected for the instance of
* the user collection object.
*
* @exception InvalidNameException if the given names are not valid
*/
public void setValues(Set names) throws InvalidNameException {
if (names == null) {
debug.error("Organization.setValues() Invalid names");
throw (new InvalidNameException(ResBundleUtils.rbName, "org_subject_invalid_user_names", null, "null", PolicyException.USER_COLLECTION));
}
selectedOrgDNs = new HashSet<>();
selectedOrgDNs.addAll(names);
if (debug.messageEnabled()) {
debug.message("Organization.setValues(): selected org names=" + selectedOrgDNs);
}
selectedRFCOrgDNs = new HashSet<>();
// add to the RFC Set now
for (Object name : names) {
selectedRFCOrgDNs.add(DN.valueOf((String) name).toString().toLowerCase());
}
}
Aggregations