Package com.helixframework.api.contract
Class HateoasCollectionResponse<T>
java.lang.Object
com.helixframework.api.contract.HateoasResponse
com.helixframework.api.contract.HateoasCollectionResponse<T>
- Type Parameters:
T- item type
API response that returns a collection with HATEOS links.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance ofHateoasCollectionResponse.HateoasCollectionResponse(Collection<T> items) Creates an instance ofHateoasCollectionResponsewithout links.HateoasCollectionResponse(Collection<T> items, Map<String, HalLink> links) Creates an instance ofHateoasCollectionResponsewith links. -
Method Summary
-
Constructor Details
-
HateoasCollectionResponse
public HateoasCollectionResponse()Creates an instance ofHateoasCollectionResponse. -
HateoasCollectionResponse
Creates an instance ofHateoasCollectionResponsewithout links.- Parameters:
items- items to return in response
-
HateoasCollectionResponse
Creates an instance ofHateoasCollectionResponsewith links.- Parameters:
items- items to return in responselinks- hateoas links
-
-
Method Details
-
getCount
public int getCount()Gets the number of items in the collection.- Returns:
- number of items in the collection
-
getItems
Gets the items.- Returns:
- items
-