Class ResponseSerializers
java.lang.Object
gov.nasa.jpl.aerie.scheduler.server.http.ResponseSerializers
json serialization methods for data entities used in the scheduler response bodies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.json.JsonValueserializeArgument(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue parameter) static javax.json.JsonValuestatic javax.json.JsonValuestatic javax.json.JsonValuecreate report of given exception that can be passed as json payloadstatic javax.json.JsonValueserializeFailedGlobalSchedulingConditions(List<List<SchedulingCompilationError.UserCodeError>> failedGlobalSchedulingConditions) static javax.json.JsonValueserializeFailedGoals(List<org.apache.commons.lang3.tuple.Pair<gov.nasa.jpl.aerie.scheduler.model.GoalId, List<SchedulingCompilationError.UserCodeError>>> failedGoals) static javax.json.JsonValueserializeFailureReason(gov.nasa.jpl.aerie.json.JsonParseResult.FailureReason failure) static javax.json.JsonValueserializeInstantiationException(gov.nasa.jpl.aerie.merlin.protocol.types.InstantiationException ex) static javax.json.JsonValuestatic javax.json.JsonValuestatic <T> javax.json.JsonValueserializeIterable(Function<T, javax.json.JsonValue> elementSerializer, Iterable<T> elements) static <T> javax.json.JsonValueserializeMap(Function<T, javax.json.JsonValue> fieldSerializer, Map<String, T> fields) static javax.json.JsonValuestatic javax.json.JsonValuestatic javax.json.JsonValueserializeParseFailureBreadcrumb(gov.nasa.jpl.aerie.json.Breadcrumb breadcrumb) static javax.json.JsonValueserializeScheduleResults(ScheduleResults results) serialize the provided scheduling result summary to jsonstatic javax.json.JsonValueserialize the scheduler run result, including if it is incomplete/failedstatic javax.json.JsonValueserializeString(String value) static javax.json.JsonValueserializeStringList(List<String> elements) static javax.json.JsonValueserializeValueSchema(gov.nasa.jpl.aerie.merlin.protocol.types.ValueSchema schema)
-
Constructor Details
-
ResponseSerializers
public ResponseSerializers()
-
-
Method Details
-
serializeIterable
-
serializeMap
-
serializeScheduleResultsResponse
public static javax.json.JsonValue serializeScheduleResultsResponse(ScheduleAction.Response response) serialize the scheduler run result, including if it is incomplete/failed- Parameters:
response- the result of the scheduling run to serialize- Returns:
- a json serialization of the scheduling run result
-
serializeArgument
public static javax.json.JsonValue serializeArgument(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue parameter) -
serializeBulkEffectiveArgumentResponseList
public static javax.json.JsonValue serializeBulkEffectiveArgumentResponseList(List<BulkEffectiveArgumentResponse> responses) -
serializeBulkEffectiveArgumentResponse
public static javax.json.JsonValue serializeBulkEffectiveArgumentResponse(BulkEffectiveArgumentResponse response) -
serializeInstantiationException
public static javax.json.JsonValue serializeInstantiationException(gov.nasa.jpl.aerie.merlin.protocol.types.InstantiationException ex) -
serializeStringList
-
serializeString
-
serializeScheduleResults
serialize the provided scheduling result summary to json- Parameters:
results- the scheduling results to serialize- Returns:
- a json serialization of the given scheduling result
-
serializeFailedGlobalSchedulingConditions
public static javax.json.JsonValue serializeFailedGlobalSchedulingConditions(List<List<SchedulingCompilationError.UserCodeError>> failedGlobalSchedulingConditions) -
serializeFailedGoals
public static javax.json.JsonValue serializeFailedGoals(List<org.apache.commons.lang3.tuple.Pair<gov.nasa.jpl.aerie.scheduler.model.GoalId, List<SchedulingCompilationError.UserCodeError>>> failedGoals) -
serializeNoSuchSpecificationException
public static javax.json.JsonValue serializeNoSuchSpecificationException(NoSuchSpecificationException e) -
serializeNoSuchPlanException
-
serializeException
create report of given exception that can be passed as json payload- Parameters:
e- the exception to generate json report for- Returns:
- a json serialization of the exception details
-
serializeFailureReason
public static javax.json.JsonValue serializeFailureReason(gov.nasa.jpl.aerie.json.JsonParseResult.FailureReason failure) -
serializeParseFailureBreadcrumb
public static javax.json.JsonValue serializeParseFailureBreadcrumb(gov.nasa.jpl.aerie.json.Breadcrumb breadcrumb) -
serializeInvalidJsonException
-
serializeInvalidEntityException
-
serializeValueSchema
public static javax.json.JsonValue serializeValueSchema(gov.nasa.jpl.aerie.merlin.protocol.types.ValueSchema schema)
-