1 4 package org.oddjob.webapp.struts.forms; 5 6 import java.io.Serializable ; 7 import java.util.Collection ; 8 import java.util.Map ; 9 10 import org.apache.struts.action.ActionForm; 11 12 16 public class JobActionsForm extends ActionForm implements Serializable { 17 private final static long serialVersionUID = 20051104; 18 19 20 private String refId; 21 22 private transient String performCommand; 23 24 private transient Map commandMap; 25 26 31 public void setRefId(String refId) { 32 this.refId = refId; 33 } 34 35 40 public String getRefId() { 41 return refId; 42 } 43 44 50 public void setCommandMap(Map commandMap) { 51 this.commandMap = commandMap; 52 } 53 54 public Collection getCommands() { 55 return commandMap.keySet(); 56 } 57 58 public boolean isEnabled(String command) { 59 Boolean enabled = (Boolean ) commandMap.get(command); 60 return enabled.booleanValue(); 61 } 62 63 public String getPerformCommand() { 64 return performCommand; 65 } 66 67 public void setPerformCommand(String command) { 68 this.performCommand = command; 69 } 70 } | Popular Tags |