Refractor Email service and change user server feature name

components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
4.x.x
manoj 10 years ago
parent 63b6a5b206
commit c918622cc6

@ -24,6 +24,8 @@ import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService;
import org.wso2.carbon.core.ServerStartupObserver; import org.wso2.carbon.core.ServerStartupObserver;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException;
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManager; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManager;
@ -37,8 +39,6 @@ import org.wso2.carbon.device.mgt.core.api.mgt.APIPublisherService;
import org.wso2.carbon.device.mgt.core.api.mgt.APIPublisherServiceImpl; import org.wso2.carbon.device.mgt.core.api.mgt.APIPublisherServiceImpl;
import org.wso2.carbon.device.mgt.core.api.mgt.APIRegistrationStartupObserver; import org.wso2.carbon.device.mgt.core.api.mgt.APIRegistrationStartupObserver;
import org.wso2.carbon.device.mgt.core.app.mgt.AppManagementServiceImpl; import org.wso2.carbon.device.mgt.core.app.mgt.AppManagementServiceImpl;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.core.app.mgt.RemoteAppManagerConnector; import org.wso2.carbon.device.mgt.core.app.mgt.RemoteAppManagerConnector;
import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig; import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfig;
import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfigurationManager; import org.wso2.carbon.device.mgt.core.app.mgt.config.AppManagementConfigurationManager;
@ -55,9 +55,11 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementService;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementServiceImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementServiceImpl;
import org.wso2.carbon.device.mgt.core.util.DeviceManagementSchemaInitializer; import org.wso2.carbon.device.mgt.core.util.DeviceManagementSchemaInitializer;
import org.wso2.carbon.device.mgt.user.core.UserManager; import org.wso2.carbon.device.mgt.user.core.UserManager;
import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.device.mgt.user.core.service.UserManagementService;
import org.wso2.carbon.ndatasource.core.DataSourceService; import org.wso2.carbon.ndatasource.core.DataSourceService;
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 java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -93,9 +95,9 @@ import java.util.List;
* policy="dynamic" * policy="dynamic"
* bind="setDataSourceService" * bind="setDataSourceService"
* unbind="unsetDataSourceService" * unbind="unsetDataSourceService"
* @scr.reference name="org.wso2.carbon.device.mgt.usermanager.service" * @scr.reference name="org.wso2.carbon.device.mgt.user.core.usermanager"
* interface="org.wso2.carbon.device.mgt.user.core.UserManager" * interface="org.wso2.carbon.device.mgt.user.core.UserManager"
* cardinality="1..1" * cardinality="1..1
* policy="dynamic" * policy="dynamic"
* bind="setUserManager" * bind="setUserManager"
* unbind="unsetUserManager" * unbind="unsetUserManager"
@ -188,7 +190,7 @@ public class DeviceManagementServiceComponent {
AppManagementConfig appConfig = AppManagementConfig appConfig =
AppManagementConfigurationManager.getInstance().getAppManagementConfig(); AppManagementConfigurationManager.getInstance().getAppManagementConfig();
DeviceManagementDataHolder.getInstance().setAppManagerConfig(appConfig); DeviceManagementDataHolder.getInstance().setAppManagerConfig(appConfig);
RemoteAppManagerConnector appManager = new RemoteAppManagerConnector(appConfig,this.getPluginRepository()); RemoteAppManagerConnector appManager = new RemoteAppManagerConnector(appConfig, this.getPluginRepository());
DeviceManagementDataHolder.getInstance().setAppManager(appManager); DeviceManagementDataHolder.getInstance().setAppManager(appManager);
} }

@ -22,6 +22,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext; import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
import org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl; import org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl;
import org.wso2.carbon.device.mgt.core.service.EmailService; import org.wso2.carbon.device.mgt.core.service.EmailService;
import org.wso2.carbon.device.mgt.core.service.EmailServiceImpl; import org.wso2.carbon.device.mgt.core.service.EmailServiceImpl;
@ -48,6 +50,9 @@ public class EmailServiceComponent {
log.debug("Initializing email service bundle"); log.debug("Initializing email service bundle");
} }
DeviceConfigurationManager.getInstance().initConfig();
DeviceManagementConfig config =
DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
/* Initializing Email Service Configurations */ /* Initializing Email Service Configurations */
EmailService emailServiceProvider = new EmailServiceProviderImpl(); EmailService emailServiceProvider = new EmailServiceProviderImpl();

@ -55,8 +55,8 @@ public class DeviceMgtUserServiceComponent {
} }
/* Registering User Management service */ /* Registering User Management service */
BundleContext bundleContext = componentContext.getBundleContext(); BundleContext bundleContext = componentContext.getBundleContext();
bundleContext.registerService(UserManager.class, bundleContext.registerService(org.wso2.carbon.device.mgt.user.core.UserManager.class,
new UserManagementService(), null); new org.wso2.carbon.device.mgt.user.core.service.UserManagementService(), null);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("User management core bundle has been successfully initialized"); log.debug("User management core bundle has been successfully initialized");
} }

Loading…
Cancel
Save