Package com.ecyrd.jspwiki

Examples of com.ecyrd.jspwiki.WikiPage


        if( pname.endsWith(".html") && pname.length() > 5 )
        {
            pname = pname.substring(0,pname.length()-5);
        }
       
        WikiPage page = m_engine.getPage( pname );
       
        if( page != null )
        {
            return new HTMLPageDavItem( this, path, page );
        }
View Full Code Here


    private static final long serialVersionUID = 0L;
   
    public final int doWikiStartTag()
        throws IOException
    {
        WikiPage   page   = m_wikiContext.getPage();

        if( page != null )
        {
            int version = page.getVersion();

            if( version > 0 )
            {
                pageContext.getOut().print( Integer.toString(version) );
                return SKIP_BODY;
View Full Code Here

    private static final long serialVersionUID = 0L;
   
    public final int doWikiStartTag()
        throws IOException
    {
        WikiPage   page   = m_wikiContext.getPage();

        int version = page.getVersion();

        if( version == -1 )
            version = -1;
        else
            version++;
View Full Code Here

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

        try
        {
            if( page != null )
            {
                long size = page.getSize();

                if( size == -1 && engine.pageExists(page) ) // should never happen with attachments
                {
                    size = engine.getPureText( page.getName(), page.getVersion() ).length();
                    page.setSize( size );
                }

                pageContext.getOut().write( Long.toString(size) );
            }
        }
View Full Code Here

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

        WikiEngine engine = m_wikiContext.getEngine();
        WikiPage   page;

        page = m_wikiContext.getPage();

        try
        {
            if( page != null && engine.pageExists(page) )
            {
                Collection versions = engine.getVersionHistory( page.getName() );

                if( versions == null )
                {
                    // There is no history
                    return SKIP_BODY;
View Full Code Here

        WikiEngine engine = m_wikiContext.getEngine();
        String     pageName = m_pageName;

        if( m_pageName == null )
        {
            WikiPage p = m_wikiContext.getPage();

            if( p != null )
            {
                pageName = p.getName();
            }
            else
            {
                return SKIP_BODY;
            }
View Full Code Here

    }

    public final int doWikiStartTag()
        throws IOException
    {
        WikiPage   page   = m_wikiContext.getPage();

        if( page != null )
        {
            if( m_type.equals("attachment") && page instanceof Attachment )
            {
                return EVAL_BODY_INCLUDE;
            }
           
            if( m_type.equals("page") && !(page instanceof Attachment) )
            {
                return EVAL_BODY_INCLUDE;
            }

            if( m_type.equals("weblogentry") && !(page instanceof Attachment) && page.getName().indexOf("_blogentry_") != -1 )
            {
                return EVAL_BODY_INCLUDE;
            }
        }
View Full Code Here

        m_monthUrlFormat = new SimpleDateFormat( format );
    }

    private String format( String txt )
    {
        WikiPage p = m_wikiContext.getPage();

        if( p != null )
        {
            return TextUtil.replaceString( txt, "%p", p.getName() );
        }

        return txt;
    }
View Full Code Here

        nextMonth.add( Calendar.DATE, -1);
        nextMonth.add( Calendar.MONTH, 1 ); // Now move to 1st day of next month

        if ( day.before(nextMonth) )
        {
            WikiPage thePage = m_wikiContext.getPage();
            String pageName = thePage.getName();

            String calendarDate = m_dateFormat.format(day.getTime());
            String url = m_wikiContext.getURL( WikiContext.VIEW, pageName,
                                               "calendar.date="+calendarDate );
View Full Code Here

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

        if( page != null )
        {
            PageManager mgr = engine.getPageManager();

            PageLock lock = mgr.getCurrentLock( page );

            HttpSession session = pageContext.getSession();

            PageLock userLock = (PageLock) session.getAttribute("lock-"+page.getName());

            if( (lock != null && m_mode == LockState.LOCKED && lock != userLock ) ||
                (lock != null && m_mode == LockState.OWNED && lock == userLock ) ||
                (lock == null && m_mode == LockState.NOTLOCKED) )
            {
View Full Code Here

TOP

Related Classes of com.ecyrd.jspwiki.WikiPage

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.