Examples of ObjectData


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

        if (callUrl != CallUrl.ROOT) {
            return;
        }

        ObjectData object = null;

        if (objectId != null) {
            object = service.getObject(repositoryId, objectId, null, false, IncludeRelationships.NONE, "cmis:none",
                    false, false, null);
        } else {
            object = service.getObjectByPath(repositoryId, getPath(request), null, false, IncludeRelationships.NONE,
                    "cmis:none", false, false, null);
        }

        if (context instanceof CallContextImpl) {
            ((CallContextImpl) context).put(CONTEXT_OBJECT_ID, object.getId());
            ((CallContextImpl) context).put(CONTEXT_OBJECT_TYPE_ID,
                    getProperty(object, PropertyIds.OBJECT_TYPE_ID, String.class));
            ((CallContextImpl) context).put(CONTEXT_BASETYPE_ID,
                    getProperty(object, PropertyIds.BASE_TYPE_ID, String.class));
        }
View Full Code Here

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

        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) {
            throw new CmisRuntimeException("Object Id is null!");
        }

        // set headers
        UrlBuilder baseUrl = compileBaseUrl(request, repositoryId);
        String location = compileUrl(baseUrl, RESOURCE_ENTRY, object.getId());

        response.setStatus(HttpServletResponse.SC_CREATED);
        response.setContentType(Constants.MEDIATYPE_ENTRY);
        response.setHeader("Content-Location", location);
        response.setHeader("Location", location);
View Full Code Here

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

     * Retrieves an object.
     */
    protected ObjectData getObject(String objectId, String filter, Boolean includeAllowableActions,
            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
            Boolean includeACL, ExtensionsData extension) {
        ObjectData object = getBinding().getObjectService()
                .getObject(getTestRepositoryId(), objectId, filter, includeAllowableActions, includeRelationships,
                        renditionFilter, includePolicyIds, includeACL, extension);

        assertNotNull(object);

View Full Code Here

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

    /**
     * Retrieves a full blown object.
     */
    protected ObjectData getObject(String objectId) {
        ObjectData object = getObject(objectId, "*", Boolean.TRUE, IncludeRelationships.BOTH, null, Boolean.TRUE,
                Boolean.TRUE, null);

        assertBasicProperties(object.getProperties());

        return object;
    }
View Full Code Here

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

     * Retrieves an object by path.
     */
    protected ObjectData getObjectByPath(String path, String filter, Boolean includeAllowableActions,
            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
            Boolean includeACL, ExtensionsData extension) {
        ObjectData object = getBinding().getObjectService()
                .getObjectByPath(getTestRepositoryId(), path, filter, includeAllowableActions, includeRelationships,
                        renditionFilter, includePolicyIds, includeACL, extension);

        assertNotNull(object);

View Full Code Here

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

    /**
     * Retrieves a full blown object by path.
     */
    protected ObjectData getObjectByPath(String path) {
        ObjectData object = getObjectByPath(path, "*", Boolean.TRUE, IncludeRelationships.BOTH, null, Boolean.TRUE,
                Boolean.TRUE, null);

        assertBasicProperties(object.getProperties());

        return object;
    }
View Full Code Here

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

     * Returns <code>true</code> if the object with the given id exists,
     * <code>false</code> otherwise.
     */
    protected boolean existsObject(String objectId) {
        try {
            ObjectData object = getObject(objectId, PropertyIds.OBJECT_ID, Boolean.FALSE, IncludeRelationships.NONE,
                    null, Boolean.FALSE, Boolean.FALSE, null);

            assertNotNull(object);
            assertNotNull(object.getId());
        } catch (CmisObjectNotFoundException e) {
            return false;
        }

        return true;
View Full Code Here

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

        assertNotNull(typeProp);
        assertPropertyValue(folderChild.getObject().getProperties(), PropertyIds.OBJECT_TYPE_ID, PropertyId.class,
                typeProp.getFirstValue());

        // check parent
        ObjectData parent = getBinding().getNavigationService().getFolderParent(getTestRepositoryId(), objectId, null,
                null);
        assertNotNull(parent);
        assertNotNull(parent.getProperties());
        assertNotNull(parent.getProperties().getProperties());
        assertNotNull(parent.getProperties().getProperties().get(PropertyIds.OBJECT_ID));
        assertEquals(folderId, parent.getProperties().getProperties().get(PropertyIds.OBJECT_ID).getFirstValue());

        return objectId;
    }
View Full Code Here

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

            // get document by path (check relative path segment)
            assertNotNull(parent.getObject().getProperties().getProperties().get(PropertyIds.PATH));
            String parentPath = parent.getObject().getProperties().getProperties().get(PropertyIds.PATH)
                    .getFirstValue().toString();

            ObjectData docByPath = getObjectByPath((parentPath.equals("/") ? "" : parentPath) + "/"
                    + folderChild.getPathSegment());

            PropertyData<?> idProp = docByPath.getProperties().getProperties().get(PropertyIds.OBJECT_ID);
            assertNotNull(idProp);
            assertEquals(objectId, idProp.getFirstValue());
        } else {
            List<ObjectParentData> parents = getBinding().getNavigationService().getObjectParents(
                    getTestRepositoryId(), objectId, null, Boolean.TRUE, IncludeRelationships.BOTH, null, Boolean.TRUE,
View Full Code Here

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

        if (entry.getId() == null) {
            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
        }

        lockLinks();
        ObjectData result = null;
        try {
            // clean up cache
            removeLinks(repositoryId, entry.getId());

            // walk through the entry
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.