mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Moing interfacs to common bundle and fixing test cases
This commit is contained in:
parent
be5f161eb5
commit
10a585ea6a
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.wso2.carbon.policy.mgt.core.impl;
|
package org.wso2.carbon.policy.mgt.common;
|
||||||
|
|
||||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||||
|
|
||||||
@ -22,6 +22,7 @@ package org.wso2.carbon.policy.mgt.core.impl;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
import org.wso2.carbon.policy.mgt.common.Policy;
|
||||||
|
import org.wso2.carbon.policy.mgt.common.PolicyFilter;
|
||||||
import org.wso2.carbon.policy.mgt.core.util.PolicyManagementConstants;
|
import org.wso2.carbon.policy.mgt.core.util.PolicyManagementConstants;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@ -27,11 +27,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|||||||
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
|
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
|
||||||
import org.wso2.carbon.device.mgt.core.service.DeviceManagementService;
|
import org.wso2.carbon.device.mgt.core.service.DeviceManagementService;
|
||||||
import org.wso2.carbon.device.mgt.common.Feature;
|
import org.wso2.carbon.device.mgt.common.Feature;
|
||||||
import org.wso2.carbon.policy.mgt.common.FeatureManagementException;
|
import org.wso2.carbon.policy.mgt.common.*;
|
||||||
import org.wso2.carbon.policy.mgt.common.PIPDevice;
|
|
||||||
import org.wso2.carbon.policy.mgt.common.Policy;
|
|
||||||
import org.wso2.carbon.policy.mgt.common.PolicyInformationPoint;
|
|
||||||
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
|
|
||||||
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
|
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
|
||||||
import org.wso2.carbon.policy.mgt.core.mgt.FeatureManager;
|
import org.wso2.carbon.policy.mgt.core.mgt.FeatureManager;
|
||||||
import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager;
|
import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager;
|
||||||
|
|||||||
@ -55,71 +55,68 @@ public class ProfileFeatureCreator {
|
|||||||
|
|
||||||
|
|
||||||
private static String getJSON() {
|
private static String getJSON() {
|
||||||
return "[\n" +
|
return "{\n" +
|
||||||
"\t{\n" +
|
" \"userNameList\": [\n" +
|
||||||
"\t\tcolor: \"red\",\n" +
|
" \"admin\"\n" +
|
||||||
"\t\tvalue: \"#f00\"\n" +
|
" ],\n" +
|
||||||
"\t},\n" +
|
" \"roleNameList\": [\n" +
|
||||||
"\t{\n" +
|
" \"admin\"\n" +
|
||||||
"\t\tcolor: \"green\",\n" +
|
" ],\n" +
|
||||||
"\t\tvalue: \"#0f0\"\n" +
|
" \"deviceIdentifiers\": [\n" +
|
||||||
"\t},\n" +
|
" {\n" +
|
||||||
"\t{\n" +
|
" \"id\": \"08:00:27:fe:27:7b\",\n" +
|
||||||
"\t\tcolor: \"blue\",\n" +
|
" \"type\": \"ios\"\n" +
|
||||||
"\t\tvalue: \"#00f\"\n" +
|
" }\n" +
|
||||||
"\t},\n" +
|
" ],\n" +
|
||||||
"\t{\n" +
|
" \"application\": {\n" +
|
||||||
"\t\tcolor: \"cyan\",\n" +
|
" \"id\": \"id\",\n" +
|
||||||
"\t\tvalue: \"#0ff\"\n" +
|
" \"name\": \"test\",\n" +
|
||||||
"\t},\n" +
|
" \"type\": \"ENTERPRISE\",\n" +
|
||||||
"\t{\n" +
|
" \"platform\": \"android\",\n" +
|
||||||
"\t\tcolor: \"magenta\",\n" +
|
" \"version\": \"1.0\",\n" +
|
||||||
"\t\tvalue: \"#f0f\"\n" +
|
" \"identifier\": \"sdfsdfldfs\",\n" +
|
||||||
"\t},\n" +
|
" \"iconImage\": \"http://gogle.com\",\n" +
|
||||||
"\t{\n" +
|
" \"packageName\": \"com.google.mail\",\n" +
|
||||||
"\t\tcolor: \"yellow\",\n" +
|
" \"appIdentifier\": \"asdf\",\n" +
|
||||||
"\t\tvalue: \"#ff0\"\n" +
|
" \"location\": \"location\",\n" +
|
||||||
"\t},\n" +
|
" \"properties\": {\n" +
|
||||||
"\t{\n" +
|
" \"isRemoveApp\": true,\n" +
|
||||||
"\t\tcolor: \"black\",\n" +
|
" \"isPreventBackup\": true\n" +
|
||||||
"\t\tvalue: \"#000\"\n" +
|
" }\n" +
|
||||||
"\t}\n" +
|
" }\n" +
|
||||||
"]";
|
"}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getJSON2() {
|
private static String getJSON2() {
|
||||||
return "{\n" +
|
return "{\n" +
|
||||||
" \"odata.metadata\":\"http://services.odata.org/V3/OData/OData.svc/$metadata#Products\",\n" +
|
" \"userNameList\": [\n" +
|
||||||
" \"value\":[\n" +
|
" \"admin\"\n" +
|
||||||
" {\n" +
|
" ],\n" +
|
||||||
" \"ID\":0,\n" +
|
" \"roleNameList\": [\n" +
|
||||||
" \"Name\":\"Bread\",\n" +
|
" \"admin\"\n" +
|
||||||
" \"Description\":\"Whole grain bread\",\n" +
|
" ],\n" +
|
||||||
" \"ReleaseDate\":\"1992-01-01T00:00:00\",\n" +
|
" \"deviceIdentifiers\": [\n" +
|
||||||
" \"DiscontinuedDate\":null,\n" +
|
" {\n" +
|
||||||
" \"Rating\":4,\n" +
|
" \"id\": \"11:11:11:12\",\n" +
|
||||||
" \"Price\":\"2.5\"\n" +
|
" \"type\": \"ios\"\n" +
|
||||||
" },\n" +
|
" }\n" +
|
||||||
" {\n" +
|
" ],\n" +
|
||||||
" \"ID\":1,\n" +
|
" \"application\": {\n" +
|
||||||
" \"Name\":\"Milk\",\n" +
|
" \"id\": \"1d548206-14ee-4672-91f6-9c230626a056\",\n" +
|
||||||
" \"Description\":\"Low fat milk\",\n" +
|
" \"platform\": \"ios\",\n" +
|
||||||
" \"ReleaseDate\":\"1995-10-01T00:00:00\",\n" +
|
" \"packageName\": \"com.imangi.templerun2\",\n" +
|
||||||
" \"DiscontinuedDate\":null,\n" +
|
" \"name\": \"Temle Run\",\n" +
|
||||||
" \"Rating\":3,\n" +
|
" \"appIdentifier\": \"572395608\",\n" +
|
||||||
" \"Price\":\"3.5\"\n" +
|
" \"iconImage\": \"http://10.100.5.6:9763/publisher/api/mobileapp/getfile/FHmJReGEV3cExtf.png\",\n" +
|
||||||
" },\n" +
|
" \"type\": \"PUBLIC\",\n" +
|
||||||
" {\n" +
|
" \"identifier\": \"572395608\",\n" +
|
||||||
" \"ID\":2,\n" +
|
" \"version\": \"1\",\n" +
|
||||||
" \"Name\":\"Vint soda\",\n" +
|
" \"properties\": {\n" +
|
||||||
" \"Description\":\"Americana Variety - Mix of 6 flavors\",\n" +
|
" \"isRemoveApp\": true,\n" +
|
||||||
" \"ReleaseDate\":\"2000-10-01T00:00:00\",\n" +
|
" \"isPreventBackup\": true,\n" +
|
||||||
" \"DiscontinuedDate\":null,\n" +
|
" \"iTunesId\": 572395608\n" +
|
||||||
" \"Rating\":3,\n" +
|
" }\n" +
|
||||||
" \"Price\":\"20.9\"\n" +
|
" }\n" +
|
||||||
" },\n" +
|
|
||||||
" …\n" +
|
|
||||||
" ]\n" +
|
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user