Coverage Report - org.apache.tapestry.form.FormMessages
 
Classes in this File Line Coverage Branch Coverage Complexity
FormMessages
0%
0/8
N/A
1
 
 1  
 // Copyright 2005 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.tapestry.form;
 16  
 
 17  
 import org.apache.hivemind.HiveMind;
 18  
 import org.apache.hivemind.impl.MessageFormatter;
 19  
 import org.apache.tapestry.IComponent;
 20  
 
 21  
 /**
 22  
  * @author Howard M. Lewis Ship
 23  
  * @since 4.0
 24  
  */
 25  
 final class FormMessages
 26  
 {
 27  0
     private static final MessageFormatter _formatter = new MessageFormatter(FormMessages.class);
 28  
 
 29  
     /* defeat instantiation */
 30  0
     private FormMessages() { }
 31  
     
 32  
     static String formTooManyIds(IComponent form, int actualCount, IComponent component)
 33  
     {
 34  0
         return _formatter.format(
 35  
                 "form-too-many-ids",
 36  
                 form.getExtendedId(),
 37  
                 new Integer(actualCount),
 38  
                 component.getExtendedId());
 39  
     }
 40  
 
 41  
     static String formIdMismatch(IComponent form, int mismatchIndex, String expectedId,
 42  
             String actualId, IComponent component)
 43  
     {
 44  0
         return _formatter.format("form-id-mismatch", new Object[]
 45  
         { form.getExtendedId(), new Integer(mismatchIndex + 1), expectedId, actualId,
 46  
                 component.getExtendedId() });
 47  
     }
 48  
 
 49  
     static String formTooFewIds(IComponent form, int remainingCount, String nextExpectedId)
 50  
     {
 51  0
         return _formatter.format("form-too-few-ids", form.getExtendedId(), new Integer(
 52  
                 remainingCount), nextExpectedId);
 53  
     }
 54  
 
 55  
     static String encodingTypeContention(IComponent form, String establishedEncodingType,
 56  
             String newEncodingType)
 57  
     {
 58  0
         return _formatter.format(
 59  
                 "encoding-type-contention",
 60  
                 form.getExtendedId(),
 61  
                 establishedEncodingType,
 62  
                 newEncodingType);
 63  
     }
 64  
 
 65  
     static String fieldAlreadyPrerendered(IComponent field)
 66  
     {
 67  0
         return _formatter.format("field-already-prerendered", field);
 68  
     }
 69  
 
 70  
     static String linkSubmitMayNotNest(IComponent inner, IComponent outer)
 71  
     {
 72  0
         return _formatter.format("link-submit-may-not-nest", inner.getExtendedId(), outer
 73  
                 .getExtendedId(), HiveMind.getLocationString(outer));
 74  
     }
 75  
 }