Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.IdFactory


        }
        else {
            uri = parameters.get(PARAM_REPOSITORY_URI).toString();
        }

        IdFactory idFactory;
        Object param = parameters.get(PARAM_ID_FACTORY);
        if (param != null && param instanceof IdFactory) {
            idFactory = (IdFactory) param;
        } else {
            idFactory = IdFactoryImpl.getInstance();
View Full Code Here


                    pb.addLast(elems[j]);
                }
                Path remainingPath = pb.getPath();

                NodeId parentId = entry.getWorkspaceId();
                IdFactory idFactory = factory.getIdFactory();

                NodeId nodeId = idFactory.createNodeId(parentId, remainingPath);
                NodeEntry ne = entry.loadNodeEntry(nodeId);
                if (ne != null) {
                    return ne;
                } else {
                    throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

            for (int j = i; j < elems.length; j++) {
                pb.addLast(elems[j]);
            }
            Path remainingPath = pb.getPath();

            IdFactory idFactory = getIdFactory();
            NodeId parentId = entry.getWorkspaceId();
            parentId = (remainingPath.getLength() == 1) ? parentId : idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
            PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getNameElement().getName());
            pe = entry.loadPropertyEntry(propId);
        }

        if (pe == null) {
            throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

        this.definitionProvider = definitionProvider;
        this.cache = cache;
    }

    public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException {
        IdFactory idFactory = service.getIdFactory();
        PathFactory pf = service.getPathFactory();

        return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry);
    }
View Full Code Here

        this.definitionProvider = definitionProvider;
        this.cache = cache;
    }

    public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException {
        IdFactory idFactory = service.getIdFactory();
        PathFactory pf = service.getPathFactory();

        return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry);
    }
View Full Code Here

    /**
     * @inheritDoc
     * @see ItemStateFactory#createRootState(NodeEntry)
     */
    public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException {
        IdFactory idFactory = service.getIdFactory();
        PathFactory pf = service.getPathFactory();

        return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry);
    }
View Full Code Here

    /**
     * @inheritDoc
     * @see NodeEntry#getId()
     */
    public NodeId getId() throws InvalidItemStateException, RepositoryException {
        IdFactory idFactory = getIdFactory();
        if (uniqueID != null) {
            return idFactory.createNodeId(uniqueID);
        } else {
            PathFactory pf = getPathFactory();
            if (parent == null) {
                // root node
                return idFactory.createNodeId((String) null, pf.getRootPath());
            } else {
                Path p = pf.create(getName(), getIndex());
                return idFactory.createNodeId(parent.getId(), p);
            }
        }
    }
View Full Code Here

                    pb.addLast(elems[j]);
                }
                Path remainingPath = pb.getPath();

                NodeId parentId = entry.getWorkspaceId();
                IdFactory idFactory = factory.getIdFactory();

                NodeId nodeId = idFactory.createNodeId(parentId, remainingPath);
                NodeEntry ne = entry.loadNodeEntry(nodeId);
                if (ne != null) {
                    return ne;
                } else {
                    throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

            for (int j = i; j < elems.length; j++) {
                pb.addLast(elems[j]);
            }
            Path remainingPath = pb.getPath();

            IdFactory idFactory = getIdFactory();
            NodeId parentId = entry.getWorkspaceId();
            parentId = (remainingPath.getLength() == 1) ? parentId : idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
            PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getNameElement().getName());
            pe = entry.loadPropertyEntry(propId);
        }

        if (pe == null) {
            throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

        this.sessionInfo = sessionInfo;
    }

    public QNodeDefinition getRootNodeDefinition() throws RepositoryException {
        if (rootNodeDefinition == null) {
            IdFactory idFactory = service.getIdFactory();
            PathFactory pf = service.getPathFactory();

            rootNodeDefinition = service.getNodeDefinition(
                    sessionInfo, idFactory.createNodeId((String) null, pf.getRootPath()));
        }
        return rootNodeDefinition;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.IdFactory

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.