1 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.EventController; 28 import org.infoglue.cms.entities.workflow.EventVO; 29 import org.infoglue.cms.util.ConstraintExceptionBuffer; 30 31 32 36 37 public class RequestContentVersionUnpublishAction extends InfoGlueAbstractAction 38 { 39 private static final long serialVersionUID = 1L; 40 41 private ConstraintExceptionBuffer ceb; 42 private EventVO eventVO; 43 private Integer repositoryId; 44 private Integer contentId; 45 private Integer languageId; 46 47 public RequestContentVersionUnpublishAction() 48 { 49 this(new EventVO()); 50 } 51 52 public RequestContentVersionUnpublishAction(EventVO eventVO) 53 { 54 this.eventVO = eventVO; 55 this.ceb = new ConstraintExceptionBuffer(); 56 } 57 58 public void setRepositoryId(Integer repositoryId) 59 { 60 this.repositoryId = repositoryId; 61 } 62 63 public Integer getRepositoryId() 64 { 65 return this.repositoryId; 66 } 67 68 public void setContentId(Integer contentId) 69 { 70 this.contentId = contentId; 71 } 72 73 public Integer getContentId() 74 { 75 return this.contentId; 76 } 77 78 public void setLanguageId(Integer languageId) 79 { 80 this.languageId = languageId; 81 } 82 83 public Integer getLanguageId() 84 { 85 return this.languageId; 86 } 87 88 public void setName(String name) 89 { 90 this.eventVO.setName(name); 91 } 92 93 public void setDescription(String description) 94 { 95 this.eventVO.setDescription(description); 96 } 97 98 public String getName() 99 { 100 return this.eventVO.getName(); 101 } 102 103 public void setEntityClass(String entityClass) 104 { 105 this.eventVO.setEntityClass(entityClass); 106 } 107 108 public void setEntityId(Integer entityId) 109 { 110 this.eventVO.setEntityId(entityId); 111 } 112 113 public void setTypeId(Integer typeId) 114 { 115 this.eventVO.setTypeId(typeId); 116 } 117 118 public String doExecute() throws Exception 119 { 120 ceb = this.eventVO.validate(); 121 ceb.throwIfNotEmpty(); 122 123 EventController.create(this.eventVO, this.repositoryId, this.getInfoGluePrincipal()); 124 125 return "success"; 126 } 127 128 } 129 | Popular Tags |