package sale;
import users.User;
public class GateChangeTransition extends Object implements Transition {
protected Gate m_gTarget;
public GateChangeTransition (Gate gTarget) {
super();
m_gTarget = gTarget;
}
public final Gate perform (SaleProcess p, User u) {
return m_gTarget;
}
public static final Transition CHANGE_TO_ROLLBACK_GATE = new Transition() {
public Gate perform (SaleProcess p, User u) {
return p.getRollbackGate();
}
};
public static final Transition CHANGE_TO_COMMIT_GATE = new Transition() {
public Gate perform (SaleProcess p, User u) {
return p.getCommitGate();
}
};
public static final Transition CHANGE_TO_QUIT_GATE = new Transition() {
public Gate perform (SaleProcess p, User u) {
return p.getQuitGate();
}
};
public static final Transition CHANGE_TO_STOP_GATE = new Transition() {
public Gate perform (SaleProcess p, User u) {
return p.getStopGate();
}
};
public static final Transition CHANGE_TO_LOG_GATE = new Transition() {
public Gate perform (SaleProcess p, User u) {
return p.getLogGate();
}
};
}