1 19 20 package org.netbeans.modules.j2ee.sun.ide.j2ee; 21 22 import javax.enterprise.deploy.shared.ActionType ; 23 import javax.enterprise.deploy.shared.CommandType ; 24 import javax.enterprise.deploy.shared.StateType ; 25 import javax.enterprise.deploy.spi.status.DeploymentStatus ; 26 27 31 35 public class Status implements DeploymentStatus { 36 37 38 private ActionType at; 39 40 41 private CommandType ct; 42 43 44 private String msg; 45 46 47 private StateType state; 48 49 public Status (ActionType at, CommandType ct, String msg, StateType state) { 50 this.at = at; 51 this.ct = ct; 52 this.msg = msg; 53 this.state = state; 54 } 55 56 public ActionType getAction () { 57 return at; 58 } 59 60 public CommandType getCommand () { 61 return ct; 62 } 63 64 public String getMessage () { 65 return msg; 66 } 67 68 public StateType getState () { 69 return state; 70 } 71 72 public boolean isCompleted () { 73 return StateType.COMPLETED.equals (state); 74 } 75 76 public boolean isFailed () { 77 return StateType.FAILED.equals (state); 78 } 79 80 public boolean isRunning () { 81 return StateType.RUNNING.equals (state); 82 } 83 84 public String toString () { 85 return "A="+getAction ()+" S="+getState ()+" "+getMessage (); } 87 } 88 89 | Popular Tags |