Package io.wcm.caravan.hal.resource
Class HalResourceFactory
- java.lang.Object
-
- io.wcm.caravan.hal.resource.HalResourceFactory
-
@Deprecated @ProviderType public final class HalResourceFactory extends Object
Deprecated.just createHalResource
andLink
instances using the new constructorsFactory for HALHalResource
s.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.node.ObjectNode
convert(Object input)
Deprecated.use a JacksonObjectMapper
insteadstatic Link
createLink(String href)
Deprecated.use the constructorinstead
static HalResource
createResource(com.fasterxml.jackson.databind.node.ObjectNode model, String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsstatic HalResource
createResource(Object model, String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsstatic HalResource
createResource(String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsstatic <T> T
getStateAsObject(HalResource halResource, Class<T> type)
Deprecated.
-
-
-
Method Detail
-
convert
@Deprecated public static com.fasterxml.jackson.databind.node.ObjectNode convert(Object input)
Deprecated.use a JacksonObjectMapper
insteadConverts any object into a JSONObjectNode
.- Parameters:
input
- Any object- Returns:
- JSON object node
-
createLink
@Deprecated public static Link createLink(String href)
Deprecated.use the constructorinstead
Creates a HAL link with the given HREF.- Parameters:
href
- Link HREF- Returns:
- Link
-
createResource
@Deprecated public static HalResource createResource(String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsCreates a HAL resource with empty state but a self link. Mostly needed for index resources.- Parameters:
href
- The self HREF for the resource- Returns:
- New HAL resource
-
createResource
@Deprecated public static HalResource createResource(Object model, String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsCreates a HAL resource with state and a self link.- Parameters:
model
- The state of the resourcehref
- The self link for the resource- Returns:
- New HAL resource
-
createResource
@Deprecated public static HalResource createResource(com.fasterxml.jackson.databind.node.ObjectNode model, String href)
Deprecated.just createHalResource
andLink
instances using the new constructorsCreates a HAL resource with state and a self link.- Parameters:
model
- The state of the resourcehref
- The self link for the resource- Returns:
- New HAL resource
-
getStateAsObject
@Deprecated public static <T> T getStateAsObject(HalResource halResource, Class<T> type)
Deprecated.Converts the JSON model to an object of the given type.- Type Parameters:
T
- Output type- Parameters:
halResource
- HAL resource with model to converttype
- Type of the requested object- Returns:
- State as object
-
-