01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // 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.internal;
16:
17: import org.apache.tapestry.Binding;
18: import org.apache.tapestry.internal.structure.ComponentPageElement;
19: import org.apache.tapestry.runtime.Component;
20: import org.apache.tapestry.runtime.RenderQueue;
21:
22: /**
23: * Operations shared by {@link InternalComponentResources} and {@link ComponentPageElement}.
24: * Typically, these means methods of InternalComponentResources that are delegated to the component
25: * page element.
26: */
27: public interface InternalComponentResourcesCommon {
28: /**
29: * Get the current persisted value of the field.
30: *
31: * @param fieldName
32: * the name of the field to access
33: * @return the value stored for the field, or null if no value is currently stored
34: */
35: Object getFieldChange(String fieldName);
36:
37: /** Checks to see if there is a value stored for the indicated field. */
38: boolean hasFieldChange(String fieldName);
39:
40: /**
41: * Returns true if the component has finished loading. Initially, this value will be false.
42: *
43: * @see org.apache.tapestry.runtime.PageLifecycleListener#containingPageDidLoad()
44: */
45: boolean isLoaded();
46:
47: /**
48: * Used during construction of the page to identify the binding for a particular parameter.
49: * <p>
50: */
51: void bindParameter(String parameterName, Binding binding);
52:
53: /**
54: * Returns the mixin instance for the fully qualfied mixin class name.
55: *
56: * @param mixinClassName
57: * fully qualified class name
58: * @return IllegalArgumentException if no such mixin is associated with the core component
59: */
60: Component getMixinByClassName(String mixinClassName);
61:
62: /** Invoked to make the receiver queue itself to be rendered. */
63: void queueRender(RenderQueue queue);
64: }
|