Examples of ObjectData


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

        if (so == null) {
            throw new CmisObjectNotFoundException("Unknown path: " + path);
        }

        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        ObjectData od = PropertyCreationHelper.getObjectData(td, so, filter, user, includeAllowableActions,
                includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension);

        LOG.debug("stop getObjectByPath()");

        // To be able to provide all Atom links in the response we need
View Full Code Here

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

        spo.move(sourceFolder, targetFolder);
        objectId.setValue(so.getId());
        LOG.debug("stop moveObject()");

        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        ObjectData od = PropertyCreationHelper.getObjectData(td, so, null, user, false,
                IncludeRelationships.NONE, null, false, false, extension);

        // To be able to provide all Atom links in the response we need
        // additional information:
        if (context.isObjectInfoRequired()) {
View Full Code Here

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

            // AclPropagation.OBJECTONLY,
            // extension);
        }

        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        ObjectData od = PropertyCreationHelper.getObjectData(td, so, null, user, false,
                IncludeRelationships.NONE, null, false, false, extension);

        // To be able to provide all Atom links in the response we need
        // additional information:
        if (context.isObjectInfoRequired()) {
View Full Code Here

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

        List<ObjectData> objDataList = new ArrayList<ObjectData>();
        Map<String, String> props = queryObj.getRequestedProperties();
        Map<String, String> funcs = queryObj.getRequestedFuncs();
        for (StoredObject so : matches) {
            TypeDefinition td = tm.getTypeById(so.getTypeId()).getTypeDefinition();
            ObjectData od = PropertyCreationHelper.getObjectDataQueryResult(td, so, user, props, funcs,
                    includeAllowableActions, includeRelationships, renditionFilter);

            objDataList.add(od);
        }
        res.setObjects(objDataList);
View Full Code Here

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

            for (StoredObject checkedOut : checkedOuts) {
                TypeDefinition td = fStoreManager.getTypeById(repositoryId, checkedOut.getTypeId()).getTypeDefinition();
//                DocumentVersion workingCopy = ((VersionedDocument) checkedOut).getPwc();
//                if (null == workingCopy)
//                  throw new CmisConstraintException("document " + checkedOut + " is checked out but has no working copy");      
                ObjectData od = PropertyCreationHelper.getObjectData(td, checkedOut, filter, user,
                        includeAllowableActions, includeRelationships, renditionFilter, false, false, extension);
                if (context.isObjectInfoRequired()) {
                    ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                    fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, /* workingCopy */ checkedOut, objectInfo);
                    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);
                    if (context.isObjectInfoRequired()) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
View Full Code Here

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

        } else {
            throw new CmisInvalidArgumentException("Can't get folder parent, id does not refer to a folder: "
                    + folderId);
        }

        ObjectData res = getFolderParentIntern(repositoryId, folder, filter, false,
            IncludeRelationships.NONE, context.getUsername(), context.isObjectInfoRequired() ? objectInfos : null);
        if (res == null) {
            throw new CmisInvalidArgumentException("Cannot get parent of a root folder");
        }
View Full Code Here

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

            if (includePathSegments != null && includePathSegments) {
                oifd.setPathSegment(spo.getName());
            }

            TypeDefinition typeDef = fStoreManager.getTypeById(repositoryId, spo.getTypeId()).getTypeDefinition();
            ObjectData objectData = PropertyCreationHelper.getObjectData(typeDef, spo, filter, user, includeAllowableActions,
                    includeRelationships, renditionFilter, false, true, null);

            oifd.setObject(objectData);
            folderList.add(oifd);
            // add additional information for Atom
View Full Code Here

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

            ObjectInfoHandler objectInfos, Boolean includeAllowableActions,
            IncludeRelationships includeRelationships, String user) {

        List<ObjectParentData> result = null;
        if (sop instanceof SingleFiling) {
            ObjectData parent = getFolderParentIntern(repositoryId, (SingleFiling) sop, filter,
                includeAllowableActions, includeRelationships, user, objectInfos);
            if (null != parent) {
                ObjectParentDataImpl parentData = new ObjectParentDataImpl();
                parentData.setObject(parent);
                String path = ((SingleFiling) sop).getPath();
                int beginIndex = path.lastIndexOf(Filing.PATH_SEPARATOR) + 1;
                //   Note: if not found results in 0
                String relPathSeg = path.substring(beginIndex, path.length());
                parentData.setRelativePathSegment(relPathSeg);
                result = Collections.singletonList((ObjectParentData) parentData);
            } else {
                result = Collections.emptyList();
            }
        } else if (sop instanceof MultiFiling) {
            result = new ArrayList<ObjectParentData>();
            MultiFiling multiParentObj = (MultiFiling) sop;
            List<Folder> parents = multiParentObj.getParents(user);
            if (null != parents) {
                for (Folder parent : parents) {
                    ObjectParentDataImpl parentData = new ObjectParentDataImpl();
                    TypeDefinition typeDef = fStoreManager.getTypeById(repositoryId, parent.getTypeId()).getTypeDefinition();
                    ObjectData objData = PropertyCreationHelper.getObjectData(typeDef, parent, filter, user, includeAllowableActions,
                            includeRelationships, "", false, true, null);

                    parentData.setObject(objData);
                    parentData.setRelativePathSegment(multiParentObj.getPathSegment());
                    result.add(parentData);
View Full Code Here

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

            throw new CmisInvalidArgumentException("getAllVersions requires a version series id, but ist was null.");
            so = validator.getAllVersions(context, repositoryId, objectId, versionSeriesId, extension);
   
            if (!(so instanceof VersionedDocument)) {
              so = validator.getObject(context, repositoryId, objectId, extension)
              ObjectData objData = getObject(context, repositoryId, objectId, filter, includeAllowableActions,
                      IncludeRelationships.NONE,extension, objectInfos);
              res.add(objData);
            }
   
            VersionedDocument verDoc = (VersionedDocument) so;
            res = new ArrayList<ObjectData>();
            List<DocumentVersion> versions = verDoc.getAllVersions();
            for (DocumentVersion version : versions) {
                ObjectData objData = getObject(context, repositoryId, version.getId(), filter, includeAllowableActions,
                        IncludeRelationships.NONE,extension, objectInfos);
                res.add(objData);
            }

       
View Full Code Here

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

            String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension,
            ObjectInfoHandler objectInfos) {

        StoredObject so = validator.getObjectOfLatestVersion(context, repositoryId, objectId, versionSeriesId, extension);

        ObjectData objData = null;

        if (so instanceof VersionedDocument) {
            VersionedDocument verDoc = (VersionedDocument) so;
            DocumentVersion latestVersion = verDoc.getLatestVersion(major);
            objData = getObject(context, repositoryId, latestVersion.getId(), filter, includeAllowableActions,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.