Examples of WikiPage


Examples of com.ecyrd.jspwiki.WikiPage

    protected void setUp() throws Exception
    {
        Properties props = new Properties();
        props.load( TestEngine.findTestProperties() );
        testEngine = new TestEngine( props );
        WikiContext context = new WikiContext( testEngine, new WikiPage(testEngine,"dummyPage"));
        val = new InputValidator( TEST, context );
    }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.wikis.WikiPage

        do{
          params.put("page", Integer.toString(page));
          EntityList<WikiPage> wikiPages = wikiService.getWikiPages(wikiLabel, params);
          for (Iterator<WikiPage> iter = wikiPages.iterator(); iter.hasNext();) {
              JsonJavaObject wikiEntry = new JsonJavaObject();
              WikiPage wikiPage = iter.next();
              entityToJsonObject(wikiPage, AtomXPath.values(), wikiEntry);
              entityToJsonObject(wikiPage, WikiXPath.values(), wikiEntry);
              String pageHTML = wikiPage.getContent();
              wikiEntry.put("content", pageHTML);

              wikiEntry.putArray("pageImages", extractImagesFromWikiPage(pageHTML));
              pagesArray.add(wikiEntry);
          }
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.wiki.WikiPage

        if(parameter == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage", this.getClass().getName()));
        }

        WikiPage wikiPage = (WikiPage)parameter;

        // check for mandatory fields
        String name = wikiPage.getName();
        if(name == null || name.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.name", this.getClass().getName()));
        }

        String content = wikiPage.getContent();
        if(content == null || content.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.content", this.getClass().getName()));
        }

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(name);
        multiParameter.addParameter(content);

        Hashtable attributes = new Hashtable();
        String comment = wikiPage.getComment();
        if(comment != null && !comment.trim().equals("")){
            attributes.put(WikiKeys.COMMENT, comment);
        }

        multiParameter.addParameter(attributes);
View Full Code Here

Examples of com.piki.shared.model.WikiPage

   * .gwt.user.client.rpc.AsyncCallback)
   */
  @Override
  public void toBeSaved(final String c, final AsyncCallback<Boolean> success) {

    final WikiPage wpc = new WikiPage();
    wpc.setName(getName());
    wpc.setWiki(c);

    wikiPageDAO.update(wpc, new AsyncCallback<WikiPage>() {

      @Override
      public void onFailure(Throwable caught) {
View Full Code Here

Examples of com.piki.shared.model.WikiPage

  }

  @Override
  public void read(String name, AsyncCallback<WikiPage> wikiPage) {

    WikiPage result = new WikiPage();
    result.setName(name);
    result.setWiki(storage.read(name));
    result.setHtml(storage.readHtml(name));

    if (result.getWiki() == null)
      wikiPage.onFailure(new Exception("html5 storage is not supported"));
    else
      wikiPage.onSuccess(result);
  }
View Full Code Here

Examples of com.taskadapter.redmineapi.bean.WikiPage

    result.setName(JsonInput.getStringOrNull(content, "name"));
    return result;
  }

    public static WikiPage parseWikiPage(JSONObject object) throws JSONException {
        WikiPage wikiPage = WikiPageFactory.create(JsonInput.getStringNotNull(object, "title"));
        wikiPage.setVersion(JsonInput.getIntOrNull(object, "version"));
        wikiPage.setCreatedOn(getDateOrNull(object, "created_on"));
        wikiPage.setUpdatedOn(getDateOrNull(object, "updated_on"));
        return wikiPage;
    }
View Full Code Here

Examples of fitnesse.wiki.WikiPage

  @Before
  public void setup() throws Exception {
    testTime = DateTimeUtil.getDateFromString("12/5/1952 1:19:00");
    clock = new DateAlteringClock(testTime).freeze();

    WikiPage root = InMemoryPage.makeRoot("RooT");
    FitNesseContext context = FitNesseUtil.makeTestContext(root);
    WikiPage suitePage = root.addChildPage("SuitePage");
    testPage = new WikiTestPage(suitePage.addChildPage("TestPage"), null);
    writers = new LinkedList<StringWriter>();
    formatter = new SuiteHistoryFormatter(context, suitePage, new TestXmlFormatter.WriterFactory() {
      @Override
      public Writer getWriter(FitNesseContext context, WikiPage page, TestSummary counts, long time) throws IOException {
        StringWriter w = new StringWriter();
View Full Code Here

Examples of org.apache.wiki.WikiPage

     @return
     */
    private boolean checkPermission( String permission )
    {
        WikiSession session        = m_wikiContext.getWikiSession();
        WikiPage    page           = m_wikiContext.getPage();
        AuthorizationManager mgr   = m_wikiContext.getEngine().getAuthorizationManager();
        boolean gotPermission     = false;
       
        if ( CREATE_GROUPS.equals( permission ) || CREATE_PAGES.equals( permission )
            || EDIT_PREFERENCES.equals( permission ) || EDIT_PROFILE.equals( permission )
            || LOGIN.equals( permission ) )
        {
            gotPermission = mgr.checkPermission( session, new WikiPermission( page.getWiki(), permission ) );
        }
        else if ( VIEW_GROUP.equals( permission )
            || EDIT_GROUP.equals( permission )
            || DELETE_GROUP.equals( permission ) )
        {
            Command command = m_wikiContext.getCommand();
            gotPermission = false;
            if ( command instanceof GroupCommand && command.getTarget() != null )
            {
                GroupPrincipal group = (GroupPrincipal)command.getTarget();
                String groupName = group.getName();
                String action = "view";
                if( EDIT_GROUP.equals( permission ) )
                {
                    action = "edit";
                }
                else if ( DELETE_GROUP.equals( permission ) )
                {
                    action = "delete";
                }
                gotPermission = mgr.checkPermission( session, new GroupPermission( groupName, action ) );
            }
        }
        else if ( ALL_PERMISSION.equals( permission ) )
        {
            gotPermission = mgr.checkPermission( session, new AllPermission( m_wikiContext.getEngine().getApplicationName() ) );
        }
        else if ( page != null )
        {
            //
            //  Edit tag also checks that we're not trying to edit an
            //  old version: they cannot be edited.
            //
            if( EDIT.equals(permission) )
            {
                WikiPage latest = m_wikiContext.getEngine().getPage( page.getName() );
                if( page.getVersion() != WikiProvider.LATEST_VERSION &&
                    latest.getVersion() != page.getVersion() )
                {
                    return false;
                }
            }

View Full Code Here

Examples of org.apache.wiki.WikiPage

    @Override
    public final int doWikiStartTag()
        throws IOException
    {
        WikiEngine engine = m_wikiContext.getEngine();
        WikiPage   page   = m_wikiContext.getPage();

        if( page != null )
        {
            if( page instanceof Attachment )
            {
                pageContext.getOut().print( engine.beautifyTitle( ((Attachment)page).getParentName()) );
            }
            else
            {
                String name = page.getName();

                int entrystart = name.indexOf("_blogentry_");

                if( entrystart != -1 )
                {
View Full Code Here

Examples of org.apache.wiki.WikiPage

        m_wikiContext = (WikiContext) pageContext.getAttribute( WikiTagBase.ATTR_CONTEXT,
                                                                PageContext.REQUEST_SCOPE );

        WikiEngine        engine = m_wikiContext.getEngine();
        AttachmentManager mgr    = engine.getAttachmentManager();
        WikiPage          page;

        page = m_wikiContext.getPage();

        if( !mgr.attachmentsEnabled() )
        {
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.