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