1
2
3
4
5
6
7
8 package org.astrogrid.applications.beans.v1;
9
10
11
12
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
23
24 /***
25 * Description of an HTTP Application
26 *
27 * @version $Revision: 1.8 $ $Date: 2007/01/04 16:26:34 $
28 */
29 public class WebHttpApplicationSetup extends org.astrogrid.common.bean.BaseBean
30 implements java.io.Serializable
31 {
32
33
34
35
36
37
38 /***
39 * Field _URL
40 */
41 private org.astrogrid.applications.beans.v1.HttpURLType _URL;
42
43 /***
44 * Field _preProcessScript
45 */
46 private org.astrogrid.applications.beans.v1.Script _preProcessScript;
47
48 /***
49 * Field _postProcessScript
50 */
51 private org.astrogrid.applications.beans.v1.Script _postProcessScript;
52
53
54
55
56
57
58 public WebHttpApplicationSetup() {
59 super();
60 }
61
62
63
64
65
66
67 /***
68 * Note: hashCode() has not been overriden
69 *
70 * @param obj
71 */
72 public boolean equals(java.lang.Object obj)
73 {
74 if ( this == obj )
75 return true;
76
77 if (super.equals(obj)==false)
78 return false;
79
80 if (obj instanceof WebHttpApplicationSetup) {
81
82 WebHttpApplicationSetup temp = (WebHttpApplicationSetup)obj;
83 if (this._URL != null) {
84 if (temp._URL == null) return false;
85 else if (!(this._URL.equals(temp._URL)))
86 return false;
87 }
88 else if (temp._URL != null)
89 return false;
90 if (this._preProcessScript != null) {
91 if (temp._preProcessScript == null) return false;
92 else if (!(this._preProcessScript.equals(temp._preProcessScript)))
93 return false;
94 }
95 else if (temp._preProcessScript != null)
96 return false;
97 if (this._postProcessScript != null) {
98 if (temp._postProcessScript == null) return false;
99 else if (!(this._postProcessScript.equals(temp._postProcessScript)))
100 return false;
101 }
102 else if (temp._postProcessScript != null)
103 return false;
104 return true;
105 }
106 return false;
107 }
108
109 /***
110 * Returns the value of field 'postProcessScript'.
111 *
112 * @return the value of field 'postProcessScript'.
113 */
114 public org.astrogrid.applications.beans.v1.Script getPostProcessScript()
115 {
116 return this._postProcessScript;
117 }
118
119 /***
120 * Returns the value of field 'preProcessScript'.
121 *
122 * @return the value of field 'preProcessScript'.
123 */
124 public org.astrogrid.applications.beans.v1.Script getPreProcessScript()
125 {
126 return this._preProcessScript;
127 }
128
129 /***
130 * Returns the value of field 'URL'.
131 *
132 * @return the value of field 'URL'.
133 */
134 public org.astrogrid.applications.beans.v1.HttpURLType getURL()
135 {
136 return this._URL;
137 }
138
139 /***
140 * Method isValid
141 */
142 public boolean isValid()
143 {
144 try {
145 validate();
146 }
147 catch (org.exolab.castor.xml.ValidationException vex) {
148 return false;
149 }
150 return true;
151 }
152
153 /***
154 * Method marshal
155 *
156 * @param out
157 */
158 public void marshal(java.io.Writer out)
159 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
160 {
161
162 Marshaller.marshal(this, out);
163 }
164
165 /***
166 * Method marshal
167 *
168 * @param handler
169 */
170 public void marshal(org.xml.sax.ContentHandler handler)
171 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
172 {
173
174 Marshaller.marshal(this, handler);
175 }
176
177 /***
178 * Sets the value of field 'postProcessScript'.
179 *
180 * @param postProcessScript the value of field
181 * 'postProcessScript'.
182 */
183 public void setPostProcessScript(org.astrogrid.applications.beans.v1.Script postProcessScript)
184 {
185 this._postProcessScript = postProcessScript;
186 }
187
188 /***
189 * Sets the value of field 'preProcessScript'.
190 *
191 * @param preProcessScript the value of field 'preProcessScript'
192 */
193 public void setPreProcessScript(org.astrogrid.applications.beans.v1.Script preProcessScript)
194 {
195 this._preProcessScript = preProcessScript;
196 }
197
198 /***
199 * Sets the value of field 'URL'.
200 *
201 * @param URL the value of field 'URL'.
202 */
203 public void setURL(org.astrogrid.applications.beans.v1.HttpURLType URL)
204 {
205 this._URL = URL;
206 }
207
208 /***
209 * Method unmarshalWebHttpApplicationSetup
210 *
211 * @param reader
212 */
213 public static org.astrogrid.applications.beans.v1.WebHttpApplicationSetup unmarshalWebHttpApplicationSetup(java.io.Reader reader)
214 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
215 {
216 return (org.astrogrid.applications.beans.v1.WebHttpApplicationSetup) Unmarshaller.unmarshal(org.astrogrid.applications.beans.v1.WebHttpApplicationSetup.class, reader);
217 }
218
219 /***
220 * Method validate
221 */
222 public void validate()
223 throws org.exolab.castor.xml.ValidationException
224 {
225 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
226 validator.validate(this);
227 }
228
229 }