|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ComponentSpecificationResolver.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.resolver;
|
|
16 |
|
|
17 |
import org.apache.hivemind.Location;
|
|
18 |
import org.apache.tapestry.INamespace;
|
|
19 |
import org.apache.tapestry.IRequestCycle;
|
|
20 |
import org.apache.tapestry.spec.IComponentSpecification;
|
|
21 |
|
|
22 |
/**
|
|
23 |
* Service interface for locating component specifications.
|
|
24 |
*
|
|
25 |
* @author Howard Lewis Ship
|
|
26 |
* @since 4.0
|
|
27 |
*/
|
|
28 |
public interface ComponentSpecificationResolver |
|
29 |
{ |
|
30 |
/**
|
|
31 |
* Passed the namespace of a container (to resolve the type in)
|
|
32 |
* and the type to resolve, performs the processing. A "bare type"
|
|
33 |
* (without a library prefix) may be in the containerNamespace,
|
|
34 |
* or the framework namespace
|
|
35 |
* (a search occurs in that order).
|
|
36 |
*
|
|
37 |
* @param cycle current request cycle
|
|
38 |
* @param containerNamespace namespace that may contain
|
|
39 |
* a library referenced in the type
|
|
40 |
* @param type the component specification
|
|
41 |
* to find, either a simple name, or prefixed with a library id
|
|
42 |
* (defined for the container namespace)
|
|
43 |
*
|
|
44 |
* @see #getNamespace()
|
|
45 |
* @see #getSpecification()
|
|
46 |
*
|
|
47 |
*/
|
|
48 |
public void resolve( |
|
49 |
IRequestCycle cycle, |
|
50 |
INamespace containerNamespace, |
|
51 |
String type, |
|
52 |
Location location); |
|
53 |
|
|
54 |
/**
|
|
55 |
* Like {@link #resolve(org.apache.tapestry.IRequestCycle, org.apache.tapestry.INamespace, java.lang.String, org.apache.tapestry.ILocation)},
|
|
56 |
* but used when the type has already been parsed into a library id and a simple type.
|
|
57 |
*
|
|
58 |
* @param cycle current request cycle
|
|
59 |
* @param containerNamespace namespace that may contain
|
|
60 |
* a library referenced in the type
|
|
61 |
* @param libraryId the library id within the container namespace, or null
|
|
62 |
* @param type the component specification
|
|
63 |
* to find as a simple name (without a library prefix)
|
|
64 |
* @param location of reference to be resolved
|
|
65 |
* @throws ApplicationRuntimeException if the type cannot be resolved
|
|
66 |
*
|
|
67 |
*/
|
|
68 |
public void resolve( |
|
69 |
IRequestCycle cycle, |
|
70 |
INamespace containerNamespace, |
|
71 |
String libraryId, |
|
72 |
String type, |
|
73 |
Location location); |
|
74 |
|
|
75 |
/**
|
|
76 |
* The specification resolved by the resolve() method.
|
|
77 |
*/
|
|
78 |
public IComponentSpecification getSpecification();
|
|
79 |
|
|
80 |
/**
|
|
81 |
* The namespace containing the resolved component.
|
|
82 |
*/
|
|
83 |
public INamespace getNamespace();
|
|
84 |
} |
|