Class ActionReportJsonProvider
- java.lang.Object
-
- org.glassfish.admin.rest.provider.BaseProvider<ActionReporter>
-
- org.glassfish.admin.rest.provider.ActionReportJsonProvider
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<ActionReporter>
- Direct Known Subclasses:
ActionReportJson2Provider
@Provider @Produces({"application/json","application/x-javascript"}) public class ActionReportJsonProvider extends BaseProvider<ActionReporter>- Since:
- 4.0
- Author:
- Ludovic Champenois, Jason Lee, mmares
-
-
Field Summary
-
Fields inherited from class org.glassfish.admin.rest.provider.BaseProvider
desiredType, habitat, HEADER_DEBUG, JSONP_CALLBACK, requestHeaders, supportedMediaTypes, uriInfo
-
-
Constructor Summary
Constructors Constructor Description ActionReportJsonProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdecodeEol(String str)StringgetContent(ActionReporter ar)Returns the content of theActionReporterin Json format as aString.protected jakarta.json.JsonObjectgetExtraProperties(Properties props)protected <T> TgetFieldValue(ActionReporter ar, String name, T type)protected booleanisGivenTypeWritable(Class<?> type, Type genericType)Overwrite this if you need different test of type compatibility.protected jakarta.json.JsonArrayprocessChildren(List<ActionReport.MessagePart> parts)protected jakarta.json.JsonObjectprocessReport(ActionReporter ar)Converts an ActionReport into a JsonObjectprotected jakarta.json.JsonArrayprocessSubReports(List<ActionReporter> subReports)-
Methods inherited from class org.glassfish.admin.rest.provider.BaseProvider
canShowDeprecatedItems, canShowHiddenCommands, getCallBackJSONP, getResourceLinks, getResourceLinks, getSize, getXmlCommandLinks, isDebug, isWriteable, writeTo
-
-
-
-
Method Detail
-
isGivenTypeWritable
protected boolean isGivenTypeWritable(Class<?> type, Type genericType)
Description copied from class:BaseProviderOverwrite this if you need different test of type compatibility. Used from isWritable method.- Overrides:
isGivenTypeWritablein classBaseProvider<ActionReporter>
-
getContent
public String getContent(ActionReporter ar)
Returns the content of theActionReporterin Json format as aString.This is equivalent to
processReport(ar).toString()- Specified by:
getContentin classBaseProvider<ActionReporter>- Parameters:
ar-- Returns:
-
processReport
protected jakarta.json.JsonObject processReport(ActionReporter ar) throws jakarta.json.JsonException
Converts an ActionReport into a JsonObject- Parameters:
ar-- Returns:
- Throws:
jakarta.json.JsonException
-
processChildren
protected jakarta.json.JsonArray processChildren(List<ActionReport.MessagePart> parts) throws jakarta.json.JsonException
- Throws:
jakarta.json.JsonException
-
processSubReports
protected jakarta.json.JsonArray processSubReports(List<ActionReporter> subReports) throws jakarta.json.JsonException
- Throws:
jakarta.json.JsonException
-
getExtraProperties
protected jakarta.json.JsonObject getExtraProperties(Properties props) throws jakarta.json.JsonException
- Throws:
jakarta.json.JsonException
-
getFieldValue
protected <T> T getFieldValue(ActionReporter ar, String name, T type)
-
-