Package org.apache.chemistry.opencmis.commons.server

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo


                context.getMemoryThreshold());

        // execute
        service.applyPolicy(repositoryId, parser.getId(), objectId, null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, parser.getId());
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData policy = objectInfo.getObject();
        if (policy == null) {
            throw new CmisRuntimeException("Policy is null!");
        }

        // set headers
View Full Code Here


        CmisObjectType resultJaxb = convert(policy);
        if (resultJaxb == null) {
            return;
        }

        ObjectInfo info = service.getObjectInfo(repositoryId, policy.getId());
        if (info == null) {
            throw new CmisRuntimeException("Object Info not found!");
        }

        // start
        entry.startEntry(false);

        // write the object
        entry.writeObject(policy, info, null, null, null, null);

        // write links
        UrlBuilder selfLink = compileUrlBuilder(baseUrl, RESOURCE_POLICIES, objectId);
        selfLink.addParameter(Constants.PARAM_POLICY_ID, info.getId());
        entry.writeSelfLink(selfLink.toString(), null);

        // we are done
        entry.endEntry();
    }
View Full Code Here

        // execute
        Holder<String> checkOutId = new Holder<String>(parser.getId());
        service.checkOut(repositoryId, checkOutId, null, null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, checkOutId.getValue());
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        if (object.getId() == null) {
View Full Code Here

        AtomFeed feed = new AtomFeed();
        feed.startDocument(response.getOutputStream());
        feed.startFeed(true);

        // write basic Atom feed elements
        ObjectInfo latestObjectInfo = service.getObjectInfo(repositoryId, versions.get(0).getId());
        ObjectInfo firstObjectInfo = service.getObjectInfo(repositoryId, versions.get(versions.size() - 1).getId());

        feed.writeFeedElements(versionSeriesId, firstObjectInfo.getCreatedBy(), latestObjectInfo.getName(),
                latestObjectInfo.getLastModificationDate(), null, null);

        // write links
        UrlBuilder baseUrl = compileBaseUrl(request, repositoryId);
View Full Code Here

                service.moveObject(repositoryId, objectIdHolder, folderId, sourceFolderId, null);
                newObjectId = objectIdHolder.getValue();
            }
        }

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, newObjectId);
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        // set headers
View Full Code Here

        // execute
        String newObjectId = service.createRelationship(repositoryId, parser.getProperties(), parser.getPolicyIds(),
                null, null, null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, newObjectId);
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        // set headers
View Full Code Here

        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, objectId);
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        // set headers
View Full Code Here

        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, object.getId());
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        // set headers
View Full Code Here

            service.updateProperties(repositoryId, objectIdHolder, changeToken == null ? null : new Holder<String>(
                    changeToken), parser.getProperties(), null);
        }

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, objectIdHolder.getValue());
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        // set headers
View Full Code Here

        }

        // execute
        service.removeObjectFromFolder(repositoryId, objectId, removeFrom, null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, objectId);
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        if (object.getId() == null) {
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.server.ObjectInfo

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.