public class AWSDevPayProduct extends Object implements Serializable, Comparable
| Constructor and Description |
|---|
AWSDevPayProduct(String productToken) |
AWSDevPayProduct(String productToken,
String productName) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o)
Compare two products by their names (using string comparision)
|
String |
getProductName() |
String |
getProductToken() |
static Vector |
load()
Loads the products listed in
Constants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME |
static Vector |
load(InputStream pin)
Loads the products listed in the
Properties file
represented by the input stream. |
static Vector |
load(Properties prodProps)
Loads the products listed in the
Properties. |
String |
toString() |
public AWSDevPayProduct(String productToken)
public String getProductName()
public String getProductToken()
public String toString()
public int compareTo(Object o)
compareTo in interface Comparablepublic static Vector load() throws IOException
Constants.DEVPAY_PRODUCTS_PROPERTIES_FILENAMEAWSDevPayProductsIOExceptionpublic static Vector load(InputStream pin) throws IOException
Properties file
represented by the input stream.pin - the input streamAWSDevPayProductsIOExceptionpublic static Vector load(Properties prodProps)
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...").prodProps - the propertiesAWSDevPayProducts, sorted by name