| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| InternalComponentResources |
|
| 1.0;1 |
| 1 | // Copyright 2006, 2007, 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.internal; | |
| 16 | ||
| 17 | import org.apache.tapestry5.ComponentResources; | |
| 18 | import org.apache.tapestry5.internal.services.PersistentFieldManager; | |
| 19 | import org.apache.tapestry5.internal.structure.Page; | |
| 20 | import org.apache.tapestry5.runtime.RenderQueue; | |
| 21 | ||
| 22 | /** | |
| 23 | * An extension of {@link org.apache.tapestry5.ComponentResources} that represents additional methods that are private | |
| 24 | * to the framework and not exposed in any public APIs. | |
| 25 | */ | |
| 26 | public interface InternalComponentResources extends ComponentResources, InternalComponentResourcesCommon | |
| 27 | { | |
| 28 | /** | |
| 29 | * Get the current persisted value of the field. | |
| 30 | * | |
| 31 | * @param fieldName the name of the field to access | |
| 32 | * @return the value stored for the field, or null if no value is currently stored | |
| 33 | */ | |
| 34 | Object getFieldChange(String fieldName); | |
| 35 | ||
| 36 | /** | |
| 37 | * Checks to see if there is a value stored for the indicated field. | |
| 38 | */ | |
| 39 | boolean hasFieldChange(String fieldName); | |
| 40 | ||
| 41 | /** | |
| 42 | * Posts a change to a persistent field. If the component is still loading, then this change is ignored. Otherwise, | |
| 43 | * it is propagated, via the {@link Page#persistFieldChange(org.apache.tapestry5.ComponentResources, String, Object) | |
| 44 | * page} to the {@link PersistentFieldManager}. | |
| 45 | */ | |
| 46 | void persistFieldChange(String fieldName, Object newValue); | |
| 47 | ||
| 48 | /** | |
| 49 | * Allows the resources to cleanup any render-time only data. | |
| 50 | */ | |
| 51 | void postRenderCleanup(); | |
| 52 | ||
| 53 | /** | |
| 54 | * Invoked to make the receiver queue itself to be rendered. | |
| 55 | */ | |
| 56 | void queueRender(RenderQueue queue); | |
| 57 | ||
| 58 | /** | |
| 59 | * Gets access object for the parameter. | |
| 60 | * | |
| 61 | * @param parameterName | |
| 62 | * @return object used to read and update the parameter | |
| 63 | */ | |
| 64 | ParameterAccess getParameterAccess(String parameterName); | |
| 65 | } |