KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > structuretool > actions > ViewStructureToolMenuHtmlAction


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.structuretool.actions;
25
26 import org.infoglue.cms.applications.common.actions.TreeViewAbstractAction;
27 import org.infoglue.cms.exception.SystemException;
28 import org.infoglue.cms.treeservice.ss.SiteNodeNodeSupplier;
29 import org.infoglue.cms.util.CmsPropertyHandler;
30
31 import com.frovi.ss.Tree.BaseNode;
32 import com.frovi.ss.Tree.INodeSupplier;
33
34 public class ViewStructureToolMenuHtmlAction extends TreeViewAbstractAction
35 {
36     private static final long serialVersionUID = 1L;
37
38     private Integer JavaDoc repositoryId;
39     private Integer JavaDoc select;
40     private String JavaDoc treeMode = "classic";
41     private BaseNode rootNode = null;
42     
43     public String JavaDoc doBindingView() throws Exception JavaDoc
44     {
45         super.doExecute();
46         
47         return "bindingView";
48     }
49         
50     /**
51      * @see org.infoglue.cms.applications.common.actions.TreeViewAbstractAction#getNodeSupplier()
52      */

53     protected INodeSupplier getNodeSupplier() throws Exception JavaDoc, SystemException
54     {
55         String JavaDoc treeMode = CmsPropertyHandler.getTreeMode();
56         if(treeMode != null) setTreeMode(treeMode);
57         SiteNodeNodeSupplier sup = new SiteNodeNodeSupplier(getRepositoryId(), this.getInfoGluePrincipal());
58         rootNode = sup.getRootNode();
59         
60         if(this.repositoryId != null && this.repositoryId.intValue() > -1)
61             return sup;
62         else
63             return null;
64     }
65
66     /**
67      * Returns the repositoryId.
68      * @return Integer
69      */

70     public Integer JavaDoc getRepositoryId()
71     {
72         return repositoryId;
73     }
74
75     /**
76      * Sets the repositoryId.
77      * @param repositoryId The repositoryId to set
78      */

79     public void setRepositoryId(Integer JavaDoc repositoryId)
80     {
81         this.repositoryId = repositoryId;
82     }
83
84     /**
85      * Returns the select.
86      * @return Integer
87      */

88     public Integer JavaDoc getSelect()
89     {
90         return select;
91     }
92
93     /**
94      * Sets the select.
95      * @param select The select to set
96      */

97     public void setSelect(Integer JavaDoc select)
98     {
99         this.select = select;
100     }
101
102     public String JavaDoc getTreeMode() {
103         return treeMode;
104     }
105     public void setTreeMode(String JavaDoc treeMode) {
106         this.treeMode = treeMode;
107     }
108     public BaseNode getRootNode() {
109         return rootNode;
110     }
111     public void setRootNode(BaseNode rootNode) {
112         this.rootNode = rootNode;
113     }
114 }
115
Popular Tags