KickJava   Java API By Example, From Geeks To Geeks.

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


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

36
37 public class UpdateRolePropertiesAction extends InfoGlueAbstractAction
38 {
39     private RolePropertiesVO rolePropertiesVO;
40     private Integer JavaDoc languageId;
41     private Integer JavaDoc contentTypeDefinitionId;
42     private Integer JavaDoc currentEditorId;
43     private String JavaDoc attributeName;
44     private String JavaDoc returnAddress;
45
46     private ConstraintExceptionBuffer ceb;
47     
48     public UpdateRolePropertiesAction()
49     {
50         rolePropertiesVO = new RolePropertiesVO();
51         this.ceb = new ConstraintExceptionBuffer();
52     }
53         
54     public String JavaDoc doExecute() throws Exception JavaDoc
55     {
56         ceb.throwIfNotEmpty();
57         RolePropertiesController.getController().update(this.languageId, this.contentTypeDefinitionId, this.rolePropertiesVO);
58         
59         this.getResponse().sendRedirect(returnAddress);
60         
61         return NONE;
62     }
63
64     public String JavaDoc doSaveAndExit() throws Exception JavaDoc
65     {
66         RolePropertiesController.getController().update(this.languageId, this.contentTypeDefinitionId, this.rolePropertiesVO);
67                          
68         return "saveAndExit";
69     }
70
71     public String JavaDoc doSaveAndExitStandalone() throws Exception JavaDoc
72     {
73         RolePropertiesController.getController().update(this.languageId, this.contentTypeDefinitionId, this.rolePropertiesVO);
74                          
75         return "saveAndExitStandalone";
76     }
77                    
78     public void setEntityId(Integer JavaDoc rolePropertiesId)
79     {
80         this.rolePropertiesVO.setRolePropertiesId(rolePropertiesId);
81     }
82
83     public java.lang.Integer JavaDoc getEntityId()
84     {
85         return this.rolePropertiesVO.getRolePropertiesId();
86     }
87     
88     public Integer JavaDoc getContentTypeDefinitionId()
89     {
90         return contentTypeDefinitionId;
91     }
92
93     public void setContentTypeDefinitionId(Integer JavaDoc contentTypeDefinitionId)
94     {
95         this.contentTypeDefinitionId = contentTypeDefinitionId;
96     }
97
98     public String JavaDoc getRoleName()
99     {
100         return this.rolePropertiesVO.getRoleName();
101     }
102
103     public void setRoleName(String JavaDoc roleName)
104     {
105         this.rolePropertiesVO.setRoleName(roleName);
106     }
107
108     public String JavaDoc getOwnerEntityId()
109     {
110         return this.rolePropertiesVO.getRoleName();
111     }
112
113     public void setOwnerEntityId(String JavaDoc ownerEntityId)
114     {
115         this.rolePropertiesVO.setRoleName(ownerEntityId);
116     }
117
118     public void setLanguageId(Integer JavaDoc languageId)
119     {
120         this.languageId = languageId;
121     }
122
123     public java.lang.Integer JavaDoc getLanguageId()
124     {
125         return this.languageId;
126     }
127         
128     public java.lang.String JavaDoc getValue()
129     {
130         return this.rolePropertiesVO.getValue();
131     }
132         
133     public void setValue(java.lang.String JavaDoc value)
134     {
135         this.rolePropertiesVO.setValue(value);
136     }
137     
138     public Integer JavaDoc getCurrentEditorId()
139     {
140         return currentEditorId;
141     }
142
143     public void setCurrentEditorId(Integer JavaDoc integer)
144     {
145         currentEditorId = integer;
146     }
147
148     public String JavaDoc getAttributeName()
149     {
150         return this.attributeName;
151     }
152
153     public void setAttributeName(String JavaDoc attributeName)
154     {
155         this.attributeName = attributeName;
156     }
157
158     public String JavaDoc getReturnAddress()
159     {
160         return returnAddress;
161     }
162     
163     public void setReturnAddress(String JavaDoc returnAddress)
164     {
165         this.returnAddress = returnAddress;
166     }
167 }
168
Popular Tags