@ProviderType
public static interface BaseRepresentor.BaseFirstStep<T,S extends BaseRepresentor<T>,U extends BaseRepresentor.BaseFirstStep<T,S,U>>
Modifier and Type | Method and Description |
---|---|
U |
addApplicationRelativeURL(java.lang.String key,
java.util.function.Function<T,java.lang.String> function)
Adds information about a resource's application relative URL field.
|
U |
addBinary(java.lang.String key,
BinaryFunction<T> binaryFunction)
Adds binary files to a resource.
|
U |
addBoolean(java.lang.String key,
java.util.function.Function<T,java.lang.Boolean> function)
Adds information about a resource's boolean field.
|
U |
addBooleanList(java.lang.String key,
java.util.function.Function<T,java.util.List<java.lang.Boolean>> function)
Adds information about a resource's boolean list field.
|
U |
addDate(java.lang.String key,
java.util.function.Function<T,java.util.Date> function)
Adds information about a resource's date field.
|
U |
addLink(java.lang.String key,
java.lang.String url)
Adds information about a resource link.
|
<V> U |
addLinkedModel(java.lang.String key,
java.lang.Class<? extends Identifier<V>> identifierClass,
java.util.function.Function<T,V> modelToIdentifierFunction)
Adds information about an embeddable related resource.
|
U |
addLocalizedStringByLanguage(java.lang.String key,
java.util.function.BiFunction<T,AcceptLanguage,java.lang.String> stringFunction)
Provides information about a resource localized string field.
|
U |
addLocalizedStringByLocale(java.lang.String key,
java.util.function.BiFunction<T,java.util.Locale,java.lang.String> stringFunction)
Provides information about a resource localized string field.
|
<V> U |
addNested(java.lang.String key,
java.util.function.Function<T,V> transformFunction,
java.util.function.Function<NestedRepresentor.Builder<V>,NestedRepresentor<V>> function)
Provides information about a nested field.
|
<V> U |
addNestedList(java.lang.String key,
java.util.function.Function<T,java.util.List<V>> transformFunction,
java.util.function.Function<NestedRepresentor.Builder<V>,NestedRepresentor<V>> function)
Adds a nested list field to the representor.
|
U |
addNumber(java.lang.String key,
java.util.function.Function<T,java.lang.Number> function)
Adds information about a resource's number field.
|
U |
addNumberList(java.lang.String key,
java.util.function.Function<T,java.util.List<java.lang.Number>> function)
Adds information about a resource's number list field.
|
<V,S extends Identifier<?>> |
addRelatedCollection(java.lang.String key,
java.lang.Class<S> itemIdentifierClass,
java.util.function.Function<T,V> modelToIdentifierFunction)
Adds information about a related collection.
|
U |
addRelativeURL(java.lang.String key,
java.util.function.Function<T,java.lang.String> function)
Adds information about a resource's relative URL field.
|
U |
addString(java.lang.String key,
java.util.function.Function<T,java.lang.String> function)
Adds information about a resource's string field.
|
U |
addStringList(java.lang.String key,
java.util.function.Function<T,java.util.List<java.lang.String>> function)
Adds information about a resource's string list field.
|
S |
build()
Constructs and returns a
NestedRepresentor instance with the
information provided to the builder. |
U addApplicationRelativeURL(java.lang.String key, java.util.function.Function<T,java.lang.String> function)
URLs returned by this function should already be encoded (to check for potential security holes).
key
- the field's namefunction
- the function used to get the relative URLU addBinary(java.lang.String key, BinaryFunction<T> binaryFunction)
key
- the binary resource's namebinaryFunction
- the function used to get the binariesU addBoolean(java.lang.String key, java.util.function.Function<T,java.lang.Boolean> function)
key
- the field's namefunction
- the function used to get the boolean valueU addBooleanList(java.lang.String key, java.util.function.Function<T,java.util.List<java.lang.Boolean>> function)
key
- the field's namefunction
- the function used to get the boolean listU addDate(java.lang.String key, java.util.function.Function<T,java.util.Date> function)
key
- the field's namefunction
- the function used to get the date valueU addLink(java.lang.String key, java.lang.String url)
key
- the field's nameurl
- the link's URL<V> U addLinkedModel(java.lang.String key, java.lang.Class<? extends Identifier<V>> identifierClass, java.util.function.Function<T,V> modelToIdentifierFunction)
key
- the relation's nameidentifierClass
- the related resource identifier's classmodelToIdentifierFunction
- the function used to get the
related resource's identifierU addLocalizedStringByLanguage(java.lang.String key, java.util.function.BiFunction<T,AcceptLanguage,java.lang.String> stringFunction)
key
- the field's namestringFunction
- the function used to get the string valueU addLocalizedStringByLocale(java.lang.String key, java.util.function.BiFunction<T,java.util.Locale,java.lang.String> stringFunction)
key
- the field's namestringFunction
- the function used to get the string value<V> U addNested(java.lang.String key, java.util.function.Function<T,V> transformFunction, java.util.function.Function<NestedRepresentor.Builder<V>,NestedRepresentor<V>> function)
key
- the field's nametransformFunction
- the function that transforms the model into
the model used inside the nested representorfunction
- the function that creates the nested representor<V> U addNestedList(java.lang.String key, java.util.function.Function<T,java.util.List<V>> transformFunction, java.util.function.Function<NestedRepresentor.Builder<V>,NestedRepresentor<V>> function)
key
- the field's nametransformFunction
- the function that transforms the model into
the list whose models are used inside the nested representorfunction
- the function that creates the nested representor for
each modelU addNumber(java.lang.String key, java.util.function.Function<T,java.lang.Number> function)
key
- the field's namefunction
- the function used to get the number's valueU addNumberList(java.lang.String key, java.util.function.Function<T,java.util.List<java.lang.Number>> function)
key
- the field's namefunction
- the function used to get the number list<V,S extends Identifier<?>> U addRelatedCollection(java.lang.String key, java.lang.Class<S> itemIdentifierClass, java.util.function.Function<T,V> modelToIdentifierFunction)
key
- the relation's nameitemIdentifierClass
- the class of the collection items'
identifierU addRelativeURL(java.lang.String key, java.util.function.Function<T,java.lang.String> function)
URLs returned by this function should already be encoded (to check for potential security holes).
key
- the field's namefunction
- the function used to get the relative URLU addString(java.lang.String key, java.util.function.Function<T,java.lang.String> function)
key
- the field's namefunction
- the function used to get the string's valueU addStringList(java.lang.String key, java.util.function.Function<T,java.util.List<java.lang.String>> function)
key
- the field's namefunction
- the function used to get the string listS build()
NestedRepresentor
instance with the
information provided to the builder.Representor
instance