KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > mydesktoptool > actions > ViewMyDesktopToolToolBarAction


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.mydesktoptool.actions;
25
26 import java.util.ArrayList JavaDoc;
27 import java.util.HashMap JavaDoc;
28 import java.util.List JavaDoc;
29
30 import org.apache.log4j.Logger;
31 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction;
32
33 /**
34  * This class implements the action class for the framed page in the management tool.
35  *
36  * @author Mattias Bogeblad
37  */

38
39 public class ViewMyDesktopToolToolBarAction extends InfoGlueAbstractAction
40 {
41     private final static Logger logger = Logger.getLogger(ViewMyDesktopToolToolBarAction.class.getName());
42
43     private static final long serialVersionUID = 1L;
44
45     private String JavaDoc title = "";
46     private String JavaDoc name = "";
47     private String JavaDoc toolbarKey = "";
48     private String JavaDoc url = "";
49     
50     //All id's that are used
51
private Integer JavaDoc repositoryId = null;
52     private Integer JavaDoc systemUserId = null;
53     private Integer JavaDoc roleId = null;
54     private Integer JavaDoc languageId = null;
55     private Integer JavaDoc functionId = null;
56     private Integer JavaDoc serviceDefinitionId = null;
57     private Integer JavaDoc availableServiceBindingId = null;
58     private Integer JavaDoc siteNodeTypeDefinitionId = null;
59     
60     private static HashMap JavaDoc buttonsMap = new HashMap JavaDoc();
61         
62     public String JavaDoc doExecute() throws Exception JavaDoc
63     {
64         return "success";
65     }
66
67     public Integer JavaDoc getRepositoryId()
68     {
69         return this.repositoryId;
70     }
71
72     public void setRepositoryId(Integer JavaDoc repositoryId)
73     {
74         this.repositoryId = repositoryId;
75     }
76
77     public Integer JavaDoc getSystemUserId()
78     {
79         return this.systemUserId;
80     }
81
82     public void setSystemUserId(Integer JavaDoc systemUserId)
83     {
84         this.systemUserId = systemUserId;
85     }
86
87     public Integer JavaDoc getLanguageId()
88     {
89         return this.languageId;
90     }
91
92     public void setLanguageId(Integer JavaDoc languageId)
93     {
94         this.languageId = languageId;
95     }
96
97     public Integer JavaDoc getRoleId()
98     {
99         return this.roleId;
100     }
101
102     public void setRoleId(Integer JavaDoc roleId)
103     {
104         this.roleId = roleId;
105     }
106
107     public Integer JavaDoc getFunctionId()
108     {
109         return this.functionId;
110     }
111
112     public void setFunctionId(Integer JavaDoc functionId)
113     {
114         this.functionId = functionId;
115     }
116
117     public Integer JavaDoc getServiceDefinitionId()
118     {
119         return this.serviceDefinitionId;
120     }
121
122     public void setServiceDefinitionId(Integer JavaDoc serviceDefinitionId)
123     {
124         this.serviceDefinitionId = serviceDefinitionId;
125     }
126
127     public Integer JavaDoc getAvailableServiceBindingId()
128     {
129         return this.availableServiceBindingId;
130     }
131
132     public void setAvailableServiceBindingId(Integer JavaDoc availableServiceBindingId)
133     {
134         this.availableServiceBindingId = availableServiceBindingId;
135     }
136
137     public Integer JavaDoc getSiteNodeTypeDefinitionId()
138     {
139         return this.siteNodeTypeDefinitionId;
140     }
141
142     public void setSiteNodeTypeDefinitionId(Integer JavaDoc siteNodeTypeDefinitionId)
143     {
144         this.siteNodeTypeDefinitionId = siteNodeTypeDefinitionId;
145     }
146
147     public String JavaDoc getTitle()
148     {
149         return this.title;
150     }
151     
152     public void setTitle(String JavaDoc title)
153     {
154         this.title = title;
155     }
156
157     public String JavaDoc getName()
158     {
159         return this.name;
160     }
161     
162     public void setName(String JavaDoc name)
163     {
164         this.name = name;
165     }
166     
167     public String JavaDoc getToolbarKey()
168     {
169         return this.toolbarKey;
170     }
171
172     public void setToolbarKey(String JavaDoc toolbarKey)
173     {
174         this.toolbarKey = toolbarKey;
175     }
176
177     public void setUrl(String JavaDoc url)
178     {
179         this.url = url;
180     }
181     
182     public String JavaDoc getUrl()
183     {
184         return this.url;
185     }
186
187     public List JavaDoc getButtons()
188     {
189         logger.info("Title:" + this.title);
190         
191         if(this.toolbarKey.equalsIgnoreCase("publications"))
192             return getPublicationsButtons();
193                     
194         return null;
195     }
196     
197     
198     private List JavaDoc getPublicationsButtons()
199     {
200         List JavaDoc buttons = new ArrayList JavaDoc();
201         //buttons.add(new ImageButton(true, "javascript:submitToPreview();", getLocalizedString(getSession().getLocale(), "images.publishingtool.buttons.previewContent"), "Preview", "Preview marked versions"));
202
//buttons.add(new ImageButton(true, "javascript:submitToCreate();", getLocalizedString(getSession().getLocale(), "images.publishingtool.buttons.createEdition"), "Create publication", "Create a new edition of the marked versions"));
203
//buttons.add(new ImageButton(true, "javascript:submitToUnpublish('publication');", getLocalizedString(getSession().getLocale(), "images.publishingtool.buttons.unpublishEdition"), "Unpublish edition", "Unpublish the marked edition and send the versions back to publishable state"));
204
//buttons.add(new ImageButton(true, "javascript:submitToDeny();", getLocalizedString(getSession().getLocale(), "images.publishingtool.buttons.denyPublishing"), "Deny publishing", "Deny the checked items from publication"));
205
return buttons;
206     }
207
208
209 }
210
Popular Tags