@Override public void init(ServletConfig config) throws ServletException { super.init(config); try { PhrescoServerFactory.initialize(); PhrescoServerFactory.getRepositoryManager().getApplicationTypes(); // List<ApplicationType> applicationTypes = // PhrescoServerFactory.getDBManager().getApplicationTypes(); // System.out.println("applicationTypes " + applicationTypes); } catch (PhrescoException e) { throw new ServletException(e); } new VideoDownloader().start(); }
private String buildCommandString(ProjectInfo info) throws PhrescoException { if (isDebugEnabled) { S_LOGGER.debug("Entering Method ArchetypeExecutorImpl.buildCommandString(ProjectInfo info)"); S_LOGGER.debug("buildCommandString() ProjectCode=" + info.getCode()); } ArchetypeInfo archInfo = PhrescoServerFactory.getRepositoryManager().getArchetype(info); if (archInfo == null) { throw new PhrescoException("Archetype not defined for " + info.getTechnology().getName()); } // For Thread-Safe,using StringBuffer instead of StringBuilder StringBuffer commandStr = new StringBuffer(); commandStr .append(Constants.MVN_COMMAND) .append(STR_BLANK_SPACE) .append(Constants.MVN_ARCHETYPE) .append(STR_COLON) .append(Constants.MVN_GOAL_GENERATE) .append(STR_BLANK_SPACE) .append(ARCHETYPE_ARCHETYPEGROUPID) .append(STR_EQUALS) .append(archInfo.getGroupId()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_ARCHETYPEARTIFACTID) .append(STR_EQUALS) .append(archInfo.getArtifactId()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_ARCHETYPEVERSION) .append(STR_EQUALS) .append(archInfo.getVersion()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_GROUPID) .append(STR_EQUALS) .append(archInfo.getProjectGroupId()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_ARTIFACTID) .append(STR_EQUALS) .append(STR_DOUBLE_QUOTES) .append(info.getCode()) .append(STR_DOUBLE_QUOTES) // artifactId --> project name could have space in between .append(STR_BLANK_SPACE) .append(ARCHETYPE_VERSION) .append(STR_EQUALS) .append(info.getVersion()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_ARCHETYPEREPOSITORYURL) .append(STR_EQUALS) .append(serverConfig.getRepositoryURL()) .append(STR_BLANK_SPACE) .append(ARCHETYPE_INTERACTIVEMODE) .append(STR_EQUALS) .append(INTERACTIVE_MODE); return commandStr.toString(); }
private String getRepositoryUrl() throws PhrescoException { String repositoryUrl = PhrescoServerFactory.getRepositoryManager().getRepositoryURL(); return repositoryUrl; }