mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing build failiures
This commit is contained in:
parent
8f9259f346
commit
e0dd398b27
@ -52,12 +52,9 @@
|
||||
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
||||
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
||||
<Bundle-Description>Policy Management Common Bundle</Bundle-Description>
|
||||
<Private-Package>org.wso2.carbon.policy.mgt.common.internal</Private-Package>
|
||||
<Import-Package>
|
||||
org.apache.commons.logging,
|
||||
org.wso2.carbon.device.mgt.common.*,
|
||||
org.wso2.carbon.device.mgt.core.dto.*,
|
||||
org.wso2.carbon.device.mgt.core.operation.*,
|
||||
javax.xml.bind.*,
|
||||
</Import-Package>
|
||||
<Export-Package>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package org.wso2.carbon.policy.mgt.common.Monitor;
|
||||
package org.wso2.carbon.policy.mgt.common.monitor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.wso2.carbon.policy.mgt.common.monitor;
|
||||
|
||||
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||
|
||||
public interface ComplianceDecisionPoint {
|
||||
|
||||
String getNoneComplianceRule(Policy policy) throws PolicyComplianceException;
|
||||
|
||||
void setDeviceAsUnreachable(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void setDeviceAsReachable(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void reEnforcePolicy(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void markDeviceAsNoneCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void markDeviceAsCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void deactivateDevice(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void activateDevice(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
void validateDevicePolicyCompliance(DeviceIdentifier deviceIdentifier, Policy policy) throws
|
||||
PolicyComplianceException;
|
||||
|
||||
|
||||
}
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package org.wso2.carbon.policy.mgt.common.Monitor;
|
||||
package org.wso2.carbon.policy.mgt.common.monitor;
|
||||
|
||||
import org.wso2.carbon.policy.mgt.common.ProfileFeature;
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package org.wso2.carbon.policy.mgt.common.Monitor;
|
||||
package org.wso2.carbon.policy.mgt.common.monitor;
|
||||
|
||||
public class PolicyComplianceException extends Exception {
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
package org.wso2.carbon.policy.mgt.common.spi;
|
||||
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -71,7 +71,8 @@
|
||||
org.wso2.carbon.context.*,
|
||||
org.wso2.carbon.user.api.*,
|
||||
org.wso2.carbon.device.mgt.core.*,
|
||||
org.wso2.carbon.device.mgt.common.*
|
||||
org.wso2.carbon.device.mgt.common.*,
|
||||
org.wso2.carbon.ntask.*
|
||||
</Import-Package>
|
||||
<Export-Package>
|
||||
!org.wso2.carbon.policy.mgt.core.internal,
|
||||
@ -132,6 +133,12 @@
|
||||
<artifactId>org.wso2.carbon.ndatasource.rdbms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Ntask dependencies-->
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.commons</groupId>
|
||||
<artifactId>org.wso2.carbon.ntask.core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Policy Management Dependencies-->
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
|
||||
@ -22,9 +22,9 @@ package org.wso2.carbon.policy.mgt.core;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.device.mgt.common.Feature;
|
||||
import org.wso2.carbon.policy.mgt.common.FeatureManagementException;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||
import org.wso2.carbon.policy.mgt.common.PolicyAdministratorPoint;
|
||||
import org.wso2.carbon.policy.mgt.common.PolicyEvaluationPoint;
|
||||
@ -77,4 +77,6 @@ public interface PolicyManagerService {
|
||||
boolean checkCompliance(DeviceIdentifier deviceIdentifier, Object response) throws PolicyComplianceException;
|
||||
|
||||
ComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
|
||||
boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException;
|
||||
}
|
||||
|
||||
@ -27,18 +27,16 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementExcept
|
||||
import org.wso2.carbon.device.mgt.core.operation.mgt.PolicyOperation;
|
||||
import org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation;
|
||||
import org.wso2.carbon.policy.mgt.common.*;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.core.impl.PolicyAdministratorPointImpl;
|
||||
import org.wso2.carbon.policy.mgt.core.impl.PolicyInformationPointImpl;
|
||||
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
|
||||
import org.wso2.carbon.policy.mgt.core.mgt.MonitoringManager;
|
||||
import org.wso2.carbon.policy.mgt.core.mgt.impl.MonitoringManagerImpl;
|
||||
import org.wso2.carbon.policy.mgt.core.util.PolicyManagementConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class PolicyManagerServiceImpl implements PolicyManagerService {
|
||||
@ -232,4 +230,9 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
||||
public ComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
return monitoringManager.getDevicePolicyCompliance(deviceIdentifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
return monitoringManager.isCompliance(deviceIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,11 +19,10 @@
|
||||
|
||||
package org.wso2.carbon.policy.mgt.core.dao;
|
||||
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MonitoringDAO {
|
||||
|
||||
|
||||
@ -19,5 +19,54 @@
|
||||
|
||||
package org.wso2.carbon.policy.mgt.core.impl;
|
||||
|
||||
public class ComplianceDecisionPointImpl {
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
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;
|
||||
|
||||
public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint {
|
||||
@Override
|
||||
public String getNoneComplianceRule(Policy policy) throws PolicyComplianceException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceAsUnreachable(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceAsReachable(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reEnforcePolicy(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDeviceAsNoneCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDeviceAsCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deactivateDevice(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void activateDevice(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateDevicePolicyCompliance(DeviceIdentifier deviceIdentifier, Policy policy) throws PolicyComplianceException {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
package org.wso2.carbon.policy.mgt.core.mgt;
|
||||
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -26,9 +26,9 @@ 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.DeviceManagementDAOException;
|
||||
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||
import org.wso2.carbon.policy.mgt.common.ProfileFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.spi.PolicyMonitoringService;
|
||||
|
||||
@ -21,9 +21,9 @@ package org.wso2.carbon.policy.mgt.core.service;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.device.mgt.common.Feature;
|
||||
import org.wso2.carbon.policy.mgt.common.FeatureManagementException;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.Monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
|
||||
import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
|
||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||
import org.wso2.carbon.policy.mgt.common.PolicyAdministratorPoint;
|
||||
import org.wso2.carbon.policy.mgt.common.PolicyEvaluationPoint;
|
||||
@ -132,4 +132,9 @@ public class PolicyManagementService implements PolicyManagerService {
|
||||
public ComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
return policyManagerService.getDeviceCompliance(deviceIdentifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
|
||||
return policyManagerService.isCompliance(deviceIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.wso2.carbon.policy.mgt.core.task;
|
||||
|
||||
import org.wso2.carbon.ntask.core.Task;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class MonitoringTask implements Task {
|
||||
|
||||
@Override
|
||||
public void setProperties(Map<String, String> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user