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  /***
13   * Class SystemInterceptorDescriptor.
14   * 
15   * @version $Revision: 1.1 $ $Date: 2004/10/13 10:52:28 $
16   */
17  
18  public class SystemInterceptorDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
19  
20      /***
21       * Field nsPrefix
22       */
23      private java.lang.String nsPrefix;
24  
25      /***
26       * Field nsURI
27       */
28      private java.lang.String nsURI;
29  
30      /***
31       * Field xmlName
32       */
33      private java.lang.String xmlName;
34  
35      /***
36       * Field identity
37       */
38      private org.exolab.castor.xml.XMLFieldDescriptor identity;
39  
40      public SystemInterceptorDescriptor() {
41          super();
42          xmlName = "system-interceptor";
43          
44          //-- set grouping compositor
45          setCompositorAsSequence();
46          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
47          org.exolab.castor.xml.XMLFieldHandler              handler        = null;
48          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
49          //-- initialize attribute descriptors
50          
51          //-- initialize element descriptors
52          
53          //-- _interceptorList
54          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.huihoo.jfox.soaf.schema.config.Interceptor.class, "_interceptorList", "interceptor", org.exolab.castor.xml.NodeType.Element);
55          handler = (new org.exolab.castor.xml.XMLFieldHandler() {
56              public java.lang.Object getValue( java.lang.Object object ) 
57                  throws IllegalStateException
58              {
59                  SystemInterceptor target = (SystemInterceptor) object;
60                  return target.getInterceptor();
61              }
62              public void setValue( java.lang.Object object, java.lang.Object value) 
63                  throws IllegalStateException, IllegalArgumentException
64              {
65                  try {
66                      SystemInterceptor target = (SystemInterceptor) object;
67                      target.addInterceptor( (org.huihoo.jfox.soaf.schema.config.Interceptor) value);
68                  }
69                  catch (java.lang.Exception ex) {
70                      throw new IllegalStateException(ex.toString());
71                  }
72              }
73              public java.lang.Object newInstance( java.lang.Object parent ) {
74                  return new org.huihoo.jfox.soaf.schema.config.Interceptor();
75              }
76          } );
77          desc.setHandler(handler);
78          desc.setMultivalued(true);
79          addFieldDescriptor(desc);
80          
81          //-- validation code for: _interceptorList
82          fieldValidator = new org.exolab.castor.xml.FieldValidator();
83          fieldValidator.setMinOccurs(0);
84          { //-- local scope
85          }
86          desc.setValidator(fieldValidator);
87      } 
88  
89      /***
90       * Method getAccessMode
91       */
92      public org.exolab.castor.mapping.AccessMode getAccessMode()
93      {
94          return null;
95      }  
96  
97      /***
98       * Method getExtends
99       */
100     public org.exolab.castor.mapping.ClassDescriptor getExtends()
101     {
102         return null;
103     }  
104 
105     /***
106      * Method getIdentity
107      */
108     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
109     {
110         return identity;
111     }  
112 
113     /***
114      * Method getJavaClass
115      */
116     public java.lang.Class getJavaClass()
117     {
118         return org.huihoo.jfox.soaf.schema.config.SystemInterceptor.class;
119     }  
120 
121     /***
122      * Method getNameSpacePrefix
123      */
124     public java.lang.String getNameSpacePrefix()
125     {
126         return nsPrefix;
127     }  
128 
129     /***
130      * Method getNameSpaceURI
131      */
132     public java.lang.String getNameSpaceURI()
133     {
134         return nsURI;
135     }  
136 
137     /***
138      * Method getValidator
139      */
140     public org.exolab.castor.xml.TypeValidator getValidator()
141     {
142         return this;
143     }  
144 
145     /***
146      * Method getXMLName
147      */
148     public java.lang.String getXMLName()
149     {
150         return xmlName;
151     } 
152 
153 }