View Javadoc

1   /***
2    * JFoxSOAF, Service-Oriented Application Framework
3    * 
4    * Copyright (C) www.huihoo.org
5    * 
6    * Distributable under GNU LGPL For more information, please visit:
7    * http://www.huihoo.org/jfox/jfoxsoaf
8    */
9   
10  package org.huihoo.jfox.soaf.schema.config;
11  
12  import org.exolab.castor.xml.Marshaller;
13  import org.exolab.castor.xml.Unmarshaller;
14  
15  /***
16   * Class Interceptor.
17   * 
18   * @version $Revision: 1.2 $ $Date: 2004/10/13 10:51:05 $
19   */
20  public class Interceptor implements java.io.Serializable {
21  
22      /***
23       * Field _name
24       */
25      private java.lang.String _name;
26  
27      /***
28       * Field _value
29       */
30      private java.lang.String _value;
31  
32      public Interceptor() {
33          super();
34      }
35  
36      /***
37       * Method getNameReturns the value of field 'name'.
38       * 
39       * @return the value of field 'name'.
40       */
41      public java.lang.String getName() {
42          return this._name;
43      }
44  
45      /***
46       * Method getValueReturns the value of field 'value'.
47       * 
48       * @return the value of field 'value'.
49       */
50      public java.lang.String getValue() {
51          return this._value;
52      }
53  
54      /***
55       * Method isValid
56       */
57      public boolean isValid() {
58          try {
59              validate();
60          } catch (org.exolab.castor.xml.ValidationException vex) {
61              return false;
62          }
63          return true;
64      }
65  
66      /***
67       * Method marshal
68       * 
69       * @param out
70       */
71      public void marshal(java.io.Writer out)
72              throws org.exolab.castor.xml.MarshalException,
73              org.exolab.castor.xml.ValidationException {
74  
75          Marshaller.marshal(this, out);
76      }
77  
78      /***
79       * Method marshal
80       * 
81       * @param handler
82       */
83      public void marshal(org.xml.sax.ContentHandler handler)
84              throws java.io.IOException, org.exolab.castor.xml.MarshalException,
85              org.exolab.castor.xml.ValidationException {
86  
87          Marshaller.marshal(this, handler);
88      }
89  
90      /***
91       * Method setNameSets the value of field 'name'.
92       * 
93       * @param name
94       *            the value of field 'name'.
95       */
96      public void setName(java.lang.String name) {
97          this._name = name;
98      }
99  
100     /***
101      * Method setValueSets the value of field 'value'.
102      * 
103      * @param value
104      *            the value of field 'value'.
105      */
106     public void setValue(java.lang.String value) {
107         this._value = value;
108     }
109 
110     /***
111      * Method unmarshal
112      * 
113      * @param reader
114      */
115     public static org.huihoo.jfox.soaf.schema.config.Interceptor unmarshal(
116             java.io.Reader reader)
117             throws org.exolab.castor.xml.MarshalException,
118             org.exolab.castor.xml.ValidationException {
119         return (org.huihoo.jfox.soaf.schema.config.Interceptor) Unmarshaller
120                 .unmarshal(
121                         org.huihoo.jfox.soaf.schema.config.Interceptor.class,
122                         reader);
123     }
124 
125     /***
126      * Method validate
127      */
128     public void validate() throws org.exolab.castor.xml.ValidationException {
129         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
130         validator.validate(this);
131     }
132 
133 }