Add licence to Traccar spi

traccar-v5.0.15-sync
shamalka 2 years ago
parent c18c295a32
commit bfd9197c4f

@ -1,3 +1,21 @@
/*
* Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* you may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.common.spi;
import org.wso2.carbon.device.mgt.common.Device;

@ -270,14 +270,14 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
applicationDAO.removeApplications(new ArrayList<>(appsToRemove.values()), device.getId(),
device.getEnrolmentInfo().getId(), tenantId);
}
// if (!appsToUpdate.isEmpty()) {
// applicationDAO.updateApplications(new ArrayList<>(appsToUpdate.values()), device.getId(),
// device.getEnrolmentInfo().getId(), tenantId);
// }
// if (!appsToInsert.isEmpty()) {
// applicationDAO.addApplications(new ArrayList<>(appsToInsert.values()), device.getId(),
// device.getEnrolmentInfo().getId(), tenantId);
// }
if (!appsToUpdate.isEmpty()) {
applicationDAO.updateApplications(new ArrayList<>(appsToUpdate.values()), device.getId(),
device.getEnrolmentInfo().getId(), tenantId);
}
if (!appsToInsert.isEmpty()) {
applicationDAO.addApplications(new ArrayList<>(appsToInsert.values()), device.getId(),
device.getEnrolmentInfo().getId(), tenantId);
}
DeviceManagementDAOFactory.commitTransaction();
String reportingHost = HttpReportingUtil.getReportingHost();

@ -370,7 +370,6 @@ public class DeviceManagementDataHolder {
TraccarManagementService.class, null);
if (traccarManagementService == null) {
String msg = "Traccar management service not initialized.";
// log.error(msg);
throw new IllegalStateException(msg);
}
return traccarManagementService;

@ -787,6 +787,7 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- END OF DYNAMIC TASK TABLE--
-- DM_TRACCAR_UNSYNCED_DEVICES TABLE --
CREATE TABLE IF NOT EXISTS DM_TRACCAR_UNSYNCED_DEVICES (
ID INT NOT NULL AUTO_INCREMENT,
@ -800,14 +801,6 @@ CREATE TABLE IF NOT EXISTS DM_TRACCAR_UNSYNCED_DEVICES (
);
-- END OF DM_TRACCAR_UNSYNCED_DEVICES TABLE --
-- DM_TRACCAR_USER_MAPPING TABLE --
CREATE TABLE IF NOT EXISTS DM_TRACCAR_USER_MAPPING (
USER_EMAIL VARCHAR(100) NOT NULL UNIQUE,
USER_ID INT NOT NULL,
PRIMARY KEY (USER_EMAIL,USER_ID)
);
-- END OF DM_TRACCAR_USER_MAPPING TABLE --
-- DM_TRACCAR_USER_MAPPING TABLE --
CREATE TABLE IF NOT EXISTS DM_TRACCAR_DEVICE_MAPPING (
DEVICE_UNIQUE_ID VARCHAR(100) NOT NULL,

Loading…
Cancel
Save