Class RestList<T>
java.lang.Object
com.atlassian.confluence.rest.v2.api.model.RestObject
com.atlassian.confluence.rest.v2.api.model.RestList<T>
- Type Parameters:
T-
- All Implemented Interfaces:
PageResponse<T>,NavigationAware,Iterable<T>,Collection<T>,List<T>,SequencedCollection<T>
@ExperimentalApi
public final class RestList<T>
extends RestObject
implements PageResponse<T>, List<T>, NavigationAware
The RestList participates in our collection serialization by jackson, and allows collections to be enriched with extra
properties during serialization. It wraps a pageResponse, and allows extra fields to be added as jsonProperties.
This map of properties is added to by the property enrichers, and is ultimately used by the
RestEntitySerializer to convert the object to json
- Since:
- 9.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.atlassian.confluence.rest.v2.api.model.RestObject
RestObject.Properties -
Field Summary
Fields inherited from class com.atlassian.confluence.rest.v2.api.model.RestObject
jsonProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) static <T> RestList<T> createRestList(PageRequest pageRequest, PageResponse<T> pageResponse) Deprecated.since 5.6.5.static <T> RestList<T> createRestList(PageRequest request, List<T> results, boolean hasMore) Deprecated.since 5.6.5.static <T> RestList<T> createRestList(PageResponse<T> pageResponse) Deprecated.since 5.6.5.booleanget(int index) inthashCode()booleanhasMore()Indicates whether the source has more results after this page.intbooleanisEmpty()iterator()intlistIterator(int index) static <T> RestList.Builder<T> static <T> RestList.Builder<T> newRestList(PageRequest pageRequest) static <T> RestList.Builder<T> newRestList(PageResponse<T> response) remove(int index) booleanbooleanremoveAll(Collection<?> c) resolveNavigation(NavigationService navigationService) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<A> A[]toArray(A[] a) toString()Methods inherited from class com.atlassian.confluence.rest.v2.api.model.RestObject
getProperty, hasProperty, properties, putProperties, putProperty, removePropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface com.atlassian.confluence.api.model.pagination.PageResponse
getTotalCount
-
Constructor Details
-
RestList
protected RestList()
-
-
Method Details
-
newRestList
-
newRestList
-
newRestList
-
createRestList
Deprecated.since 5.6.5. UsenewRestList(PageResponse)instead. -
createRestList
@Deprecated public static <T> RestList<T> createRestList(PageRequest pageRequest, PageResponse<T> pageResponse) Deprecated.since 5.6.5. UsenewRestList(PageResponse)instead. -
createRestList
@Deprecated public static <T> RestList<T> createRestList(PageRequest request, List<T> results, boolean hasMore) Deprecated.since 5.6.5. UsenewRestList(PageRequest)instead. -
getPageRequest
- Specified by:
getPageRequestin interfacePageResponse<T>- Returns:
- the request used to produce this response
-
getPageResponse
-
toString
-
iterator
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
subList
-
toArray
public <A> A[] toArray(A[] a) -
getResults
- Specified by:
getResultsin interfacePageResponse<T>- Returns:
- the results
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein interfacePageResponse<T>- Returns:
- the number of results in this page of results
-
isEmpty
public boolean isEmpty() -
contains
-
hasMore
public boolean hasMore()Description copied from interface:PageResponseIndicates whether the source has more results after this page.- Specified by:
hasMorein interfacePageResponse<T>- Returns:
- true if there are more results
-
getNextCursor
- Specified by:
getNextCursorin interfacePageResponse<T>- Returns:
- the identifier which is used to skip results from a previous query when paginating in forward direction.
-
getPrevCursor
- Specified by:
getPrevCursorin interfacePageResponse<T>- Returns:
- the identifier which is used to skip results from a previous query when paginating in backward direction.
-
equals
-
hashCode
public int hashCode()
-