1 23 24 package org.infoglue.cms.applications.managementtool.actions; 25 26 import org.infoglue.cms.controllers.kernel.impl.simple.RedirectController; 27 import org.infoglue.cms.entities.management.RedirectVO; 28 import org.infoglue.cms.util.ConstraintExceptionBuffer; 29 30 31 36 public class UpdateRedirectAction extends ViewRedirectAction { 38 39 private RedirectVO redirectVO; 40 private Integer redirectId; 41 private String userAction = ""; 42 private ConstraintExceptionBuffer ceb; 43 44 public UpdateRedirectAction() 45 { 46 this(new RedirectVO()); 47 } 48 49 public UpdateRedirectAction(RedirectVO redirectVO) 50 { 51 this.redirectVO = redirectVO; 52 this.ceb = new ConstraintExceptionBuffer(); 53 } 54 55 56 public String doExecute() throws Exception 57 { 58 super.initialize(getRedirectId()); 59 60 ceb.add(this.redirectVO.validate()); 61 ceb.throwIfNotEmpty(); 62 63 RedirectController.getController().update(this.redirectVO); 64 65 return "success"; 66 } 67 68 public String doLocal() throws Exception 69 { 70 super.initialize(getRedirectId()); 71 72 ceb.throwIfNotEmpty(); 73 74 RedirectController.getController().update(this.redirectVO); 75 76 return "successLocal"; 77 } 78 79 public String doSaveAndExit() throws Exception 80 { 81 doExecute(); 82 83 return "saveAndExit"; 84 } 85 86 public String doSaveAndExitLocal() throws Exception 87 { 88 doLocal(); 89 90 return "saveAndExitLocal"; 91 } 92 93 public void setRedirectId(Integer redirectId) throws Exception 94 { 95 this.redirectVO.setRedirectId(redirectId); 96 } 97 98 public java.lang.Integer getRedirectId() 99 { 100 return this.redirectVO.getRedirectId(); 101 } 102 103 public java.lang.String getUrl() 104 { 105 return this.redirectVO.getUrl(); 106 } 107 108 public void setUrl(java.lang.String url) 109 { 110 this.redirectVO.setUrl(url); 111 } 112 113 public String getRedirectUrl() 114 { 115 return this.redirectVO.getRedirectUrl(); 116 } 117 118 public void setRedirectUrl(String redirectUrl) 119 { 120 this.redirectVO.setRedirectUrl(redirectUrl); 121 } 122 123 } 124 | Popular Tags |