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>
@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 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends T> c) boolean
addAll
(Collection<? extends T> c) void
clear()
boolean
boolean
containsAll
(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.boolean
get
(int index) int
hashCode()
boolean
hasMore()
Indicates whether the source has more results after this page.int
boolean
isEmpty()
iterator()
int
listIterator
(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) boolean
boolean
removeAll
(Collection<?> c) resolveNavigation
(NavigationService navigationService) boolean
retainAll
(Collection<?> c) int
size()
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, removeProperty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
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:
getPageRequest
in interfacePageResponse<T>
- Returns:
- the request used to produce this response
-
getPageResponse
-
toString
-
iterator
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-
toArray
public <A> A[] toArray(A[] a) -
getResults
- Specified by:
getResults
in interfacePageResponse<T>
- Returns:
- the results
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in 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:PageResponse
Indicates whether the source has more results after this page.- Specified by:
hasMore
in interfacePageResponse<T>
- Returns:
- true if there are more results
-
getNextCursor
- Specified by:
getNextCursor
in interfacePageResponse<T>
- Returns:
- the identifier which is used to skip results from a previous query when paginating in forward direction.
-
getPrevCursor
- Specified by:
getPrevCursor
in 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()
-