private void copySignerToNewLocation(){
  String tenantLduDn=getLduDn();
  ILdapMessage credsObjects=null;
  try {
    credsObjects=getTenantCredentials(tenantLduDn);
    int maxIndex=getCurrMaxIndex(TRUSTED_CRED_OBJECT_CLASS,null) + 1;
    String cn=getTenantCredentialCn(maxIndex);
    ILdapEntry lastSigner=getLastSigner(credsObjects);
    List<LdapMod> modValues=createAtts(lastSigner);
    LdapValue[] values={new LdapValue(cn)};
    LdapMod mod=new LdapMod(LdapModOperation.ADD,"cn",values);
    modValues.add(mod);
    String baseDn=String.format("CN=%s,CN=Tenants,CN=IdentityManager,CN=Services,%s",tenantName,this.rootDn);
    String newDn="CN=" + cn + ","+ baseDn;
    connection.addObject(newDn,modValues.toArray(new LdapMod[]{}));
  }
  finally {
    closeMessage(credsObjects);
  }
}

private void copySignerToNewLocation ( ) { String tenantLduDn = getLduDn ( ) ; ILdapMessage credsObjects = null ; try { credsObjects = getTenantCredentials ( tenantLduDn ) ; int maxIndex = getCurrMaxIndex ( TRUSTED_CRED_OBJECT_CLASS , null ) + 1 ; String cn = getTenantCredentialCn ( maxIndex ) ; ILdapEntry lastSigner = getLastSigner ( credsObjects ) ; List < LdapMod > modValues = createAtts ( lastSigner ) ; LdapValue [ ] values = { new LdapValue ( cn ) } ; LdapMod mod = new LdapMod ( LdapModOperation . ADD , "cn" , values ) ; modValues . add ( mod ) ; String baseDn = String . format ( "CN=%s,CN=Tenants,CN=IdentityManager,CN=Services,%s" , tenantName , this . rootDn ) ; String newDn = "CN=" + cn + "," + baseDn ; connection . addObject ( newDn , modValues . toArray ( new LdapMod [ ] { } ) ) ; } finally { closeMessage ( credsObjects ) ; } }
copy the tenant credentials / signers at new location under services .
