|
|
@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.core.config.license.LicenseConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.core.config.license.LicenseConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
|
|
|
|
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
|
|
|
|
import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
|
|
|
|
import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
|
|
|
|
|
|
|
|
import org.wso2.carbon.email.sender.core.service.EmailSenderService;
|
|
|
|
import org.wso2.carbon.ntask.core.service.TaskService;
|
|
|
|
import org.wso2.carbon.ntask.core.service.TaskService;
|
|
|
|
import org.wso2.carbon.registry.core.service.RegistryService;
|
|
|
|
import org.wso2.carbon.registry.core.service.RegistryService;
|
|
|
|
import org.wso2.carbon.user.core.service.RealmService;
|
|
|
|
import org.wso2.carbon.user.core.service.RealmService;
|
|
|
@ -36,6 +37,7 @@ import java.util.HashMap;
|
|
|
|
|
|
|
|
|
|
|
|
public class DeviceManagementDataHolder {
|
|
|
|
public class DeviceManagementDataHolder {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static DeviceManagementDataHolder thisInstance = new DeviceManagementDataHolder();
|
|
|
|
private RealmService realmService;
|
|
|
|
private RealmService realmService;
|
|
|
|
private TenantManager tenantManager;
|
|
|
|
private TenantManager tenantManager;
|
|
|
|
private DeviceManagementProviderService deviceManagerProvider;
|
|
|
|
private DeviceManagementProviderService deviceManagerProvider;
|
|
|
@ -49,12 +51,8 @@ public class DeviceManagementDataHolder {
|
|
|
|
private HashMap<String,Boolean> requireDeviceAuthorization = new HashMap<>();
|
|
|
|
private HashMap<String,Boolean> requireDeviceAuthorization = new HashMap<>();
|
|
|
|
private DeviceAccessAuthorizationService deviceAccessAuthorizationService;
|
|
|
|
private DeviceAccessAuthorizationService deviceAccessAuthorizationService;
|
|
|
|
private GroupManagementProviderService groupManagementProviderService;
|
|
|
|
private GroupManagementProviderService groupManagementProviderService;
|
|
|
|
|
|
|
|
|
|
|
|
private TaskService taskService;
|
|
|
|
private TaskService taskService;
|
|
|
|
//private EmailSenderService emailSenderService;
|
|
|
|
private EmailSenderService emailSenderService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static DeviceManagementDataHolder thisInstance = new DeviceManagementDataHolder();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private DeviceManagementDataHolder() {}
|
|
|
|
private DeviceManagementDataHolder() {}
|
|
|
|
|
|
|
|
|
|
|
@ -74,6 +72,10 @@ public class DeviceManagementDataHolder {
|
|
|
|
this.setTenantManager(realmService);
|
|
|
|
this.setTenantManager(realmService);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public TenantManager getTenantManager() {
|
|
|
|
|
|
|
|
return tenantManager;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void setTenantManager(RealmService realmService) {
|
|
|
|
private void setTenantManager(RealmService realmService) {
|
|
|
|
if (realmService == null) {
|
|
|
|
if (realmService == null) {
|
|
|
|
throw new IllegalStateException("Realm service is not initialized properly");
|
|
|
|
throw new IllegalStateException("Realm service is not initialized properly");
|
|
|
@ -81,10 +83,6 @@ public class DeviceManagementDataHolder {
|
|
|
|
this.tenantManager = realmService.getTenantManager();
|
|
|
|
this.tenantManager = realmService.getTenantManager();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TenantManager getTenantManager() {
|
|
|
|
|
|
|
|
return tenantManager;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DeviceManagementProviderService getDeviceManagementProvider() {
|
|
|
|
public DeviceManagementProviderService getDeviceManagementProvider() {
|
|
|
|
return deviceManagerProvider;
|
|
|
|
return deviceManagerProvider;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -189,13 +187,13 @@ public class DeviceManagementDataHolder {
|
|
|
|
public void setTaskService(TaskService taskService) {
|
|
|
|
public void setTaskService(TaskService taskService) {
|
|
|
|
this.taskService = taskService;
|
|
|
|
this.taskService = taskService;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//
|
|
|
|
|
|
|
|
// public EmailSenderService getEmailSenderService() {
|
|
|
|
public EmailSenderService getEmailSenderService() {
|
|
|
|
// return emailSenderService;
|
|
|
|
return emailSenderService;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//
|
|
|
|
|
|
|
|
// public void setEmailSenderService(EmailSenderService emailSenderService) {
|
|
|
|
public void setEmailSenderService(EmailSenderService emailSenderService) {
|
|
|
|
// this.emailSenderService = emailSenderService;
|
|
|
|
this.emailSenderService = emailSenderService;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|