|
|
@ -19,7 +19,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.core.traccar.api.service.addons;
|
|
|
|
package org.wso2.carbon.device.mgt.core.traccar.api.service.addons;
|
|
|
|
|
|
|
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
|
|
|
import okhttp3.ConnectionPool;
|
|
|
|
import okhttp3.ConnectionPool;
|
|
|
|
import okhttp3.MediaType;
|
|
|
|
import okhttp3.MediaType;
|
|
|
|
import okhttp3.OkHttpClient;
|
|
|
|
import okhttp3.OkHttpClient;
|
|
|
@ -47,7 +46,6 @@ import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarDevice;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarGroups;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarGroups;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarPosition;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarPosition;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarUser;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.beans.TraccarUser;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.config.TraccarConfigurationException;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.config.TraccarGateway;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.config.TraccarGateway;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.util.TraccarUtil;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.common.util.TraccarUtil;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.core.config.TraccarConfigurationManager;
|
|
|
|
import org.wso2.carbon.device.mgt.core.traccar.core.config.TraccarConfigurationManager;
|
|
|
@ -99,12 +97,6 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
private String authorizeKey;
|
|
|
|
private String authorizeKey;
|
|
|
|
private String serverUri;
|
|
|
|
private String serverUri;
|
|
|
|
|
|
|
|
|
|
|
|
private OkHttpClientThreadPool(String publisherUrlWithContext, JSONObject payload, String method, String authorizeKey) {
|
|
|
|
|
|
|
|
this.publisherUrlWithContext = publisherUrlWithContext;
|
|
|
|
|
|
|
|
this.payload = payload;
|
|
|
|
|
|
|
|
this.method = method;
|
|
|
|
|
|
|
|
this.authorizeKey = authorizeKey;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private OkHttpClientThreadPool(String publisherUrlWithContext, JSONObject payload, String method,
|
|
|
|
private OkHttpClientThreadPool(String publisherUrlWithContext, JSONObject payload, String method,
|
|
|
|
String authorizeKey, String serverUri) {
|
|
|
|
String authorizeKey, String serverUri) {
|
|
|
|
this.publisherUrlWithContext = publisherUrlWithContext;
|
|
|
|
this.publisherUrlWithContext = publisherUrlWithContext;
|
|
|
@ -150,7 +142,6 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String res = result.get();
|
|
|
|
String res = result.get();
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -239,8 +230,6 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String result = res.get();
|
|
|
|
String result = res.get();
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -253,11 +242,11 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String result = res.get();
|
|
|
|
String result = res.get();
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setPermission(int userId, int deviceId) throws ExecutionException, InterruptedException, TrackerManagementDAOException {
|
|
|
|
public void setPermission(int userId, int deviceId)
|
|
|
|
|
|
|
|
throws ExecutionException, InterruptedException, TrackerManagementDAOException {
|
|
|
|
JSONObject payload = new JSONObject();
|
|
|
|
JSONObject payload = new JSONObject();
|
|
|
|
payload.put("userId", userId);
|
|
|
|
payload.put("userId", userId);
|
|
|
|
payload.put("deviceId", deviceId);
|
|
|
|
payload.put("deviceId", deviceId);
|
|
|
@ -269,31 +258,33 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String result = res.get();
|
|
|
|
String result = res.get();
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
if(result==""){
|
|
|
|
if(result==""){
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
trackerDAO.addTrackerUserDevicePermission(userId, deviceId);
|
|
|
|
trackerDAO.addTrackerUserDevicePermission(userId, deviceId);
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
log.error("Couldnt add the permission record: "+ result);
|
|
|
|
log.error("Couldn't add the permission record: "+ result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void removePermission(int userId, int deviceId, int removeType) throws ExecutionException, InterruptedException {
|
|
|
|
public void removePermission(int userId, int deviceId, int removeType)
|
|
|
|
|
|
|
|
throws TrackerManagementDAOException, ExecutionException, InterruptedException {
|
|
|
|
JSONObject payload = new JSONObject();
|
|
|
|
JSONObject payload = new JSONObject();
|
|
|
|
payload.put("userId", userId);
|
|
|
|
payload.put("userId", userId);
|
|
|
|
payload.put("deviceId", deviceId);
|
|
|
|
payload.put("deviceId", deviceId);
|
|
|
@ -305,40 +296,42 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String result = res.get();
|
|
|
|
String result = res.get();
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result!=null){
|
|
|
|
if(result!=null){
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
trackerDAO.removeTrackerUserDevicePermission(deviceId, userId, removeType);
|
|
|
|
trackerDAO.removeTrackerUserDevicePermission(deviceId, userId, removeType);
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
//throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
//throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<TrackerPermissionInfo> getUserIdofPermissionByUserIdNIdList(int userId, List<Integer> NotInDeviceIdList) throws TrackerManagementDAOException {
|
|
|
|
public List<TrackerPermissionInfo> getUserIdofPermissionByUserIdNIdList(int userId, List<Integer> NotInDeviceIdList)
|
|
|
|
|
|
|
|
throws TrackerManagementDAOException {
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
return trackerDAO.getUserIdofPermissionByUserIdNIdList(userId, NotInDeviceIdList);
|
|
|
|
return trackerDAO.getUserIdofPermissionByUserIdNIdList(userId, NotInDeviceIdList);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
@ -347,15 +340,16 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TrackerDeviceInfo getTrackerDevice(int deviceId, int tenantId) throws TrackerManagementDAOException {
|
|
|
|
public TrackerDeviceInfo getTrackerDevice(int deviceId, int tenantId) throws TrackerManagementDAOException {
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
return trackerDAO.getTrackerDevice(deviceId, tenantId);
|
|
|
|
return trackerDAO.getTrackerDevice(deviceId, tenantId);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg="Could not add new device location";
|
|
|
|
msg="Could not add new device location";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally{
|
|
|
|
} finally{
|
|
|
@ -363,17 +357,19 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public boolean getUserIdofPermissionByDeviceIdNUserId(int deviceId, int userId) throws TrackerManagementDAOException {
|
|
|
|
public boolean getUserIdofPermissionByDeviceIdNUserId(int deviceId, int userId)
|
|
|
|
|
|
|
|
throws TrackerManagementDAOException {
|
|
|
|
Boolean result = false;
|
|
|
|
Boolean result = false;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
result = trackerDAO.getUserIdofPermissionByDeviceIdNUserId(deviceId, userId);
|
|
|
|
result = trackerDAO.getUserIdofPermissionByDeviceIdNUserId(deviceId, userId);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
@ -386,25 +382,26 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* @param traccarDevice with DeviceName UniqueId, Status, Disabled LastUpdate, PositionId, GroupId
|
|
|
|
* @param traccarDevice with DeviceName UniqueId, Status, Disabled LastUpdate, PositionId, GroupId
|
|
|
|
* Model, Contact, Category, fenceIds
|
|
|
|
* Model, Contact, Category, fenceIds
|
|
|
|
* @throws TraccarConfigurationException Failed while add Traccar Device the operation
|
|
|
|
* @throws TrackerManagementDAOException Failed while add Traccar Device the operation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void addDevice(TraccarDevice traccarDevice, int tenantId) throws
|
|
|
|
public void addDevice(TraccarDevice traccarDevice, int tenantId) throws
|
|
|
|
TrackerAlreadyExistException, ExecutionException, InterruptedException, TrackerManagementDAOException {
|
|
|
|
TrackerManagementDAOException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(traccarDevice.getId(), tenantId);
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(traccarDevice.getId(), tenantId);
|
|
|
|
if(trackerDeviceInfo!=null){
|
|
|
|
if(trackerDeviceInfo!=null){
|
|
|
|
String msg = "The device already exist";
|
|
|
|
msg = "The device already exist";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg);
|
|
|
|
//throw new TrackerAlreadyExistException(msg);
|
|
|
|
throw new TrackerAlreadyExistException(msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
@ -421,7 +418,6 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
String result = res.get();
|
|
|
|
String result = res.get();
|
|
|
|
log.info("---------result--------");
|
|
|
|
|
|
|
|
if(result.charAt(0)=='{'){
|
|
|
|
if(result.charAt(0)=='{'){
|
|
|
|
JSONObject obj = new JSONObject(result);
|
|
|
|
JSONObject obj = new JSONObject(result);
|
|
|
|
if (obj.has("id")){
|
|
|
|
if (obj.has("id")){
|
|
|
@ -438,12 +434,12 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
@ -455,24 +451,25 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add Device GPS Location operation.
|
|
|
|
* Add Device GPS Location operation.
|
|
|
|
* @param deviceInfo with DeviceIdentifier, Timestamp, Lat, Lon, Bearing, Speed, ignition
|
|
|
|
* @param deviceInfo with DeviceIdentifier, Timestamp, Lat, Lon, Bearing, Speed, ignition
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void updateLocation(TraccarDevice device, TraccarPosition deviceInfo, int tenantId) throws TrackerManagementDAOException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
public void updateLocation(TraccarDevice device, TraccarPosition deviceInfo, int tenantId) throws
|
|
|
|
|
|
|
|
TrackerManagementDAOException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(device.getId(), tenantId);
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(device.getId(), tenantId);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection .";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg="Could not add new device location";
|
|
|
|
msg = "Could not add new device location";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally{
|
|
|
|
} finally{
|
|
|
@ -495,28 +492,25 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
"http://localhost:"));
|
|
|
|
"http://localhost:"));
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Dis-enroll a Device operation.
|
|
|
|
* Dis-enroll a Device operation.
|
|
|
|
* @param deviceId identified via deviceIdentifier
|
|
|
|
* @param deviceId identified via deviceIdentifier
|
|
|
|
* @throws TraccarConfigurationException Failed while dis-enroll a Traccar Device operation
|
|
|
|
* @throws TrackerManagementDAOException Failed while dis-enroll a Traccar Device operation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void disEnrollDevice(int deviceId, int tenantId) throws TraccarConfigurationException {
|
|
|
|
public void disEnrollDevice(int deviceId, int tenantId) throws TrackerManagementDAOException, ExecutionException, InterruptedException {
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
TrackerDeviceInfo trackerDeviceInfo = null;
|
|
|
|
List<TrackerPermissionInfo> trackerPermissionInfo = null;
|
|
|
|
List<TrackerPermissionInfo> trackerPermissionInfo = null;
|
|
|
|
//JSONObject trackerDevice = null;
|
|
|
|
String msg = "";
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(deviceId, tenantId);
|
|
|
|
trackerDeviceInfo = trackerDAO.getTrackerDevice(deviceId, tenantId);
|
|
|
|
|
|
|
|
|
|
|
|
log.info("------deviceId-----" + deviceId);
|
|
|
|
log.info("deviceId - " + deviceId);
|
|
|
|
log.info(trackerDeviceInfo);
|
|
|
|
|
|
|
|
if(trackerDeviceInfo!=null){
|
|
|
|
if(trackerDeviceInfo!=null){
|
|
|
|
//trackerDevice = new JSONObject(trackerDeviceInfo);
|
|
|
|
|
|
|
|
int status = trackerDAO.removeTrackerDevice(deviceId, tenantId);
|
|
|
|
int status = trackerDAO.removeTrackerDevice(deviceId, tenantId);
|
|
|
|
log.info("Status" + status);
|
|
|
|
log.info("Status" + status);
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
@ -525,14 +519,14 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection";
|
|
|
|
msg = "Error occurred establishing the DB connection";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with deviceId";
|
|
|
|
msg = "Error occurred while mapping with deviceId";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -546,7 +540,6 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//remove permissions
|
|
|
|
//remove permissions
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -556,10 +549,7 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
TraccarHandlerConstants.Types.REMOVE_TYPE_MULTIPLE);
|
|
|
|
TraccarHandlerConstants.Types.REMOVE_TYPE_MULTIPLE);
|
|
|
|
} catch (ExecutionException e) {
|
|
|
|
} catch (ExecutionException e) {
|
|
|
|
log.error("ExecutionException : " + e);
|
|
|
|
log.error("ExecutionException : " + e);
|
|
|
|
//throw new RuntimeException(e);
|
|
|
|
throw new ExecutionException(e);
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
|
|
|
log.error("InterruptedException : " + e);
|
|
|
|
|
|
|
|
//throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -567,27 +557,28 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* @param groupInfo with groupName
|
|
|
|
* @param groupInfo with groupName
|
|
|
|
* @throws TraccarConfigurationException Failed while add Traccar Device the operation
|
|
|
|
* @throws TrackerManagementDAOException Failed while add Traccar Device the operation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void addGroup(TraccarGroups groupInfo, int groupId, int tenantId) throws
|
|
|
|
public void addGroup(TraccarGroups groupInfo, int groupId, int tenantId) throws
|
|
|
|
TraccarConfigurationException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerManagementDAOException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerGroupInfo trackerGroupInfo = null;
|
|
|
|
TrackerGroupInfo trackerGroupInfo = null;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
trackerGroupInfo = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
|
trackerGroupInfo = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
|
if (trackerGroupInfo!=null){
|
|
|
|
if (trackerGroupInfo!=null){
|
|
|
|
String msg = "The group already exit";
|
|
|
|
msg = "The group already exit";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg);
|
|
|
|
throw new TrackerAlreadyExistException(msg);
|
|
|
|
throw new TrackerAlreadyExistException(msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while mapping with groupId.";
|
|
|
|
msg = "Error occurred while mapping with groupId.";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection.";
|
|
|
|
msg = "Error occurred establishing the DB connection.";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -617,15 +608,15 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
trackerDAO.updateTrackerGroupIdANDStatus(trackerGroupInfo.getTraccarGroupId(), groupId, tenantId, 1);
|
|
|
|
trackerDAO.updateTrackerGroupIdANDStatus(trackerGroupInfo.getTraccarGroupId(), groupId, tenantId, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while mapping with deviceId .";
|
|
|
|
msg = "Error occurred while mapping with deviceId. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -635,25 +626,25 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
log.error("Something went wrong_2: " + result);
|
|
|
|
log.error("Something went wrong_2: " + result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* update Traccar Group operation.
|
|
|
|
* update Traccar Group operation.
|
|
|
|
* @param groupInfo with groupName
|
|
|
|
* @param groupInfo with groupName
|
|
|
|
* @throws TraccarConfigurationException Failed while add Traccar Device the operation
|
|
|
|
* @throws TrackerManagementDAOException Failed while add Traccar Device the operation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void updateGroup(TraccarGroups groupInfo, int groupId, int tenantId) throws
|
|
|
|
public void updateGroup(TraccarGroups groupInfo, int groupId, int tenantId) throws
|
|
|
|
TraccarConfigurationException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerManagementDAOException, TrackerAlreadyExistException, ExecutionException, InterruptedException {
|
|
|
|
TrackerGroupInfo res = null;
|
|
|
|
TrackerGroupInfo res = null;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
TrackerManagementDAOFactory.openConnection();
|
|
|
|
res = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
|
res = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
String msg="Could not find traccar group details";
|
|
|
|
msg="Could not find traccar group details. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
} finally{
|
|
|
|
} finally{
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
@ -670,14 +661,14 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
TrackerManagementDAOFactory.commitTransaction();
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg="Could not update the traccar group";
|
|
|
|
msg="Could not update the traccar group. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection .";
|
|
|
|
msg = "Error occurred establishing the DB connection. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new TraccarConfigurationException(msg, e);
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally{
|
|
|
|
} finally{
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -694,18 +685,18 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, payload, method,
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, payload, method,
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* Add Traccar Device operation.
|
|
|
|
* @param groupId
|
|
|
|
* @param groupId
|
|
|
|
* @throws TraccarConfigurationException Failed while add Traccar Device the operation
|
|
|
|
* @throws TrackerManagementDAOException Failed while add Traccar Device the operation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void deleteGroup(int groupId, int tenantId) throws TraccarConfigurationException, ExecutionException, InterruptedException {
|
|
|
|
public void deleteGroup(int groupId, int tenantId) throws TrackerManagementDAOException, ExecutionException, InterruptedException {
|
|
|
|
TrackerGroupInfo res = null;
|
|
|
|
TrackerGroupInfo res = null;
|
|
|
|
JSONObject obj = null;
|
|
|
|
JSONObject obj = null;
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
TrackerManagementDAOFactory.beginTransaction();
|
|
|
|
res = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
|
res = trackerDAO.getTrackerGroup(groupId, tenantId);
|
|
|
@ -721,17 +712,18 @@ public class TraccarClientImpl implements TraccarClient {
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
executor.submit(new OkHttpClientThreadPool(url, null, method,
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
serverUrl(HttpReportingUtil.trackerServer())));
|
|
|
|
//executor.shutdown();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred establishing the DB connection";
|
|
|
|
msg = "Error occurred establishing the DB connection. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
} catch (TrackerManagementDAOException e) {
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
TrackerManagementDAOFactory.rollbackTransaction();
|
|
|
|
String msg = "Error occurred while mapping with groupId";
|
|
|
|
msg = "Error occurred while mapping with groupId. ";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
|
|
|
|
throw new TrackerManagementDAOException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
TrackerManagementDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|