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

Examples of org.apache.chemistry.opencmis.commons.impl.json.JSONObject


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

        // return object
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        setStatus(request, response, HttpServletResponse.SC_CREATED);
        setCookie(request, response, repositoryId, transaction,
                createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
View Full Code Here


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

        // return object
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        setStatus(request, response, HttpServletResponse.SC_CREATED);
        setCookie(request, response, repositoryId, transaction,
                createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
View Full Code Here

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

        // return object
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        setStatus(request, response, HttpServletResponse.SC_CREATED);
        setCookie(request, response, repositoryId, transaction,
                createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
View Full Code Here

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

        // return object
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        setStatus(request, response, HttpServletResponse.SC_CREATED);
        setCookie(request, response, repositoryId, transaction,
                createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
View Full Code Here

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

        // return object
        JSONObject jsonObject = JSONConverter.convert(object, typeCache, false);

        int status = HttpServletResponse.SC_OK;
        if (!objectId.equals(newObjectId)) {
            status = HttpServletResponse.SC_CREATED;
        }
View Full Code Here

            throw new CmisRuntimeException("Properties are null!");
        }

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

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

            throw new CmisRuntimeException("Object is null!");
        }

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

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

        // get parameters
        String objectId = (String) context.get(CONTEXT_OBJECT_ID);

        AllowableActions allowableActions = service.getAllowableActions(repositoryId, objectId, null);

        JSONObject jsonAllowableActions = JSONConverter.convert(allowableActions);

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

                continueOnFailure, null);

        response.setStatus(HttpServletResponse.SC_OK);

        if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
            JSONObject jsonObject = JSONConverter.convert(ftd);
            writeJSON(jsonObject, request, response);
            return;
        }

        writeEmpty(request, response);
View Full Code Here

        response.setStatus(HttpServletResponse.SC_OK);

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

        writeJSON(jsonObject, request, response);
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.json.JSONObject

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.