KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > contenttool > actions > ViewContentToolMenuAction


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.applications.contenttool.actions;
25
26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction;
27
28 /**
29  * This class implements the action class for the menu in the content tool.
30  *
31  * @author Mattias Bogeblad
32  */

33
34 public class ViewContentToolMenuAction extends InfoGlueAbstractAction
35 {
36     private static final long serialVersionUID = 1L;
37     
38     private Integer JavaDoc repositoryId;
39     private String JavaDoc tree;
40     private String JavaDoc showVersions;
41     
42     public void setRepositoryId(Integer JavaDoc repositoryId)
43     {
44         if (this.showVersions == null || this.showVersions.equals(""))
45             this.showVersions = (String JavaDoc)getRequest().getSession().getAttribute("htmlTreeShowVersions");
46         else
47             getRequest().getSession().setAttribute("htmlTreeShowVersions", this.showVersions);
48         
49         if(repositoryId != null)
50         {
51             getHttpSession().setAttribute("repositoryId", repositoryId);
52         }
53         
54         this.repositoryId = repositoryId;
55     }
56
57     public Integer JavaDoc getRepositoryId()
58     {
59         return this.repositoryId;
60     }
61     
62     public String JavaDoc doExecute() throws Exception JavaDoc
63     {
64         getResponse().setHeader("Cache-Control","no-cache");
65         getResponse().setHeader("Pragma","no-cache");
66         getResponse().setDateHeader ("Expires", 0);
67
68         return "success";
69     }
70                
71     /**
72      * Returns the tree.
73      * @return String
74      */

75     public String JavaDoc getTree()
76     {
77         return tree;
78     }
79
80     /**
81      * Sets the tree.
82      * @param tree The tree to set
83      */

84     public void setTree(String JavaDoc tree)
85     {
86         this.tree = tree;
87     }
88
89     public String JavaDoc getShowVersions()
90     {
91         return showVersions;
92     }
93     
94     public void setShowVersions(String JavaDoc showVersions)
95     {
96         this.showVersions = showVersions;
97     }
98     
99 }
100
Popular Tags