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.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.JsonValueserializeInstantiationException(gov.nasa.jpl.aerie.merlin.protocol.types.InstantiationException ex) static <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.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)
-
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)
-