Package org.apache.jackrabbit.oak.spi.commit.ConflictHandler

Examples of org.apache.jackrabbit.oak.spi.commit.ConflictHandler.Resolution


    private void resolveConflict(ConflictType conflictType, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictType);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictType, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictType);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictType, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictType + '\'');
View Full Code Here


    private void resolveConflict(ConflictType conflictType, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictType);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictType, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictType);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictType, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictType + '\'');
View Full Code Here

    private void resolveConflict(String conflictName, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictName);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictName, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictName);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictName, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictName + '\'');
View Full Code Here

    private void resolveConflict(ConflictType conflictType, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictType);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictType, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictType);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictType, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictType + '\'');
View Full Code Here

    private void resolveConflict(ConflictType conflictType, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictType);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictType, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictType);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictType, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictType + '\'');
View Full Code Here

    private void resolveConflict(ConflictType conflictType, NodeState conflictInfo) {
        PropertyConflictHandler propertyConflictHandler = propertyConflictHandlers.get(conflictType);
        if (propertyConflictHandler != null) {
            for (PropertyState ours : conflictInfo.getProperties()) {
                PropertyState theirs = parent.getProperty(ours.getName());
                Resolution resolution = propertyConflictHandler.resolve(ours, theirs);
                applyResolution(resolution, conflictType, ours);
            }
        }
        else {
            NodeConflictHandler nodeConflictHandler = nodeConflictHandlers.get(conflictType);
            if (nodeConflictHandler != null) {
                for (ChildNodeEntry oursCNE : conflictInfo.getChildNodeEntries()) {
                    String name = oursCNE.getName();
                    NodeState ours = oursCNE.getNodeState();
                    NodeState theirs = parent.getChildNode(name);
                    Resolution resolution = nodeConflictHandler.resolve(name, ours, theirs);
                    applyResolution(resolution, conflictType, name, ours);
                }
            }
            else {
                LOG.warn("Ignoring unknown conflict '" + conflictType + '\'');
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.commit.ConflictHandler.Resolution

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.