public static final AuthnProviderParamsToValidate mapToValidateCommon(AuthnProviderBaseParam param,AuthnProvider provider){
  AuthnProviderParamsToValidate authnToValidate=new AuthnProviderParamsToValidate();
  if (provider == null) {
    authnToValidate.setManagerDN(param.getManagerDn());
    authnToValidate.setManagerPwd(param.getManagerPassword());
    authnToValidate.setSearchBase(param.getSearchBase());
    authnToValidate.setGroupAttr(param.getGroupAttribute());
    authnToValidate.setMode(param.getMode());
  }
 else {
    authnToValidate.setManagerDN((param.getManagerDn() == null) ? provider.getManagerDN() : param.getManagerDn());
    authnToValidate.setManagerPwd((param.getManagerPassword() == null) ? provider.getManagerPassword() : param.getManagerPassword());
    authnToValidate.setSearchBase((param.getSearchBase() == null) ? provider.getSearchBase() : param.getSearchBase());
    authnToValidate.setGroupAttr((param.getGroupAttribute() == null) ? provider.getGroupAttribute() : param.getGroupAttribute());
    authnToValidate.setMode((param.getMode() == null) ? provider.getMode() : param.getMode());
  }
  return authnToValidate;
}

public static final AuthnProviderParamsToValidate mapToValidateCommon ( AuthnProviderBaseParam param , AuthnProvider provider ) { AuthnProviderParamsToValidate authnToValidate = new AuthnProviderParamsToValidate ( ) ; if ( provider == null ) { authnToValidate . setManagerDN ( param . getManagerDn ( ) ) ; authnToValidate . setManagerPwd ( param . getManagerPassword ( ) ) ; authnToValidate . setSearchBase ( param . getSearchBase ( ) ) ; authnToValidate . setGroupAttr ( param . getGroupAttribute ( ) ) ; authnToValidate . setMode ( param . getMode ( ) ) ; } else { authnToValidate . setManagerDN ( ( param . getManagerDn ( ) == null ) ? provider . getManagerDN ( ) : param . getManagerDn ( ) ) ; authnToValidate . setManagerPwd ( ( param . getManagerPassword ( ) == null ) ? provider . getManagerPassword ( ) : param . getManagerPassword ( ) ) ; authnToValidate . setSearchBase ( ( param . getSearchBase ( ) == null ) ? provider . getSearchBase ( ) : param . getSearchBase ( ) ) ; authnToValidate . setGroupAttr ( ( param . getGroupAttribute ( ) == null ) ? provider . getGroupAttribute ( ) : param . getGroupAttribute ( ) ) ; authnToValidate . setMode ( ( param . getMode ( ) == null ) ? provider . getMode ( ) : param . getMode ( ) ) ; } return authnToValidate ; }
generate an authnproviderparams object from an input rest authnproviderbaseparam and db model provider . it merges the two .
