NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/getpartiallyregistereddetails/GetPartiallyRegisteredDetailsLdapComponent.java
/**
     * This function will read the account detail attributes from ldap and set the appropriate 
     * details in the account taking into consideration organisations and persons. 
     * @param attributes this is a map of name value pairs representing LDAP attributes
     * @return account details held in LDAP
     */
This function will read the account detail attributes from ldap and set the appropriate
details in the account taking into consideration organisations and persons.
@param attributes this is a map of name value pairs representing LDAP attributes
@return account details held in LDAP
This function will read the account detail attributes from ldap and set the appropriate details in the account taking into consideration organisations and persons . @param attributes this is a map of name value pairs representing LDAP attributes @return account details held in LDAP
private BeisAccountDetails GetAccountDetailsFromLdapAttributes(Map<String, String> attributes){
        BeisAccountDetails accountDetails = new BeisAccountDetails();
        String ldapAttributeForename = configurationManager.getString("attribute.forename");        
        String ldapAttributeSurname = configurationManager.getString("attribute.surname");
        String ldapAttributeHomePhone = configurationManager.getString("attribute.homePhone");       
        String ldapAttributeOrgname = configurationManager.getString("attribute.organisationName");               
        if(!StringUtils.isEmpty(attributes.get(ldapAttributeOrgname))){
            OrganisationNameDetail organisationNameDetail = new OrganisationNameDetail();
            organisationNameDetail.setOrgName(attributes.get(ldapAttributeOrgname));
            accountDetails.setOrganisationNameDetail(organisationNameDetail);
            accountDetails.setAccountType(AccountType.ORGANISATION);
        }else if(!StringUtils.isEmpty(attributes.get(ldapAttributeForename))){
            PersonNameDetail personNameDetail = new PersonNameDetail();
            personNameDetail.setFirstname(attributes.get(ldapAttributeForename));       
            personNameDetail.setSurname(attributes.get(ldapAttributeSurname));                       
            accountDetails.setPersonNameDetail(personNameDetail);  
            accountDetails.setAccountType(AccountType.PERSON);
        }
        accountDetails.setTelNumber(attributes.get(ldapAttributeHomePhone));   
        return accountDetails;
    }
private BeisAccountDetails GetAccountDetailsFromLdapAttributes ( Map < String , String > attributes ) { BeisAccountDetails accountDetails = new BeisAccountDetails ( ) ; String ldapAttributeForename = configurationManager . getString ( "attribute.forename" ) ; String ldapAttributeSurname = configurationManager . getString ( "attribute.surname" ) ; String ldapAttributeHomePhone = configurationManager . getString ( "attribute.homePhone" ) ; String ldapAttributeOrgname = configurationManager . getString ( "attribute.organisationName" ) ; if ( ! StringUtils . isEmpty ( attributes . get ( ldapAttributeOrgname ) ) ) { OrganisationNameDetail organisationNameDetail = new OrganisationNameDetail ( ) ; organisationNameDetail . setOrgName ( attributes . get ( ldapAttributeOrgname ) ) ; accountDetails . setOrganisationNameDetail ( organisationNameDetail ) ; accountDetails . setAccountType ( AccountType . ORGANISATION ) ; } else if ( ! StringUtils . isEmpty ( attributes . get ( ldapAttributeForename ) ) ) { PersonNameDetail personNameDetail = new PersonNameDetail ( ) ; personNameDetail . setFirstname ( attributes . get ( ldapAttributeForename ) ) ; personNameDetail . setSurname ( attributes . get ( ldapAttributeSurname ) ) ; accountDetails . setPersonNameDetail ( personNameDetail ) ; accountDetails . setAccountType ( AccountType . PERSON ) ; } accountDetails . setTelNumber ( attributes . get ( ldapAttributeHomePhone ) ) ; return accountDetails ; }
This function will read the account detail attributes from ldap and set the appropriate
 details in the account taking into consideration organisations and persons.
This function will read the account detail attributes from ldap and set the appropriate details in the account taking into consideration organisations and persons .