01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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
28: JetspeedLocatorDescriptor implements TemplateDescriptor {
29: String absolutePath;
30: String appRelativePath;
31:
32: public JetspeedTemplateDescriptor() {
33: super ();
34: }
35:
36: public JetspeedTemplateDescriptor(LocatorDescriptor locator) {
37: this .setCountry(locator.getCountry());
38: this .setLanguage(locator.getLanguage());
39: this .setMediaType(locator.getMediaType());
40: this .setName(locator.getName());
41: this .setType(locator.getType());
42: }
43:
44: /* (non-Javadoc)
45: * @see org.apache.jetspeed.cps.template.Template#getAbsolutePath()
46: */
47: public String getAbsolutePath() {
48: return this .absolutePath;
49: }
50:
51: /* (non-Javadoc)
52: * @see org.apache.jetspeed.cps.template.Template#setAbsolutePath(java.lang.String)
53: */
54: public void setAbsolutePath(String path) {
55: this .absolutePath = (new File(path)).getAbsolutePath();
56: }
57:
58: /**
59: * @see Object#clone
60: * @return an instance copy of this object
61: */
62: public Object clone() throws java.lang.CloneNotSupportedException {
63: return super .clone();
64: }
65:
66: /**
67: * @return
68: */
69: public String getAppRelativePath() {
70: return appRelativePath;
71: }
72:
73: /**
74: * @param string
75: */
76: public void setAppRelativePath(String string) {
77: appRelativePath = string;
78: }
79:
80: }
|