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.UserControllerProxy; 28 import org.infoglue.cms.entities.management.SystemUserVO; 29 import org.infoglue.cms.security.InfoGluePrincipal; 30 import org.infoglue.cms.util.ConstraintExceptionBuffer; 31 32 33 38 39 40 public class CreateSystemUserAction extends InfoGlueAbstractAction 41 { 42 private static final long serialVersionUID = 1L; 43 44 private ConstraintExceptionBuffer ceb; 45 private SystemUserVO systemUserVO; 46 private InfoGluePrincipal infoGluePrincipal; 47 53 54 55 public CreateSystemUserAction() 56 { 57 this(new SystemUserVO()); 58 } 59 60 public CreateSystemUserAction(SystemUserVO systemUserVO) 61 { 62 this.systemUserVO = systemUserVO; 63 this.ceb = new ConstraintExceptionBuffer(); 64 } 65 66 public String doInput() throws Exception 67 { 68 return "input"; 69 } 70 71 protected String doExecute() throws Exception 72 { 73 ceb = this.systemUserVO.validate(); 74 ceb.throwIfNotEmpty(); 75 76 this.infoGluePrincipal = UserControllerProxy.getController().createUser(this.systemUserVO); 77 78 return "success"; 79 } 80 81 public void setuserName(String userName) 82 { 83 this.systemUserVO.setUserName(userName); 84 } 85 86 public String getUserName() 87 { 88 return this.systemUserVO.getUserName(); 89 } 90 91 public java.lang.String getFirstName() 92 { 93 return this.systemUserVO.getFirstName(); 94 } 95 96 public void setFirstName(java.lang.String firstName) 97 { 98 this.systemUserVO.setFirstName(firstName); 99 } 100 101 public java.lang.String getLastName() 102 { 103 return this.systemUserVO.getLastName(); 104 } 105 106 public void setLastName(java.lang.String lastName) 107 { 108 this.systemUserVO.setLastName(lastName); 109 } 110 111 public java.lang.String getEmail() 112 { 113 return this.systemUserVO.getEmail(); 114 } 115 116 public void setEmail(java.lang.String email) 117 { 118 this.systemUserVO.setEmail(email); 119 } 120 121 public java.lang.String getPassword() 122 { 123 return this.systemUserVO.getPassword(); 124 } 125 126 public void setPassword(java.lang.String password) 127 { 128 this.systemUserVO.setPassword(password); 129 } 130 131 } 132 | Popular Tags |