private void createEntity(SSOToken token,PersistentObject parentObj,int objectType,Map attributes,String profileName) throws UMSException, AMEntryExistsException, AMException {
  String orgDN=getOrganizationDN(internalToken,parentObj.getDN());
  AttrSet attrSet=CommonUtils.mapToAttrSet(attributes);
  makeNamingFirst(attrSet,getNamingAttribute(objectType),profileName);
  String ctName=getCreationTemplateName(objectType);
  if (ctName == null) {
    ctName="BasicUser";
  }
  TemplateManager tempMgr=TemplateManager.getTemplateManager();
  CreationTemplate creationTemp=tempMgr.getCreationTemplate(ctName,new Guid(orgDN),TemplateManager.SCOPE_ANCESTORS);
  attrSet=combineOCs(creationTemp,attrSet);
  PersistentObject user=new PersistentObject(creationTemp,attrSet);
  try {
    parentObj.addChild(user);
  }
 catch (  AccessRightsException e) {
    if (debug.warningEnabled()) {
      debug.warning("DirectoryServicesImpl.createEntity():" + " Insufficient Access rights to create entity",e);
    }
    throw new AMException(token,"460");
  }
catch (  EntryAlreadyExistsException ee) {
    if (ComplianceServicesImpl.isComplianceUserDeletionEnabled()) {
      complianceImpl.checkIfDeletedUser(token,user.getDN());
    }
    if (debug.warningEnabled()) {
      debug.warning("DirectoryServicesImpl.createEntity() Entity " + "already exists: ",ee);
    }
    throw new AMEntryExistsException(token,"462",ee);
  }
catch (  UMSException ue) {
    if (debug.warningEnabled()) {
      debug.warning("DirectoryServicesImpl.createEntity(): Internal " + "Error occurred. Unable to create User Entry",ue);
    }
    processInternalException(token,ue,"324");
  }
}

private void createEntity ( SSOToken token , PersistentObject parentObj , int objectType , Map attributes , String profileName ) throws UMSException , AMEntryExistsException , AMException { String orgDN = getOrganizationDN ( internalToken , parentObj . getDN ( ) ) ; AttrSet attrSet = CommonUtils . mapToAttrSet ( attributes ) ; makeNamingFirst ( attrSet , getNamingAttribute ( objectType ) , profileName ) ; String ctName = getCreationTemplateName ( objectType ) ; if ( ctName == null ) { ctName = "BasicUser" ; } TemplateManager tempMgr = TemplateManager . getTemplateManager ( ) ; CreationTemplate creationTemp = tempMgr . getCreationTemplate ( ctName , new Guid ( orgDN ) , TemplateManager . SCOPE_ANCESTORS ) ; attrSet = combineOCs ( creationTemp , attrSet ) ; PersistentObject user = new PersistentObject ( creationTemp , attrSet ) ; try { parentObj . addChild ( user ) ; } catch ( AccessRightsException e ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "DirectoryServicesImpl.createEntity():" + " Insufficient Access rights to create entity" , e ) ; } throw new AMException ( token , "460" ) ; } catch ( EntryAlreadyExistsException ee ) { if ( ComplianceServicesImpl . isComplianceUserDeletionEnabled ( ) ) { complianceImpl . checkIfDeletedUser ( token , user . getDN ( ) ) ; } if ( debug . warningEnabled ( ) ) { debug . warning ( "DirectoryServicesImpl.createEntity() Entity " + "already exists: " , ee ) ; } throw new AMEntryExistsException ( token , "462" , ee ) ; } catch ( UMSException ue ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "DirectoryServicesImpl.createEntity(): Internal " + "Error occurred. Unable to create User Entry" , ue ) ; } processInternalException ( token , ue , "324" ) ; } }
method to create a user entry
