KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > structuretool > actions > UpdateSiteNodeVersionAction


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.structuretool.actions;
25
26 import org.infoglue.cms.entities.structure.SiteNodeVersionVO;
27 import org.infoglue.cms.util.ConstraintExceptionBuffer;
28
29 /**
30   * This is the action-class for UpdateSiteNodeVersionVersion
31   *
32   * @author Mattias Bogeblad
33   */

34
35 public class UpdateSiteNodeVersionAction extends ViewSiteNodeVersionAction
36 {
37     
38     private SiteNodeVersionVO siteNodeVersionVO;
39     private Integer JavaDoc siteNodeId;
40     private Integer JavaDoc languageId;
41     private Integer JavaDoc siteNodeVersionId;
42
43     private ConstraintExceptionBuffer ceb;
44     
45     public UpdateSiteNodeVersionAction()
46     {
47         this(new SiteNodeVersionVO());
48     }
49     
50     public UpdateSiteNodeVersionAction(SiteNodeVersionVO siteNodeVersionVO)
51     {
52         this.siteNodeVersionVO = siteNodeVersionVO;
53         this.ceb = new ConstraintExceptionBuffer();
54     }
55     
56     public String JavaDoc doExecute() throws Exception JavaDoc
57     {
58         super.initialize(this.siteNodeId, this.languageId);
59         
60         ceb.throwIfNotEmpty();
61         
62         return "success";
63     }
64
65     public String JavaDoc doSaveAndExit() throws Exception JavaDoc
66     {
67         doExecute();
68                          
69         return "saveAndExit";
70     }
71
72     public void setSiteNodeVersionId(Integer JavaDoc siteNodeVersionId)
73     {
74         this.siteNodeVersionVO.setSiteNodeVersionId(siteNodeVersionId);
75     }
76
77     public java.lang.Integer JavaDoc getSiteNodeVersionId()
78     {
79         return this.siteNodeVersionVO.getSiteNodeVersionId();
80     }
81
82     public void setStateId(Integer JavaDoc stateId)
83     {
84         this.siteNodeVersionVO.setStateId(stateId);
85     }
86
87     public java.lang.Integer JavaDoc getStateId()
88     {
89         return this.siteNodeVersionVO.getStateId();
90     }
91
92     public void setSiteNodeId(Integer JavaDoc siteNodeId)
93     {
94         this.siteNodeId = siteNodeId;
95     }
96
97     public java.lang.Integer JavaDoc getSiteNodeId()
98     {
99         return this.siteNodeId;
100     }
101
102     public void setLanguageId(Integer JavaDoc languageId)
103     {
104         this.languageId = languageId;
105     }
106
107     public java.lang.Integer JavaDoc getLanguageId()
108     {
109         return this.languageId;
110     }
111             
112
113 }
114
Popular Tags