|
|||||||||||||||||||
30 day Evaluation License registered to hlship@comcast.net Your 30 day evaluation period has expired. Please visit http://www.cenqua.com to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
IBeanProvider.java | - | - | - | - |
|
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; | |
16 | ||
17 | import java.util.Collection; | |
18 | ||
19 | import org.apache.hivemind.ClassResolver; | |
20 | ||
21 | /** | |
22 | * An object that provides a component with access to helper beans. | |
23 | * Helper beans are JavaBeans associated with a page or component | |
24 | * that are used to extend the functionality of the component via | |
25 | * aggregation. | |
26 | * | |
27 | * @author Howard Lewis Ship | |
28 | * @since 1.0.4 | |
29 | **/ | |
30 | ||
31 | ||
32 | public interface IBeanProvider | |
33 | { | |
34 | /** | |
35 | * Returns the JavaBean with the specified name. The bean is created as needed. | |
36 | * | |
37 | * @throws ApplicationRuntimeException if no such bean is available. | |
38 | * | |
39 | **/ | |
40 | ||
41 | public Object getBean(String name); | |
42 | ||
43 | /** | |
44 | * Returns the {@link IComponent} (which may be a | |
45 | * {@link org.apache.tapestry.IPage}) for which | |
46 | * this bean provider is providing beans. | |
47 | * | |
48 | * @since 1.0.5 | |
49 | **/ | |
50 | ||
51 | public IComponent getComponent(); | |
52 | ||
53 | /** | |
54 | * Returns a collection of the names of any beans which may | |
55 | * be provided. | |
56 | * | |
57 | * @since 1.0.6 | |
58 | * @see org.apache.tapestry.spec.IComponentSpecification#getBeanNames() | |
59 | * | |
60 | **/ | |
61 | ||
62 | public Collection getBeanNames(); | |
63 | ||
64 | /** | |
65 | * Returns true if the provider can provide the named bean. | |
66 | * | |
67 | * @since 2.2 | |
68 | * | |
69 | **/ | |
70 | ||
71 | public boolean canProvideBean(String name); | |
72 | ||
73 | /** | |
74 | * Returns a resource resolver. | |
75 | * | |
76 | * @since 1.0.8 | |
77 | * | |
78 | **/ | |
79 | ||
80 | public ClassResolver getClassResolver(); | |
81 | ||
82 | } | |
83 |
|