Class ConstraintAction
java.lang.Object
gov.nasa.jpl.aerie.merlin.server.services.ConstraintAction
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintAction(ConstraintsDSLCompilationService constraintsDSLCompilationService, ConstraintService constraintService, PlanService planService, SimulationService simulationService) -
Method Summary
Modifier and TypeMethodDescriptiongetConstraintProcedureEffectiveArgumentsBulk(HasuraAction.ConstraintArguments procedureArgumentsList) org.apache.commons.lang3.tuple.Pair<Integer, Map<ConstraintRecord, Fallible<gov.nasa.jpl.aerie.constraints.model.ConstraintResult, List<? extends Exception>>>> getViolations(PlanId planId, Optional<SimulationDatasetId> simulationDatasetId, boolean force, HasuraAction.Session userSession) Check the constraints on a plan's specification for violations.voidrefreshConstraintProcedureParameterTypes(long constraintId, long revision) Update the parameter schema of a procedural constraint's definition
-
Constructor Details
-
ConstraintAction
public ConstraintAction(ConstraintsDSLCompilationService constraintsDSLCompilationService, ConstraintService constraintService, PlanService planService, SimulationService simulationService)
-
-
Method Details
-
refreshConstraintProcedureParameterTypes
public void refreshConstraintProcedureParameterTypes(long constraintId, long revision) Update the parameter schema of a procedural constraint's definition- Parameters:
constraintId- The id of the constraint's metadatarevision- The definition to be updated
-
getConstraintProcedureEffectiveArgumentsBulk
public List<BulkConstraintEffectiveArgumentResponse> getConstraintProcedureEffectiveArgumentsBulk(HasuraAction.ConstraintArguments procedureArgumentsList) -
getViolations
public org.apache.commons.lang3.tuple.Pair<Integer,Map<ConstraintRecord, getViolationsFallible<gov.nasa.jpl.aerie.constraints.model.ConstraintResult, List<? extends Exception>>>> (PlanId planId, Optional<SimulationDatasetId> simulationDatasetId, boolean force, HasuraAction.Session userSession) throws NoSuchPlanException, MissionModelService.NoSuchMissionModelException, SimulationDatasetMismatchException Check the constraints on a plan's specification for violations.- Parameters:
planId- The plan to check.simulationDatasetId- If provided, the id of the simulation dataset to check constraints against. Defaults to the latest simulation of the planforce- If true, ignore cached values and rerun all constraints.userSession- The Hasura Session that made the request.- Returns:
- A mapping of each constraint and its result.
- Throws:
NoSuchPlanException- If the plan does not exist.MissionModelService.NoSuchMissionModelException- If the plan's mission model does not exist.SimulationDatasetMismatchException- If the specified simulation is not a simulation of the specified plan.
-