1 23 24 package org.infoglue.cms.applications.managementtool.actions; 25 26 import org.infoglue.cms.controllers.kernel.impl.simple.ServerNodeController; 27 import org.infoglue.cms.entities.management.ServerNodeVO; 28 import org.infoglue.cms.util.ConstraintExceptionBuffer; 29 30 31 36 public class UpdateServerNodeAction extends ViewServerNodeAction { 38 39 private ServerNodeVO serverNodeVO; 40 private Integer serverNodeId; 41 private String userAction = ""; 42 private ConstraintExceptionBuffer ceb; 43 44 public UpdateServerNodeAction() 45 { 46 this(new ServerNodeVO()); 47 } 48 49 public UpdateServerNodeAction(ServerNodeVO serverNodeVO) 50 { 51 this.serverNodeVO = serverNodeVO; 52 this.ceb = new ConstraintExceptionBuffer(); 53 } 54 55 56 public String doExecute() throws Exception 57 { 58 super.initialize(getServerNodeId()); 59 60 ceb.add(this.serverNodeVO.validate()); 61 ceb.throwIfNotEmpty(); 62 63 ServerNodeController.getController().update(this.serverNodeVO); 64 65 return "success"; 66 } 67 68 public String doSaveAndExit() throws Exception 69 { 70 doExecute(); 71 72 return "saveAndExit"; 73 } 74 75 public void setServerNodeId(Integer serverNodeId) throws Exception 76 { 77 this.serverNodeVO.setServerNodeId(serverNodeId); 78 } 79 80 public java.lang.Integer getServerNodeId() 81 { 82 return this.serverNodeVO.getServerNodeId(); 83 } 84 85 public java.lang.String getName() 86 { 87 return this.serverNodeVO.getName(); 88 } 89 90 public void setName(java.lang.String name) 91 { 92 this.serverNodeVO.setName(name); 93 } 94 95 public String getDescription() 96 { 97 return this.serverNodeVO.getDescription(); 98 } 99 100 public void setDescription(String description) 101 { 102 this.serverNodeVO.setDescription(description); 103 } 104 105 public String getDnsName() 106 { 107 return this.serverNodeVO.getDnsName(); 108 } 109 110 public void setDnsName(String dnsName) 111 { 112 this.serverNodeVO.setDnsName(dnsName); 113 } 114 115 } 116 | Popular Tags |