package org.jboss.deployment.spi.status;
import javax.enterprise.deploy.shared.ActionType;
import javax.enterprise.deploy.shared.CommandType;
import javax.enterprise.deploy.shared.StateType;
import javax.enterprise.deploy.spi.status.DeploymentStatus;
public class DeploymentStatusImpl implements DeploymentStatus
{
private StateType stateType;
private CommandType commandType;
private ActionType actionType;
private String message;
public DeploymentStatusImpl(StateType stateType, CommandType commandType, ActionType actionType, String message)
{
this.stateType = stateType;
this.commandType = commandType;
this.actionType = actionType;
this.message = message;
}
void setStateType(StateType stateType)
{
this.stateType = stateType;
}
void setMessage(String message)
{
this.message = message;
}
public StateType getState()
{
return stateType;
}
public CommandType getCommand()
{
return commandType;
}
public ActionType getAction()
{
return actionType;
}
public String getMessage()
{
return message;
}
public boolean isCompleted()
{
return stateType == StateType.COMPLETED;
}
public boolean isFailed()
{
return stateType == StateType.FAILED;
}
public boolean isRunning()
{
return stateType == StateType.RUNNING;
}
}