1 23 24 package org.infoglue.cms.applications.managementtool.actions; 25 26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 27 import org.infoglue.cms.controllers.kernel.impl.simple.InterceptorController; 28 import org.infoglue.cms.entities.management.InterceptorVO; 29 import org.infoglue.cms.util.ConstraintExceptionBuffer; 30 31 34 35 public class CreateInterceptorAction extends InfoGlueAbstractAction 36 { 37 private ConstraintExceptionBuffer ceb; 38 private InterceptorVO interceptorVO; 39 40 41 public CreateInterceptorAction() 42 { 43 this(new InterceptorVO()); 44 } 45 46 public CreateInterceptorAction(InterceptorVO interceptorVO) 47 { 48 this.interceptorVO = interceptorVO; 49 this.ceb = new ConstraintExceptionBuffer(); 50 51 } 52 53 public String doExecute() throws Exception 54 { 55 ceb.add(this.interceptorVO.validate()); 56 ceb.throwIfNotEmpty(); 57 58 this.interceptorVO = InterceptorController.getController().create(interceptorVO); 59 60 return "success"; 61 } 62 63 public String doInput() throws Exception 64 { 65 return "input"; 66 } 67 68 71 72 public Integer getInterceptorId() 73 { 74 return this.interceptorVO.getInterceptorId(); 75 } 76 77 80 81 public String getClassName() 82 { 83 return this.interceptorVO.getClassName(); 84 } 85 86 89 public void setClassName(String className) 90 { 91 this.interceptorVO.setClassName(className); 92 } 93 94 97 98 public String getDescription() 99 { 100 return this.interceptorVO.getDescription(); 101 } 102 103 106 107 public void setDescription(String description) 108 { 109 this.interceptorVO.setDescription(description); 110 } 111 112 115 116 public String getName() 117 { 118 return this.interceptorVO.getName(); 119 } 120 121 124 125 public void setName(String name) 126 { 127 this.interceptorVO.setName(name); 128 } 129 130 } 131 | Popular Tags |