Package com.atlassian.confluence.pages

Examples of com.atlassian.confluence.pages.Page


        // Better mocks: https://bitbucket.org/atlassian/confluence-socialbookmarking-plugin/src/32a13cb027cb08c8063504ea05a50932daa99430/src/test/java/com/atlassian/confluence/plugins/socialbookmarking/BookmarkUpdateListenerTest.java
       
        Settings settings = new Settings();
        settings.setBaseUrl("http://foo.com");
       
    this.page = new Page();
    page.setTitle("hoge");
    page.setId(4l);

   
View Full Code Here


      // Cleanup Task should delete entries, that have no valid macroid and sectionname.
      // Also delete all props, where is no macro on the page.
      if (enableddl) {
        String propertyKey = new String(Base64.encodeBase64((macroid+sectionName).getBytes()));
        if (pageManager != null) {
          Page page = pageManager.getPage(pageid);
          contentPropertyManager.setTextProperty(page, PAGE_PROPERTY_PREFIX+propertyKey, finalcode)
          addPagePropertyKeyToPagePropertyList(page, PAGE_PROPERTY_PREFIX+propertyKey);
          params.put(DownloadCodeServlet.PARAM_PAGECONTENTPROPERTYKEY, propertyKey);     
          params.put(DownloadCodeServlet.PARAM_PAGEID, pageid.toString());           
        }
      }
      params.put(VELOCITY_PLACEHOLDER_CODE, finalcode);
      params.put(VELOCITY_PLACEHOLDER_TITLE, sectionName);
      result.add(params);
    }
    // Raw Download
    String propertyKey = new String(Base64.encodeBase64((macroid+"raw").getBytes()));
    if (pageManager != null) {
      Page page = pageManager.getPage(pageid);
      contentPropertyManager.setTextProperty(page, PAGE_PROPERTY_PREFIX+propertyKey, contentUnparsed);
      addPagePropertyKeyToPagePropertyList(page, PAGE_PROPERTY_PREFIX+propertyKey);
      context.put(DownloadCodeServlet.PARAM_RAWDOWNLOAD_PAGECONTENTPROPERTYKEY, propertyKey);
      context.put(VELOCITY_PLACEHOLDER_PAGEID, new Long(pageid).toString());
    }
View Full Code Here

   
    try {
      Long pageid = new Long(request.getParameter(PARAM_PAGEID));   
      String pagepropertykey = request.getParameter(PARAM_PAGECONTENTPROPERTYKEY);
      String asciiOnly = request.getParameter(PARAM_ASCIIONLY);
      Page page = pageManager.getPage(pageid);
      String cached = contentPropertyManager.getTextProperty(page, AdvancedCodeBlockMacro.PAGE_PROPERTY_PREFIX+pagepropertykey);
      if (asciiOnly != null && "true".equals(asciiOnly)) {
        cached = CharMatcher.ASCII.or(CharMatcher.anyOf(allowedChars)).retainFrom(cached);
        log.info("using ascii Only mode. Stripping all non ASCII Chars from content.");
      }
View Full Code Here

        return;
    }
   
    try {
      Long pageid = new Long(request.getParameter(PARAM_PAGEID));   
      Page page = pageManager.getPage(pageid);
      String unparsedPagePropertyKeyList = contentPropertyManager.getTextProperty(page, AdvancedCodeBlockMacro.PAGE_PROPERTY_PREFIX+pageid);
      List<String> pagePropertyKeyList = parseAllPagePropertyKeys(unparsedPagePropertyKeyList);
      out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
      out.print("<advancedcodeblockmacro>\n");
      out.print("<pageinfo>\n");
      out.print("  <pageid>"+pageid+"</pageid>\n");
      out.print("  <pagename>"+page.getTitle()+"</pagename>\n");
      out.print("  <spacekey>"+page.getSpaceKey()+"</spacekey>\n");
      out.print("</pageinfo>\n");
      out.print("<pagepropertykeys>\n");
      for (String pagepropertykey : pagePropertyKeyList) {
        out.print("  <pageproperty>\n");
        out.print("    <pagepropertykey>"+pagepropertykey+"</pagepropertykey>\n");
View Full Code Here

TOP

Related Classes of com.atlassian.confluence.pages.Page

Copyright © 2018 www.massapicom. 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.