// Path: src/main/java/org/kopi/ebics/exception/EbicsException.java
// public class EbicsException extends Exception {
// 
//   /**
//    * A means to construct a server error.
//    */
//   public EbicsException() {}
// 
//   /**
//    * A means to construct a server error with an additional message.
//    * @param message the exception message
//    */
//   public EbicsException(String message) {
//     super(message);
//   }
//   /**
//    * A means to construct a server error with no additional message.
//    * @param returnCode the ebics return code.
//    */
//   public EbicsException(ReturnCode returnCode) {
//     this.returnCode = returnCode;
//   }
// 
//   /**
//    * A means to construct a server error with an additional message.
//    * @param returnCode the ebics return code.
//    * @param message the additional message.
//    */
//   public EbicsException(ReturnCode returnCode, String message) {
//     super(message);
//     this.returnCode = returnCode;
//   }
// 
//   /**
//    * Returns the standardized error code.
//    * @return the standardized error code.
//    */
//   public ReturnCode getReturnCode() {
//     return returnCode;
//   }
// 
//   // --------------------------------------------------------------------
//   // DATA MEMBERS
//   // --------------------------------------------------------------------
// 
//   private ReturnCode 		returnCode;
//   private static final long 	serialVersionUID = 2728820344946361669L;
// }
// 
// Path: src/main/java/org/kopi/ebics/session/EbicsSession.java
// public class EbicsSession {
// 
//   /**
//    * Constructs a new ebics session
//    * @param user the ebics user
//    * @param the ebics client configuration
//    */
//   public EbicsSession(EbicsUser user, Configuration configuration) {
//     this.user = user;
//     this.configuration = configuration;
//     parameters = new HashMap<String, String>();
//   }
// 
//   /**
//    * Returns the banks encryption key.
//    * The key will be fetched automatically form the bank if needed.
//    * @return the banks encryption key.
//    * @throws IOException Communication error during key retrieval.
//    * @throws EbicsException Server error message generated during key retrieval.
//    */
//   public RSAPublicKey getBankE002Key() throws IOException, EbicsException {
//     return user.getPartner().getBank().getE002Key();
//   }
// 
//   /**
//    * Returns the banks authentication key.
//    * The key will be fetched automatically form the bank if needed.
//    * @return the banks authentication key.
//    * @throws IOException Communication error during key retrieval.
//    * @throws EbicsException Server error message generated during key retrieval.
//    */
//   public RSAPublicKey getBankX002Key() throws IOException, EbicsException {
//     return user.getPartner().getBank().getX002Key();
//   }
// 
//   /**
//    * Returns the bank id.
//    * @return the bank id.
//    * @throws EbicsException
//    */
//   public String getBankID() throws EbicsException {
//     return user.getPartner().getBank().getHostId();
//   }
// 
//   /**
//    * Return the session user.
//    * @return the session user.
//    */
//   public EbicsUser getUser() {
//     return user;
//   }
// 
//   /**
//    * Returns the client application configuration.
//    * @return the client application configuration.
//    */
//   public Configuration getConfiguration() {
//     return configuration;
//   }
// 
//   /**
//    * Sets the optional product identification that will be sent to the bank during each request.
//    * @param product Product description
//    */
//   public void setProduct(Product product) {
//     this.product = product;
//   }
// 
//   /**
//    * @return the product
//    */
//   public Product getProduct() {
//     return product;
//   }
// 
//   /**
//    * Adds a session parameter to use it in the transfer process.
//    * @param key the parameter key
//    * @param value the parameter value
//    */
//   public void addSessionParam(String key, String value) {
//     parameters.put(key, value);
//   }
// 
//   /**
//    * Retrieves a session parameter using its key.
//    * @param key the parameter key
//    * @return the session parameter
//    */
//   public String getSessionParam(String key) {
//     if (key == null) {
//       return null;
//     }
// 
//     return parameters.get(key);
//   }
// 
//   // --------------------------------------------------------------------
//   // DATA MEMBERS
//   // --------------------------------------------------------------------
// 
//   private EbicsUser				user;
//   private Configuration 			configuration;
//   private Product				product;
//   private Map<String, String>			parameters;
// }


import org.kopi.ebics.exception.EbicsException;
import org.kopi.ebics.session.EbicsSession;
/*
 * Copyright (c) 1990-2012 kopiLeft Development SARL, Bizerte, Tunisia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * $Id$
 */

package org.kopi.ebics.xml;


/**
 * The <code>HPBRequestElement</code> is the element to be sent when
 * a HPB request is needed to retrieve the bank public keys
 *
 * @author hachani
 *
 */
public class HPBRequestElement extends DefaultEbicsRootElement {

  /**
   * Constructs a new HPB Request element.
   * @param session the current ebics session.
   */
  public HPBRequestElement(EbicsSession session) {
    super(session);
  }

  @Override
  public String getName() {
    return "HPBRequest.xml";
  }

