use of beans.request.ReleasePlan in project MSEC by Tencent.
the class ReleaseOnlyConfig method doRelease.
private ReleaseStepsGOResponse doRelease(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());
plan.setMemo(request.getMemo());
//check if saved
ReleasePlan plan2 = (ReleasePlan) session.getAttribute("plan");
//System.out.println("config tag:"+plan2.getConfig_tag());
// Commit Plan
String commitResult = CommitPlan(plan2);
if (commitResult == null || !commitResult.equals("success")) {
response.setMessage("commit failed:" + (commitResult == null ? "" : commitResult));
response.setStatus(100);
return response;
}
response.setPlanDetail(plan2);
response.setMessage("success");
response.setStatus(0);
return response;
}
use of beans.request.ReleasePlan in project MSEC by Tencent.
the class ReleaseOnlyLibrary method doRelease.
private ReleaseStepsGOResponse doRelease(ReleasePlan request) {
ReleaseStepsGOResponse response = new ReleaseStepsGOResponse();
//把计划保存到session里
HttpSession session = getHttpRequest().getSession();
ReleasePlan plan = (ReleasePlan) session.getAttribute("plan");
if (plan == null) {
response.setMessage("can NOT find the session, it maybe timeout.");
response.setStatus(100);
return response;
}
//System.out.println("plan id in session:"+plan.getPlan_id());
plan.setMemo(request.getMemo());
// Commit Plan
String commitResult = CommitPlan(plan);
if (commitResult == null || !commitResult.equals("success")) {
response.setMessage("commit failed:" + (commitResult == null ? "" : commitResult));
response.setStatus(100);
return response;
}
response.setPlanDetail(plan);
response.setMessage("success");
response.setStatus(0);
return response;
}
use of beans.request.ReleasePlan 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;
}
Aggregations