// Path: src/main/java/javapns/devices/exceptions/DuplicateDeviceException.java
// public class DuplicateDeviceException extends Exception {
// 
//   private static final long serialVersionUID = -7116507420722667479L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public DuplicateDeviceException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public DuplicateDeviceException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/NullDeviceTokenException.java
// public class NullDeviceTokenException extends Exception {
// 
//   private static final long serialVersionUID = 208339461070934305L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public NullDeviceTokenException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public NullDeviceTokenException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/NullIdException.java
// public class NullIdException extends Exception {
// 
//   private static final long serialVersionUID = -2842793759970312540L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public NullIdException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public NullIdException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/UnknownDeviceException.java
// public class UnknownDeviceException extends Exception {
// 
//   private static final long serialVersionUID = -322193098126184434L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public UnknownDeviceException() {
//     this.message = "Unknown client";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public UnknownDeviceException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }


import javapns.devices.exceptions.DuplicateDeviceException;
import javapns.devices.exceptions.NullDeviceTokenException;
import javapns.devices.exceptions.NullIdException;
import javapns.devices.exceptions.UnknownDeviceException;
package javapns.devices;


/**
 * This is the common interface for all DeviceFactories.
 * It allows the PushNotificationManager to support multiple
 * implementations of DeviceFactory (in-memory, JPA-backed, etc.)
 *
 * @author Sylvain Pedneault
 * @deprecated Phasing out DeviceFactory because it has become irrelevant in the new library architecture
 */
@Deprecated
public interface DeviceFactory {
  /**
   * Add a device to the map
   *
   * @param id    The local device id
   * @param token The device token
   * @return The device created
   * @throws DuplicateDeviceException
   * @throws NullIdException
   * @throws NullDeviceTokenException
   */
  Device addDevice(String id, String token) throws Exception;

  /**
   * Get a device according to his id
   *
   * @param id The local device id
   * @return The device
   * @throws UnknownDeviceException
   * @throws NullIdException
   */
// Path: src/main/java/javapns/devices/exceptions/DuplicateDeviceException.java
// public class DuplicateDeviceException extends Exception {
// 
//   private static final long serialVersionUID = -7116507420722667479L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public DuplicateDeviceException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public DuplicateDeviceException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/NullDeviceTokenException.java
// public class NullDeviceTokenException extends Exception {
// 
//   private static final long serialVersionUID = 208339461070934305L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public NullDeviceTokenException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public NullDeviceTokenException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/NullIdException.java
// public class NullIdException extends Exception {
// 
//   private static final long serialVersionUID = -2842793759970312540L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public NullIdException() {
//     this.message = "Client already exists";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public NullIdException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }
// 
// Path: src/main/java/javapns/devices/exceptions/UnknownDeviceException.java
// public class UnknownDeviceException extends Exception {
// 
//   private static final long serialVersionUID = -322193098126184434L;
//   /* Custom message for this exception */
//   private final String message;
// 
//   /**
//    * Constructor
//    */
//   public UnknownDeviceException() {
//     this.message = "Unknown client";
//   }
// 
//   /**
//    * Constructor with custom message
//    *
//    * @param message
//    */
//   public UnknownDeviceException(final String message) {
//     this.message = message;
//   }
// 
//   /**
//    * String representation
//    */
//   public String toString() {
//     return this.message;
//   }
// }


// Path: src/main/java/javapns/devices/DeviceFactory.java
import javapns.devices.exceptions.DuplicateDeviceException;
import javapns.devices.exceptions.NullDeviceTokenException;
import javapns.devices.exceptions.NullIdException;
import javapns.devices.exceptions.UnknownDeviceException;

package javapns.devices;


/**
 * This is the common interface for all DeviceFactories.
 * It allows the PushNotificationManager to support multiple
 * implementations of DeviceFactory (in-memory, JPA-backed, etc.)
 *
 * @author Sylvain Pedneault
 * @deprecated Phasing out DeviceFactory because it has become irrelevant in the new library architecture
 */
@Deprecated
public interface DeviceFactory {
  /**
   * Add a device to the map
   *
   * @param id    The local device id
   * @param token The device token
   * @return The device created
   * @throws DuplicateDeviceException
   * @throws NullIdException
   * @throws NullDeviceTokenException
   */
  Device addDevice(String id, String token) throws Exception;

  /**
   * Get a device according to his id
   *
   * @param id The local device id
   * @return The device
   * @throws UnknownDeviceException
   * @throws NullIdException
   */
  Device getDevice(String id) throws UnknownDeviceException, NullIdException;