  @Override
// Path: src/main/java/org/kopi/ebics/exception/EbicsException.java
// public class EbicsException extends Exception {
// 
//   /**
//    * A means to construct a server error.
//    */
//   public EbicsException() {}
// 
//   /**
//    * A means to construct a server error with an additional message.
//    * @param message the exception message
//    */
//   public EbicsException(String message) {
//     super(message);
//   }
//   /**
//    * A means to construct a server error with no additional message.
//    * @param returnCode the ebics return code.
//    */
//   public EbicsException(ReturnCode returnCode) {
//     this.returnCode = returnCode;
//   }
// 
//   /**
//    * A means to construct a server error with an additional message.
//    * @param returnCode the ebics return code.
//    * @param message the additional message.
//    */
//   public EbicsException(ReturnCode returnCode, String message) {
//     super(message);
//     this.returnCode = returnCode;
//   }
// 
//   /**
//    * Returns the standardized error code.
//    * @return the standardized error code.
//    */
//   public ReturnCode getReturnCode() {
//     return returnCode;
//   }
// 
//   // --------------------------------------------------------------------
//   // DATA MEMBERS
//   // --------------------------------------------------------------------
// 
//   private ReturnCode 		returnCode;
//   private static final long 	serialVersionUID = 2728820344946361669L;
// }
// 
// Path: src/main/java/org/kopi/ebics/session/EbicsSession.java
// public class EbicsSession {
// 
//   /**
//    * Constructs a new ebics session
//    * @param user the ebics user
//    * @param the ebics client configuration
//    */
//   public EbicsSession(EbicsUser user, Configuration configuration) {
//     this.user = user;
//     this.configuration = configuration;
//     parameters = new HashMap<String, String>();
//   }
// 
//   /**
//    * Returns the banks encryption key.
//    * The key will be fetched automatically form the bank if needed.
//    * @return the banks encryption key.
//    * @throws IOException Communication error during key retrieval.
//    * @throws EbicsException Server error message generated during key retrieval.
//    */
//   public RSAPublicKey getBankE002Key() throws IOException, EbicsException {
//     return user.getPartner().getBank().getE002Key();
//   }
// 
//   /**
//    * Returns the banks authentication key.
//    * The key will be fetched automatically form the bank if needed.
//    * @return the banks authentication key.
//    * @throws IOException Communication error during key retrieval.
//    * @throws EbicsException Server error message generated during key retrieval.
//    */
//   public RSAPublicKey getBankX002Key() throws IOException, EbicsException {
//     return user.getPartner().getBank().getX002Key();
//   }
// 
//   /**
//    * Returns the bank id.
//    * @return the bank id.
//    * @throws EbicsException
//    */
//   public String getBankID() throws EbicsException {
//     return user.getPartner().getBank().getHostId();
//   }
// 
//   /**
//    * Return the session user.
//    * @return the session user.
//    */
//   public EbicsUser getUser() {
//     return user;
//   }
// 
//   /**
//    * Returns the client application configuration.
//    * @return the client application configuration.
//    */
//   public Configuration getConfiguration() {
//     return configuration;
//   }
// 
//   /**
//    * Sets the optional product identification that will be sent to the bank during each request.
//    * @param product Product description
//    */
//   public void setProduct(Product product) {
//     this.product = product;
//   }
// 
//   /**
//    * @return the product
//    */
//   public Product getProduct() {
//     return product;
//   }
// 
//   /**
//    * Adds a session parameter to use it in the transfer process.
//    * @param key the parameter key
//    * @param value the parameter value
//    */
//   public void addSessionParam(String key, String value) {
//     parameters.put(key, value);
//   }
// 
//   /**
//    * Retrieves a session parameter using its key.
//    * @param key the parameter key
//    * @return the session parameter
//    */
//   public String getSessionParam(String key) {
//     if (key == null) {
//       return null;
//     }
// 
//     return parameters.get(key);
//   }
// 
//   // --------------------------------------------------------------------
//   // DATA MEMBERS
//   // --------------------------------------------------------------------
// 
//   private EbicsUser				user;
//   private Configuration 			configuration;
//   private Product				product;
//   private Map<String, String>			parameters;
// }


// Path: src/main/java/org/kopi/ebics/xml/HPBRequestElement.java
import org.kopi.ebics.exception.EbicsException;
import org.kopi.ebics.session.EbicsSession;

/*
 * Copyright (c) 1990-2012 kopiLeft Development SARL, Bizerte, Tunisia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * $Id$
 */

package org.kopi.ebics.xml;


/**
 * The <code>HPBRequestElement</code> is the element to be sent when
 * a HPB request is needed to retrieve the bank public keys
 *
 * @author hachani
 *
 */
public class HPBRequestElement extends DefaultEbicsRootElement {

  /**
   * Constructs a new HPB Request element.
   * @param session the current ebics session.
   */
  public HPBRequestElement(EbicsSession session) {
    super(session);
  }

  @Override
  public String getName() {
    return "HPBRequest.xml";
  }

  @Override
  public void build() throws EbicsException {