use of com.iplanet.services.ldap.Attr in project OpenAM by OpenRock.
the class PersistentObject method deleteACI.
/**
* Deletes an ACI of this object
*
* @param aci ACI to be deleted.
* @throws AccessRightsException if an access rights exception occurs.
* @throws UMSException if any error.
*
* @supported.api
*/
public void deleteACI(ACI aci) throws AccessRightsException, UMSException {
Attr attr = new Attr(ACI.ACI, aci.getACIText());
modify(attr, ModificationType.DELETE);
save();
}
use of com.iplanet.services.ldap.Attr in project OpenAM by OpenRock.
the class PersistentObject method getRoles.
/**
* Gets the list of GUIDS roles assosciated with this object
*
* @return list that lets iterating over role GUIDs
* @throws UMSException
* propagates any exception from the datalayer
*
* @supported.api
*/
public Collection getRoles() throws UMSException {
ArrayList roleList = new ArrayList();
Attr roleAttr = getAttribute(COMPUTED_MEMBER_ATTR_NAME);
if (roleAttr != null && roleAttr.getStringValues() != null) {
roleList.addAll(Arrays.asList(roleAttr.getStringValues()));
}
return roleList;
}
use of com.iplanet.services.ldap.Attr in project OpenAM by OpenRock.
the class PersistentObject method addACI.
/**
* Adds an ACI to this object.
*
* @param aci ACI added to be added to this object.
* @throws AccessRightsException if an access rights exception occurs.
* @throws UMSException if any error
*
* @supported.api
*/
public void addACI(ACI aci) throws AccessRightsException, UMSException {
Attr attr = new Attr(ACI.ACI, aci.toString());
modify(attr, ModificationType.ADD);
save();
}
use of com.iplanet.services.ldap.Attr in project OpenAM by OpenRock.
the class PersistentObject method setAttribute.
/**
* Sets an attribute value with a given locale for the entity.
* <P>
* IMPORTANT: To make the changes persistent, you need to call the save
* method to save the changes.
* <P>
*
* @param attr
* Attribute and value
* @param locale
* Intended locale of the attribute to be set
*
* @supported.api
*/
public void setAttribute(Attr attr, Locale locale) {
if (locale == null) {
setAttribute(attr);
return;
}
// TODO: ??? should check if adding Attr.setName method makes more
// sense than recopying the data values of the passed in attribute
//
Attr attrWithLocale = new Attr(Attr.getName(attr.getBaseName(), locale));
attrWithLocale.addValues(attr.getStringValues());
setAttribute(attrWithLocale);
}
use of com.iplanet.services.ldap.Attr in project OpenAM by OpenRock.
the class StaticGroup method getMemberIDAt.
/**
* Gets a member given an index (zero-based).
*
* @param index
* Zero-based index into the group container
* @return The unique identifier for a member
* @exception Not
* thrown by this class
* @supported.api
*/
public Guid getMemberIDAt(int index) throws UMSException {
Attr attr = getAttribute(MEMBER_ATTR_NAME);
String value = attr.getStringValues()[index];
return (value != null) ? new Guid(value) : null;
}
Aggregations