public interface ResourceCreator extends ContextProvider, Identifiable
Resource
Modifier and Type | Method and Description |
---|---|
default <T> Optional<Resource<T>> |
createResource(String id)
creates a new Resource with the specified ID (=Name)
|
default <T> Optional<Resource<T>> |
createResource(String id,
Identification consumer)
creates a new Resource with the specified ID (=Name)
|
default <T> Optional<Resource<T>> |
createResource(String id,
T t)
creates a new Resource with the specified ID (=Name)
|
default <T> Optional<Resource<T>> |
createResource(String id,
T t,
Identification consumer)
creates a new Resource with the specified ID (=Name)
|
default <T> List<T> |
optionalToList(Optional<T> optional)
utility method to create a list from an Optional.
|
debug, debug, error, error, getContext
getID, isOwner
default <T> Optional<Resource<T>> createResource(String id)
T
- the data-type of the resourceid
- the iddefault <T> Optional<Resource<T>> createResource(String id, Identification consumer)
T
- the data-type of the resourceid
- the idconsumer
- the consumer of the Resourcedefault <T> Optional<Resource<T>> createResource(String id, T t)
T
- the data-type of the resourceid
- the idt
- the datadefault <T> Optional<Resource<T>> createResource(String id, T t, Identification consumer)
T
- the data-type of the resourceid
- the idt
- the dataconsumer
- the consumer of the Resourcedefault <T> List<T> optionalToList(Optional<T> optional)
T
- the typeoptional
- the Optional to create the List fromCopyright © 2016. All rights reserved.