use of com.iplanet.ums.OrganizationalUnit in project OpenAM by OpenRock.
the class DirectoryServicesImpl method createGroupContainer.
private void createGroupContainer(PersistentObject parentObj, Map attributes, String profileName) throws UMSException, AMException {
AttrSet attrSet = CommonUtils.mapToAttrSet(attributes);
makeNamingFirst(attrSet, getNamingAttribute(AMObject.GROUP_CONTAINER), profileName);
TemplateManager tempMgr = TemplateManager.getTemplateManager();
String orgDN = getOrganizationDN(internalToken, parentObj.getDN());
CreationTemplate creationTemp = tempMgr.getCreationTemplate("BasicGroupContainer", new Guid(orgDN), TemplateManager.SCOPE_ANCESTORS);
OrganizationalUnit gc = new OrganizationalUnit(creationTemp, attrSet);
parentObj.addChild(gc);
}
use of com.iplanet.ums.OrganizationalUnit in project OpenAM by OpenRock.
the class DirectoryServicesImpl method createOrganizationalUnit.
private void createOrganizationalUnit(SSOToken token, PersistentObject parentObj, Map attributes, String profileName) throws UMSException, AMException {
// Invoke the Pre Post Plugins
String orgDN = getOrganizationDN(internalToken, parentObj.getDN());
String entryDN = getNamingAttribute(AMObject.ORGANIZATIONAL_UNIT) + "=" + profileName + "," + parentObj.getDN();
attributes = callBackHelper.preProcess(token, entryDN, orgDN, null, attributes, CallBackHelper.CREATE, AMObject.ORGANIZATIONAL_UNIT, false);
AttrSet attrSet = CommonUtils.mapToAttrSet(attributes);
makeNamingFirst(attrSet, getNamingAttribute(AMObject.ORGANIZATIONAL_UNIT), profileName);
TemplateManager tempMgr = TemplateManager.getTemplateManager();
CreationTemplate creationTemp = tempMgr.getCreationTemplate("BasicOrganizationalUnit", new Guid(orgDN), TemplateManager.SCOPE_ANCESTORS);
attrSet = combineOCs(creationTemp, attrSet);
OrganizationalUnit ou = new OrganizationalUnit(creationTemp, attrSet);
parentObj.addChild(ou);
// Invoke Post processing impls
callBackHelper.postProcess(token, ou.getDN(), orgDN, null, attributes, CallBackHelper.CREATE, AMObject.ORGANIZATIONAL_UNIT, false);
}
Aggregations