KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.List JavaDoc;
27
28 import org.apache.log4j.Logger;
29 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction;
30 import org.infoglue.cms.controllers.kernel.impl.simple.AvailableServiceBindingController;
31 import org.infoglue.cms.controllers.kernel.impl.simple.ServiceDefinitionController;
32 import org.infoglue.cms.entities.management.AvailableServiceBindingVO;
33
34 public class ViewAvailableServiceBindingAction extends InfoGlueAbstractAction
35 {
36     private final static Logger logger = Logger.getLogger(ViewAvailableServiceBindingAction.class.getName());
37
38     private static final long serialVersionUID = 1L;
39
40     private AvailableServiceBindingVO availableServiceBindingVO;
41     private List JavaDoc availableServiceDefinitionVOList;
42     private List JavaDoc serviceDefinitionVOList;
43     
44     public ViewAvailableServiceBindingAction()
45     {
46         this(new AvailableServiceBindingVO());
47     }
48     
49     public ViewAvailableServiceBindingAction(AvailableServiceBindingVO availableServiceBindingVO)
50     {
51         this.availableServiceBindingVO = availableServiceBindingVO;
52     }
53     
54     protected void initialize(Integer JavaDoc availableServiceBindingId) throws Exception JavaDoc
55     {
56         //ViewAvailableServiceBindingUCC viewAvailableServiceBindingUCC = ViewAvailableServiceBindingUCCFactory.newViewAvailableServiceBindingUCC();
57
//availableServiceBindingVO = viewAvailableServiceBindingUCC.viewAvailableServiceBinding(availableServiceBindingId);
58
availableServiceBindingVO = AvailableServiceBindingController.getController().getAvailableServiceBindingVOWithId(availableServiceBindingId);
59         
60         //availableServiceDefinitionVOList = viewAvailableServiceBindingUCC.getAvailableServiceDefinitions(availableServiceBindingId);
61
//serviceDefinitionVOList = viewAvailableServiceBindingUCC.getAllServiceDefinitions();
62
availableServiceDefinitionVOList = AvailableServiceBindingController.getController().getServiceDefinitionVOList(availableServiceBindingId);
63         serviceDefinitionVOList = ServiceDefinitionController.getController().getServiceDefinitionVOList();
64     }
65     
66     public String JavaDoc doExecute() throws Exception JavaDoc
67     {
68         logger.info("Executing doExecute on ViewAvailableServiceBindingAction..");
69         initialize(getAvailableServiceBindingId());
70         /*
71         ViewAvailableServiceBindingUCC viewAvailableServiceBindingUCC = ViewAvailableServiceBindingUCCFactory.newViewAvailableServiceBindingUCC();
72         availableServiceBindingVO = viewAvailableServiceBindingUCC.viewAvailableServiceBinding(getAvailableServiceBindingId());
73         
74         availableServiceDefinitionVOList = viewAvailableServiceBindingUCC.getAvailableServiceDefinitions(getAvailableServiceBindingId());
75         serviceDefinitionVOList = viewAvailableServiceBindingUCC.getAllServiceDefinitions();
76         */

77         logger.info("Finished executing doExecute on ViewAvailableServiceBindingAction..");
78         return "success";
79     }
80         
81     public java.lang.Integer JavaDoc getAvailableServiceBindingId()
82     {
83         return this.availableServiceBindingVO.getAvailableServiceBindingId();
84     }
85
86     public void setAvailableServiceBindingId(Integer JavaDoc availableServiceBindingId)
87     {
88         this.availableServiceBindingVO.setAvailableServiceBindingId(availableServiceBindingId);
89     }
90         
91     public java.lang.String JavaDoc getName()
92     {
93         return this.availableServiceBindingVO.getName();
94     }
95
96     public java.lang.String JavaDoc getDescription()
97     {
98         return this.availableServiceBindingVO.getDescription();
99     }
100
101     public java.lang.String JavaDoc getVisualizationAction()
102     {
103         return this.availableServiceBindingVO.getVisualizationAction();
104     }
105
106     public Boolean JavaDoc getIsMandatory()
107     {
108         return this.availableServiceBindingVO.getIsMandatory();
109     }
110
111     public Boolean JavaDoc getIsUserEditable()
112     {
113         return this.availableServiceBindingVO.getIsUserEditable();
114     }
115
116     public Boolean JavaDoc getIsInheritable()
117     {
118         return this.availableServiceBindingVO.getIsInheritable();
119     }
120
121     public List JavaDoc getAvailableServiceDefinitions()
122     {
123         return this.availableServiceDefinitionVOList;
124     }
125
126     public List JavaDoc getAllServiceDefinitions()
127     {
128         return this.serviceDefinitionVOList;
129     }
130 }
131
Popular Tags