Loading src/main/java/org/etsi/osl/tmf/gsm674/api/GeographicSiteManagementApiController.java +2 −2 Original line number Diff line number Diff line Loading @@ -65,14 +65,14 @@ public class GeographicSiteManagementApiController implements GeographicSiteMana Individual ind = individualRepoService.findByUsername(principal.getName()); GeographicSite gs= geographicSiteManagementService.findGeographicSiteByRelatedPartyId(ind.getId()); return new ResponseEntity<>(gs,HttpStatus.OK); return new ResponseEntity<GeographicSite>(gs,HttpStatus.OK); } else if ( authentication.getAuthorities().contains( new SimpleGrantedAuthority( UserRoleType.ROLE_ADMIN.getValue() ) ) ){ return new ResponseEntity<GeographicSite>(geographicSiteManagementService.findGeographicSiteByUUID(id), HttpStatus.OK); }else { return new ResponseEntity< GeographicSite >(HttpStatus.FORBIDDEN ); } return new ResponseEntity<>(geographicSiteManagementService.findGeographicSiteByUUID(id), HttpStatus.OK); } catch (Exception e) { log.error(COULD_NOT_SERIALIZE, e); Loading src/main/java/org/etsi/osl/tmf/gsm674/reposervices/GeographicSiteManagementService.java +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,11 @@ public class GeographicSiteManagementService { public GeographicSite findGeographicSiteByRelatedPartyId(String uuid){ Optional<GeographicSite> gs=geographicSiteManagementRepository.findByRelatedPartyId(uuid); try { log.info("Found geographic site from related party:{} , geographic site info: {}", uuid, gs.orElse(null).toString()); }catch(Exception e){ log.error("Error during fetch of geographic site info: {}", e.getMessage()); } return gs.orElse(null); } Loading Loading
src/main/java/org/etsi/osl/tmf/gsm674/api/GeographicSiteManagementApiController.java +2 −2 Original line number Diff line number Diff line Loading @@ -65,14 +65,14 @@ public class GeographicSiteManagementApiController implements GeographicSiteMana Individual ind = individualRepoService.findByUsername(principal.getName()); GeographicSite gs= geographicSiteManagementService.findGeographicSiteByRelatedPartyId(ind.getId()); return new ResponseEntity<>(gs,HttpStatus.OK); return new ResponseEntity<GeographicSite>(gs,HttpStatus.OK); } else if ( authentication.getAuthorities().contains( new SimpleGrantedAuthority( UserRoleType.ROLE_ADMIN.getValue() ) ) ){ return new ResponseEntity<GeographicSite>(geographicSiteManagementService.findGeographicSiteByUUID(id), HttpStatus.OK); }else { return new ResponseEntity< GeographicSite >(HttpStatus.FORBIDDEN ); } return new ResponseEntity<>(geographicSiteManagementService.findGeographicSiteByUUID(id), HttpStatus.OK); } catch (Exception e) { log.error(COULD_NOT_SERIALIZE, e); Loading
src/main/java/org/etsi/osl/tmf/gsm674/reposervices/GeographicSiteManagementService.java +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,11 @@ public class GeographicSiteManagementService { public GeographicSite findGeographicSiteByRelatedPartyId(String uuid){ Optional<GeographicSite> gs=geographicSiteManagementRepository.findByRelatedPartyId(uuid); try { log.info("Found geographic site from related party:{} , geographic site info: {}", uuid, gs.orElse(null).toString()); }catch(Exception e){ log.error("Error during fetch of geographic site info: {}", e.getMessage()); } return gs.orElse(null); } Loading