KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > managementtool > actions > ViewManagementToolMenuHtmlAction


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.managementtool.actions;
25
26 import org.infoglue.cms.applications.common.actions.TreeViewAbstractAction;
27 import org.infoglue.cms.controllers.kernel.impl.simple.RepositoryController;
28 import org.infoglue.cms.entities.management.RepositoryVO;
29 import org.infoglue.cms.treeservice.ss.ManagementToolNodeSupplier;
30
31 import com.frovi.ss.Tree.INodeSupplier;
32
33 /**
34  * ViewManagementToolMenuHtmlAction.java
35  * Created on 2002-okt-11
36  * @author Stefan Sik, ss@frovi.com
37  * ss
38  *
39  * This class implements the use case ViewManagementToolMenuHtmlAction.java
40  * The class supplies action classes with methods
41  * to carry out the use case
42  */

43 public class ViewManagementToolMenuHtmlAction extends TreeViewAbstractAction
44 {
45     private static final long serialVersionUID = 1L;
46
47     private Integer JavaDoc repositoryId;
48     private String JavaDoc name;
49     private RepositoryVO repositoryVO;
50     
51     /**
52      * @see org.infoglue.cms.applications.common.actions.TreeViewAbstractAction#getNodeSupplier()
53      */

54     protected INodeSupplier getNodeSupplier() throws Exception JavaDoc
55     {
56         if(this.getRepositoryId().intValue() > 0){
57             this.repositoryVO = RepositoryController.getController().getRepositoryVOWithId(this.repositoryId);
58             this.setName(this.repositoryVO.getName());
59         }
60         
61         return new ManagementToolNodeSupplier(repositoryId);
62     }
63
64
65     /**
66      * Returns the name.
67      * @return String
68      */

69     public String JavaDoc getName()
70     {
71         return name;
72     }
73
74     /**
75      * Returns the repositoryId.
76      * @return Integer
77      */

78     public Integer JavaDoc getRepositoryId()
79     {
80         return repositoryId;
81     }
82
83     /**
84      * Sets the name.
85      * @param name The name to set
86      */

87     public void setName(String JavaDoc name)
88     {
89         this.name = name;
90     }
91
92     /**
93      * Sets the repositoryId.
94      * @param repositoryId The repositoryId to set
95      */

96     public void setRepositoryId(Integer JavaDoc repositoryId)
97     {
98         this.repositoryId = repositoryId;
99     }
100
101 }
102
Popular Tags