forked from community/device-mgt-core
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
Conflicts: components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.javarevert-70aa11f8
commit
3c444f6102
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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.cache;
|
||||
|
||||
public class PolicyCacheException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = -4234546127441192907L;
|
||||
|
||||
private String errorMessage;
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public PolicyCacheException(String msg, Exception nestedEx) {
|
||||
super(msg, nestedEx);
|
||||
setErrorMessage(msg);
|
||||
}
|
||||
|
||||
public PolicyCacheException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
setErrorMessage(message);
|
||||
}
|
||||
|
||||
public PolicyCacheException(String msg) {
|
||||
super(msg);
|
||||
setErrorMessage(msg);
|
||||
}
|
||||
|
||||
public PolicyCacheException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public PolicyCacheException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.cache;
|
||||
|
||||
import org.wso2.carbon.device.mgt.core.policy.mgt.policy.Policy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PolicyCacheManager {
|
||||
|
||||
void addAllPolicies(List<Policy> policies);
|
||||
|
||||
void updateAllPolicies(List<Policy> policies);
|
||||
|
||||
List<Policy> getAllPolicies();
|
||||
|
||||
void removeAllPolicies();
|
||||
|
||||
void addPolicy(Policy policy);
|
||||
|
||||
void updatePolicy(Policy policy);
|
||||
|
||||
void removePolicy(int policyId);
|
||||
|
||||
Policy getPolicy(int policyId);
|
||||
|
||||
void addPolicyToDevice(int deviceId, int policyId);
|
||||
|
||||
List<Integer> getPolicyAppliedDeviceIds(int policyId);
|
||||
|
||||
int getPolicyIdOfDevice(int deviceId);
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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.cache.impl;
|
||||
|
||||
import org.wso2.carbon.device.mgt.core.policy.mgt.policy.Policy;
|
||||
import org.wso2.carbon.policy.mgt.core.cache.PolicyCacheManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PolicyCacheManagerImpl implements PolicyCacheManager {
|
||||
|
||||
@Override
|
||||
public void addAllPolicies(List<Policy> policies) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAllPolicies(List<Policy> policies) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Policy> getAllPolicies() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllPolicies() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPolicy(Policy policy) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePolicy(Policy policy) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePolicy(int policyId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Policy getPolicy(int policyId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPolicyToDevice(int deviceId, int policyId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getPolicyAppliedDeviceIds(int policyId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPolicyIdOfDevice(int deviceId) {
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue