Examples of PageId


Examples of org.gatein.api.page.PageId

    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.ADD_RESOURCE, description = "Adds the given page to the portal")
    public ModelObject addPage(@MappedPath("page-name") String name) {

        // Create the page
        PageId pageId = new PageId(siteId, name);
        Page page;
        try {
            page = portal.createPage(pageId);
        } catch (EntityAlreadyExistsException e) {
            throw alreadyExists("Could not add page", pageId);
View Full Code Here

Examples of org.gatein.api.page.PageId

    @Managed("{page-name}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.UPDATE_RESOURCE, description = "Updates a page of the portal")
    public ModelObject updatePage(@MappedPath("page-name") String name, @ManagedContext ModelObject pageModel) {
        // Retrieve page from api, ensuring it exists
        PageId pageId = new PageId(siteId, name);
        Page page = portal.getPage(pageId);
        if (page == null) {
            throw notFound("Could not update page", pageId);
        }
        boolean changed = false;
View Full Code Here

Examples of org.sweble.wikitext.engine.PageId

        return pageVertex;
    }

    private String getPageText(String wikitext, String wikipediaPageVertexId, TextConverter textConverter) throws LinkTargetException, EngineException {
        String fileTitle = wikipediaPageVertexId;
        PageId pageId = new PageId(PageTitle.make(config, fileTitle), -1);
        EngProcessedPage compiledPage = compiler.postprocess(pageId, wikitext, null);
        String text = (String) textConverter.go(compiledPage.getPage());
        if (text.length() > 0) {
            wikitext = text;
        }
View Full Code Here

Examples of org.sweble.wikitext.engine.PageId

    try {
      config = new SimpleWikiConfiguration(
              "classpath:/org/languagetool/resource/dev/SimpleWikiConfiguration.xml");
      compiler = new Compiler(config);
      final PageTitle pageTitle = PageTitle.make(config, "fileTitle");
      pageId = new PageId(pageTitle, -1);
    } catch (Exception e) {
      throw new RuntimeException("Could not set up text filter", e);
    }
  }
View Full Code Here

Examples of org.sweble.wikitext.engine.PageId

    try {
      config = new SimpleWikiConfiguration(
              "classpath:/org/languagetool/resource/dev/SimpleWikiConfiguration.xml");
      compiler = new Compiler(config);
      final PageTitle pageTitle = PageTitle.make(config, "fileTitle");
      pageId = new PageId(pageTitle, -1);
    } catch (Exception e) {
      throw new RuntimeException("Could not set up text filter", e);
    }
  }
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.