Package org.modeshape.jcr.spi.federation

Examples of org.modeshape.jcr.spi.federation.PageKey


    @Override
    public Document getChildrenBlock( String key ) {
        Connector connector = connectors.getConnectorForSourceKey(sourceKey(key));
        if (connector != null && connector instanceof Pageable) {
            key = documentIdFromNodeKey(key);
            PageKey blockKey = new PageKey(key);
            Document childrenBlock = ((Pageable)connector).getChildren(blockKey);
            if (childrenBlock != null) {
                return replaceConnectorIdsWithNodeKeys(childrenBlock, connector.getSourceName());
            }
        }
View Full Code Here


        Connector connector = connectors.getConnectorForSourceKey(sourceKey(key));
        if (connector != null) {
            Document document = null;
            if (connector instanceof Pageable && PageKey.isValidFormat(key)) {
                // a page was requested
                PageKey pageKey = new PageKey(key);
                String parentId = pageKey.getParentId();
                pageKey = pageKey.withParentId(documentIdFromNodeKey(parentId));
                document = ((Pageable)connector).getChildren(pageKey);
            } else {
                // interpret the key as a regular node id
                String docId = documentIdFromNodeKey(key);
                document = connector.getDocumentById(docId);
View Full Code Here

            return localStore().getChildrenBlock(key);
        }
        Connector connector = connectors.getConnectorForSourceKey(sourceKey(key));
        if (connector != null && connector instanceof Pageable) {
            key = documentIdFromNodeKey(key);
            PageKey blockKey = new PageKey(key);
            Document childrenBlock = ((Pageable)connector).getChildren(blockKey);
            if (childrenBlock != null) {
                return replaceConnectorIdsWithNodeKeys(childrenBlock, connector.getSourceName());
            }
        }
View Full Code Here

                                   long blockSize,
                                   long totalChildCount ) {
        EditableDocument childrenInfo = document().getOrCreateDocument(DocumentTranslator.CHILDREN_INFO);
        childrenInfo.setNumber(DocumentTranslator.COUNT, totalChildCount);
        childrenInfo.setNumber(DocumentTranslator.BLOCK_SIZE, blockSize);
        PageKey pageKey = new PageKey(parentId, nextPageOffset, blockSize);
        childrenInfo.setString(DocumentTranslator.NEXT_BLOCK, pageKey.toString());
        return this;
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.spi.federation.PageKey

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.