Skip to content
Snippets Groups Projects
Commit 9c620ba9 authored by Irfan Ariq's avatar Irfan Ariq
Browse files

add method get location by id

parent 408789bb
1 merge request!43KIA -13515016 - Kevin Erdiza Yogatama
This commit is part of merge request !43. Comments created here will be created in the context of that merge request.
...@@ -22,6 +22,9 @@ public interface LocationService { ...@@ -22,6 +22,9 @@ public interface LocationService {
@WebMethod @WebMethod
public Location[] getAllLocation(String token); public Location[] getAllLocation(String token);
@WebMethod
public Location[] getAllLocation(Integer id);
@WebMethod @WebMethod
public Boolean editLocation(String token, Location pastLocation, Location newLocation); public Boolean editLocation(String token, Location pastLocation, Location newLocation);
......
...@@ -66,6 +66,15 @@ public class LocationServiceImpl implements LocationService { ...@@ -66,6 +66,15 @@ public class LocationServiceImpl implements LocationService {
return new Location[0]; return new Location[0];
} }
@Override
public Location[] getAllLocation(Integer id) {
if(id){
ArrayList<Location> locations = locationDAO.getAllLocation(user.getId());
return locations.toArray(new Location[locations.size()]);
}
return new Location[0];
}
@Override @Override
public Boolean editLocation(String token, Location pastLocation, Location newLocation) { public Boolean editLocation(String token, Location pastLocation, Location newLocation) {
if(getIdentityService().isTokenValid(token)) { if(getIdentityService().isTokenValid(token)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment