2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to you under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.shale.validator.validator;
19  
20  import java.util.Map;
21  import javax.faces.component.UIComponent;
22  import javax.faces.context.FacesContext;
23  import javax.faces.validator.ValidatorException;
24  import org.apache.commons.validator.ValidatorResources;
25  import org.apache.shale.validator.util.ShaleValidatorAction;
26  
27  /***
28   * <p>Simple concrete implementation of <code>AbstractValidator</code>.</p>
29   */
30  public class ConcreteValidator extends AbstractValidator {
31  
32  
33      public void validate(FacesContext context, UIComponent component, Object value)
34        throws ValidatorException {
35  
36          ; // Do nothing
37  
38      }
39      
40  
41      // Expose the following protected methods publicly for testing purposes
42  
43  
44      public ShaleValidatorAction[] actions(FacesContext context, String type) {
45          return super.actions(context, type);
46      }
47  
48  
49  
50      public Object convert(FacesContext context, Object value, Class type) {
51          return super.convert(context, value, type);
52      }
53  
54  
55      public String message(FacesContext context, String key) {
56          return super.message(context, key);
57      }
58  
59  
60  
61      public ValidatorResources resources(FacesContext context) {
62          return super.resources(context);
63      }
64  
65  
66  
67      public void validate(FacesContext context, UIComponent component,
68                           Object value, String type, Map vars)
69        throws ValidatorException {
70          super.validate(context, component, value, type, vars);
71      }
72  
73  
74  }