View Javadoc
1   /*
2    * Copyright 2005-2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * Created on Mar 10, 2005
18   *
19   */
20  package org.kuali.ole.module.purap.util.cxml;
21  
22  import org.apache.commons.lang.builder.ToStringBuilder;
23  
24  public class CxmlHeader {
25      private String fromIdentity;
26      private String fromDomain;
27      private String fromType;
28      private String toIdentity;
29      private String toDomain;
30      private String toType;
31      private String senderIdentity;
32      private String senderDomain;
33      private String senderType;
34      private String senderUserAgent;
35  
36      /**
37       * Newly Added
38       */
39      private String fromSharedSecret;
40      private String toSharedSecret;
41      private String senderSharedSecret;
42  
43      public CxmlHeader() {
44          super();
45      }
46  
47      public void setFrom(String domain, String identity) {
48          this.setFrom(domain, identity, null);
49      }
50  
51      public void setFrom(String domain, String identity, String type) {
52          this.fromDomain = domain;
53          this.fromIdentity = identity;
54          this.fromType = type;
55      }
56  
57      public void setTo(String domain, String identity) {
58          this.setTo(domain, identity, null);
59      }
60  
61      public void setTo(String domain, String identity, String type) {
62          this.toDomain = domain;
63          this.toIdentity = identity;
64          this.toType = type;
65      }
66  
67      public void setSender(String domain, String identity) {
68          this.setSender(domain, identity, null);
69      }
70  
71      public void setSender(String domain, String identity, String type) {
72          this.senderDomain = domain;
73          this.senderIdentity = identity;
74          this.senderType = type;
75      }
76  
77      /**
78       * @return Returns the fromDomain.
79       */
80      public String getFromDomain() {
81          return fromDomain;
82      }
83  
84      /**
85       * @param fromDomain The fromDomain to set.
86       */
87      public void setFromDomain(String fromDomain) {
88          this.fromDomain = fromDomain;
89      }
90  
91      /**
92       * @return Returns the fromIdentity.
93       */
94      public String getFromIdentity() {
95          return fromIdentity;
96      }
97  
98      /**
99       * @param fromIdentity The fromIdentity to set.
100      */
101     public void setFromIdentity(String fromIdentity) {
102         this.fromIdentity = fromIdentity;
103     }
104 
105     /**
106      * @return Returns the fromType.
107      */
108     public String getFromType() {
109         return fromType;
110     }
111 
112     /**
113      * @param fromType The fromType to set.
114      */
115     public void setFromType(String fromType) {
116         this.fromType = fromType;
117     }
118 
119     /**
120      * @return Returns the senderDomain.
121      */
122     public String getSenderDomain() {
123         return senderDomain;
124     }
125 
126     /**
127      * @param senderDomain The senderDomain to set.
128      */
129     public void setSenderDomain(String senderDomain) {
130         this.senderDomain = senderDomain;
131     }
132 
133     /**
134      * @return Returns the senderIdentity.
135      */
136     public String getSenderIdentity() {
137         return senderIdentity;
138     }
139 
140     /**
141      * @param senderIdentity The senderIdentity to set.
142      */
143     public void setSenderIdentity(String senderIdentity) {
144         this.senderIdentity = senderIdentity;
145     }
146 
147     /**
148      * @return Returns the senderType.
149      */
150     public String getSenderType() {
151         return senderType;
152     }
153 
154     /**
155      * @param senderType The senderType to set.
156      */
157     public void setSenderType(String senderType) {
158         this.senderType = senderType;
159     }
160 
161     /**
162      * @return Returns the senderUserAgent.
163      */
164     public String getSenderUserAgent() {
165         return senderUserAgent;
166     }
167 
168     /**
169      * @param senderUserAgent The senderUserAgent to set.
170      */
171     public void setSenderUserAgent(String senderUserAgent) {
172         this.senderUserAgent = senderUserAgent;
173     }
174 
175     /**
176      * @return Returns the toDomain.
177      */
178     public String getToDomain() {
179         return toDomain;
180     }
181 
182     /**
183      * @param toDomain The toDomain to set.
184      */
185     public void setToDomain(String toDomain) {
186         this.toDomain = toDomain;
187     }
188 
189     /**
190      * @return Returns the toIdentity.
191      */
192     public String getToIdentity() {
193         return toIdentity;
194     }
195 
196     /**
197      * @param toIdentity The toIdentity to set.
198      */
199     public void setToIdentity(String toIdentity) {
200         this.toIdentity = toIdentity;
201     }
202 
203     /**
204      * @return Returns the toType.
205      */
206     public String getToType() {
207         return toType;
208     }
209 
210     /**
211      * @param toType The toType to set.
212      */
213     public void setToType(String toType) {
214         this.toType = toType;
215     }
216 
217     public String getSenderSharedSecret() {
218         return senderSharedSecret;
219     }
220 
221     public void setSenderSharedSecret(String senderSharedSecret) {
222         this.senderSharedSecret = senderSharedSecret;
223     }
224 
225     public String getFromSharedSecret() {
226         return fromSharedSecret;
227     }
228 
229     public void setFromSharedSecret(String fromSharedSecret) {
230         this.fromSharedSecret = fromSharedSecret;
231     }
232 
233     public String getToSharedSecret() {
234         return toSharedSecret;
235     }
236 
237     public void setToSharedSecret(String toSharedSecret) {
238         this.toSharedSecret = toSharedSecret;
239     }
240 
241     public String toString() {
242 
243         ToStringBuilder toString = new ToStringBuilder(this);
244 
245         toString.append("FromDomain", getFromDomain());
246         toString.append("FromIdentity", getFromIdentity());
247         toString.append("FromSharedSecret", getFromSharedSecret());
248         toString.append("FromType", getFromType());
249 
250         toString.append("ToDomain", getToDomain());
251         toString.append("ToIdentity", getToIdentity());
252         toString.append("ToSharedSecret", getToSharedSecret());
253         toString.append("ToType", getToType());
254 
255         toString.append("SenderDomain", getSenderDomain());
256         toString.append("SenderIdentity", getSenderIdentity());
257         toString.append("SenderType", getSenderType());
258         toString.append("SenderSharedSecret", getSenderSharedSecret());
259         toString.append("SenderUserAgent", getSenderUserAgent());
260 
261         return toString.toString();
262     }
263 
264 
265 }