/** * Converts FailedToDelete ids. */ public static FailedToDeleteData convertFailedToDelete(final Map<String, Object> json) { if (json == null) { return null; } FailedToDeleteDataImpl result = new FailedToDeleteDataImpl(); List<String> ids = new ArrayList<String>(); List<Object> jsonIds = getList(json.get(JSON_FAILEDTODELETE_ID)); if (jsonIds != null) { for (Object obj : jsonIds) { if (obj != null) { ids.add(obj.toString()); } } } result.setIds(ids); convertExtension(json, result, FAILEDTODELETE_KEYS); return result; }
/** * Converts FailedToDelete ids. */ public static FailedToDeleteData convertFailedToDelete(final Map<String, Object> json) { if (json == null) { return null; } FailedToDeleteDataImpl result = new FailedToDeleteDataImpl(); List<String> ids = new ArrayList<String>(); List<Object> jsonIds = getList(json.get(JSON_FAILEDTODELETE_ID)); if (jsonIds != null) { for (Object obj : jsonIds) { if (obj != null) { ids.add(obj.toString()); } } } result.setIds(ids); convertExtension(json, result, FAILEDTODELETE_KEYS); return result; }
/** * Converts a list of policy ids. */ public static PolicyIdList convertPolicyIds(final Map<String, Object> json) { if (json == null) { return null; } PolicyIdListImpl result = new PolicyIdListImpl(); List<String> policyIds = new ArrayList<String>(); List<Object> ids = getList(json.get(JSON_OBJECT_POLICY_IDS_IDS)); if (ids != null) { for (Object obj : ids) { if (obj instanceof String) { policyIds.add((String) obj); } } } convertExtension(json, result, POLICY_IDS_KEYS); result.setPolicyIds(policyIds); return result; }
/** * Converts a list of policy ids. */ public static PolicyIdList convertPolicyIds(final Map<String, Object> json) { if (json == null) { return null; } PolicyIdListImpl result = new PolicyIdListImpl(); List<String> policyIds = new ArrayList<String>(); List<Object> ids = getList(json.get(JSON_OBJECT_POLICY_IDS_IDS)); if (ids != null) { for (Object obj : ids) { if (obj instanceof String) { policyIds.add((String) obj); } } } convertExtension(json, result, POLICY_IDS_KEYS); result.setPolicyIds(policyIds); return result; }
/** * Converts a descendant. */ public static ObjectInFolderContainer convertDescendant(final Map<String, Object> json, final TypeCache typeCache) { if (json == null) { return null; } ObjectInFolderContainerImpl result = new ObjectInFolderContainerImpl(); result.setObject(convertObjectInFolder(getMap(json.get(JSON_OBJECTINFOLDERCONTAINER_OBJECT)), typeCache)); List<ObjectInFolderContainer> containerList = new ArrayList<ObjectInFolderContainer>(); List<Object> jsonContainerList = getList(json.get(JSON_OBJECTINFOLDERCONTAINER_CHILDREN)); if (jsonContainerList != null) { for (Object obj : jsonContainerList) { Map<String, Object> containerChild = getMap(obj); if (containerChild != null) { containerList.add(convertDescendant(containerChild, typeCache)); } } } result.setChildren(containerList); convertExtension(json, result, OBJECTINFOLDERCONTAINER_KEYS); return result; }
/** * Converts a descendant. */ public static ObjectInFolderContainer convertDescendant(final Map<String, Object> json, final TypeCache typeCache) { if (json == null) { return null; } ObjectInFolderContainerImpl result = new ObjectInFolderContainerImpl(); result.setObject(convertObjectInFolder(getMap(json.get(JSON_OBJECTINFOLDERCONTAINER_OBJECT)), typeCache)); List<ObjectInFolderContainer> containerList = new ArrayList<ObjectInFolderContainer>(); List<Object> jsonContainerList = getList(json.get(JSON_OBJECTINFOLDERCONTAINER_CHILDREN)); if (jsonContainerList != null) { for (Object obj : jsonContainerList) { Map<String, Object> containerChild = getMap(obj); if (containerChild != null) { containerList.add(convertDescendant(containerChild, typeCache)); } } } result.setChildren(containerList); convertExtension(json, result, OBJECTINFOLDERCONTAINER_KEYS); return result; }
List<Object> jsonAces = getList(json.get(JSON_ACL_ACES)); if (jsonAces != null) { for (Object obj : jsonAces) { ace.setDirect(isDirect != null ? isDirect.booleanValue() : true); List<Object> jsonPermissions = getList(entry.get(JSON_ACE_PERMISSIONS)); if (jsonPermissions != null) { List<String> permissions = new ArrayList<String>(5);
/** * Converts a object list. */ public static ObjectInFolderList convertObjectInFolderList(final Map<String, Object> json, final TypeCache typeCache) { if (json == null) { return null; } ObjectInFolderListImpl result = new ObjectInFolderListImpl(); List<Object> jsonChildren = getList(json.get(JSON_OBJECTINFOLDERLIST_OBJECTS)); List<ObjectInFolderData> objects = new ArrayList<ObjectInFolderData>(); if (jsonChildren != null) { for (Object obj : jsonChildren) { Map<String, Object> jsonObject = getMap(obj); if (jsonObject != null) { objects.add(convertObjectInFolder(jsonObject, typeCache)); } } } result.setObjects(objects); result.setHasMoreItems(getBoolean(json, JSON_OBJECTINFOLDERLIST_HAS_MORE_ITEMS)); result.setNumItems(getInteger(json, JSON_OBJECTINFOLDERLIST_NUM_ITEMS)); convertExtension(json, result, OBJECTINFOLDERLIST_KEYS); return result; }
List<Object> jsonAces = getList(json.get(JSON_ACL_ACES)); if (jsonAces != null) { for (Object obj : jsonAces) { ace.setDirect(isDirect != null ? isDirect.booleanValue() : true); List<Object> jsonPermissions = getList(entry.get(JSON_ACE_PERMISSIONS)); if (jsonPermissions != null) { List<String> permissions = new ArrayList<String>(5);
/** * Converts a object list. */ public static ObjectInFolderList convertObjectInFolderList(final Map<String, Object> json, final TypeCache typeCache) { if (json == null) { return null; } ObjectInFolderListImpl result = new ObjectInFolderListImpl(); List<Object> jsonChildren = getList(json.get(JSON_OBJECTINFOLDERLIST_OBJECTS)); List<ObjectInFolderData> objects = new ArrayList<ObjectInFolderData>(); if (jsonChildren != null) { for (Object obj : jsonChildren) { Map<String, Object> jsonObject = getMap(obj); if (jsonObject != null) { objects.add(convertObjectInFolder(jsonObject, typeCache)); } } } result.setObjects(objects); result.setHasMoreItems(getBoolean(json, JSON_OBJECTINFOLDERLIST_HAS_MORE_ITEMS)); result.setNumItems(getInteger(json, JSON_OBJECTINFOLDERLIST_NUM_ITEMS)); convertExtension(json, result, OBJECTINFOLDERLIST_KEYS); return result; }
result.setAclPropagation(getEnum(json, JSON_ACLCAP_ACL_PROPAGATION, AclPropagation.class)); List<Object> permissions = getList(json.get(JSON_ACLCAP_PERMISSIONS)); if (permissions != null) { List<PermissionDefinition> permissionDefinitionList = new ArrayList<PermissionDefinition>(); List<Object> permissionMapping = getList(json.get(JSON_ACLCAP_PERMISSION_MAPPING)); if (permissionMapping != null) { Map<String, PermissionMapping> permMap = new HashMap<String, PermissionMapping>();
result.setAclPropagation(getEnum(json, JSON_ACLCAP_ACL_PROPAGATION, AclPropagation.class)); List<Object> permissions = getList(json.get(JSON_ACLCAP_PERMISSIONS)); if (permissions != null) { List<PermissionDefinition> permissionDefinitionList = new ArrayList<PermissionDefinition>(); List<Object> permissionMapping = getList(json.get(JSON_ACLCAP_PERMISSION_MAPPING)); if (permissionMapping != null) { Map<String, PermissionMapping> permMap = new HashMap<String, PermissionMapping>();
List<Object> jsonRelationships = getList(json.get(JSON_OBJECT_RELATIONSHIPS)); if (jsonRelationships != null) { result.setRelationships(convertObjects(jsonRelationships, typeCache)); List<Object> jsonRenditions = getList(json.get(JSON_OBJECT_RENDITIONS)); if (jsonRenditions != null) { result.setRenditions(convertRenditions(jsonRenditions));
List<Object> jsonRelationships = getList(json.get(JSON_OBJECT_RELATIONSHIPS)); if (jsonRelationships != null) { result.setRelationships(convertObjects(jsonRelationships, typeCache)); List<Object> jsonRenditions = getList(json.get(JSON_OBJECT_RENDITIONS)); if (jsonRenditions != null) { result.setRenditions(convertRenditions(jsonRenditions));
List<Object> jsonChildren = getList( json.get(isQueryResult ? JSON_QUERYRESULTLIST_RESULTS : JSON_OBJECTLIST_OBJECTS)); List<ObjectData> objects = new ArrayList<ObjectData>();
List<Object> jsonChildren = getList( json.get(isQueryResult ? JSON_QUERYRESULTLIST_RESULTS : JSON_OBJECTLIST_OBJECTS)); List<ObjectData> objects = new ArrayList<ObjectData>();
result.setChangesIncomplete(getBoolean(json, JSON_REPINFO_CHANGES_INCOMPLETE)); List<Object> changesOnType = getList(json.get(JSON_REPINFO_CHANGES_ON_TYPE)); if (changesOnType != null) { List<BaseTypeId> types = new ArrayList<BaseTypeId>(); result.setPrincipalAnyone(getString(json, JSON_REPINFO_PRINCIPAL_ID_ANYONE)); List<Object> extendedFeatures = getList(json.get(JSON_REPINFO_EXTENDED_FEATURES)); if (extendedFeatures != null) { List<ExtensionFeature> features = new ArrayList<ExtensionFeature>();
result.setChangesIncomplete(getBoolean(json, JSON_REPINFO_CHANGES_INCOMPLETE)); List<Object> changesOnType = getList(json.get(JSON_REPINFO_CHANGES_ON_TYPE)); if (changesOnType != null) { List<BaseTypeId> types = new ArrayList<BaseTypeId>(); result.setPrincipalAnyone(getString(json, JSON_REPINFO_PRINCIPAL_ID_ANYONE)); List<Object> extendedFeatures = getList(json.get(JSON_REPINFO_EXTENDED_FEATURES)); if (extendedFeatures != null) { List<ExtensionFeature> features = new ArrayList<ExtensionFeature>();
CreatablePropertyTypesImpl creatablePropertyTypes = new CreatablePropertyTypesImpl(); List<Object> canCreateJson = getList( creatablePropertyTypesJson.get(JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE)); if (canCreateJson != null) {
CreatablePropertyTypesImpl creatablePropertyTypes = new CreatablePropertyTypesImpl(); List<Object> canCreateJson = getList( creatablePropertyTypesJson.get(JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE)); if (canCreateJson != null) {