prabathabey 9 years ago
commit bfa1ea1875

@ -26,6 +26,7 @@ import org.wso2.carbon.policy.mgt.common.spi.PolicyMonitoringService;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.user.core.tenant.TenantManager;
import java.util.HashMap;
import java.util.Map;
public class PolicyManagementDataHolder {
@ -35,7 +36,7 @@ public class PolicyManagementDataHolder {
private PolicyEvaluationPoint policyEvaluationPoint;
private PolicyInformationPoint policyInformationPoint;
private DeviceManagementProviderService deviceManagementService;
private Map<String, PolicyMonitoringService> policyMonitoringServiceMap;
private Map<String, PolicyMonitoringService> policyMonitoringServiceMap = new HashMap<>();
private TaskService taskService;
private static PolicyManagementDataHolder thisInstance = new PolicyManagementDataHolder();

@ -308,6 +308,38 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
);
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
ID INT NOT NULL AUTO_INCREMENT,
DEVICE_ID INT NOT NULL,
POLICY_ID INT NOT NULL,
STATUS INT NULL,
LAST_SUCCESS_TIME TIMESTAMP NULL,
LAST_REQUESTED_TIME TIMESTAMP NULL,
LAST_FAILED_TIME TIMESTAMP NULL,
ATTEMPTS INT NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_FEATURES (
ID INT NOT NULL AUTO_INCREMENT,
COMPLIANCE_STATUS_ID INT NOT NULL,
FEATURE_CODE INT NOT NULL,
STATUS INT NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_COMPLIANCE_FEATURES_STATUS
FOREIGN KEY (COMPLIANCE_STATUS_ID)
REFERENCES DM_POLICY_COMPLIANCE_STATUS (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED --

@ -281,6 +281,37 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_STATUS (
ID INT NOT NULL AUTO_INCREMENT,
DEVICE_ID INT NOT NULL,
POLICY_ID INT NOT NULL,
STATUS INT NULL,
LAST_SUCCESS_TIME TIMESTAMP NULL,
LAST_REQUESTED_TIME TIMESTAMP NULL,
LAST_FAILED_TIME TIMESTAMP NULL,
ATTEMPTS INT NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_POLICY_COMPLIANCE_STATUS_POLICY
FOREIGN KEY (POLICY_ID)
REFERENCES DM_POLICY (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_POLICY_COMPLIANCE_FEATURES (
ID INT NOT NULL AUTO_INCREMENT,
COMPLIANCE_STATUS_ID INT NOT NULL,
FEATURE_CODE INT NOT NULL,
STATUS INT NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_COMPLIANCE_FEATURES_STATUS
FOREIGN KEY (COMPLIANCE_STATUS_ID)
REFERENCES DM_POLICY_COMPLIANCE_STATUS (ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE TABLE IF NOT EXISTS DM_ENROLMENT (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,

Loading…
Cancel
Save