Package org.brixcms.jcr.api

Examples of org.brixcms.jcr.api.JcrProperty


                } else if (n.hasNode("jcr:content")) {
                    JcrNode content = n.getNode("jcr:content");
                    if (content.isModified() || content.isNew()) {
                        touch(n);
                    } else if (content.hasProperty("jcr:data")) {
                        JcrProperty data = content.getProperty("jcr:data");
                        if (data.isNew() || data.isModified()) {
                            touch(n);
                        }
                    }
                }
            }
View Full Code Here


            JcrNode targetNode = current.targetNode;

            JcrValueFactory vf = targetNode.getSession().getValueFactory();
            JcrPropertyIterator propertyIterator = originalNode.getProperties();
            while (propertyIterator.hasNext()) {
                JcrProperty property = propertyIterator.nextProperty();
                String name = property.getName();
                if (!property.getDefinition().isProtected()) {
                    if (!property.getDefinition().isMultiple()) {
                        JcrValue value = property.getValue();
                        targetNode.setProperty(name, remapReference(value, uuidMap, vf));
                    } else {
                        JcrValue values[] = property.getValues();
                        for (int i = 0; i < values.length; ++i) {
                            values[i] = remapReference(values[i], uuidMap, vf);
                        }
                        targetNode.setProperty(name, values);
                    }
View Full Code Here

    private static void checkDependencies(JcrNode node, List<String> paths, JcrWorkspace targetWorkspace,
                                          Map<JcrNode, List<JcrNode>> result) {
        // go through all properties
        JcrPropertyIterator iterator = node.getProperties();
        while (iterator.hasNext()) {
            JcrProperty property = iterator.nextProperty();

            // if it is a reference property
            if (property.getType() == PropertyType.REFERENCE) {
                // if the property has multiple values
                if (property.getDefinition().isMultiple()) {
                    JcrValue values[] = property.getValues();
                    for (JcrValue value : values) {
                        checkReferenceValue(value, node, paths, targetWorkspace, result);
                    }
                } else {
                    JcrValue value = property.getValue();
                    checkReferenceValue(value, node, paths, targetWorkspace, result);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.brixcms.jcr.api.JcrProperty

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.