Kamidu Sachith 9 years ago
commit 51441b0ff9

@ -34,7 +34,6 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.EmailMessageProperties; import org.wso2.carbon.device.mgt.common.EmailMessageProperties;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; 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.config.email.EmailConfigurations; import org.wso2.carbon.device.mgt.core.config.email.EmailConfigurations;
import org.wso2.carbon.device.mgt.core.internal.EmailServiceDataHolder; import org.wso2.carbon.device.mgt.core.internal.EmailServiceDataHolder;
import org.wso2.carbon.device.mgt.core.service.EmailService; import org.wso2.carbon.device.mgt.core.service.EmailService;
@ -91,8 +90,8 @@ public class EmailServiceProviderImpl implements EmailService {
payload.setText(body); payload.setText(body);
try { try {
ServiceClient serviceClient; ServiceClient serviceClient;
ConfigurationContext configContext = EmailServiceDataHolder.getInstance() ConfigurationContext configContext = EmailServiceDataHolder.getInstance().
.getConfigurationContextService().getClientConfigContext(); getConfigurationContextService().getServerConfigContext();
//Set configuration service client if available, else create new service client //Set configuration service client if available, else create new service client
if (configContext != null) { if (configContext != null) {
serviceClient = new ServiceClient(configContext, null); serviceClient = new ServiceClient(configContext, null);

@ -263,11 +263,6 @@ CREATE TABLE IF NOT EXISTS DM_USER_POLICY (
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
); );

@ -245,11 +245,6 @@ CREATE TABLE IF NOT EXISTS DM_USER_POLICY (
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
); );

@ -248,11 +248,6 @@ CREATE TABLE DM_USER_POLICY (
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
); );

@ -240,11 +240,6 @@ CREATE TABLE IF NOT EXISTS DM_USER_POLICY (
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB; )ENGINE = InnoDB;

@ -363,10 +363,6 @@ END;
CONSTRAINT FK_DM_POLICY_DEVCIE_APPLIED CONSTRAINT FK_DM_POLICY_DEVCIE_APPLIED
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
); );
-- Generate ID using sequence and trigger -- Generate ID using sequence and trigger

@ -211,11 +211,6 @@ CREATE TABLE DM_DEVICE_POLICY_APPLIED (
FOREIGN KEY (DEVICE_ID ) FOREIGN KEY (DEVICE_ID )
REFERENCES DM_DEVICE (ID ) REFERENCES DM_DEVICE (ID )
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT FK_DM_POLICY_DEVICE_APPLIED_POLICY
FOREIGN KEY (POLICY_ID )
REFERENCES DM_POLICY (ID )
ON DELETE NO ACTION
ON UPDATE NO ACTION ON UPDATE NO ACTION
); );

Loading…
Cancel
Save