net.authorize.xml
Class Result<T>

java.lang.Object
  extended by net.authorize.Result<T>
      extended by net.authorize.xml.Result<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Result, Result, Result

public class Result<T>
extends Result<T>

Templated wrapper container for passing back the result from the request gateway.

See Also:
Serialized Form

Field Summary
static String ERROR
           
protected  ArrayList<Message> messages
           
static String OK
           
protected  String resultCode
           
 
Fields inherited from class net.authorize.Result
MessageDigestAlgorithm, target, transaction
 
Constructor Summary
protected Result()
           
 
Method Summary
static
<T> Result<T>
createResult(T object, BasicXmlDocument response)
           
protected static String getElementText(Element parent_el, String element_name)
          Local wrapper for getting element text from a parent.
 ArrayList<Message> getMessages()
           
 String getResultCode()
          Returns the result code.
protected  void importResponseMessages(Transaction txn)
          Import the response messages into the result.
 boolean isError()
          Returns true if the response is Error.
 boolean isOk()
          Returns true if the response is Ok.
 void printMessages()
           
 
Methods inherited from class net.authorize.Result
getTarget, getTransaction, isAuthorizeNetResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final String OK
See Also:
Constant Field Values

ERROR

public static final String ERROR
See Also:
Constant Field Values

resultCode

protected String resultCode

messages

protected ArrayList<Message> messages
Constructor Detail

Result

protected Result()
Method Detail

createResult

public static <T> Result<T> createResult(T object,
                                         BasicXmlDocument response)

getResultCode

public String getResultCode()
Returns the result code.

Returns:
String containing the result code.

getMessages

public ArrayList<Message> getMessages()
Returns:
the messages

getElementText

protected static String getElementText(Element parent_el,
                                       String element_name)
Local wrapper for getting element text from a parent.

Parameters:
parent_el -
element_name -
Returns:
element text

importResponseMessages

protected void importResponseMessages(Transaction txn)
Import the response messages into the result.

Parameters:
txn - transaction containing the response messages.

printMessages

public void printMessages()

isOk

public boolean isOk()
Returns true if the response is Ok.

Returns:
boolean

isError

public boolean isError()
Returns true if the response is Error.

Returns:
boolean


Copyright © 2014. All Rights Reserved.