Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.ItemManager


    @Override
    protected Result buildResult(Path absPath) throws RepositoryException {
        boolean existingNode = false;
        NodeImpl node;

        ItemManager itemMgr = session.getItemManager();
        try {
            ItemImpl item = itemMgr.getItem(absPath);
            if (item.isNode()) {
                node = (NodeImpl) item;
                existingNode = true;
            } else {
                node = (NodeImpl) item.getParent();
View Full Code Here


        boolean canRead = false;
        synchronized (monitor) {
            if (readCache.containsKey(id)) {
                canRead = readCache.get(id);
            } else {
                ItemManager itemMgr = session.getItemManager();
                NodeId nodeId = (isExistingNode) ? (NodeId) id : ((PropertyId) id).getParentId();
                NodeImpl node = (NodeImpl) itemMgr.getItem(nodeId);

                boolean isAcItem = util.isAcItem(node);
                EntryFilterImpl filter;
                if (path == null) {
                    filter = new EntryFilterImpl(principalNames, id, session);
View Full Code Here

    private class FetchNext implements SessionOperation<Object> {

        public Object perform(SessionContext context) {
            next = null; // reset

            ItemManager itemMgr = context.getItemManager();
            while (next == null && scoreNodes.hasNext()) {
                ScoreNode[] sn = scoreNodes.nextScoreNodes();
                try {
                    next = (NodeImpl) itemMgr.getItem(
                            sn[selectorIndex].getNodeId());
                } catch (RepositoryException e) {
                    log.warn("Failed to retrieve query result node "
                            + sn[selectorIndex].getNodeId(), e);
                    // try next
View Full Code Here

        @Override
        protected Result buildResult(Path absPath) throws RepositoryException {
            boolean existingNode = false;
            NodeImpl node;

            ItemManager itemMgr = session.getItemManager();
            try {
                ItemImpl item = itemMgr.getItem(absPath);
                if (item.isNode()) {
                    node = (NodeImpl) item;
                    existingNode = true;
                } else {
                    node = (NodeImpl) item.getParent();
View Full Code Here

            boolean canRead;
            synchronized (monitor) {
                if (readCache.containsKey(nodeId)) {
                    canRead = readCache.get(nodeId);
                } else {
                    ItemManager itemMgr = session.getItemManager();
                    NodeImpl node = (NodeImpl) itemMgr.getItem(nodeId);
                    Result result = buildResult(node, existingNode, isAcItem(node), new EntryFilterImpl(principalNames));

                    canRead = result.grants(Permission.READ);
                    readCache.put(nodeId, canRead);
                }
View Full Code Here

  @Override
  protected Result buildResult( Path absPath ) throws RepositoryException {
    boolean existingNode = false;
    NodeImpl node;

    ItemManager itemMgr = session.getItemManager();
    try {
      ItemImpl item = itemMgr.getItem( absPath );
      if ( item.isNode() ) {
        node = (NodeImpl) item;
        existingNode = true;
      } else {
        node = (NodeImpl) item.getParent();
View Full Code Here

      if ( readCache.containsKey( id ) ) {
        return readCache.get( id );
      }
    }

    ItemManager itemMgr = session.getItemManager();
    NodeId nodeId = ( isExistingNode ) ? (NodeId) id : ( (PropertyId) id ).getParentId();
    NodeImpl node = (NodeImpl) itemMgr.getItem( nodeId );

    boolean isAcItem = util.isAcItem( node );
    EntryFilterImpl filter;
    if ( path == null ) {
      filter = new EntryFilterImpl( principalNames, id, session );
View Full Code Here

    @Override
    protected Result buildResult(Path absPath) throws RepositoryException {
        boolean existingNode = false;
        NodeImpl node;

        ItemManager itemMgr = session.getItemManager();
        try {
            ItemImpl item = itemMgr.getItem(absPath);
            if (item.isNode()) {
                node = (NodeImpl) item;
                existingNode = true;
            } else {
                node = (NodeImpl) item.getParent();
View Full Code Here

        boolean canRead;
        synchronized (monitor) {
            if (readCache.containsKey(id)) {
                canRead = readCache.get(id);
            } else {
                ItemManager itemMgr = session.getItemManager();
                NodeId nodeId = (isExistingNode) ? (NodeId) id : ((PropertyId) id).getParentId();
                NodeImpl node = (NodeImpl) itemMgr.getItem(nodeId);
                // TODO: check again if retrieving the path can be avoided
                Path absPath = (path == null) ? session.getHierarchyManager().getPath(id) : path;
                Result result = buildResult(node, isExistingNode, util.isAcItem(node), new EntryFilterImpl(principalNames, absPath, session));

                canRead = result.grants(Permission.READ);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.ItemManager

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.