question: private void createUser ( SSOToken token , PersistentObject parentObj , Map attributes , String profileName ) throws UMSException , AMEntryExistsException , AMException { String orgDN = getOrganizationDN ( internalToken , parentObj . getDN ( ) ) ; String entryDN = getNamingAttribute ( AMObject . USER ) + "=" + profileName + "," + parentObj . getDN ( ) ; attributes = callBackHelper . preProcess ( token , entryDN , orgDN , null , attributes , CallBackHelper . CREATE , AMObject . USER , false ) ; AttrSet attrSet = CommonUtils . mapToAttrSet ( attributes ) ; makeNamingFirst ( attrSet , getNamingAttribute ( AMObject . USER ) , profileName ) ; UserPasswordValidationHelper pluginImpl = new UserPasswordValidationHelper ( token , orgDN ) ; try { pluginImpl . validate ( CommonUtils . attrSetToMap ( attrSet ) ) ; } catch ( AMException ame ) { debug . error ( "DirectoryServicesImpl.createUser(): Invalid " + "characters for user" , ame ) ; throw ame ; } TemplateManager tempMgr = TemplateManager . getTemplateManager ( ) ; CreationTemplate creationTemp = tempMgr . getCreationTemplate ( "BasicUser" , 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.createUser(): Insufficient " + "Access rights to create user" , e ) ; } throw new AMException ( token , "460" ) ; } catch ( EntryAlreadyExistsException ee ) { if ( ComplianceServicesImpl . isComplianceUserDeletionEnabled ( ) ) { complianceImpl . checkIfDeletedUser ( token , user . getDN ( ) ) ; } if ( debug . warningEnabled ( ) ) { debug . warning ( "DirectoryServicesImpl.createUser() User " + "already exists: " , ee ) ; } throw new AMEntryExistsException ( token , "328" , ee ) ; } catch ( UMSException ue ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "DirectoryServicesImpl.createUser(): Internal " + "Error occurred. Unable to create User Entry" , ue ) ; } processInternalException ( token , ue , "324" ) ; } callBackHelper . postProcess ( token , user . getDN ( ) , orgDN , null , attributes , CallBackHelper . CREATE , AMObject . USER , false ) ; AMUserEntryProcessed postPlugin = getUserPostPlugin ( ) ; if ( postPlugin != null ) { Map attrMap = CommonUtils . attrSetToMap ( attrSet ) ; postPlugin . processUserAdd ( token , user . getDN ( ) , attrMap ) ; } EmailNotificationHelper mailerObj = new EmailNotificationHelper ( user . getDN ( ) ) ; mailerObj . setUserCreateNotificationList ( ) ; mailerObj . sendUserCreateNotification ( attributes ) ; }
target:  Method to create a user entry