merge-requests/7/head
manoj 10 years ago
commit 63b6a5b206

@ -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" +
" \"Rating\":4,\n" +
" \"Price\":\"2.5\"\n" +
" },\n" +
" {\n" +
" \"ID\":1,\n" +
" \"Name\":\"Milk\",\n" +
" \"Description\":\"Low fat milk\",\n" +
" \"ReleaseDate\":\"1995-10-01T00:00:00\",\n" +
" \"DiscontinuedDate\":null,\n" +
" \"Rating\":3,\n" +
" \"Price\":\"3.5\"\n" +
" },\n" +
" {\n" + " {\n" +
" \"ID\":2,\n" + " \"id\": \"11:11:11:12\",\n" +
" \"Name\":\"Vint soda\",\n" + " \"type\": \"ios\"\n" +
" \"Description\":\"Americana Variety - Mix of 6 flavors\",\n" + " }\n" +
" \"ReleaseDate\":\"2000-10-01T00:00:00\",\n" + " ],\n" +
" \"DiscontinuedDate\":null,\n" + " \"application\": {\n" +
" \"Rating\":3,\n" + " \"id\": \"1d548206-14ee-4672-91f6-9c230626a056\",\n" +
" \"Price\":\"20.9\"\n" + " \"platform\": \"ios\",\n" +
" },\n" + " \"packageName\": \"com.imangi.templerun2\",\n" +
" …\n" + " \"name\": \"Temle Run\",\n" +
" ]\n" + " \"appIdentifier\": \"572395608\",\n" +
" \"iconImage\": \"http://10.100.5.6:9763/publisher/api/mobileapp/getfile/FHmJReGEV3cExtf.png\",\n" +
" \"type\": \"PUBLIC\",\n" +
" \"identifier\": \"572395608\",\n" +
" \"version\": \"1\",\n" +
" \"properties\": {\n" +
" \"isRemoveApp\": true,\n" +
" \"isPreventBackup\": true,\n" +
" \"iTunesId\": 572395608\n" +
" }\n" +
" }\n" +
"}"; "}";
} }
} }

Loading…
Cancel
Save