@Override
	public void onPhase(PHASE phase, PHASE_STAGE stage) {
		if (phase.equals(PHASE.CONTENT_SCRAPE)
				&& stage.equals(PHASE_STAGE.COMPLETE) && canTerminate) {
			logger.debug("Done scrapping. Deleting mapping");
			// delete the mapping. We are done with the scrape
			
		} else if (phase.equals(PHASE.PAGE_SCRAPE)
				&& stage.equals(PHASE_STAGE.COMPLETE)) {
			if (lowerYearBound > upperYearBound) {
				canTerminate = true;
				logger.info("Fetched complete year range. Can terminate");
			} else {

				addYearRange();
				String fetchUrl = buildFetchURL();
				computeMaxPage(APIUtil.initTemplate(), fetchUrl);
				this.controlFlowManager.startPageScrape(apiKey, fetchUrl,
						maxPages);
			}
		}
	}