Package org.apache.chemistry.opencmis.commons.impl

Examples of org.apache.chemistry.opencmis.commons.impl.TypeCache


        Holder<String> changeLogTokenHolder = new Holder<String>(changeLogToken);
        ObjectList changes = service.getContentChanges(repositoryId, changeLogTokenHolder, includeProperties, filter,
                includePolicyIds, includeAcl, maxItems, null);

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONObject jsonChanges = JSONConverter.convert(changes, typeCache, false);
        jsonChanges.put(JSONConstants.JSON_OBJECTLIST_CHANGE_LOG_TOKEN, changeLogTokenHolder.getValue());

        response.setStatus(HttpServletResponse.SC_OK);
        BrowserBindingUtils.writeJSON(jsonChanges, request, response);
View Full Code Here


        if (children == null) {
            throw new CmisRuntimeException("Children are null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONObject jsonChildren = JSONConverter.convert(children, typeCache);

        response.setStatus(HttpServletResponse.SC_OK);
        BrowserBindingUtils.writeJSON(jsonChildren, request, response);
    }
View Full Code Here

        if (descendants == null) {
            throw new CmisRuntimeException("Descendants are null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONArray jsonDescendants = new JSONArray();
        for (ObjectInFolderContainer descendant : descendants) {
            jsonDescendants.add(JSONConverter.convert(descendant, typeCache));
        }
View Full Code Here

        if (folderTree == null) {
            throw new CmisRuntimeException("Folder Tree are null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONArray jsonDescendants = new JSONArray();
        for (ObjectInFolderContainer descendant : folderTree) {
            jsonDescendants.add(JSONConverter.convert(descendant, typeCache));
        }
View Full Code Here

        if (parent == null) {
            throw new CmisRuntimeException("Parent is null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONObject jsonObject = JSONConverter.convert(parent, typeCache, false);

        response.setStatus(HttpServletResponse.SC_OK);
        BrowserBindingUtils.writeJSON(jsonObject, request, response);
    }
View Full Code Here

        if (parents == null) {
            throw new CmisRuntimeException("Parents are null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONArray jsonParents = new JSONArray();
        for (ObjectParentData parent : parents) {
            jsonParents.add(JSONConverter.convert(parent, typeCache));
        }
View Full Code Here

        if (checkedout == null) {
            throw new CmisRuntimeException("Checked out list is null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONObject jsonCheckedOut = JSONConverter.convert(checkedout, typeCache, false);

        response.setStatus(HttpServletResponse.SC_OK);
        BrowserBindingUtils.writeJSON(jsonCheckedOut, request, response);
    }
View Full Code Here

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

        // return object
        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        // set headers
        String location = compileUrl(compileBaseUrl(request, repositoryId), RESOURCE_CONTENT, object.getId());
View Full Code Here

        String checkinComment = getStringParameter(request, PARAM_CHECKIN_COMMENT);
        String transaction = getStringParameter(request, PARAM_TRANSACTION);

        // execute
        ControlParser cp = new ControlParser(request);
        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        Holder<String> objectIdHolder = new Holder<String>(objectId);

        service.checkIn(repositoryId, objectIdHolder, major, createProperties(cp, typeId, typeCache),
                createContentStream(request), checkinComment, createPolicies(cp), createAddAcl(cp),
                createRemoveAcl(cp), null);
View Full Code Here

        if (versions == null) {
            throw new CmisRuntimeException("Versions are null!");
        }

        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
        JSONArray jsonVersions = new JSONArray();
        for (ObjectData version : versions) {
            jsonVersions.add(JSONConverter.convert(version, typeCache, false));
        }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.TypeCache

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.