Package org.apache.sling.servlets.post.impl.helper

Examples of org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler$Modifiable


            final Map<String, RequestProperty> reqProperties,
            final List<Modification> changes,
            final VersioningConfiguration versioningConfiguration)
    throws RepositoryException, PersistenceException {

        final SlingPropertyValueHandler propHandler = new SlingPropertyValueHandler(
            dateParser, new ReferenceParser(resolver.adaptTo(Session.class)), changes);

        for (final RequestProperty prop : reqProperties.values()) {
            if (prop.hasValues()) {
                final Resource parent = deepGetOrCreateNode(resolver,
                    prop.getParentPath(), reqProperties, changes, versioningConfiguration);

                final Node parentNode = parent.adaptTo(Node.class);
                if ( parentNode != null ) {
                    checkoutIfNecessary(parentNode, changes, versioningConfiguration);
                }

                // skip jcr special properties
                if (prop.getName().equals("jcr:primaryType")
                    || prop.getName().equals("jcr:mixinTypes")) {
                    continue;
                }

                if (prop.isFileUpload()) {
                    uploadHandler.setFile(parent, prop, changes);
                } else {
                    propHandler.setProperty(parent, prop);
                }
            }
        }
    }
View Full Code Here


     */
    private void writeContent(Session session,
            Map<String, RequestProperty> reqProperties, HtmlResponse response)
            throws RepositoryException {

        SlingPropertyValueHandler propHandler = new SlingPropertyValueHandler(
            dateParser, response);

        for (RequestProperty prop : reqProperties.values()) {
            if (prop.hasValues()) {
                Node parent = deepGetOrCreateNode(session,
                    prop.getParentPath(), reqProperties, response);
                // skip jcr special properties
                if (prop.getName().equals("jcr:primaryType")
                    || prop.getName().equals("jcr:mixinTypes")) {
                    continue;
                }
                if (prop.isFileUpload()) {
                    uploadHandler.setFile(parent, prop, response);
                } else {
                    propHandler.setProperty(parent, prop);
                }
            }
        }
    }
View Full Code Here

     */
    private void writeContent(Session session,
            Map<String, RequestProperty> reqProperties, List<Modification> changes)
            throws RepositoryException {

        SlingPropertyValueHandler propHandler = new SlingPropertyValueHandler(
            dateParser, changes);

        for (RequestProperty prop : reqProperties.values()) {
            if (prop.hasValues()) {
                Node parent = deepGetOrCreateNode(session,
                    prop.getParentPath(), reqProperties, changes);
                // skip jcr special properties
                if (prop.getName().equals("jcr:primaryType")
                    || prop.getName().equals("jcr:mixinTypes")) {
                    continue;
                }
                if (prop.isFileUpload()) {
                    uploadHandler.setFile(parent, prop, changes);
                } else {
                    propHandler.setProperty(parent, prop);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler$Modifiable

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.