TypedRest for Java
Public Member Functions | Protected Member Functions | List of all members
net.typedrest.CollectionEndpointImpl< TEntity > Class Template Reference

REST endpoint that represents a collection of TEntitys as ElementEndpoints. More...

Inheritance diagram for net.typedrest.CollectionEndpointImpl< TEntity >:
net.typedrest.AbstractCollectionEndpoint< TEntity, ElementEndpoint< TEntity > > net.typedrest.CollectionEndpoint< TEntity > net.typedrest.GenericCollectionEndpoint< TEntity, ElementEndpoint< TEntity > >

Public Member Functions

 CollectionEndpointImpl (Endpoint referrer, URI relativeUri, Class< TEntity > entityType)
 Creates a new element collection endpoint. More...
 
 CollectionEndpointImpl (Endpoint referrer, String relativeUri, Class< TEntity > entityType)
 Creates a new element collection endpoint. More...
 
- Public Member Functions inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, ElementEndpoint< TEntity > >
TElementEndpoint get (String id)
 
TElementEndpoint get (TEntity entity)
 
Optional< Boolean > isReadAllAllowed ()
 
List< TEntity > readAll () throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isReadRangeAllowed ()
 
PartialResponse< TEntity > readRange (Long from, Long to) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 
Optional< Boolean > isCreateAllowed ()
 
TElementEndpoint create (TEntity entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isCreateAllAllowed ()
 
void createAll (Iterable< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isSetAllAllowed ()
 
void setAll (Collection< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
- Public Member Functions inherited from net.typedrest.CollectionEndpoint< TEntity >
default boolean contains (String id) throws IOException, IllegalAccessException
 Determines whether the collection contains a specific entity. More...
 
default boolean contains (TEntity element) throws IOException, IllegalAccessException
 Determines whether the collection contains a specific entity. More...
 
default TEntity set (TEntity element) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Sets/replaces an existing element in the collection. More...
 
default TEntity merge (TEntity element) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Modifies an existing element in the collection by merging changes. More...
 
default void delete (String id) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Deletes an existing element from the collection. More...
 
default void delete (TEntity element) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Deletes an existing element from the collection. More...
 
- Public Member Functions inherited from net.typedrest.GenericCollectionEndpoint< TEntity, ElementEndpoint< TEntity > >
Class< TEntity > getEntityType ()
 Returns the type of entity the endpoint represents. More...
 
TElementEndpoint get (String id)
 Returns a ElementEndpoint for a specific child element of this collection. More...
 
TElementEndpoint get (TEntity entity)
 Returns a ElementEndpoint for a specific child element of this collection. More...
 
Optional< Boolean > isReadAllAllowed ()
 Shows whether the server has indicated that readAll() is currently allowed. More...
 
List< TEntity > readAll () throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Returns all TEntitys. More...
 
Optional< Boolean > isReadRangeAllowed ()
 Shows whether the server has indicated that readRange(Long,Long) is allowed. More...
 
PartialResponse< TEntity > readRange (Long from, Long to) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Returns all TElementEndpoints within a specific range of the set. More...
 
Optional< Boolean > isCreateAllowed ()
 Shows whether the server has indicated that create(java.lang.Object) is currently allowed. More...
 
TElementEndpoint create (TEntity entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Creates a new TEntity. More...
 
Optional< Boolean > isCreateAllAllowed ()
 Shows whether the server has indicated that createAll(java.lang.Iterable) is currently allowed. More...
 
void createAll (Iterable< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Creates multiple new TEntitys. More...
 
Optional< Boolean > isSetAllAllowed ()
 Shows whether the server has indicated that setAll(java.util.Collection) is currently allowed. More...
 
void setAll (Collection< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 Replaces the entire content of the collection with new TEntitys. More...
 

Protected Member Functions

ElementEndpoint< TEntity > buildElementEndpoint (URI relativeUri)
 
- Protected Member Functions inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, ElementEndpoint< TEntity > >
 AbstractCollectionEndpoint (Endpoint referrer, URI relativeUri, Class< TEntity > entityType)
 Creates a new paged collection endpoint. More...
 
 AbstractCollectionEndpoint (Endpoint referrer, String relativeUri, Class< TEntity > entityType)
 Creates a new paged collection endpoint. More...
 
abstract TElementEndpoint buildElementEndpoint (URI relativeUri)
 Builds a ElementEndpoint for a specific child element of this collection. More...
 
void handleCapabilities (HttpResponse response)
 

Additional Inherited Members

- Protected Attributes inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, ElementEndpoint< TEntity > >
final Class< TEntity > entityType
 

Detailed Description

REST endpoint that represents a collection of TEntitys as ElementEndpoints.

Parameters
<TEntity>The type of entity the endpoint represents.

Constructor & Destructor Documentation

◆ CollectionEndpointImpl() [1/2]

net.typedrest.CollectionEndpointImpl< TEntity >.CollectionEndpointImpl ( Endpoint  referrer,
URI  relativeUri,
Class< TEntity >  entityType 
)

Creates a new element collection endpoint.

Parameters
referrerThe endpoint used to navigate to this one.
relativeUriThe URI of this endpoint relative to the referrer's. Missing trailing slash will be appended automatically.
entityTypeThe type of entity the endpoint represents.

◆ CollectionEndpointImpl() [2/2]

net.typedrest.CollectionEndpointImpl< TEntity >.CollectionEndpointImpl ( Endpoint  referrer,
String  relativeUri,
Class< TEntity >  entityType 
)

Creates a new element collection endpoint.

Parameters
referrerThe endpoint used to navigate to this one.
relativeUriThe URI of this endpoint relative to the referrer's. Missing trailing slash will be appended automatically. Prefix ./ to append a trailing slash to the parent URI if missing.
entityTypeThe type of entity the endpoint represents.

The documentation for this class was generated from the following file: