01: // Copyright 2006 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.parser;
16:
17: import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
18: import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
19:
20: import java.util.List;
21: import java.util.Set;
22:
23: import org.apache.tapestry.ioc.Resource;
24:
25: public class ComponentTemplateImpl implements ComponentTemplate {
26: private final Resource _resource;
27:
28: private final List<TemplateToken> _tokens;
29:
30: private final Set<String> _componentIds;
31:
32: /**
33: * @param resource
34: * the resource from which the template was parsed
35: * @param tokens
36: * the tokens of the template, a copy of this list will be made
37: * @param componentIds
38: * TODO
39: */
40: public ComponentTemplateImpl(Resource resource,
41: List<TemplateToken> tokens, Set<String> componentIds) {
42: _resource = resource;
43: _tokens = newList(tokens);
44: _componentIds = newSet(componentIds);
45: }
46:
47: public Resource getResource() {
48: return _resource;
49: }
50:
51: public List<TemplateToken> getTokens() {
52: return _tokens;
53: }
54:
55: public Set<String> getComponentIds() {
56: return _componentIds;
57: }
58:
59: /** Returns false. */
60: public boolean isMissing() {
61: return false;
62: }
63:
64: }
|