KickJava   Java API By Example, From Geeks To Geeks.

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


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.controllers.kernel.impl.simple.InterceptionPointController;
27 import org.infoglue.cms.entities.management.InterceptionPointVO;
28 import org.infoglue.cms.util.ConstraintExceptionBuffer;
29
30
31 /**
32  * This is the action-class for UpdateInterceptionPoint
33  *
34  * @author Mattias Bogeblad
35  */

36
37 public class UpdateInterceptionPointAction extends ViewInterceptionPointAction
38 {
39     private InterceptionPointVO interceptionPointVO = new InterceptionPointVO();
40     private ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
41     
42     
43     public String JavaDoc doExecute() throws Exception JavaDoc
44     {
45         super.initialize(getInterceptionPointId());
46         
47         ceb.add(this.interceptionPointVO.validate());
48         ceb.throwIfNotEmpty();
49         
50         String JavaDoc[] values = getRequest().getParameterValues("interceptorId");
51         
52         InterceptionPointController.getController().update(this.interceptionPointVO, values);
53         
54         return "success";
55     }
56     
57     public String JavaDoc doSaveAndExit() throws Exception JavaDoc
58     {
59         doExecute();
60                         
61         return "saveAndExit";
62     }
63     
64     
65
66     public Integer JavaDoc getInterceptionPointId()
67     {
68         return this.interceptionPointVO.getInterceptionPointId();
69     }
70
71     public void setInterceptionPointId(Integer JavaDoc interceptionPointId)
72     {
73         this.interceptionPointVO.setInterceptionPointId(interceptionPointId);
74     }
75
76     public InterceptionPointVO getInterceptionPointVO()
77     {
78         return this.interceptionPointVO;
79     }
80     
81     public void setName(String JavaDoc name)
82     {
83         this.interceptionPointVO.setName(name);
84     }
85     
86     public void setCategory(String JavaDoc category)
87     {
88         this.interceptionPointVO.setCategory(category);
89     }
90     
91     public void setDescription(String JavaDoc description)
92     {
93         this.interceptionPointVO.setDescription(description);
94     }
95
96     public void setUsesExtraDataForAccessControl(Boolean JavaDoc usesExtraDataForAccessControl)
97     {
98         this.interceptionPointVO.setUsesExtraDataForAccessControl(usesExtraDataForAccessControl);
99     }
100
101 }
102
Popular Tags