/** * Creates a type definition list. * * @param list * the list of type definitions, not {@code null} * @param hasMoreItems * {@code true} if there are more items, {@code false} otherwise * @param numItems * the total (positive) number of types at this level or * {@code null} if the number is unknown * * @return the TypeDefinitionList object */ public TypeDefinitionList createTypeDefinitionList(List<TypeDefinition> list, boolean hasMoreItems, BigInteger numItems) { if (list == null) { throw new IllegalArgumentException("List must be set!"); } if (numItems != null && numItems.signum() < 0) { throw new IllegalArgumentException("Number of items is negative!"); } TypeDefinitionListImpl result = new TypeDefinitionListImpl(list); result.setHasMoreItems(hasMoreItems); result.setNumItems(numItems); return result; }
TypeDefinitionListImpl result = new TypeDefinitionListImpl(Collections.<TypeDefinition> emptyList()); result.setHasMoreItems(false); result.setNumItems(BigInteger.ZERO);
/** * Converts a type definition list. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static TypeDefinitionList convertTypeChildren(final Map<String, Object> json) { if (json == null) { return null; } TypeDefinitionListImpl result = new TypeDefinitionListImpl(); Object typesList = json.get(JSON_TYPESLIST_TYPES); List<TypeDefinition> types = new ArrayList<TypeDefinition>(); if (typesList instanceof List) { for (Object type : (List) typesList) { if (type instanceof Map) { types.add(convertTypeDefinition((Map<String, Object>) type)); } } } result.setList(types); result.setHasMoreItems(getBoolean(json, JSON_TYPESLIST_HAS_MORE_ITEMS)); result.setNumItems(getInteger(json, JSON_TYPESLIST_NUM_ITEMS)); convertExtension(json, result, TYPESLIST_KEYS); return result; }
/** * Converts a type definition list. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static TypeDefinitionList convertTypeChildren(final Map<String, Object> json) { if (json == null) { return null; } TypeDefinitionListImpl result = new TypeDefinitionListImpl(); Object typesList = json.get(JSON_TYPESLIST_TYPES); List<TypeDefinition> types = new ArrayList<TypeDefinition>(); if (typesList instanceof List) { for (Object type : (List) typesList) { if (type instanceof Map) { types.add(convertTypeDefinition((Map<String, Object>) type)); } } } result.setList(types); result.setHasMoreItems(getBoolean(json, JSON_TYPESLIST_HAS_MORE_ITEMS)); result.setNumItems(getInteger(json, JSON_TYPESLIST_NUM_ITEMS)); convertExtension(json, result, TYPESLIST_KEYS); return result; }
TypeDefinitionListImpl result = new TypeDefinitionListImpl(); List<TypeDefinition> list = new ArrayList<TypeDefinition>(); result.setList(list);
TypeDefinitionListImpl result = new TypeDefinitionListImpl(); List<TypeDefinition> list = new ArrayList<TypeDefinition>(); result.setList(list);
BigInteger maxItems, BigInteger skipCount) { TypeDefinitionListImpl result = new TypeDefinitionListImpl(new ArrayList<TypeDefinition>());
/** * Converts a type list. */ public static TypeDefinitionList convert(CmisTypeDefinitionListType typeList) { if (typeList == null) { return null; } TypeDefinitionListImpl result = new TypeDefinitionListImpl(); List<TypeDefinition> types = new ArrayList<TypeDefinition>(); for (CmisTypeDefinitionType typeDefinition : typeList.getTypes()) { types.add(convert(typeDefinition)); } result.setList(types); result.setHasMoreItems(typeList.isHasMoreItems()); result.setNumItems(typeList.getNumItems()); // handle extensions convertExtension(typeList, result); return result; }
TypeDefinitionListImpl result = new TypeDefinitionListImpl(new ArrayList<TypeDefinition>());
@Override public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) { TypeDefinitionListImpl result = new TypeDefinitionListImpl();
@Override public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) { TypeDefinitionListImpl result = new TypeDefinitionListImpl();