use of org.alien4cloud.tosca.editor.exception.RecoverTopologyException in project alien4cloud by alien4cloud.
the class EditorService method checkTopologyRecovery.
/**
* Checks if the topology needs to be recovered and eventually throws an error.
* The {@link RecoverTopologyOperation} is cache for later use in recovering process
*/
public void checkTopologyRecovery() {
Topology topology = EditionContextManager.getTopology();
EditionContext context = EditionContextManager.get();
context.setRecoveryOperation(recoveryHelperService.buildRecoveryOperation(topology));
if (context.getRecoveryOperation() != null) {
throw new RecoverTopologyException("The topology needs to be recovered.", context.getRecoveryOperation());
}
}
Aggregations