Coverage Report - org.apache.tapestry.pageload.PageloadMessages
 
Classes in this File Line Coverage Branch Coverage Complexity
PageloadMessages
0%
0/23
N/A
1
 
 1  
 // Copyright 2004, 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.pageload;
 16  
 
 17  
 import org.apache.hivemind.HiveMind;
 18  
 import org.apache.hivemind.Location;
 19  
 import org.apache.hivemind.impl.MessageFormatter;
 20  
 import org.apache.tapestry.IBinding;
 21  
 import org.apache.tapestry.IComponent;
 22  
 import org.apache.tapestry.spec.IContainedComponent;
 23  
 
 24  
 /**
 25  
  * Messages for the pageload package.
 26  
  * 
 27  
  * @author Howard Lewis Ship
 28  
  * @since 4.0
 29  
  */
 30  
 final class PageloadMessages
 31  
 {
 32  0
     private static final MessageFormatter _formatter = new MessageFormatter(PageloadMessages.class);
 33  
 
 34  
     /* defeat instantiation */
 35  
     private PageloadMessages()
 36  0
     {
 37  0
     }
 38  
 
 39  
     static String parameterMustHaveNoDefaultValue(IComponent component,
 40  
             String name)
 41  
     {
 42  0
         return _formatter.format("parameter-must-have-no-default-value",
 43  
                 component.getExtendedId(), name);
 44  
     }
 45  
 
 46  
     static String unableToInitializeProperty(String propertyName,
 47  
             IComponent component, Throwable cause)
 48  
     {
 49  0
         return _formatter.format("unable-to-initialize-property", propertyName,
 50  
                 component, cause);
 51  
     }
 52  
 
 53  
     static String requiredParameterNotBound(String name, IComponent component)
 54  
     {
 55  0
         return _formatter.format("required-parameter-not-bound", name,
 56  
                 component.getExtendedId());
 57  
     }
 58  
 
 59  
     static String inheritInformalInvalidComponentFormalOnly(IComponent component)
 60  
     {
 61  0
         return _formatter.format(
 62  
                 "inherit-informal-invalid-component-formal-only", component
 63  
                         .getExtendedId());
 64  
     }
 65  
 
 66  
     static String inheritInformalInvalidContainerFormalOnly(
 67  
             IComponent container, IComponent component)
 68  
     {
 69  0
         return _formatter.format(
 70  
                 "inherit-informal-invalid-container-formal-only", container
 71  
                         .getExtendedId(), component.getExtendedId());
 72  
     }
 73  
 
 74  
     static String formalParametersOnly(IComponent component,
 75  
             String parameterName)
 76  
     {
 77  0
         return _formatter.format("formal-parameters-only", component
 78  
                 .getExtendedId(), parameterName);
 79  
     }
 80  
 
 81  
     static String unableToInstantiateComponent(IComponent container,
 82  
             Throwable cause)
 83  
     {
 84  0
         return _formatter.format("unable-to-instantiate-component", container
 85  
                 .getExtendedId(), cause);
 86  
     }
 87  
 
 88  
     static String classNotComponent(Class componentClass)
 89  
     {
 90  0
         return _formatter.format("class-not-component", componentClass
 91  
                 .getName());
 92  
     }
 93  
 
 94  
     static String unableToInstantiate(String className, Throwable cause)
 95  
     {
 96  0
         return _formatter.format("unable-to-instantiate", className, cause);
 97  
     }
 98  
 
 99  
     static String pageNotAllowed(String componentId)
 100  
     {
 101  0
         return _formatter.format("page-not-allowed", componentId);
 102  
     }
 103  
 
 104  
     static String classNotPage(Class componentClass)
 105  
     {
 106  0
         return _formatter.format("class-not-page", componentClass.getName());
 107  
     }
 108  
 
 109  
     static String defaultParameterName(String name)
 110  
     {
 111  0
         return _formatter.format("default-parameter-name", name);
 112  
     }
 113  
 
 114  
     static String initializerName(String propertyName)
 115  
     {
 116  0
         return _formatter.format("initializer-name", propertyName);
 117  
     }
 118  
 
 119  
     static String parameterName(String name)
 120  
     {
 121  0
         return _formatter.format("parameter-name", name);
 122  
     }
 123  
 
 124  
     static String duplicateParameter(String parameterName, IBinding binding)
 125  
     {
 126  0
         return _formatter.format("duplicate-parameter", parameterName, HiveMind
 127  
                 .getLocationString(binding));
 128  
     }
 129  
 
 130  
     public static String usedParameterAlias(IContainedComponent contained,
 131  
             String name, String parameterName, Location bindingLocation)
 132  
     {
 133  0
         return _formatter.format("used-parameter-alias", new Object[] {
 134  
                 HiveMind.getLocationString(bindingLocation),
 135  
                 contained.getType(), name, parameterName });
 136  
     }
 137  
 
 138  
     public static String deprecatedParameter(String parameterName,
 139  
             Location location, String componentType)
 140  
     {
 141  0
         return _formatter.format("deprecated-parameter", parameterName,
 142  
                 HiveMind.getLocationString(location), componentType);
 143  
     }
 144  
 
 145  
     public static String componentNotFound(String id)
 146  
     {
 147  0
         return _formatter.format("component-not-found", id);
 148  
     }
 149  
 
 150  
     public static String recursiveComponent(IComponent component)
 151  
     {
 152  0
         return _formatter.format("recursive-component", component);
 153  
     }
 154  
 
 155  
     public static String errorPagePoolGet(Object key)
 156  
     {
 157  0
         return _formatter.format("error-page-pool-borrow", key);
 158  
     }
 159  
 }