| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| InternalComponentResourcesCommon |
|
| 0.0;0 |
| 1 | // Copyright 2006, 2007, 2008, 2009 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.internal; | |
| 16 | ||
| 17 | import org.apache.tapestry5.Binding; | |
| 18 | import org.apache.tapestry5.internal.structure.ComponentPageElement; | |
| 19 | import org.apache.tapestry5.runtime.Component; | |
| 20 | ||
| 21 | import java.util.Map; | |
| 22 | ||
| 23 | /** | |
| 24 | * Operations shared by {@link InternalComponentResources} and {@link ComponentPageElement}. Typically, these means | |
| 25 | * methods of InternalComponentResources that are delegated to the component page element. | |
| 26 | */ | |
| 27 | public interface InternalComponentResourcesCommon | |
| 28 | { | |
| 29 | /** | |
| 30 | * Returns true if the component has finished loading. Initially, this value will be false. | |
| 31 | * | |
| 32 | * @see org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidLoad() | |
| 33 | */ | |
| 34 | boolean isLoaded(); | |
| 35 | ||
| 36 | /** | |
| 37 | * Used during construction of the page to identify the binding for a particular parameter. | |
| 38 | * <p/> | |
| 39 | */ | |
| 40 | void bindParameter(String parameterName, Binding binding); | |
| 41 | ||
| 42 | /** | |
| 43 | * Returns the binding for the given parameter name, or null. | |
| 44 | * | |
| 45 | * @param parameterName name of component parameter | |
| 46 | * @return binding if bound, or null | |
| 47 | * @since 5.1.0.0 | |
| 48 | */ | |
| 49 | Binding getBinding(String parameterName); | |
| 50 | ||
| 51 | /** | |
| 52 | * Returns the mixin instance for the fully qualfied mixin class name. | |
| 53 | * | |
| 54 | * @param mixinClassName fully qualified class name | |
| 55 | * @return IllegalArgumentException if no such mixin is associated with the core component | |
| 56 | */ | |
| 57 | Component getMixinByClassName(String mixinClassName); | |
| 58 | ||
| 59 | /** | |
| 60 | * Constructs a map linking informal parameters to the corresponding bindings. | |
| 61 | * | |
| 62 | * @return map, possible empty | |
| 63 | */ | |
| 64 | Map<String, Binding> getInformalParameterBindings(); | |
| 65 | ||
| 66 | ||
| 67 | } |