1 23 24 package org.infoglue.cms.applications.structuretool.actions; 25 26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 27 import org.infoglue.cms.controllers.kernel.impl.simple.EventController; 28 import org.infoglue.cms.entities.workflow.EventVO; 29 import org.infoglue.cms.util.ConstraintExceptionBuffer; 30 31 35 36 public class RequestSiteNodeVersionUnpublishAction extends InfoGlueAbstractAction 37 { 38 39 private ConstraintExceptionBuffer ceb; 40 private EventVO eventVO; 41 private Integer repositoryId; 42 private Integer siteNodeId; 43 44 public RequestSiteNodeVersionUnpublishAction() 45 { 46 this(new EventVO()); 47 } 48 49 public RequestSiteNodeVersionUnpublishAction(EventVO eventVO) 50 { 51 this.eventVO = eventVO; 52 this.ceb = new ConstraintExceptionBuffer(); 53 } 54 55 public void setRepositoryId(Integer repositoryId) 56 { 57 this.repositoryId = repositoryId; 58 } 59 60 public Integer getRepositoryId() 61 { 62 return this.repositoryId; 63 } 64 65 public void setSiteNodeId(Integer siteNodeId) 66 { 67 this.siteNodeId = siteNodeId; 68 } 69 70 public Integer getSiteNodeId() 71 { 72 return this.siteNodeId; 73 } 74 75 public void setName(String name) 76 { 77 this.eventVO.setName(name); 78 } 79 80 public void setDescription(String description) 81 { 82 this.eventVO.setDescription(description); 83 } 84 85 public String getName() 86 { 87 return this.eventVO.getName(); 88 } 89 90 public void setEntityClass(String entityClass) 91 { 92 this.eventVO.setEntityClass(entityClass); 93 } 94 95 public void setEntityId(Integer entityId) 96 { 97 this.eventVO.setEntityId(entityId); 98 } 99 100 public void setTypeId(Integer typeId) 101 { 102 this.eventVO.setTypeId(typeId); 103 } 104 105 public String doExecute() throws Exception 106 { 107 ceb = this.eventVO.validate(); 108 ceb.throwIfNotEmpty(); 109 110 EventController.create(this.eventVO, this.repositoryId, this.getInfoGluePrincipal()); 111 112 return "success"; 113 } 114 115 } 116 | Popular Tags |