Package org.apache.wiki

Examples of org.apache.wiki.PageLock


        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


        else
        {
            int rowNum = 1;
            for( Iterator<PageLock> i = locks.iterator(); i.hasNext(); )
            {
                PageLock lock = i.next();

                result.append( rowNum % 2 != 0 ? "<tr class=\"odd\">" : "<tr>" );
                result.append("<td>"+lock.getPage()+"</td>");
                result.append("<td>"+lock.getLocker()+"</td>");
                result.append( "<td>"
                               + Preferences.renderDate( context, lock.getAcquisitionTime(), Preferences.TimeFormat.DATETIME )
                               + "</td>" );
                result.append( "<td>" + Preferences.renderDate( context, lock.getExpiryTime(), Preferences.TimeFormat.DATETIME )
                               + "</td>" );
                result.append("</tr>\n");
                rowNum++;
            }
        }
View Full Code Here

        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

     */
    public void setPermissions(WikiPage page, Acl acl) throws WikiSecurityException {
        PageManager pageManager = m_engine.getPageManager();

        // Forcibly expire any page locks
        PageLock lock = pageManager.getCurrentLock(page);
        if (lock != null) {
            pageManager.unlockPage(lock);
        }

        // Remove all of the existing ACLs.
View Full Code Here

        else
        {
            int rowNum = 1;
            for( Iterator i = locks.iterator(); i.hasNext(); )
            {
                PageLock lock = (PageLock) i.next();

                result.append( rowNum % 2 != 0 ? "<tr class=\"odd\">" : "<tr>" );
                result.append("<td>"+lock.getPage()+"</td>");
                result.append("<td>"+lock.getLocker()+"</td>");
                result.append( "<td>"
                               + Preferences.renderDate( context, lock.getAcquisitionTime(), Preferences.TimeFormat.DATETIME )
                               + "</td>" );
                result.append( "<td>" + Preferences.renderDate( context, lock.getExpiryTime(), Preferences.TimeFormat.DATETIME )
                               + "</td>" );
                result.append("</tr>\n");
                rowNum++;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.wiki.PageLock

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.