%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.locator.JetspeedTemplateDescriptor |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
16 | */ |
|
17 | package org.apache.jetspeed.locator; |
|
18 | ||
19 | import java.io.File; |
|
20 | ||
21 | /** |
|
22 | * Jetspeed default Template Descriptor implementation |
|
23 | * |
|
24 | * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a> |
|
25 | * @version $Id: JetspeedTemplateDescriptor.java 516448 2007-03-09 16:25:47Z ate $ |
|
26 | */ |
|
27 | public class JetspeedTemplateDescriptor extends JetspeedLocatorDescriptor implements TemplateDescriptor |
|
28 | { |
|
29 | String absolutePath; |
|
30 | String appRelativePath; |
|
31 | ||
32 | public JetspeedTemplateDescriptor() |
|
33 | { |
|
34 | 0 | super(); |
35 | 0 | } |
36 | ||
37 | public JetspeedTemplateDescriptor(LocatorDescriptor locator) |
|
38 | 0 | { |
39 | 0 | this.setCountry(locator.getCountry()); |
40 | 0 | this.setLanguage(locator.getLanguage()); |
41 | 0 | this.setMediaType(locator.getMediaType()); |
42 | 0 | this.setName(locator.getName()); |
43 | 0 | this.setType(locator.getType()); |
44 | 0 | } |
45 | ||
46 | /* (non-Javadoc) |
|
47 | * @see org.apache.jetspeed.cps.template.Template#getAbsolutePath() |
|
48 | */ |
|
49 | public String getAbsolutePath() |
|
50 | { |
|
51 | 0 | return this.absolutePath; |
52 | } |
|
53 | ||
54 | /* (non-Javadoc) |
|
55 | * @see org.apache.jetspeed.cps.template.Template#setAbsolutePath(java.lang.String) |
|
56 | */ |
|
57 | public void setAbsolutePath(String path) |
|
58 | { |
|
59 | 0 | this.absolutePath = (new File(path)).getAbsolutePath(); |
60 | 0 | } |
61 | ||
62 | ||
63 | ||
64 | /** |
|
65 | * @see Object#clone |
|
66 | * @return an instance copy of this object |
|
67 | */ |
|
68 | public Object clone() throws java.lang.CloneNotSupportedException |
|
69 | { |
|
70 | 0 | return super.clone(); |
71 | } |
|
72 | ||
73 | /** |
|
74 | * @return |
|
75 | */ |
|
76 | public String getAppRelativePath() |
|
77 | { |
|
78 | 0 | return appRelativePath; |
79 | } |
|
80 | ||
81 | /** |
|
82 | * @param string |
|
83 | */ |
|
84 | public void setAppRelativePath(String string) |
|
85 | { |
|
86 | 0 | appRelativePath = string; |
87 | 0 | } |
88 | ||
89 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |