예제 #1
0
  @RequestMapping("/delete/{crisiscode}/{attributecode}")
  public Response getCrisisByID(
      @PathParam("crisiscode") String crisiscode,
      @PathParam("attributecode") String attributecode) {

    String shortName = crisiscode + "_" + attributecode;
    clientAppService.updateClientAppByShortName(shortName, StatusCodeType.CLIENT_APP_INACTIVE);

    return Response.status(CodeLookUp.APP_SERVICE_COMPLETED)
        .entity(StatusCodeType.POST_COMPLETED)
        .build();
  }
예제 #2
0
  @RequestMapping("/delete/crisis/{crisisID}")
  public Response disableClientApps(@PathParam("crisisID") Long crisisID) {

    try {
      clientAppService.deactivateClientAppByCrisis(crisisID);
    } catch (Exception e) {
      logger.error("disableClientApps exception for crisisID: " + crisisID);
    }

    return Response.status(CodeLookUp.APP_SERVICE_COMPLETED)
        .entity(StatusCodeType.POST_COMPLETED)
        .build();
  }
예제 #3
0
  @RequestMapping("/delete/attribute/{crisisID}/{attributeID}")
  public Response disableClientApp(
      @PathParam("crisisID") Long crisisID, @PathParam("attributeID") Long attributeID) {

    try {
      clientAppService.deactivateClientAppByAttribute(crisisID, attributeID);
    } catch (Exception e) {
      logger.error(
          "disableClientApps exception in deleting for crisisId:"
              + crisisID
              + ", attributeID: "
              + attributeID);
    }

    return Response.status(CodeLookUp.APP_SERVICE_COMPLETED)
        .entity(StatusCodeType.POST_COMPLETED)
        .build();
  }
예제 #4
0
 @RequestMapping("/activate/mobile/crisis/{crisisID}")
 public Response enableMobileClientAppByCrisisID(@PathParam("crisisID") Long crisisID) {
   Integer status = StatusCodeType.AIDR_MICROMAPPER_BOTH;
   String returnValue = clientAppService.enableForClientAppStatusByCrisisID(crisisID, status);
   return Response.status(CodeLookUp.APP_SERVICE_COMPLETED).entity(returnValue).build();
 }
예제 #5
0
 @RequestMapping("/get/crisis/{crisisID}")
 public List<ClientApp> getClientAppsByCrisisID(@PathParam("crisisID") Long crisisID) {
   return clientAppService.getAllClientAppByCrisisID(crisisID);
 }
예제 #6
0
 @RequestMapping("/allactive")
 public List<ClientAppModel> getAllActive() {
   return clientAppService.getAllActiveClientApps();
 }