Package org.apache.chemistry.opencmis.commons.data

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


    public List<String> deleteTree(boolean allVersions, UnfileObject unfile, boolean continueOnFailure) {
        String repositoryId = getRepositoryId();
        String objectId = getObjectId();

        FailedToDeleteData failed = getBinding().getObjectService().deleteTree(repositoryId, objectId, allVersions,
                unfile, continueOnFailure, null);

        if ((failed == null) || (failed.getIds() == null) || (failed.getIds().isEmpty())) {
            getSession().removeObjectFromCache(this);
        }

        return failed.getIds();
    }
View Full Code Here


        Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
        UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
        Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);

        // execute
        FailedToDeleteData ftd = service.deleteTree(repositoryId, objectId, allVersions, unfileObjects,
                continueOnFailure, null);

        if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
            // TODO
        }

        response.setStatus(HttpServletResponse.SC_OK);
        writeEmpty(request, response);
View Full Code Here

        Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
        UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
        Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);

        // execute
        FailedToDeleteData ftd = service.deleteTree(repositoryId, objectId, allVersions, unfileObjects,
                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;
        }
View Full Code Here

    public List<String> deleteTree(boolean allVersions, UnfileObject unfile, boolean continueOnFailure) {
        String repositoryId = getRepositoryId();
        String objectId = getObjectId();

        FailedToDeleteData failed = getBinding().getObjectService().deleteTree(repositoryId, objectId, allVersions,
                unfile, continueOnFailure, null);

        if ((failed == null) || (failed.getIds() == null) || (failed.getIds().isEmpty())) {
            getSession().removeObjectFromCache(this);
        }

        return (failed != null ? failed.getIds() : null);
    }
View Full Code Here

        Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
        UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
        Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);

        // execute
        FailedToDeleteData ftd = service.deleteTree(repositoryId, folderId, allVersions, unfileObjects,
                continueOnFailure, null);

        if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
            // print ids that could not be deleted
            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            response.setContentType("text/plain");

            PrintWriter pw = response.getWriter();

            pw.println("Failed to delete the following objects:");
            for (String id : ftd.getIds()) {
                pw.println(id);
            }

            pw.flush();
View Full Code Here

            // nothing has change, so there is nothing to do
            return getObjectId();
        }

        if (isMarkedForDeleteTree) {
            FailedToDeleteData ftd = getBinding().getObjectService().deleteTree(getRepositoryId(), getId(),
                    deleteTreeAllVersions, deleteTreeUnfile, deleteTreeContinueOnFailure, null);

            if ((ftd != null) && (!ftd.getIds().isEmpty())) {
                throw new CmisConstraintException("deleteTree could not delete all folder children: " + ftd.getIds());
            }

            return null;
        }
View Full Code Here

    public List<String> deleteTree(boolean allVersions, UnfileObject unfile, boolean continueOnFailure) {
        String repositoryId = getRepositoryId();
        String objectId = getObjectId();

        FailedToDeleteData failed = getBinding().getObjectService().deleteTree(repositoryId, objectId, allVersions,
                unfile, continueOnFailure, null);

        if ((failed == null) || (failed.getIds() == null) || (failed.getIds().isEmpty())) {
            getSession().removeObjectFromCache(this);
        }

        return failed.getIds();
    }
View Full Code Here

        Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
        UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
        Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);

        // execute
        FailedToDeleteData ftd = service.deleteTree(repositoryId, folderId, allVersions, unfileObjects,
                continueOnFailure, null);

        if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
            // print ids that could not be deleted
            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            response.setContentType("text/plain");

            PrintWriter pw = response.getWriter();

            pw.println("Failed to delete the following objects:");
            for (String id : ftd.getIds()) {
                pw.println(id);
            }

            pw.flush();
View Full Code Here

    public List<String> deleteTree(boolean allVersions, UnfileObject unfile, boolean continueOnFailure) {
        String repositoryId = getRepositoryId();
        String objectId = getObjectId();

        FailedToDeleteData failed = getBinding().getObjectService().deleteTree(repositoryId, objectId, allVersions,
                unfile, continueOnFailure, null);

        return failed.getIds();
    }
View Full Code Here

        Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
        UnfileObject unfileObjects = getEnumParameter(request, Constants.PARAM_UNFILE_OBJECTS, UnfileObject.class);
        Boolean continueOnFailure = getBooleanParameter(request, Constants.PARAM_CONTINUE_ON_FAILURE);

        // execute
        FailedToDeleteData ftd = service.deleteTree(repositoryId, folderId, allVersions, unfileObjects,
                continueOnFailure, null);

        if ((ftd != null) && (ftd.getIds() != null) && (ftd.getIds().size() > 0)) {
            // print ids that could not be deleted
            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            response.setContentType("text/plain");

            PrintWriter pw = response.getWriter();

            pw.println("Failed to delete the following objects:");
            for (String id : ftd.getIds()) {
                pw.println(id);
            }

            pw.flush();
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.FailedToDeleteData

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.