View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.custom.clientvalidation.common;
20  
21  import java.io.Serializable;
22  
23  /**
24   * Encapsulates information needed for client side validation/conversation.
25   * Instances are added to CVCallsHolder object located at request scope.
26   * 
27   * @author cagatay (latest modification by $Author: skitching $)
28   * @version $Revision: 673833 $ $Date: 2008-07-03 16:58:05 -0500 (Thu, 03 Jul 2008) $
29   */
30  public class CVCall implements Serializable{
31  
32      private String _id;
33      private String _clientId;
34      private boolean _required;
35      private String _converterScriptFunction;
36      private String _converterScriptResource;
37      private String[] _validatorScriptFunctions;
38      private String[] _validatorScriptResources;
39      
40      public CVCall() {}
41      
42      public CVCall(String id, String clientId, boolean required) {
43          this._id = id;
44          this._clientId = clientId;
45          this._required = required;
46      }
47      
48      public String getId() {
49          return _id;
50      }
51      public void setId(String id) {
52          this._id = id;
53      }
54      
55      public String getClientId() {
56          return _clientId;
57      }
58      public void setClientId(String clientId) {
59          this._clientId = clientId;
60      }
61      
62      public boolean isRequired() {
63          return _required;
64      }
65      public void setRequired(boolean required) {
66          this._required = required;
67      }
68  
69      public String getConverterScriptFunction() {
70          return _converterScriptFunction;
71      }
72      public void setConverterScriptFunction(String scriptFunction) {
73          _converterScriptFunction = scriptFunction;
74      }
75  
76      public String getConverterScriptResource() {
77          return _converterScriptResource;
78      }
79      public void setConverterScriptResource(String scriptResource) {
80          _converterScriptResource = scriptResource;
81      }
82  
83      public String[] getValidatorScriptFunctions() {
84          return _validatorScriptFunctions;
85      }
86      public void setValidatorScriptFunctions(String[] scriptFunctions) {
87          _validatorScriptFunctions = scriptFunctions;
88      }
89  
90      public String[] getValidatorScriptResources() {
91          return _validatorScriptResources;
92      }
93      public void setValidatorScriptResources(String[] scriptResources) {
94          _validatorScriptResources = scriptResources;
95      }
96  }
97