Examples of Resolution


Examples of net.sourceforge.stripes.action.Resolution

        try {
            final Configuration config = StripesFilter.getConfiguration();
            final ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
            final HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
            final HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();
            Resolution resolution = null;
            ExecutionContext ctx = new ExecutionContext();

            // Lookup the ActionBean if we don't already have it
            if (beanNotPresent) {
                ActionBeanContext tempContext =
View Full Code Here

Examples of net.sourceforge.stripes.action.Resolution

        boolean doValidate = annotation == null || !annotation.ignoreBindingErrors();

        // If we have errors, add the action path to them
        fillInValidationErrors(ctx);

        Resolution resolution = null;
        if (doValidate) {
            ActionBean bean = ctx.getActionBean();
            ActionBeanContext context = ctx.getActionBeanContext();
            ValidationErrors errors = context.getValidationErrors();
View Full Code Here

Examples of net.sourceforge.stripes.action.Resolution

        ctx.setLifecycleStage(LifecycleStage.ResolutionExecution);
        ctx.setInterceptors(config.getInterceptors(LifecycleStage.ResolutionExecution));
        ctx.setResolution(resolution);

        Resolution retval = ctx.wrap( new Interceptor() {
            public Resolution intercept(ExecutionContext context) throws Exception {
                ActionBeanContext abc = context.getActionBeanContext();
                Resolution resolution = context.getResolution();

                if (resolution != null) {
                    resolution.execute(abc.getRequest(), abc.getResponse());
                }

                return null;
            }
        });
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.ConflictHandler.Resolution

        assert target != null;

        store.compare(fromState, toState, new NodeStateDiff() {
            @Override
            public void propertyAdded(PropertyState after) {
                Resolution resolution;
                PropertyState p = target.getProperty(after.getName());

                if (p == null) {
                    resolution = OURS;
                }
                else {
                    resolution = conflictHandler.addExistingProperty(target, after, p);
                }

                switch (resolution) {
                    case OURS:
                        setProperty(target, after);
                        break;
                    case THEIRS:
                    case MERGED:
                        break;
                }
            }

            @Override
            public void propertyChanged(PropertyState before, PropertyState after) {
                assert before.getName().equals(after.getName());

                Resolution resolution;
                PropertyState p = target.getProperty(after.getName());

                if (p == null) {
                    resolution = conflictHandler.changeDeletedProperty(target, after);
                }
                else if (before.equals(p)) {
                    resolution = OURS;
                }
                else {
                    resolution = conflictHandler.changeChangedProperty(target, after, p);
                }

                switch (resolution) {
                    case OURS:
                        setProperty(target, after);
                        break;
                    case THEIRS:
                    case MERGED:
                        break;
                }
            }

            @Override
            public void propertyDeleted(PropertyState before) {
                Resolution resolution;
                PropertyState p = target.getProperty(before.getName());

                if (before.equals(p)) {
                    resolution = OURS;
                }
                else if (p == null) {
                    resolution = conflictHandler.deleteDeletedProperty(target, before);
                }
                else {
                    resolution = conflictHandler.deleteChangedProperty(target, p);
                }

                switch (resolution) {
                    case OURS:
                        target.removeProperty(before.getName());
                        break;
                    case THEIRS:
                    case MERGED:
                        break;
                }
            }

            @Override
            public void childNodeAdded(String name, NodeState after) {
                Resolution resolution;
                TreeImpl n = target.getChild(name);

                if (n == null) {
                    resolution = OURS;
                }
                else {
                    resolution = conflictHandler.addExistingNode(target, name, after, n.getNodeState());
                }

                switch (resolution) {
                    case OURS:
                        addChild(target, name, after);
                        break;
                    case THEIRS:
                    case MERGED:
                        break;
                }
            }

            @Override
            public void childNodeChanged(String name, NodeState before, NodeState after) {
                Resolution resolution;
                TreeImpl n = target.getChild(name);

                if (n == null) {
                    resolution = conflictHandler.changeDeletedNode(target, name, after);
                }
                else {
                    merge(before, after, n, conflictHandler);
                    resolution = MERGED;
                }

                switch (resolution) {
                    case OURS:
                        addChild(target, name, after);
                        break;
                    case THEIRS:
                    case MERGED:
                        break;
                }
            }

            @Override
            public void childNodeDeleted(String name, NodeState before) {
                Resolution resolution;
                TreeImpl n = target.getChild(name);

                if (n == null) {
                    resolution = conflictHandler.deleteDeletedNode(target, name);
                }
View Full Code Here

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

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

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

    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

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

Examples of org.apache.lucene.document.DateTools.Resolution

 
  public static Resolution getResolution(String key) {
    if (key == null || key.trim().length() == 0) {
      return Resolution.MILLISECOND;
    }
    Resolution r = resolutionMap.get(key);
    if (r != null) return r;
    return Resolution.MILLISECOND;
  }
View Full Code Here

Examples of org.apache.lucene.document.DateTools.Resolution

 
  private DateResolutionUtil() {}
 
 
  public static Resolution getLuceneResolution(org.hibernate.search.annotations.Resolution hibResolution) {
    Resolution resolution = null;
    switch (hibResolution) {
      case YEAR:
        resolution = DateTools.Resolution.YEAR;
        break;
      case MONTH:
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.