Search in sources :

Example 11 with ReleaseStepsGOResponse

use of beans.response.ReleaseStepsGOResponse in project MSEC by Tencent.

the class ReleaseStepsGO method doStep2.

private ReleaseStepsGOResponse doStep2(ReleasePlan request) {
    ReleaseStepsGOResponse response = new ReleaseStepsGOResponse();
    //把计划保存到session里
    HttpSession session = getHttpRequest().getSession();
    ReleasePlan plan = (ReleasePlan) session.getAttribute("plan");
    //System.out.println("plan id in session:"+plan.getPlan_id());
    if (plan == null) {
        response.setMessage("can NOT find the session, it maybe timeout.");
        response.setStatus(100);
        return response;
    }
    if (request.getConfig_tag() == null || request.getConfig_tag().length() < 1) {
        response.setMessage("config tag is empty!");
        response.setStatus(100);
        return response;
    }
    plan.setConfig_tag(request.getConfig_tag());
    //check if saved
    //ReleasePlan plan2 = (ReleasePlan)session.getAttribute("plan");
    //System.out.println("config tag:"+plan2.getConfig_tag());
    response.setMessage("success");
    response.setStatus(0);
    return response;
}
Also used : HttpSession(javax.servlet.http.HttpSession) ReleaseStepsGOResponse(beans.response.ReleaseStepsGOResponse) ReleasePlan(beans.request.ReleasePlan)

Aggregations

ReleaseStepsGOResponse (beans.response.ReleaseStepsGOResponse)11 HttpSession (javax.servlet.http.HttpSession)7 ReleasePlan (beans.request.ReleasePlan)6 ArrayList (java.util.ArrayList)1 DBUtil (ngse.org.DBUtil)1