Package org.jets3t.service.model
Class AWSDevPayProduct
java.lang.Object
org.jets3t.service.model.AWSDevPayProduct
- All Implemented Interfaces:
Serializable,Comparable
Class to contain information about an Amazon Web Services (AWS) S3 DevPay product.
- Author:
- Nikolas Coukouma
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAWSDevPayProduct(String productToken) AWSDevPayProduct(String productToken, String productName) -
Method Summary
Modifier and TypeMethodDescriptionintCompare two products by their names (using string comparision)static Vectorload()Loads the products listed inConstants.DEVPAY_PRODUCTS_PROPERTIES_FILENAMEstatic Vectorload(InputStream pin) Loads the products listed in thePropertiesfile represented by the input stream.static Vectorload(Properties prodProps) Loads the products listed in theProperties.toString()
-
Constructor Details
-
AWSDevPayProduct
-
AWSDevPayProduct
-
-
Method Details
-
getProductName
- Returns:
- the name of the DevPay product
-
getProductToken
- Returns:
- the product token of the DevPay product
-
toString
-
compareTo
Compare two products by their names (using string comparision)- Specified by:
compareToin interfaceComparable
-
load
Loads the products listed inConstants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME- Returns:
- the Vector of
AWSDevPayProducts - Throws:
IOException
-
load
Loads the products listed in thePropertiesfile represented by the input stream.- Parameters:
pin- the input stream- Returns:
- the Vector of
AWSDevPayProducts - Throws:
IOException
-
load
Loads the products listed in theProperties. Specifically, any properties ending inConstants.DEVPAY_PRODUCT_NAME_PROP_SUFFIX(the product's name) have that ending removed and replaced withConstants.DEVPAY_PRODUCT_NAME_PROP_SUFFIX(to form name of the property for the product's token). If the token exists, then aAWSDevPayProductis 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
-