Пример #1
0
 private State getState(String requirementId) {
   Requirement requirement = requirementManageService.get(requirementId);
   if (null == requirement) {
     throw new IllegalArgumentException(String.format("Requirement[%s] not found", requirementId));
   }
   State targetState = stateMapping.get(requirement.getStatus());
   if (null == targetState) {
     throw new IllegalArgumentException(
         String.format(
             "Requirement[%s] status[%s] not support", requirementId, requirement.getStatus()));
   }
   return targetState;
 }
Пример #2
0
 @Override
 public void disable(String requirementId) {
   requirementManageService.compareAndSetStatus(
       requirementId, this.status(requirementId), IntegrateStatus.DISABLED.status());
 }
Пример #3
0
 @Override
 public void action(String requirementId) {
   requirementManageService.compareAndSetStatus(
       requirementId, this.status(requirementId), IntegrateStatus.COMMITED.status());
 }