KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > util > template > JetspeedTemplateNavigation


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.util.template;
18
19 import org.apache.turbine.util.template.*;
20 import org.apache.turbine.util.RunData;
21 import org.apache.jetspeed.services.TemplateLocator;
22 /**
23  * A Class that produce localized navigations.
24  *
25  *
26  * @author Ignacio J. Ortega
27  */

28 public class JetspeedTemplateNavigation extends TemplateNavigation {
29
30
31     private RunData data;
32 /*XXX add no args constructor to turbine's TemplateNavigation
33     public JetspeedTemplateNavigation(){
34         data=null;
35     }
36 */

37     public JetspeedTemplateNavigation(RunData data) {
38         super(data);
39         this.data=data;
40     }
41     /**
42      * This will initialise a JetspeedTemplateNavigation object that was
43      * constructed with the default constructor (ApplicationTool
44      * method).
45      *
46      * @param data assumed to be a RunData object
47      */

48     public void init(Object JavaDoc data){
49         this.data = (RunData)data;
50     }
51
52
53     public TemplateNavigation setTemplate(String JavaDoc template) {
54         return super.setTemplate(TemplateLocator.locateNavigationTemplate(data,template));
55     }
56 }
57
58
Popular Tags