private KeywordFacade createKeywordFacade(GenerateRequest request) { LOGGER.debug("creating keyword facade"); KeywordFacadeImpl keywordFacade = new KeywordFacadeImpl(); keywordFacade.setKeywords(request.getKeywords()); return keywordFacade; }
@Override public DoorwayContext createContext(GenerateRequest request) { LOGGER.debug("creating doorway context"); DoorwayContext context = new DoorwayContext(); AbstractTextGenerator generator = textGeneratorFacade.getGenerator(request.getGeneralProperties().getTextGeneratorName()); generator.setSource(request.getTextSource().getContent()); if (!generator.isInitialized()) { generator.initialize(); } context.setTextGenerator(generator); context.setKeywordFacade(createKeywordFacade(request)); context.setUrl(request.getGeneralProperties().getUrl()); return context; }