KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > contenttool > actions > DeleteDigitalAssetAction


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.contenttool.actions;
25
26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction;
27 import org.infoglue.cms.controllers.kernel.impl.simple.DigitalAssetController;
28
29 /**
30  * This action removes a content from the system.
31  *
32  * @author Mattias Bogeblad
33  */

34
35 public class DeleteDigitalAssetAction extends InfoGlueAbstractAction
36 {
37     private static final long serialVersionUID = 1L;
38     
39     private Integer JavaDoc digitalAssetId;
40     private String JavaDoc entity;
41     private Integer JavaDoc entityId;
42     private String JavaDoc returnAddress;
43     
44     
45     protected String JavaDoc doExecute() throws Exception JavaDoc
46     {
47         DigitalAssetController.getController().delete(digitalAssetId, entity, entityId);
48         
49         this.getResponse().sendRedirect(returnAddress);
50         
51         return NONE;
52     }
53     
54     public Integer JavaDoc getDigitalAssetId()
55     {
56         return digitalAssetId;
57     }
58     
59     public void setDigitalAssetId(Integer JavaDoc digitalAssetId)
60     {
61         this.digitalAssetId = digitalAssetId;
62     }
63     
64     public String JavaDoc getEntity()
65     {
66         return entity;
67     }
68     
69     public void setEntity(String JavaDoc entity)
70     {
71         this.entity = entity;
72     }
73     
74     public Integer JavaDoc getEntityId()
75     {
76         return entityId;
77     }
78     
79     public void setEntityId(Integer JavaDoc entityId)
80     {
81         this.entityId = entityId;
82     }
83
84     public String JavaDoc getReturnAddress()
85     {
86         return returnAddress;
87     }
88     
89     public void setReturnAddress(String JavaDoc returnAddress)
90     {
91         this.returnAddress = returnAddress;
92     }
93 }
94
Popular Tags