Examples of CmisObject


Examples of org.apache.chemistry.opencmis.client.api.CmisObject

        if ((context == null) || (newId == null)) {
            return null;
        }

        // get the new object
        CmisObject object = getSession().getObject(newId, context);
        if (!(object instanceof Folder)) {
            throw new CmisRuntimeException("Newly created object is not a folder! New id: " + newId);
        }

        return (Folder) object;
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

        if ((context == null) || (newId == null)) {
            return null;
        }

        // get the new object
        CmisObject object = getSession().getObject(newId, context);
        if (!(object instanceof Policy)) {
            throw new CmisRuntimeException("Newly created object is not a policy! New id: " + newId);
        }

        return (Policy) object;
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

                // convert objects
                List<Document> page = new ArrayList<Document>();
                if (checkedOutDocs.getObjects() != null) {
                    for (ObjectData objectData : checkedOutDocs.getObjects()) {
                        CmisObject doc = objectFactory.convertObject(objectData, ctxt);
                        if (!(doc instanceof Document)) {
                            // should not happen...
                            continue;
                        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

                // shouldn't happen ...
                continue;
            }

            // convert the object
            CmisObject object = of.convertObject(oifc.getObject().getObject(), context);
            if (!(object instanceof FileableCmisObject)) {
                // the repository must not return objects that are not fileable,
                // but you never know...
                continue;
            }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

            // the repository sent an object without a valid object id...
            throw new CmisRuntimeException("Repository sent invalid data! No object id!");
        }

        // fetch the object and make sure it is a folder
        CmisObject parentFolder = getSession().getObject((String) idProperty.getFirstValue(), context);
        if (!(parentFolder instanceof Folder)) {
            // the repository sent an object that is not a folder...
            throw new CmisRuntimeException("Repository sent invalid data! Object is not a folder!");
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

                // the repository sent an object without a valid object id...
                throw new CmisRuntimeException("Repository sent invalid data! No object id!");
            }

            // fetch the object and make sure it is a folder
            CmisObject parentFolder = getSession().getObject((String) idProperty.getFirstValue(), context);
            if (!(parentFolder instanceof Folder)) {
                // the repository sent an object that is not a folder...
                throw new CmisRuntimeException("Repository sent invalid data! Object is not a folder!");
            }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

        if (objectIdHolder.getValue() == null) {
            return null;
        }

        CmisObject movedObject = getSession().getObject(objectIdHolder.getValue(), context);
        if (!(movedObject instanceof FileableCmisObject)) {
            throw new CmisRuntimeException("Moved object is invalid!");
        }

        return (FileableCmisObject) movedObject;
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

        // if no context is provided the object will not be fetched
        if (context == null || newId == null) {
            return null;
        }
        // get the new object
        CmisObject object = getSession().getObject(newId, context);
        if (!(object instanceof Document)) {
            throw new CmisRuntimeException("Newly created object is not a document! New id: " + newId);
        }

        return (Document) object;
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

        ObjectFactory objectFactory = getSession().getObjectFactory();

        List<Document> result = new ArrayList<Document>();
        if (versions != null) {
            for (ObjectData objectData : versions) {
                CmisObject doc = objectFactory.convertObject(objectData, context);
                if (!(doc instanceof Document)) {
                    // should not happen...
                    continue;
                }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.CmisObject

                context.getIncludeRelationships(), context.getRenditionFilterString(), context.isIncludePolicies(),
                context.isIncludeAcls(), null);

        ObjectFactory objectFactory = getSession().getObjectFactory();

        CmisObject result = objectFactory.convertObject(objectData, context);
        if (!(result instanceof Document)) {
            throw new CmisRuntimeException("Latest version is not a document!");
        }

        return (Document) result;
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.