Examples of WikiPageFactory


Examples of fitnesse.WikiPageFactory

  }

  private static FitNesseContext loadContext(Arguments arguments)
      throws Exception {
    Builder builder = new Builder();
    WikiPageFactory wikiPageFactory = new WikiPageFactory();
    ComponentFactory componentFactory = new ComponentFactory(
        arguments.getRootPath());

    builder.port = arguments.getPort();
    builder.rootPath = arguments.getRootPath();
    builder.rootDirectoryName = arguments.getRootDirectory();

    builder.pageTheme = componentFactory
        .getProperty(ComponentFactory.THEME);
    builder.defaultNewPageContent = componentFactory
        .getProperty(ComponentFactory.DEFAULT_NEWPAGE_CONTENT);

    builder.root = wikiPageFactory.makeRootPage(builder.rootPath,
        builder.rootDirectoryName, componentFactory);

    builder.logger = makeLogger(arguments);
    builder.authenticator = makeAuthenticator(arguments.getUserpass(),
        componentFactory);
View Full Code Here

Examples of fitnesse.WikiPageFactory

    private static String FITNESSE_ROOT_PAGE = "FitNesseRoot";

    public static void main(String... args) throws Exception {
        ResponderFactory rFac = new ResponderFactory(SRC);
        ComponentFactory componentFactory = new ComponentFactory();
        WikiPageFactory pFac = new WikiPageFactory();
        WikiPage root = pFac.makeRootPage(SRC, FITNESSE_ROOT_PAGE, componentFactory);
        Request request = mock(Request.class);
        when(request.getResource()).thenReturn(SUITE_ROOT);
        when(request.getQueryString()).thenReturn("suite&format=xml");
        verifyNoMoreInteractions(request);
        Responder responder = rFac.makeResponder(request, root);
View Full Code Here

Examples of fitnesse.wiki.WikiPageFactory

    FitNesseVersion version = new FitNesseVersion();

    updateFitNesseProperties(version);

    WikiPageFactory wikiPageFactory = (WikiPageFactory) componentFactory.createComponent(WIKI_PAGE_FACTORY_CLASS, FileSystemPageFactory.class);

    if (versionsController == null) {
      versionsController = (VersionsController) componentFactory.createComponent(VERSIONS_CONTROLLER_CLASS, ZipFileVersionsController.class);
      Integer versionDays = getVersionDays();
      if (versionDays != null) {
        versionsController.setHistoryDepth(versionDays);
      }
    }
    if (recentChanges == null) {
      recentChanges = (RecentChanges) componentFactory.createComponent(RECENT_CHANGES_CLASS, RecentChangesWikiPage.class);
    }

    if (root == null) {
      root = wikiPageFactory.makePage(new File(rootPath, rootDirectoryName), rootDirectoryName, null);
    }

    PluginsLoader pluginsLoader = new PluginsLoader(componentFactory);

    if (logger == null) {
View Full Code Here

Examples of fitnesse.wiki.WikiPageFactory

  public static WikiPage makeRoot(String name, Properties properties) {
    return makeRoot(name, properties, new MemoryFileSystem());
  }

  public static WikiPage makeRoot(String name, Properties properties, MemoryFileSystem fileSystem) {
    WikiPageFactory factory = new FileSystemPageFactory(fileSystem, new MemoryVersionsController(fileSystem), new SystemVariableSource(properties));
    FileSystemPage page = (FileSystemPage) factory.makePage(new File("."), name, null);
    return page;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.