public class PunchoutConfigurationParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTHENTICATION_BASE_URL
The key in PluginDeployment.xml to stand for authentication base URL.
|
static java.lang.String |
AUTHENTICATION_PARAMETERS
The key in PluginDeployment.xml to stand for URL parameters of HTTP request sent by
getAuthenticationURL(PluginContext, PaymentInstruction) . |
static java.lang.String |
AUTHENTICATION_REQUEST_STYLE
The key in PluginDeployment.xml to stand for authentication request style.
|
static java.lang.String |
AUTHENTICATION_SESSION_NEEDED
The key in PluginDeployment.xml to stand for whether needs authentication session or not.
|
static java.lang.String |
CHARSET
The key in PluginDeployment.xml to stand for
charset . |
static java.lang.String |
CHARSET_UTF8
A value for
charset property means UTF-8 charset . |
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
static java.lang.String |
ENCODING_METHOD
The key in PluginDeployment.xml to stand for encoding method.
|
static java.lang.String |
ENCODING_METHOD_NONE
A value for
encodingMethod property means no need to encode. |
static java.lang.String |
ENCODING_METHOD_URL
A value for
encodingMethod property means URL encoding. |
static java.lang.String |
ENCODING_PARAMETERS
The key in PluginDeployment.xml to stand for URL parameters needed to be encoded when building URL parameters.
|
static java.lang.String |
ENCRYPTION_METHOD
The key in PluginDeployment.xml to stand for encryption method.
|
static java.lang.String |
ENCRYPTION_METHOD_MD5
A value for
encryptionMethod property means MD5 encryption. |
static java.lang.String |
ENCRYPTION_METHOD_NONE
A value for
encryptionMethod property means no need to encrypt. |
static java.lang.String |
ENCRYPTION_PARAMETERS
The key in PluginDeployment.xml to stand for URL parameters needed to be encrypted when building URL parameters.
|
static java.lang.String |
EXPIRED_TIME
The key in PluginDeployment.xml to stand for payment expired time.
|
static java.lang.String |
EXPIRED_TIME_DEFAULT
A value for
expiredTime property means default value 2 hours. |
static java.lang.String |
INITIALIZATION_BASE_URL
The key in PluginDeployment.xml to stand for initialization base URL.
|
static java.lang.String |
INITIALIZATION_PARAMETERS
The key in PluginDeployment.xml standing for URL parameters of HTTP(s) request sent by
initAuthenticationSession(PluginContext, PaymentInstruction) . |
static java.lang.String |
INITIALIZATION_REQUEST_STYLE
The key in PluginDeployment.xml to stand for initialization request style.
|
static int |
MILLSECOND_IN_ONE_SECOND
Millsecond in one second. |
static java.lang.String |
PI_ID_KEY
The key in PluginDeployment.xml to stand for payment instruction id key value.
|
static java.lang.String |
REQUEST_STYLE_GET
A value for
initializationRequestStyle or authenticationRequestStyle property means
GET style request. |
static java.lang.String |
REQUEST_STYLE_POST
A value for
initializationRequestStyle or authenticationRequestStyle property means
POST style request. |
static java.lang.String |
TIMEOUT
The key in PluginDeployment.xml to stand for connection timeout.
|
static java.lang.String |
TIMEOUT_DEFAULT
A value for
timeout property means default value 20 seconds. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAuthenticationBaseURL(java.util.Map properties)
Get authenticationBaseURL value from PluginDeployment.xml.
|
static java.util.Set |
getAuthenticationParameters(java.util.Map properties)
Get authenticationParams value as a set from PluginDeployment.xml.
|
static java.lang.String |
getAuthenticationRequestStyle(java.util.Map properties)
Get authenticationRequestStyle value from PluginDeployment.xml.
|
static java.lang.String |
getCharset(java.util.Map properties)
Get
charset value from PluginDeployment.xml. |
static java.lang.String |
getEncodingMethod(java.util.Map properties)
Get encodingMethod value from PluginDeployment.xml.
|
static java.util.Set |
getEncodingParameters(java.util.Map properties)
Get encodingParams value as a set from PluginDeployment.xml.
|
static java.lang.String |
getEncryptionMethod(java.util.Map properties)
Get encryptionMethod value from PluginDeployment.xml
|
static java.util.Set |
getEncryptionParameters(java.util.Map properties)
Get encryptionParams value as a set from PluginDeployment.xml.
|
static int |
getExpiredTime(java.util.Map properties)
Get expiredTime value from PluginDeployment.xml.
|
static java.util.Map |
getGroupProperties(java.lang.String groupName,
java.util.Map properties)
This method returns the name-value pairs, where names are configured in PluginDeployment.xml separated by comma.
|
static java.lang.String |
getInitializationBaseURL(java.util.Map properties)
Get initializationBaseURL value from PluginDeployment.xml.
|
static java.util.Set |
getInitializationParameters(java.util.Map properties)
Get initializationParams value as a set from PluginDeployment.xml.
|
static java.lang.String |
getInitializationRequestStyle(java.util.Map properties)
Get initializationRequestStyle value from PluginDeployment.xml.
|
static java.lang.String |
getPIIdKey(java.util.Map properties)
Get payment instruction id key value from PluginDeployment.xml.
|
static java.util.Set |
getPropertyValueSet(java.lang.String propertyName,
java.util.Map properties)
This method parses the value separated by comma and set them to a
Set object. |
static int |
getTimeout(java.util.Map properties)
Get timeout value from PluginDeployment.xml.
|
static boolean |
isAuthenticationSessionNeeded(java.util.Map properties)
Get authenticationSessionNeeded value from PluginDeployment.xml.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String EXPIRED_TIME
public static final java.lang.String EXPIRED_TIME_DEFAULT
expiredTime
property means default value 2 hours.TIMEOUT
,
Constant Field Valuespublic static final java.lang.String TIMEOUT
public static final java.lang.String TIMEOUT_DEFAULT
timeout
property means default value 20 seconds.TIMEOUT
,
Constant Field Valuespublic static final int MILLSECOND_IN_ONE_SECOND
Millsecond
in one second.public static final java.lang.String CHARSET
charset
.public static final java.lang.String CHARSET_UTF8
charset
property means UTF-8 charset
.CHARSET
,
Constant Field Valuespublic static final java.lang.String PI_ID_KEY
public static final java.lang.String ENCODING_METHOD
public static final java.lang.String ENCODING_METHOD_NONE
encodingMethod
property means no need to encode.ENCODING_METHOD
,
Constant Field Valuespublic static final java.lang.String ENCODING_METHOD_URL
encodingMethod
property means URL encoding.ENCODING_METHOD
,
Constant Field Valuespublic static final java.lang.String ENCODING_PARAMETERS
AbstractPunchoutPaymentPluginImpl#encode(String, Map)
,
getGroupProperties(String, Map)
,
Constant Field Valuespublic static final java.lang.String ENCRYPTION_METHOD
public static final java.lang.String ENCRYPTION_METHOD_NONE
encryptionMethod
property means no need to encrypt.ENCRYPTION_METHOD
,
Constant Field Valuespublic static final java.lang.String ENCRYPTION_METHOD_MD5
encryptionMethod
property means MD5
encryption.ENCRYPTION_METHOD
,
Constant Field Valuespublic static final java.lang.String ENCRYPTION_PARAMETERS
AbstractPunchoutPaymentPluginImpl#encrypt(String, Map)
,
getGroupProperties(String, Map)
,
Constant Field Valuespublic static final java.lang.String AUTHENTICATION_SESSION_NEEDED
public static final java.lang.String INITIALIZATION_REQUEST_STYLE
public static final java.lang.String INITIALIZATION_BASE_URL
public static final java.lang.String INITIALIZATION_PARAMETERS
initAuthenticationSession(PluginContext, PaymentInstruction)
. It should just contain parameters
attached to URL, while not contain other properties that may be used in this method.AbstractPunchoutPaymentPluginImpl#initAuthenticationSession(PluginContext, PaymentInstruction)
,
getGroupProperties(String, Map)
,
Constant Field Valuespublic static final java.lang.String AUTHENTICATION_REQUEST_STYLE
public static final java.lang.String AUTHENTICATION_BASE_URL
public static final java.lang.String AUTHENTICATION_PARAMETERS
getAuthenticationURL(PluginContext, PaymentInstruction)
. It should just contains parameters
attached to URL, not contains other properties that may be used in this method.AbstractPunchoutPaymentPluginImpl#getAuthenticationURL(PluginContext, PaymentInstruction)
,
getGroupProperties(String, Map)
,
Constant Field Valuespublic static final java.lang.String REQUEST_STYLE_GET
initializationRequestStyle
or authenticationRequestStyle
property means
GET style request.public static final java.lang.String REQUEST_STYLE_POST
initializationRequestStyle
or authenticationRequestStyle
property means
POST style request.public static java.util.Set getPropertyValueSet(java.lang.String propertyName, java.util.Map properties)
Set
object.propertyName
- property name.properties
- all properties.Set
object with all String
objects separated by comma.public static java.util.Map getGroupProperties(java.lang.String groupName, java.util.Map properties)
<PluginProperty name="property1" value="value1"/> <PluginProperty name="property2" value="value2"/> <PluginProperty name="group1" value="property1,property3"/> <PluginProperty name="group2" value="property4"/>It defines two group properties. One is
group1
which contains two property keys,
property1
and property3
. The property1
is defined in this file but
property3
may come from other places. Another group property, group2
, has only one
property key, property4
. The property2
does not belong to any group.
This method calls getPropertyValueAsSet(String, Map)
to get property names, then try to find the
values in argument properties
.
groupName
- group property nameproperties
- all propertiesgetPropertyValueSet(String, Map)
public static int getExpiredTime(java.util.Map properties)
properties
- all propertiesEXPIRED_TIME
public static int getTimeout(java.util.Map properties)
properties
- all propertiesTIMEOUT
public static java.lang.String getCharset(java.util.Map properties)
charset
value from PluginDeployment.xml.properties
- all propertiescharset
valueCHARSET
public static java.lang.String getPIIdKey(java.util.Map properties)
properties
- all propertiesPI_ID_KEY
public static java.lang.String getEncodingMethod(java.util.Map properties)
properties
- all propertiesENCODING_METHOD
public static java.util.Set getEncodingParameters(java.util.Map properties)
properties
- all propertiesENCODING_PARAMETERS
public static java.lang.String getEncryptionMethod(java.util.Map properties)
properties
- all propertiesENCRYPTION_METHOD
public static java.util.Set getEncryptionParameters(java.util.Map properties)
properties
- all propertiesENCRYPTION_PARAMETERS
public static boolean isAuthenticationSessionNeeded(java.util.Map properties)
properties
- all propertiesAUTHENTICATION_SESSION_NEEDED
public static java.lang.String getInitializationRequestStyle(java.util.Map properties)
properties
- all propertiesINITIALIZATION_REQUEST_STYLE
public static java.lang.String getInitializationBaseURL(java.util.Map properties)
properties
- all propertiesINITIALIZATION_BASE_URL
public static java.util.Set getInitializationParameters(java.util.Map properties)
properties
- all propertiesINITIALIZATION_PARAMETERS
public static java.lang.String getAuthenticationRequestStyle(java.util.Map properties)
properties
- all propertiesAUTHENTICATION_REQUEST_STYLE
public static java.lang.String getAuthenticationBaseURL(java.util.Map properties)
properties
- all propertiesAUTHENTICATION_BASE_URL
public static java.util.Set getAuthenticationParameters(java.util.Map properties)
properties
- all propertiesAUTHENTICATION_PARAMETERS