KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > epayment > response > PaymentResponse


1 package epayment.response;
2
3 import epayment.framework.IPaymentResponse;
4
5 /**
6  * The <code>PaymentResponse</code> class is an
7  * <code>IPaymentResponse</code> that encapsulates
8  * the basic payment response information.
9  * <p>
10  * This class is strictly an example.
11  *
12  * @author <a HREF="mailto:mike@clarkware.com">Mike Clark</a>
13  * @author <a HREF="http://www.clarkware.com">Clarkware Consulting</a>
14  */

15  
16 public class PaymentResponse implements IPaymentResponse {
17
18     private String JavaDoc _processedDate;
19     private String JavaDoc _responseMessage;
20     
21     /**
22      * Constructs a <code>PaymentResponse</code>
23      * with default values.
24      */

25     public PaymentResponse() {
26         _processedDate = "";
27         _responseMessage = "";
28     }
29
30     /**
31      * Returns the processed date.
32      *
33      * @return Processed date.
34      */

35     public String JavaDoc getProcessedDate() {
36         return _processedDate;
37     }
38     
39     /**
40      * Sets the processed date.
41      *
42      * @param date Processed date.
43      */

44     protected void setProcessedDate(String JavaDoc date) {
45         _processedDate = date;
46     }
47     
48     /**
49      * Returns the response message.
50      *
51      * @return Response message.
52      */

53     public String JavaDoc getResponseMessage() {
54         return _responseMessage;
55     }
56     
57     /**
58      * Sets the response message.
59      *
60      * @param message Response message.
61      */

62     protected void setResponseMessage(String JavaDoc message) {
63         _responseMessage = message;
64     }
65     
66     /**
67      * Returns the string representation of this object.
68      *
69      * @return String representation.
70      */

71     public String JavaDoc toString() {
72     
73         StringBuffer JavaDoc contents = new StringBuffer JavaDoc();
74         contents.append("Response Message = " + _responseMessage + "\n");
75         contents.append("Processed Date = " + _processedDate + "\n");
76         
77         return contents.toString();
78     }
79 }
80
Popular Tags