Coverage Report - org.apache.tapestry5.corelib.internal.FormSupportAdapter
 
Classes in this File Line Coverage Branch Coverage Complexity
FormSupportAdapter
44%
8/18
N/A
0
 
 1  
 // Copyright 2008 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry5.corelib.internal;
 16  
 
 17  
 import org.apache.tapestry5.ComponentAction;
 18  
 import org.apache.tapestry5.Field;
 19  
 import org.apache.tapestry5.services.FormSupport;
 20  
 
 21  
 /**
 22  
  * An implementation of {@link org.apache.tapestry5.services.FormSupport} that delegates all behavior to another
 23  
  * instance of FormSupport. This allows some of the behavior to be overridden easily.
 24  
  */
 25  
 public class FormSupportAdapter implements FormSupport
 26  
 {
 27  
     private final FormSupport delegate;
 28  
 
 29  
     public FormSupportAdapter(FormSupport delegate)
 30  18
     {
 31  18
         this.delegate = delegate;
 32  18
     }
 33  
 
 34  
     public String allocateControlName(String id)
 35  
     {
 36  18
         return delegate.allocateControlName(id);
 37  
     }
 38  
 
 39  
     public <T> void store(T component, ComponentAction<T> action)
 40  
     {
 41  0
         delegate.store(component, action);
 42  0
     }
 43  
 
 44  
     public <T> void storeAndExecute(T component, ComponentAction<T> action)
 45  
     {
 46  0
         delegate.storeAndExecute(component, action);
 47  0
     }
 48  
 
 49  
     public void defer(Runnable command)
 50  
     {
 51  0
         delegate.defer(command);
 52  0
     }
 53  
 
 54  
     public void setEncodingType(String encodingType)
 55  
     {
 56  0
         delegate.setEncodingType(encodingType);
 57  0
     }
 58  
 
 59  
     public void addValidation(Field field, String validationName, String message, Object constraint)
 60  
     {
 61  18
         delegate.addValidation(field, validationName, message, constraint);
 62  18
     }
 63  
 
 64  
     public String getClientId()
 65  
     {
 66  0
         return delegate.getClientId();
 67  
     }
 68  
 
 69  
     public boolean isClientValidationEnabled()
 70  
     {
 71  20
         return delegate.isClientValidationEnabled();
 72  
     }
 73  
 
 74  
     public String getFormComponentId()
 75  
     {
 76  0
         return delegate.getFormComponentId();
 77  
     }
 78  
 
 79  
     public String getFormValidationId()
 80  
     {
 81  8
         return delegate.getFormValidationId();
 82  
     }
 83  
 }