Examples of VersioningConfiguration


Examples of org.apache.sling.servlets.post.VersioningConfiguration

    private VersioningConfiguration baseVersioningConfiguration;

    @Override
    protected void doPost(final SlingHttpServletRequest request,
            final SlingHttpServletResponse response) throws IOException {
        final VersioningConfiguration localVersioningConfig = createRequestVersioningConfiguration(request);

        request.setAttribute(VersioningConfiguration.class.getName(), localVersioningConfig);

        // prepare the response
        final PostResponse htmlResponse = createPostResponse(request);
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

            importOperation.setContentImporter(null);
        }
    }

    private VersioningConfiguration createBaseVersioningConfiguration(Map<?, ?> props) {
        VersioningConfiguration cfg = new VersioningConfiguration();
        cfg.setCheckinOnNewVersionableNode(OsgiUtil.toBoolean(
                props.get(PROP_CHECKIN_ON_CREATE), DEFAULT_CHECKIN_ON_CREATE));
        cfg.setAutoCheckout(OsgiUtil.toBoolean(
                props.get(PROP_AUTO_CHECKOUT), DEFAULT_AUTO_CHECKOUT));
        cfg.setAutoCheckin(OsgiUtil.toBoolean(
                props.get(PROP_AUTO_CHECKIN), DEFAULT_AUTO_CHECKIN));
        return cfg;
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

                props.get(PROP_AUTO_CHECKIN), DEFAULT_AUTO_CHECKIN));
        return cfg;
    }

    private VersioningConfiguration createRequestVersioningConfiguration(SlingHttpServletRequest request) {
        VersioningConfiguration cfg = baseVersioningConfiguration.clone();

        String paramValue = request.getParameter(PARAM_CHECKIN_ON_CREATE);
        if (paramValue != null) {
            cfg.setCheckinOnNewVersionableNode(Boolean.parseBoolean(paramValue));
        }
        paramValue = request.getParameter(PARAM_AUTO_CHECKOUT);
        if (paramValue != null) {
            cfg.setAutoCheckout(Boolean.parseBoolean(paramValue));
        }
        paramValue = request.getParameter(PARAM_AUTO_CHECKIN);
        if (paramValue != null) {
            cfg.setAutoCheckin(Boolean.parseBoolean(paramValue));
        }
        return cfg;
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

            PostResponse response,
            List<Modification> changes)
    throws RepositoryException {
        Session session = request.getResourceResolver().adaptTo(Session.class);

        VersioningConfiguration versioningConfiguration = getVersioningConfiguration(request);

        Resource resource = request.getResource();
        String source = resource.getPath();

        // ensure dest is not empty/null and is absolute
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

            return;
        }
        Map<String, RequestProperty> reqProperties = collectContent(request,
             response);

        VersioningConfiguration versioningConfiguration = getVersioningConfiguration(request);

        // do not change order unless you have a very good reason.
        Session session = request.getResourceResolver().adaptTo(Session.class);

        try {
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

    throws RepositoryException {

        try {
            final Map<String, RequestProperty> reqProperties = collectContent(request, response);

            final VersioningConfiguration versioningConfiguration = getVersioningConfiguration(request);

            // do not change order unless you have a very good reason.

            // ensure root of new content
            processCreate(request.getResourceResolver(), reqProperties, response, changes, versioningConfiguration);
View Full Code Here

Examples of org.apache.sling.servlets.post.VersioningConfiguration

                    HttpServletResponse.SC_FORBIDDEN,
                    "DeleteOperation request cannot include any selectors, extension or suffix");
            return;
        }
       
        final VersioningConfiguration versioningConfiguration = getVersioningConfiguration(request);
        final boolean deleteChunks = isDeleteChunkRequest(request);
        final Iterator<Resource> res = getApplyToResources(request);
        if (res == null) {
            final Resource resource = request.getResource();
            deleteResource(resource, changes, versioningConfiguration,
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.