Coverage Report - net.sf.beanform.BeanFormMessages
 
Classes in this File Line Coverage Branch Coverage Complexity
BeanFormMessages
100% 
N/A 
1
 
 1  
 // Copyright 2006 Daniel Gredler
 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 net.sf.beanform;
 16  
 
 17  
 import net.sf.beanform.prop.BeanProperty;
 18  
 
 19  
 import org.apache.hivemind.impl.MessageFormatter;
 20  
 import org.apache.tapestry.IComponent;
 21  
 
 22  
 /**
 23  
  * Messages for the {@link BeanForm} component and its subcomponents.
 24  
  *
 25  
  * @author Daniel Gredler
 26  
  */
 27  1
 class BeanFormMessages {
 28  
 
 29  1
     private final static MessageFormatter FORMATTER = new MessageFormatter( BeanFormMessages.class, "BeanFormMessages" );
 30  
 
 31  
     static String nullBean() {
 32  2
         return FORMATTER.getMessage( "null-bean" );
 33  
     }
 34  
 
 35  
     static String pseudoPropMissingField( BeanProperty property, String fieldName, String blockName ) {
 36  2
         return FORMATTER.format( "pseudo-prop-missing-field", property.getName(), fieldName, blockName );
 37  
     }
 38  
 
 39  
     static String unmodifiableExplicitProperty( BeanProperty property ) {
 40  2
         return FORMATTER.format( "unmodifiable-explicit-property", property.getName() );
 41  
     }
 42  
 
 43  
     static String cantFindFieldForProperty( BeanProperty property ) {
 44  2
         return FORMATTER.format( "cant-find-field-for-property", property.getName() );
 45  
     }
 46  
 
 47  
     static String componentUnexpectedType( IComponent component, Class expectedType ) {
 48  3
         return FORMATTER.format( "component-unexpected-type", component.getId(), expectedType.getName() );
 49  
     }
 50  
 
 51  
     static String noBeanForm( IComponent component ) {
 52  1
         return FORMATTER.format( "no-bean-form", component.getId() );
 53  
     }
 54  
 
 55  
     static String noBeanFormRows( IComponent component ) {
 56  1
         return FORMATTER.format( "no-bean-form-rows", component.getId() );
 57  
     }
 58  
 
 59  
 }