Package org.jets3t.service.model
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AWSDevPayProduct(String productToken)AWSDevPayProduct(String productToken, String productName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)Compare two products by their names (using string comparision)StringgetProductName()StringgetProductToken()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.StringtoString()
-
-
-
Method Detail
-
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()
-
compareTo
public int compareTo(Object o)
Compare two products by their names (using string comparision)- Specified by:
compareToin interfaceComparable
-
load
public static Vector load() throws IOException
Loads the products listed inConstants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME- Returns:
- the Vector of
AWSDevPayProducts - Throws:
IOException
-
load
public static Vector load(InputStream pin) throws IOException
Loads the products listed in thePropertiesfile 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 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
-
-