Interface MerlinDatabaseService.ReaderRole
- All Known Subinterfaces:
MerlinDatabaseService.OwnerRole
- All Known Implementing Classes:
GraphQLMerlinDatabaseService
- Enclosing interface:
MerlinDatabaseService
public static interface MerlinDatabaseService.ReaderRole
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ensurePlanExists
(PlanId planId) confirms that the specified plan exists in the aerie database, throwing exception if notgetExternalEvents
(PlanId planId, Instant horizonStart) getExternalProfiles
(PlanId planId) Gets external profiles associated to a plan, including segmentsgetMissionModelTypes
(PlanId planId) getMissionModelTypes
(gov.nasa.jpl.aerie.types.MissionModelId missionModelId) getPlanActivityDirectives
(PlanMetadata planMetadata, gov.nasa.jpl.aerie.scheduler.model.Problem mission) create an in-memory snapshot of the target plan's activity contents from aeriegetPlanMetadata
(PlanId planId) fetch current metadata of the target plan (not the activity instance content)long
getPlanRevision
(PlanId planId) fetch current revision number of the target plan stored in aeriegetResourceTypes
(PlanId planId) Gets resource types associated to a plan, those coming from the mission model as well as those coming from external dataset resourcesOptional
<org.apache.commons.lang3.tuple.Pair<gov.nasa.jpl.aerie.merlin.driver.SimulationResults, DatasetId>> getSimulationResults
(PlanMetadata planMetadata) Gets existing simulation results for current plan if they exist and are suitable for scheduling purposes (current revision, covers the entire planning horizon) These simulation results do not include events and topics.
-
Method Details
-
getMissionModelTypes
MerlinDatabaseService.MissionModelTypes getMissionModelTypes(PlanId planId) throws IOException, MerlinServiceException - Throws:
IOException
MerlinServiceException
-
getMissionModelTypes
MerlinDatabaseService.MissionModelTypes getMissionModelTypes(gov.nasa.jpl.aerie.types.MissionModelId missionModelId) throws IOException, MerlinServiceException, NoSuchMissionModelException -
getPlanRevision
fetch current revision number of the target plan stored in aerie- Parameters:
planId
- identifier of the plan container whose details should be fetched- Returns:
- the current revision number of the plan as stored in aerie
- Throws:
NoSuchPlanException
- when the plan container does not exist in aerieIOException
MerlinServiceException
-
getPlanMetadata
PlanMetadata getPlanMetadata(PlanId planId) throws IOException, NoSuchPlanException, MerlinServiceException fetch current metadata of the target plan (not the activity instance content)- Parameters:
planId
- identifier of the plan container whose details should be fetched- Returns:
- metadata about the plan that is useful to the scheduler, including current plan revision
- Throws:
NoSuchPlanException
- when the plan container does not exist in aerieIOException
MerlinServiceException
-
getPlanActivityDirectives
MerlinPlan getPlanActivityDirectives(PlanMetadata planMetadata, gov.nasa.jpl.aerie.scheduler.model.Problem mission) throws IOException, NoSuchPlanException, MerlinServiceException, InvalidJsonException, gov.nasa.jpl.aerie.merlin.protocol.types.InstantiationException create an in-memory snapshot of the target plan's activity contents from aerie- Parameters:
planMetadata
- identifying details of the plan to fetch content formission
- the mission model that the plan adheres to- Returns:
- a newly allocated snapshot of the plan contents
- Throws:
NoSuchPlanException
- when the plan container does not exist in aerieIOException
MerlinServiceException
InvalidJsonException
gov.nasa.jpl.aerie.merlin.protocol.types.InstantiationException
-
ensurePlanExists
void ensurePlanExists(PlanId planId) throws IOException, NoSuchPlanException, MerlinServiceException confirms that the specified plan exists in the aerie database, throwing exception if not- Parameters:
planId
- the target plan database identifier- Throws:
NoSuchPlanException
- when the plan container does not exist in aerieIOException
MerlinServiceException
-
getSimulationResults
Optional<org.apache.commons.lang3.tuple.Pair<gov.nasa.jpl.aerie.merlin.driver.SimulationResults,DatasetId>> getSimulationResults(PlanMetadata planMetadata) throws MerlinServiceException, IOException, InvalidJsonException Gets existing simulation results for current plan if they exist and are suitable for scheduling purposes (current revision, covers the entire planning horizon) These simulation results do not include events and topics.- Parameters:
planMetadata
- the plan metadata- Returns:
- optionally: simulation results and its dataset id
- Throws:
MerlinServiceException
IOException
InvalidJsonException
-
getExternalProfiles
Gets external profiles associated to a plan, including segments- Parameters:
planId
- the plan id- Throws:
MerlinServiceException
IOException
-
getExternalEvents
Map<String,List<gov.nasa.ammos.aerie.procedural.timeline.payloads.ExternalEvent>> getExternalEvents(PlanId planId, Instant horizonStart) throws MerlinServiceException, IOException - Throws:
MerlinServiceException
IOException
-
getResourceTypes
Collection<ResourceType> getResourceTypes(PlanId planId) throws IOException, MerlinServiceException, NoSuchPlanException Gets resource types associated to a plan, those coming from the mission model as well as those coming from external dataset resources- Parameters:
planId
- the plan id- Throws:
IOException
MerlinServiceException
NoSuchPlanException
-