|
|
|
@ -19,15 +19,36 @@
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.policy.mgt.core.impl;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
|
|
|
import org.wso2.carbon.device.mgt.core.dao.DeviceDAO;
|
|
|
|
|
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
|
|
|
|
|
import org.wso2.carbon.device.mgt.core.dao.EnrolmentDAO;
|
|
|
|
|
import org.wso2.carbon.policy.mgt.common.Policy;
|
|
|
|
|
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceDecisionPoint;
|
|
|
|
|
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
|
|
|
|
import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager;
|
|
|
|
|
import org.wso2.carbon.policy.mgt.core.mgt.impl.PolicyManagerImpl;
|
|
|
|
|
|
|
|
|
|
public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint {
|
|
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(ComplianceDecisionPointImpl.class);
|
|
|
|
|
|
|
|
|
|
private EnrolmentDAO enrolmentDAO;
|
|
|
|
|
private DeviceDAO deviceDAO;
|
|
|
|
|
|
|
|
|
|
private PolicyManager policyManager;
|
|
|
|
|
|
|
|
|
|
public ComplianceDecisionPointImpl() {
|
|
|
|
|
enrolmentDAO = DeviceManagementDAOFactory.getEnrollmentDAO();
|
|
|
|
|
deviceDAO = DeviceManagementDAOFactory.getDeviceDAO();
|
|
|
|
|
policyManager = new PolicyManagerImpl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getNoneComplianceRule(Policy policy) throws PolicyComplianceException {
|
|
|
|
|
return null;
|
|
|
|
|
return policy.getCompliance();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -66,7 +87,8 @@ public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void validateDevicePolicyCompliance(DeviceIdentifier deviceIdentifier, Policy policy) throws PolicyComplianceException {
|
|
|
|
|
public void validateDevicePolicyCompliance(DeviceIdentifier deviceIdentifier, Policy policy) throws
|
|
|
|
|
PolicyComplianceException {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|