Package org.apache.jetspeed.page.document.impl

Examples of org.apache.jetspeed.page.document.impl.NodeImpl


     */
    public synchronized static void cacheAdd(final Identity oid, final Object obj)
    {
        if (obj instanceof NodeImpl)
        {
            final NodeImpl node = (NodeImpl)obj;
            final String nodePath = node.getPath();

            // add node to caches; note that removes force notification
            // of update to distributed caches
            oidCache.remove(oid);
            final CacheElement element = oidCache.createElement(oid, node);
View Full Code Here


    public synchronized static void cacheRemove(final Identity oid)
    {
        // remove from cache by oid
        if (oid != null)
        {
            final NodeImpl node = (NodeImpl)cacheLookup(oid);
            if (node != null)
            {
                final String nodePath = node.getPath();
                // remove from caches; note that removes are
                // propagated to distributed caches
                oidCache.remove(oid);
                final boolean removed = pathCache.remove(nodePath);
                // if a remove was not successful from the path cache,
View Full Code Here

    {
        // reset cached objects
        final Iterator resetIter = oidCache.getKeys().iterator();
        while (resetIter.hasNext())
        {
            final NodeImpl node = (NodeImpl)cacheLookup((Identity)resetIter.next());
            if (node != null)
            {
              node.resetCachedSecurityConstraints();
            }
        }
    }
View Full Code Here

        System.out.println("--------------------------");       
        final Iterator dumpIter = oidCache.getKeys().iterator();
        while (dumpIter.hasNext())
        {
            final Identity oid = (Identity)dumpIter.next();
            final NodeImpl node = (NodeImpl)cacheLookup(oid);
            System.out.println("node="+node.getPath()+", oid="+oid);
        }
        System.out.println("--------------------------");
    }   
View Full Code Here

    {
        // construct page attributes from path
        path = NodeImpl.getCanonicalNodePath(path);

        // optimized retrieval from cache by path if available
        NodeImpl cachedNode = DatabasePageManagerCache.cacheLookup(path);
        if (cachedNode instanceof Page)
        {
            // check for view access on page
            cachedNode.checkAccess(JetspeedActions.VIEW);

            return (Page)cachedNode;
        }

        // retrieve page from database
View Full Code Here

    {
        // construct link attributes from path
        path = NodeImpl.getCanonicalNodePath(path);

        // optimized retrieval from cache by path if available
        NodeImpl cachedNode = DatabasePageManagerCache.cacheLookup(path);
        if (cachedNode instanceof Link)
        {
            // check for view access on link
            cachedNode.checkAccess(JetspeedActions.VIEW);

            return (Link)cachedNode;
        }

        // retrieve link from database
View Full Code Here

    {
        // construct document attributes from path
        String path = Folder.PATH_SEPARATOR + PageSecurity.DOCUMENT_TYPE;

        // optimized retrieval from cache by path if available
        NodeImpl cachedNode = DatabasePageManagerCache.cacheLookup(path);
        if (cachedNode instanceof PageSecurity)
        {
            // check for view access on document
            cachedNode.checkAccess(JetspeedActions.VIEW);

            return (PageSecurity)cachedNode;
        }

        // retrieve document from database
View Full Code Here

    {
        // construct folder attributes from path
        folderPath = NodeImpl.getCanonicalNodePath(folderPath);

        // optimized retrieval from cache by path if available
        NodeImpl cachedNode = DatabasePageManagerCache.cacheLookup(folderPath);
        if (cachedNode instanceof Folder)
        {
            // check for view access on folder
            cachedNode.checkAccess(JetspeedActions.VIEW);

            return (Folder)cachedNode;
        }

        // retrieve folder from database
View Full Code Here

        {
            cacheByOID.put(oid, new Entry(obj));
        }
        if (obj instanceof NodeImpl)
        {
            NodeImpl node = (NodeImpl)obj;
            node.setConstraintsEnabled(constraintsEnabled);
            node.setPermissionsEnabled(permissionsEnabled);
            cacheByPath.put(node.getPath(), oid);
        }
    }
View Full Code Here

    {
        // construct page attributes from path
        path = NodeImpl.getCanonicalNodePath(path);

        // optimized retrieval from cache by path if available
        NodeImpl cachedNode = DatabasePageManagerCache.cacheLookup(path);
        if (cachedNode instanceof Page)
        {
            // check for view access on page
            cachedNode.checkAccess(SecuredResource.VIEW_ACTION);

            return (Page)cachedNode;
        }

        // retrieve page from database
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.page.document.impl.NodeImpl

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.