|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.pay.xml.XMLPaymentOption
public class XMLPaymentOption
This class represents a payment option sent by the Payment Instance.
Field Summary | |
---|---|
private static java.lang.String |
EXCEPTION_WRONG_XML_STRUCTURE
|
static java.lang.String |
EXTRA_LINK
|
static java.lang.String |
EXTRA_PHONE
|
static java.lang.String |
EXTRA_TEXT
|
private java.util.Vector |
m_detailedInfos
Same explanation as m_headings |
private java.util.Vector |
m_extraInfos
This vector takes String[3] arrays. |
private boolean |
m_generic
Generic option? should be true, unless you plan to have JAP provide a special input form for this option |
private java.util.Vector |
m_headings
This vector takes String[2] arrays while the first element is the heading and the second element is the language identifier. |
private java.lang.String |
m_imageLink
A link to an image |
private java.util.Vector |
m_inputFields
This vector takes input fields. |
private static java.util.Vector |
m_languages
|
private int |
m_markup
percentage of a user's payment that we have to pay to the payment option's provider |
private java.lang.String |
m_minJapVersion
JAP version since when the option does work (for non-generic options) |
private java.lang.String |
m_name
Option name |
private java.util.Vector |
m_paymentDelays
Content: String[2], [0] is a message telling the user about the delay until his account is credited after payment, [1] the language identifier, e.g. |
private java.util.Hashtable |
m_ranks
key: language, value: rank as Integer > 0, lower number for rank means higher priority |
private java.lang.String |
m_type
Option type (active|passive) |
static int |
MAX_CLICKS_UNLIMITED
|
static java.lang.String |
OPTION_ACTIVE
|
static java.lang.String |
OPTION_MIXED
|
static java.lang.String |
OPTION_PASSIVE
|
private static java.lang.String |
XML_ATTR_MAXCLICKS
|
Fields inherited from interface anon.util.IXMLEncodable |
---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION |
Constructor Summary | |
---|---|
XMLPaymentOption()
|
|
XMLPaymentOption(org.w3c.dom.Document document)
|
|
XMLPaymentOption(org.w3c.dom.Element xml)
|
|
XMLPaymentOption(java.lang.String xml)
|
|
XMLPaymentOption(java.lang.String a_name,
java.lang.String a_type)
|
|
XMLPaymentOption(java.lang.String a_name,
java.lang.String a_type,
boolean a_generic)
|
|
XMLPaymentOption(java.lang.String a_name,
java.lang.String a_type,
boolean a_generic,
java.lang.String a_japVersion)
|
|
XMLPaymentOption(java.lang.String a_name,
java.lang.String a_type,
boolean a_generic,
java.lang.String a_japVersion,
int a_markup)
|
Method Summary | |
---|---|
void |
addDetailedInfo(java.lang.String a_info,
java.lang.String a_language)
|
void |
addExtraInfo(java.lang.String a_info,
java.lang.String a_type,
java.lang.String a_language)
|
void |
addHeading(java.lang.String a_heading,
java.lang.String a_language)
|
void |
addInputField(java.lang.String a_reference,
java.lang.String a_label,
java.lang.String a_language)
|
private static void |
addLanguage(java.lang.String lang)
|
void |
addPaymentDelay(java.lang.String a_delayString,
java.lang.String a_language)
|
void |
addRank(int a_rank,
java.lang.String a_language)
|
java.lang.String |
getDetailedInfo(java.lang.String a_langShort)
|
java.lang.String |
getExtraInfo(java.lang.String a_langShort)
|
java.util.Vector |
getExtraInfos()
getExtraInfos |
java.lang.String |
getExtraInfoType(java.lang.String a_langShort)
|
java.lang.String |
getHeading(java.lang.String a_langShort)
getHeading |
java.util.Vector |
getInputFields()
|
java.util.Vector |
getLanguages()
|
java.util.Vector |
getLocalizedExtraInfoText(java.lang.String language)
getLocalizedExtraInfoText like getExtraInfos(), except: - only returns "info", without type (so you can get Strings from the Vector directly instead of an Array) - only in the given language (so you don't have to iterate over the Vector to get one language's strings) (after Jap version 0.08.101, will fall back to english if no extra infos at all were found for the given language) Warning: extraInfos that do not exist for the given language will not be returned at all (ideally, we'd fall back to english, but the data structures used don't allow figuring out which extraInfos are equivalents in different languages) |
int |
getMarkup()
|
java.lang.String |
getMinJapVersion()
|
java.lang.String |
getName()
|
java.lang.String |
getPaymentDelay(java.lang.String a_langShort)
|
java.lang.Integer |
getRank(java.lang.String a_langShort)
|
java.lang.String |
getType()
|
boolean |
isGeneric()
|
boolean |
isNewer(XMLPaymentOption a_paymentOption)
|
void |
setImageLink(java.lang.String a_link)
|
void |
setType(java.lang.String a_type)
|
protected void |
setValues(org.w3c.dom.Element elemRoot)
|
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document. |
boolean |
worksWithJapVersion(java.lang.String a_version)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_CLICKS_UNLIMITED
public static final java.lang.String OPTION_ACTIVE
public static final java.lang.String OPTION_PASSIVE
public static final java.lang.String OPTION_MIXED
public static final java.lang.String EXTRA_TEXT
public static final java.lang.String EXTRA_LINK
public static final java.lang.String EXTRA_PHONE
private static final java.lang.String XML_ATTR_MAXCLICKS
private static final java.lang.String EXCEPTION_WRONG_XML_STRUCTURE
private static java.util.Vector m_languages
private java.lang.String m_name
private java.lang.String m_type
private int m_markup
private boolean m_generic
private java.util.Vector m_headings
private java.util.Vector m_detailedInfos
private java.util.Hashtable m_ranks
private java.util.Vector m_paymentDelays
private java.util.Vector m_extraInfos
private java.util.Vector m_inputFields
private java.lang.String m_imageLink
private java.lang.String m_minJapVersion
Constructor Detail |
---|
public XMLPaymentOption(java.lang.String xml) throws java.lang.Exception
java.lang.Exception
public XMLPaymentOption()
public XMLPaymentOption(java.lang.String a_name, java.lang.String a_type, boolean a_generic)
public XMLPaymentOption(java.lang.String a_name, java.lang.String a_type, boolean a_generic, java.lang.String a_japVersion)
public XMLPaymentOption(java.lang.String a_name, java.lang.String a_type, boolean a_generic, java.lang.String a_japVersion, int a_markup)
public XMLPaymentOption(java.lang.String a_name, java.lang.String a_type)
public XMLPaymentOption(org.w3c.dom.Element xml) throws java.lang.Exception
java.lang.Exception
public XMLPaymentOption(org.w3c.dom.Document document) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void addHeading(java.lang.String a_heading, java.lang.String a_language)
public void addDetailedInfo(java.lang.String a_info, java.lang.String a_language)
public void addRank(int a_rank, java.lang.String a_language)
public void addPaymentDelay(java.lang.String a_delayString, java.lang.String a_language)
public void addExtraInfo(java.lang.String a_info, java.lang.String a_type, java.lang.String a_language)
public void addInputField(java.lang.String a_reference, java.lang.String a_label, java.lang.String a_language)
public void setImageLink(java.lang.String a_link)
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a document
protected void setValues(org.w3c.dom.Element elemRoot) throws java.lang.Exception
java.lang.Exception
public void setType(java.lang.String a_type)
public java.lang.String getHeading(java.lang.String a_langShort)
a_langShort
- String
public java.lang.String getDetailedInfo(java.lang.String a_langShort)
public java.lang.Integer getRank(java.lang.String a_langShort)
a_langShort
- String
public java.lang.String getPaymentDelay(java.lang.String a_langShort)
public java.lang.String getExtraInfo(java.lang.String a_langShort)
public java.util.Vector getExtraInfos()
public java.util.Vector getLocalizedExtraInfoText(java.lang.String language)
language
- 2-letter code for the expected language
public java.lang.String getType()
public java.lang.String getName()
public java.lang.String getExtraInfoType(java.lang.String a_langShort)
public java.util.Vector getInputFields()
public java.util.Vector getLanguages()
public boolean isGeneric()
public int getMarkup()
public java.lang.String getMinJapVersion()
public boolean isNewer(XMLPaymentOption a_paymentOption)
public boolean worksWithJapVersion(java.lang.String a_version)
private static void addLanguage(java.lang.String lang)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |