|
|||||||||||||||||||
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 | |||||||||||||||
PageClassProviderContext.java | - | 100% | 100% | 100% |
|
1 |
// Copyright 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.pageload;
|
|
16 |
|
|
17 |
import org.apache.hivemind.util.Defense;
|
|
18 |
import org.apache.tapestry.INamespace;
|
|
19 |
import org.apache.tapestry.spec.IComponentSpecification;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* Contains information needed when trying to determine the name of a page class.
|
|
23 |
*
|
|
24 |
* @author Howard M. Lewis Ship
|
|
25 |
* @since 4.0
|
|
26 |
*/
|
|
27 |
public class PageClassProviderContext |
|
28 |
{ |
|
29 |
|
|
30 |
private INamespace _namespace;
|
|
31 |
|
|
32 |
private String _pageName;
|
|
33 |
|
|
34 |
private IComponentSpecification _pageSpecification;
|
|
35 |
|
|
36 | 142 |
public PageClassProviderContext(String pageName, IComponentSpecification pageSpecification,
|
37 |
INamespace namespace) |
|
38 |
{ |
|
39 | 142 |
Defense.notNull(pageName, "pageName");
|
40 | 142 |
Defense.notNull(pageSpecification, "pageSpecification");
|
41 | 142 |
Defense.notNull(namespace, "namespace");
|
42 |
|
|
43 | 142 |
_pageName = pageName; |
44 | 142 |
_pageSpecification = pageSpecification; |
45 | 142 |
_namespace = namespace; |
46 |
} |
|
47 |
|
|
48 |
/**
|
|
49 |
* Returns the simple, unqualifed name of the page (that is, with no namespace prefix).
|
|
50 |
*/
|
|
51 |
|
|
52 | 47 |
public String getPageName()
|
53 |
{ |
|
54 | 47 |
return _pageName;
|
55 |
} |
|
56 |
|
|
57 |
/**
|
|
58 |
* Returns the namespace containing the page.
|
|
59 |
*/
|
|
60 |
|
|
61 | 92 |
public INamespace getNamespace()
|
62 |
{ |
|
63 | 92 |
return _namespace;
|
64 |
} |
|
65 |
|
|
66 |
/**
|
|
67 |
* Returns the specification defining the page.
|
|
68 |
*/
|
|
69 | 140 |
public IComponentSpecification getPageSpecification()
|
70 |
{ |
|
71 | 140 |
return _pageSpecification;
|
72 |
} |
|
73 |
|
|
74 |
} |
|