public class StatusInfoHtmlConverter extends ConverterHelper
StatusInfo class.| Constructor and Description |
|---|
StatusInfoHtmlConverter() |
| Modifier and Type | Method and Description |
|---|---|
List<Class<?>> |
getObjectClasses(Variant source)
Returns the list of object classes that can be converted from a given
variant.
|
protected String |
getStatusLabel(StatusInfo status)
Returns the status information to display in the default representation.
|
List<VariantInfo> |
getVariants(Class<?> source)
Returns the list of variants that can be converted from a given object class.
|
protected boolean |
isCompatible(Variant variant)
Indicates if the given variant is compatible with the media types supported
by this converter.
|
float |
score(Object source,
Variant target,
Resource resource)
Scores the affinity of this helper with the source class.
|
<T> float |
score(Representation source,
Class<T> target,
Resource resource)
Scores the affinity of this helper with the source class.
|
protected Representation |
toHtml(StatusInfo status)
Returns a representation for the given status.
In order to customize the default representation, this method can be overridden. |
<T> T |
toObject(Representation source,
Class<T> target,
Resource resource)
Converts a Representation into a regular Java object.
|
Representation |
toRepresentation(Object source,
Variant target,
Resource resource)
Converts a regular Java object into a Representation.
|
addObjectClass, addVariant, addVariants, getVariants, updatePreferences, updatePreferencespublic List<Class<?>> getObjectClasses(Variant source)
ConverterHelpergetObjectClasses in class ConverterHelpersource - The source variant.protected String getStatusLabel(StatusInfo status)
status - The status.StatusService.toRepresentation(Status, Request, Response)public List<VariantInfo> getVariants(Class<?> source) throws IOException
ConverterHelpergetVariants in class ConverterHelpersource - The source object class.IOExceptionprotected boolean isCompatible(Variant variant)
variant - The variant.public float score(Object source, Variant target, Resource resource)
ConverterHelperscore in class ConverterHelpersource - The source object to convert.target - The expected representation metadata.resource - The calling resource.public <T> float score(Representation source, Class<T> target, Resource resource)
ConverterHelperscore in class ConverterHelperT - The expected class of the Java object.source - The source representation to convert.target - The expected class of the Java object.resource - The calling resource.protected Representation toHtml(StatusInfo status)
status - The status info to represent.public <T> T toObject(Representation source, Class<T> target, Resource resource) throws IOException
ConverterHelpertoObject in class ConverterHelperT - The expected class of the Java object.source - The source representation to convert.target - The expected class of the Java object.resource - The calling resource.IOExceptionpublic Representation toRepresentation(Object source, Variant target, Resource resource) throws IOException
ConverterHelpertoRepresentation in class ConverterHelpersource - The source object to convert.target - The expected representation metadata.resource - The calling resource.IOExceptionCopyright © 2005–2025. All rights reserved.