Package org.apache.chemistry.opencmis.commons.data

Examples of org.apache.chemistry.opencmis.commons.data.ObjectInFolderList


            @Override
            protected AbstractPageFetcher.Page<CmisObject> fetchPage(long skipCount) {

                // get the children
                ObjectInFolderList children = navigationService.getChildren(getRepositoryId(), objectId,
                        ctxt.getFilterString(), ctxt.getOrderBy(), ctxt.isIncludeAllowableActions(),
                        ctxt.getIncludeRelationships(), ctxt.getRenditionFilterString(), ctxt.isIncludePathSegments(),
                        BigInteger.valueOf(this.maxNumItems), BigInteger.valueOf(skipCount), null);

                // convert objects
                List<CmisObject> page = new ArrayList<CmisObject>();
                List<ObjectInFolderData> childObjects = children.getObjects();
                if (childObjects != null) {
                    for (ObjectInFolderData objectData : childObjects) {
                        if (objectData.getObject() != null) {
                            page.add(objectFactory.convertObject(objectData.getObject(), ctxt));
                        }
                    }
                }

                return new AbstractPageFetcher.Page<CmisObject>(page, children.getNumItems(), children.hasMoreItems());
            }
        });
    }
View Full Code Here


                    objectInfos.addObjectInfo(objectInfo);
                }
                odList.add(od);
            }
        } else {
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.info("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
View Full Code Here

        validator.getChildren(context,repositoryId, folderId, extension);

        int maxItemsInt = maxItems == null ? -1 : maxItems.intValue();
        int skipCountInt = skipCount == null ? -1 : skipCount.intValue();
        String user = context.getUsername();
        ObjectInFolderList res = getChildrenIntern(repositoryId, folderId, filter, orderBy, includeAllowableActions,
                includeRelationships, renditionFilter, includePathSegment, maxItemsInt, skipCountInt, false,
                context.isObjectInfoRequired() ? objectInfos : null, user);
        LOG.debug("stop getChildren()");
        return res;
    }
View Full Code Here

        // + ", max levels " + maxLevels);

        List<ObjectInFolderContainer> childrenOfFolderId = null;
        if (maxLevels == -1 || level < maxLevels) {
            String orderBy = PropertyIds.NAME;
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, includePathSegments, 1000, 0,
                    folderOnly, objectInfos, user);

            childrenOfFolderId = new ArrayList<ObjectInFolderContainer>();
            if (null != children) {

                for (ObjectInFolderData child : children.getObjects()) {
                    ObjectInFolderContainerImpl oifc = new ObjectInFolderContainerImpl();
                    String childId = child.getObject().getId();
                    List<ObjectInFolderContainer> subChildren = getDescendantsIntern(repositoryId, childId, filter,
                            includeAllowableActions, includeRelationships, renditionFilter, includePathSegments,
                            level + 1, maxLevels, folderOnly, objectInfos, user);
View Full Code Here

     */
    protected ObjectInFolderData getChild(String folderId, String objectId) {
        boolean hasMore = true;

        while (hasMore) {
            ObjectInFolderList children = getBinding().getNavigationService().getChildren(getTestRepositoryId(),
                    folderId, "*", null, Boolean.TRUE, IncludeRelationships.BOTH, null, Boolean.TRUE, null, null, null);

            assertNotNull(children);
            assertTrue(children.getObjects().size() > 0);

            hasMore = (children.hasMoreItems() == null ? false : children.hasMoreItems().booleanValue());

            for (ObjectInFolderData object : children.getObjects()) {
                assertNotNull(object);
                assertNotNull(object.getPathSegment());
                assertNotNull(object.getObject());
                assertNotNull(object.getObject().getId());

View Full Code Here

        Boolean includePathSegment = getBooleanParameter(request, PARAM_PATH_SEGMENT);
        BigInteger maxItems = getBigIntegerParameter(request, PARAM_MAX_ITEMS);
        BigInteger skipCount = getBigIntegerParameter(request, PARAM_SKIP_COUNT);

        // execute
        ObjectInFolderList children = service.getChildren(repositoryId, folderId, filter, orderBy,
                includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, maxItems,
                skipCount, null);

        if (children == null) {
            throw new CmisRuntimeException("Children are null!");
View Full Code Here

        String newParentId = result.get(0).getObject().getId();
        assertEquals(rootFolderId, newParentId);

        if (isFolder) {
            log.info("testing moveFolder to a subfolder");
            ObjectInFolderList ch = fNavSvc.getChildren(fRepositoryId, holder.getValue(), propertyFilter, null, false,
                    IncludeRelationships.NONE, null, false, null, null, null);
            String subFolderId = ch.getObjects().get(0).getObject().getId();

            try {
                fObjSvc.moveObject(fRepositoryId, holder, subFolderId, sourceFolderId, null);
                fail("moveObject to a folder that is a descendant of the source must fail.");
            } catch (Exception e) {
View Full Code Here

                    objectInfos.addObjectInfo(objectInfo);
                }
                odList.add(od);
            }
        } else {
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.info("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
View Full Code Here

        validator.getChildren(context,repositoryId, folderId, extension);

        int maxItemsInt = maxItems == null ? -1 : maxItems.intValue();
        int skipCountInt = skipCount == null ? -1 : skipCount.intValue();
        String user = context.getUsername();
        ObjectInFolderList res = getChildrenIntern(repositoryId, folderId, filter, orderBy, includeAllowableActions,
                includeRelationships, renditionFilter, includePathSegment, maxItemsInt, skipCountInt, false,
                context.isObjectInfoRequired() ? objectInfos : null, user);
        LOG.debug("stop getChildren()");
        return res;
    }
View Full Code Here

        // + ", max levels " + maxLevels);

        List<ObjectInFolderContainer> childrenOfFolderId = null;
        if (maxLevels == -1 || level < maxLevels) {
            String orderBy = PropertyIds.NAME;
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, includePathSegments, 1000, 0,
                    folderOnly, objectInfos, user);

            childrenOfFolderId = new ArrayList<ObjectInFolderContainer>();
            if (null != children) {

                for (ObjectInFolderData child : children.getObjects()) {
                    ObjectInFolderContainerImpl oifc = new ObjectInFolderContainerImpl();
                    String childId = child.getObject().getId();
                    List<ObjectInFolderContainer> subChildren = getDescendantsIntern(repositoryId, childId, filter,
                            includeAllowableActions, includeRelationships, renditionFilter, includePathSegments,
                            level + 1, maxLevels, folderOnly, objectInfos, user);
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.ObjectInFolderList

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.