Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.IdFactory


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

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

                NodeId nodeId = idFactory.createNodeId(parentId, remainingPath);
                NodeEntry ne = entry.loadNodeEntry(nodeId);
                if (ne != null) {
                    return ne;
                } else {
                    if (index != Path.INDEX_DEFAULT) {
                        throw new PathNotFoundException(path.toString());
                    }
                    // maybe a property entry exists
                    parentId = (remainingPath.getLength() == 1) ? parentId : idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
                    PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getNameElement().getName());
                    PropertyEntry pe = entry.loadPropertyEntry(propId);
                    if (pe != null) {
                        return pe;
                    } else {
                        throw new PathNotFoundException(path.toString());
View Full Code Here


    /**
     * @inheritDoc
     */
    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

    /**
     * @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

                ? null
                : create(result, logWriterProvider);
        }

        public IdFactory getIdFactory() throws RepositoryException {
            IdFactory result = super.getIdFactory();
            return result == null
                ? null
                : create(result, logWriterProvider);
        }
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

        }
        return repository;
    }

    protected RepositoryService createService(String uri) throws RepositoryException {
        IdFactory idFactory = IdFactoryImpl.getInstance();
        NameFactory nFactory = NameFactoryImpl.getInstance();
        PathFactory pFactory = PathFactoryImpl.getInstance();
        QValueFactory vFactory = QValueFactoryImpl.getInstance();
        return new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory);
    }
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

    }

    public RepositoryService getRepositoryService() throws RepositoryException {
        if (service == null) {
            String uri = getProperty(PROP_REPOSITORY_URI);
            IdFactory idFactory = IdFactoryImpl.getInstance();
            NameFactory nFactory = NameFactoryImpl.getInstance();
            PathFactory pFactory = PathFactoryImpl.getInstance();
            QValueFactory vFactory = QValueFactoryImpl.getInstance();
            service = new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory);
        }
View Full Code Here

        }
        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

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.