Skip to main content
summaryrefslogtreecommitdiffstats
blob: 74a8fac088987855cd579b0d9c6046845fe30462 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*******************************************************************************
 * Copyright (c) 2001, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective;

import org.eclipse.wst.ws.internal.explorer.platform.constants.*;
import org.eclipse.wst.ws.internal.explorer.platform.perspective.*;

import java.util.*;

public class SubQueryTransferTarget
{
  private int nodeId_;
  private int toolId_;
  private int viewId_;
  private int viewToolId_;
  private String subQueryKey_;
  private NodeManager nodeManager_;
  Hashtable parentQueryData_;

  public SubQueryTransferTarget(Node node,String subQueryKey,Hashtable parentQueryData)
  {
    nodeId_ = node.getNodeId();
    toolId_ = node.getToolManager().getSelectedToolId();
    viewId_ = node.getViewId();
    viewToolId_ = node.getViewToolId();
    subQueryKey_ = subQueryKey;
    nodeManager_ = node.getNodeManager();
    parentQueryData_ = parentQueryData;
  }

  public final int getNodeId()
  {
    return nodeId_;
  }

  public final int getToolId()
  {
    return toolId_;
  }

  public final int getViewId()
  {
    return viewId_;
  }

  public final int getViewToolId()
  {
    return viewToolId_;
  }

  public final String getSubQueryKey()
  {
    return subQueryKey_;
  }

  public final FormTool getTargetFormTool()
  {
    Node node = nodeManager_.getNode(nodeId_);
    if (node == null)
      return null;

    Tool tool = node.getToolManager().getTool(toolId_);

    if (viewId_ != ActionInputs.VIEWID_DEFAULT)
    {
      ViewTool viewTool = (ViewTool)tool;
      ToolManager viewToolManager = viewTool.getToolManager(viewId_);
      if (viewToolManager != null)
        tool = viewToolManager.getTool(viewToolId_);
      else
        tool = null;
    }
    return (FormTool)tool;
  }
  
  public final Hashtable getParentQueryData()
  {
    return parentQueryData_;
  }
}

Back to the top