Package org.jitterbit.integration.client.ui.interchange.entity.operation.graph2d.node

Examples of org.jitterbit.integration.client.ui.interchange.entity.operation.graph2d.node.OperationWrapperNode


        }
    }

    private Object getNextActivityNode(Object current) {
        PipelineActivityNode activityNode = (PipelineActivityNode) current;
        OperationWrapperNode opNode = activityNode.getParent();
        PipelineActivity nextActivity = opNode.getPipeline().getNextActivity(activityNode.getDataObject());
        if (nextActivity == null) {
            nextActivity = opNode.getPipeline().getFirstActivity();
        }
        Object nextNode = opNode.getChildFor(nextActivity);
        return nextNode != null ? nextNode : current;
    }
View Full Code Here


        return nextNode != null ? nextNode : current;
    }

    private Object getPreviousActivityNode(Object current) {
        PipelineActivityNode activityNode = (PipelineActivityNode) current;
        OperationWrapperNode opNode = activityNode.getParent();
        PipelineActivity previousActivity = opNode.getPipeline().getPreviousActivity(activityNode.getDataObject());
        if (previousActivity == null) {
            previousActivity = opNode.getPipeline().getLastActivity();
        }
        Object prevNode = opNode.getChildFor(previousActivity);
        return prevNode != null ? prevNode : current;
    }
View Full Code Here

            insertionPointIcon = null;
        }
    }
   
    private boolean isInsertionPoint(PipelineActivityEdge edge) {
        OperationWrapperNode opNode = edge.from().getParent();
        OperationPipeline pipeline = opNode.getPipeline();
        ActivityInsertionPolicy policy = pipeline.getInsertionPolicy();
        return !policy.getAllowedActivities(edge.asConnectionPoint()).isEmpty();
    }
View Full Code Here

    }

    public boolean insertNewActivity(OperationPipeline pipeline,
                                     ActivityConnection connectionPoint,
                                     PipelineActivity toInsert) {
        OperationWrapperNode opNode = getOperationNodeFor(pipeline);
        if (opNode == null) {
            return false;
        }
        if (controller.isChangeAllowed(opNode)) {
            insertActivityIntoPipeline(pipeline, toInsert, connectionPoint);
View Full Code Here

   
    protected abstract void handleNoSelection();
   
    @Override
    public void selectionChanged(Object[] selection) {
        OperationWrapperNode opNode = getOpNode(selection);
        if (opNode != null) {
            handleOperationNode(opNode);
        } else {
            handleNoSelection();
        }
View Full Code Here

            handleNoSelection();
        }
    }
   
    private static OperationWrapperNode getOpNode(Object[] selection) {
        OperationWrapperNode opNode = null;
        for (Object o : selection) {
            if (o instanceof OperationWrapperNode) {
                if (opNode == null) {
                    opNode = (OperationWrapperNode) o;
                } else if (opNode != o) {
                    return null;
                }
            } else if (o instanceof EmailWrapperNode) {
                return null;
            } else if (o instanceof PipelineActivityNode) {
                OperationWrapperNode parent = ((PipelineActivityNode) o).getParent();
                if (opNode == null) {
                    opNode = parent;
                } else if (opNode != parent) {
                    return null;
                }
View Full Code Here

            return false;
        }
    }

    private void removeImpl(PipelineActivityNode node) throws RemoveActivityVetoException {
        OperationWrapperNode opNode = node.getParent();
        UndoableEdit edit = new PipelineActivityRemovedEdit(controller, node.getDataObject(), opNode);
        opNode.getPipeline().removeActivity(node.getDataObject());
        controller.fireGraphDataEdit(edit);
    }
View Full Code Here

    }

    @Override
    public boolean isDeletable(AbstractGraphNode node) {
        if (node instanceof OperationWrapperNode) {
            OperationWrapperNode opNode = (OperationWrapperNode) node;
            if (opNode == graph.getModel().getStartNode()) {
                return false;
            }
            if (opNode.getDataObject().getIncomingRoutes().find(RouteType.SCRIPTED) != null) {
                return false;
            }
        }
        // TODO: For pipeline activity nodes we need to check the pipeline's removal policy.
        // Right now that is not possible due to the current API of ActivityRemovalPolicy
View Full Code Here

        provider.setEntityFactory(entityFactory);
    }

    @Override
    public void selectActivity(PipelineActivityNode node) {
        OperationWrapperNode opNode = node.getParent();
        node.selectActivity(this, opNode);
    }
View Full Code Here

        @Override
        public void nodesInserted(NodesInsertedEvent evt) {
            for (Object node : evt.getInserted()) {
                if (node instanceof OperationWrapperNode) {
                    OperationWrapperNode opNode = ((OperationWrapperNode) node);
                    opNode.setNodeController(opNodeController);
                    installAutoCompleter(opNode);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.ui.interchange.entity.operation.graph2d.node.OperationWrapperNode

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.