1 23 24 package org.infoglue.cms.applications.managementtool.actions; 25 26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 27 28 36 37 public class ConfirmAction extends InfoGlueAbstractAction 38 { 39 private String yesDestination; 40 private String noDestination; 41 private String dest; 42 private String header; 43 private String message; 44 private String extraParameters; 45 private String choice; 46 47 public ConfirmAction() 48 { 49 this.choice = ""; 50 } 51 52 public void setYesDestination(String yesDestination) 53 { 54 this.yesDestination = yesDestination; 55 } 56 57 public void setNoDestination(String noDestination) 58 { 59 this.noDestination = noDestination; 60 } 61 62 public String getNoDestination() 63 { 64 return this.noDestination; 65 } 66 67 public String getYesDestination() 68 { 69 return this.yesDestination; 70 } 71 72 public void setMessage(String message) 73 { 74 this.message = message; 75 } 76 77 public String getMessage() throws Exception 78 { 79 return this.message; 80 } 81 82 public String getExtraParameters() 83 { 84 return extraParameters; 85 } 86 87 public void setExtraParameters(String extraParameters) 88 { 89 this.extraParameters = extraParameters; 90 } 91 92 public void setHeader(String header) 93 { 94 this.header = header; 95 } 96 97 public String getHeader() 98 { 99 return this.header; 100 } 101 102 public void setChoice(String action) 103 { 104 this.choice = action; 105 } 106 107 public String getChoice() 108 { 109 return this.choice; 110 } 111 112 public String getDest() 113 { 114 return this.dest; 115 } 116 117 public void setDest(String dest) 118 { 119 this.dest = dest; 120 } 121 122 private void Reroute() 123 { 124 if(this.choice.equalsIgnoreCase("yes")) 125 { 126 this.dest = this.yesDestination; 127 } 128 else 129 { 130 this.dest = this.noDestination; 131 } 132 } 133 134 protected String doExecute() throws Exception 135 { 136 if(this.choice.length() > 0) 137 { 138 Reroute(); 139 return "reroute"; 140 } 141 142 return SUCCESS; 143 } 144 145 } 146 | Popular Tags |