1 22 package org.jboss.deployment.spi.status; 23 24 import javax.enterprise.deploy.shared.ActionType ; 25 import javax.enterprise.deploy.shared.CommandType ; 26 import javax.enterprise.deploy.shared.StateType ; 27 import javax.enterprise.deploy.spi.status.DeploymentStatus ; 28 29 35 public class DeploymentStatusImpl implements DeploymentStatus 36 { 37 38 private StateType stateType; 39 private CommandType commandType; 40 private ActionType actionType; 41 private String message; 42 43 public DeploymentStatusImpl(StateType stateType, CommandType commandType, ActionType actionType, String message) 44 { 45 this.stateType = stateType; 46 this.commandType = commandType; 47 this.actionType = actionType; 48 this.message = message; 49 } 50 51 54 void setStateType(StateType stateType) 55 { 56 this.stateType = stateType; 57 } 58 59 62 void setMessage(String message) 63 { 64 this.message = message; 65 } 66 67 72 public StateType getState() 73 { 74 return stateType; 75 } 76 77 82 public CommandType getCommand() 83 { 84 return commandType; 85 } 86 87 92 public ActionType getAction() 93 { 94 return actionType; 95 } 96 97 102 public String getMessage() 103 { 104 return message; 105 } 106 107 112 public boolean isCompleted() 113 { 114 return stateType == StateType.COMPLETED; 115 } 116 117 122 public boolean isFailed() 123 { 124 return stateType == StateType.FAILED; 125 } 126 127 132 public boolean isRunning() 133 { 134 return stateType == StateType.RUNNING; 135 } 136 } 137 | Popular Tags |