Search in sources :

Example 6 with ConnectorNode

use of com.twinsoft.convertigo.eclipse.views.references.model.ConnectorNode in project convertigo by convertigo.

the class ReferencesView method handleTargetRequestable.

private void handleTargetRequestable(String targetRequestableName, ProjectExplorerView projectExplorerView, RequiresNode requiresNode) throws EngineException {
    StringTokenizer st = new StringTokenizer(targetRequestableName, ".");
    int count = st.countTokens();
    String projectName = st.nextToken();
    Project project = getProject(projectName, projectExplorerView);
    if (project != null) {
        ProjectNode requiresProjectNode = new ProjectNode(requiresNode, projectName, project);
        if (count == 2) {
            String sequenceName = count == 2 ? st.nextToken() : "";
            Sequence sequence = project.getSequenceByName(sequenceName);
            SequenceNode sequenceNode = new SequenceNode(requiresProjectNode, sequenceName, sequence);
            requiresProjectNode.addChild(sequenceNode);
        } else if (count == 3) {
            String connectorName = count == 3 ? st.nextToken() : "";
            Connector connector = project.getConnectorByName(connectorName);
            ConnectorNode connectorNode = new ConnectorNode(requiresProjectNode, connectorName, connector);
            requiresProjectNode.addChild(connectorNode);
            String transactionName = count == 3 ? st.nextToken() : "";
            Transaction transaction = connector.getTransactionByName(transactionName);
            TransactionNode transactionNode = new TransactionNode(connectorNode, transactionName, transaction);
            connectorNode.addChild(transactionNode);
        }
        if (requiresProjectNode.hasChildren()) {
            requiresNode.addChild(requiresProjectNode);
        }
    }
}
Also used : Project(com.twinsoft.convertigo.beans.core.Project) HtmlConnector(com.twinsoft.convertigo.beans.connectors.HtmlConnector) JavelinConnector(com.twinsoft.convertigo.beans.connectors.JavelinConnector) HttpConnector(com.twinsoft.convertigo.beans.connectors.HttpConnector) ProxyHttpConnector(com.twinsoft.convertigo.beans.connectors.ProxyHttpConnector) Connector(com.twinsoft.convertigo.beans.core.Connector) CicsConnector(com.twinsoft.convertigo.beans.connectors.CicsConnector) SiteClipperConnector(com.twinsoft.convertigo.beans.connectors.SiteClipperConnector) SqlConnector(com.twinsoft.convertigo.beans.connectors.SqlConnector) StringTokenizer(java.util.StringTokenizer) Transaction(com.twinsoft.convertigo.beans.core.Transaction) HtmlTransaction(com.twinsoft.convertigo.beans.transactions.HtmlTransaction) JavelinTransaction(com.twinsoft.convertigo.beans.transactions.JavelinTransaction) TransactionNode(com.twinsoft.convertigo.eclipse.views.references.model.TransactionNode) ProjectNode(com.twinsoft.convertigo.eclipse.views.references.model.ProjectNode) Sequence(com.twinsoft.convertigo.beans.core.Sequence) SequenceNode(com.twinsoft.convertigo.eclipse.views.references.model.SequenceNode) ConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.ConnectorNode) SiteClipperConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.SiteClipperConnectorNode) HtmlConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.HtmlConnectorNode) JavelinConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.JavelinConnectorNode) CicsConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.CicsConnectorNode) SqlConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.SqlConnectorNode) ProxyHttpConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.ProxyHttpConnectorNode) HttpConnectorNode(com.twinsoft.convertigo.eclipse.views.references.model.HttpConnectorNode)

Aggregations

CicsConnector (com.twinsoft.convertigo.beans.connectors.CicsConnector)6 HtmlConnector (com.twinsoft.convertigo.beans.connectors.HtmlConnector)6 HttpConnector (com.twinsoft.convertigo.beans.connectors.HttpConnector)6 JavelinConnector (com.twinsoft.convertigo.beans.connectors.JavelinConnector)6 ProxyHttpConnector (com.twinsoft.convertigo.beans.connectors.ProxyHttpConnector)6 SiteClipperConnector (com.twinsoft.convertigo.beans.connectors.SiteClipperConnector)6 SqlConnector (com.twinsoft.convertigo.beans.connectors.SqlConnector)6 Connector (com.twinsoft.convertigo.beans.core.Connector)6 Project (com.twinsoft.convertigo.beans.core.Project)6 Sequence (com.twinsoft.convertigo.beans.core.Sequence)6 Transaction (com.twinsoft.convertigo.beans.core.Transaction)6 HtmlTransaction (com.twinsoft.convertigo.beans.transactions.HtmlTransaction)6 JavelinTransaction (com.twinsoft.convertigo.beans.transactions.JavelinTransaction)6 CicsConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.CicsConnectorNode)6 ConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.ConnectorNode)6 HtmlConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.HtmlConnectorNode)6 HttpConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.HttpConnectorNode)6 JavelinConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.JavelinConnectorNode)6 ProjectNode (com.twinsoft.convertigo.eclipse.views.references.model.ProjectNode)6 ProxyHttpConnectorNode (com.twinsoft.convertigo.eclipse.views.references.model.ProxyHttpConnectorNode)6