View Javadoc

    1   /*
    2    *
    3    * The Seasar Software License, Version 1.1
    4    *
    5    * Copyright (c) 2003-2004 The Seasar Project. All rights reserved.
    6    *
    7    * Redistribution and use in source and binary forms, with or
    8    * without modification, are permitted provided that the following
    9    * conditions are met:
    10   *
    11   * 1. Redistributions of source code must retain the above
    12   *    copyright notice, this list of conditions and the following
    13   *    disclaimer.
    14   *
    15   * 2. Redistributions in binary form must reproduce the above
    16   *    copyright notice, this list of conditions and the following
    17   *    disclaimer in the documentation and/or other materials provided
    18   *    with the distribution.
    19   *
    20   * 3. The end-user documentation included with the redistribution,
    21   *    if any, must include the following acknowledgement:
    22   *    "This product includes software developed by the
    23   *    Seasar Project (http://www.seasar.org/)."
    24   *    Alternately, this acknowledgement may appear in the software
    25   *    itself, if and wherever such third-party acknowledgements
    26   *    normally appear.
    27   *
    28   * 4. Neither the name "The Seasar Project" nor the names of its
    29   *    contributors may be used to endorse or promote products derived
    30   *    from this software without specific prior written permission of
    31   *    the Seasar Project.
    32   *
    33   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR
    34   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    35   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    36   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE SEASAR PROJECT
    37   * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    38   * INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    39   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    40   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    41   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    42   * WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING
    43   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    44   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    45   */
    46  package org.seasar.remoting.axis;
    47
    48  import java.util.ArrayList;
    49  import java.util.Iterator;
    50  import java.util.List;
    51
    52  import org.apache.axis.deployment.wsdd.WSDDConstants;
    53
    54  /***
    55   * diconファイル中でAxisサービスの情報を設定するために使われます。
    56   *
    57   * @author koichik
    58   */
    59  public class ServiceDef {
    60      //instance fields
    61      protected String provider = WSDDConstants.PROVIDER_RPC;
    62      protected Class serviceType;
    63      protected String allowedMethods;
    64      protected final List typeMappingDefs = new ArrayList();
    65
    66      /***
    67       * プロバイダを返します。
    68       *
    69       * @return Returns the providerType.
    70       */
    71      public String getProvider() {
    72          return provider;
    73      }
    74
    75      /***
    76       * プロバイダを指定します。
    77       *
    78       * @param providerType
    79       *            The providerType to set.
    80       */
    81      public void setProvider(final String providerType) {
    82          this.provider = providerType;
    83      }
    84
    85      /***
    86       * サービスの型を返します。
    87       *
    88       * @return Returns the serviceType.
    89       */
    90      public Class getServiceType() {
    91          return serviceType;
    92      }
    93
    94      /***
    95       * サービスの型を設定します。
    96       *
    97       * @param serviceType
    98       *            The serviceType to set.
    99       */
    100     public void setServiceType(final Class serviceType) {
    101         this.serviceType = serviceType;
    102     }
    103
    104     /***
    105      * サービスとして公開するメソッドを返します。
    106      *
    107      * @return Returns the allowedMethods.
    108      */
    109     public String getAllowedMethods() {
    110         return allowedMethods;
    111     }
    112
    113     /***
    114      * サービスとして公開するメソッドを設定します。
    115      *
    116      * @param allowedMethods
    117      *            The allowedMethods to set.
    118      */
    119     public void setAllowedMethods(final String allowedMethods) {
    120         this.allowedMethods = allowedMethods;
    121     }
    122
    123     /***
    124      * タイプマッピングを追加します。
    125      *
    126      * @param typeMappingDef
    127      */
    128     public void addTypeMapping(final TypeMappingDef typeMappingDef) {
    129         typeMappingDefs.add(typeMappingDef);
    130     }
    131
    132     /***
    133      * タイプマッピングのイテレータを返します。
    134      *
    135      * @return Returns the TypeMappings.
    136      */
    137     public Iterator getTypeMappings() {
    138         return typeMappingDefs.iterator();
    139     }
    140 }