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 TypeMethodDescriptionint
Compare two products by their names (using string comparision)static Vector
load()
Loads the products listed inConstants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME
static Vector
load
(InputStream pin) Loads the products listed in theProperties
file represented by the input stream.static Vector
load
(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:
compareTo
in interfaceComparable
-
load
Loads the products listed inConstants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME
- Returns:
- the Vector of
AWSDevPayProduct
s - Throws:
IOException
-
load
Loads the products listed in theProperties
file represented by the input stream.- Parameters:
pin
- the input stream- Returns:
- the Vector of
AWSDevPayProduct
s - 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 aAWSDevPayProduct
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
AWSDevPayProduct
s, sorted by name
-