Class AWSDevPayProduct

java.lang.Object
org.jets3t.service.model.AWSDevPayProduct
All Implemented Interfaces:
Serializable, Comparable

public class AWSDevPayProduct extends Object implements Serializable, Comparable
Class to contain information about an Amazon Web Services (AWS) S3 DevPay product.
Author:
Nikolas Coukouma
See Also:
  • Constructor Details

    • AWSDevPayProduct

      public AWSDevPayProduct(String productToken)
    • AWSDevPayProduct

      public AWSDevPayProduct(String productToken, String productName)
  • Method Details

    • getProductName

      public String getProductName()
      Returns:
      the name of the DevPay product
    • getProductToken

      public String getProductToken()
      Returns:
      the product token of the DevPay product
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the name of the DevPay product
    • compareTo

      public int compareTo(Object o)
      Compare two products by their names (using string comparision)
      Specified by:
      compareTo in interface Comparable
    • load

      public static Vector load() throws IOException
      Returns:
      the Vector of AWSDevPayProducts
      Throws:
      IOException
    • load

      public static Vector load(InputStream pin) throws IOException
      Loads the products listed in the Properties file represented by the input stream.
      Parameters:
      pin - the input stream
      Returns:
      the Vector of AWSDevPayProducts
      Throws:
      IOException
    • load

      public static Vector load(Properties prodProps)
      Loads the products listed in the Properties. Specifically, any properties ending in Constants.DEVPAY_PRODUCT_NAME_PROP_SUFFIX (the product's name) have that ending removed and replaced with Constants.DEVPAY_PRODUCT_NAME_PROP_SUFFIX (to form name of the property for the product's token). If the token exists, then a AWSDevPayProduct is constructed with that name and token, and then is added to the Vector. For example, (with the current constants) "foo.name" would become "foo.token"; if both properties exist, then a product is constructed with the values of the "foo.name" and "foo.token" properties (e.g. "Foo" and "{ProductToken}AAA...").
      Parameters:
      prodProps - the properties
      Returns:
      the Vector of AWSDevPayProducts, sorted by name