Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2ed3f564363c46d230f91a794f26da5976d21f19 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*******************************************************************************
 * Copyright (c) 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.jst.ws.internal.context;


import org.eclipse.jst.ws.internal.data.LabelsAndIds;
import org.eclipse.jst.ws.internal.ext.test.WebServiceTestRegistry;



public class ScenarioDefaults
{  
  
	
  public String[] getWebServiceTestTypes()
  {
  	//we will set the home grown sample as the first choice
  	WebServiceTestRegistry testRegistry = WebServiceTestRegistry.getInstance();
  	
  	LabelsAndIds labelsandids = testRegistry.getLabelsAndIDs();
  	String[] labels = labelsandids.getLabels_();
  	String[] ids = labelsandids.getIds_();
  	
  	String[] newNames = new String[labels.length];
  	int index = -1;
  	for(int i = 0;i<ids.length;i++){
  	  if(ids[i].equals("org.eclipse.jst.ws.internal.consumption.ui.widgets.test.WebServiceSampleTest"))  	
  	    index = i;   
  	}
  	if(index != -1){
  	  newNames[0] = labels[index];
  	  int j = 1;
  	  for(int i = 0;i<labels.length;i++){
  	    if(i != index){
  	  	  newNames[j] = labels[i]; 
  	      j++;
  	    }
  	  }
  	}
  	else return labels;
  	
  	return newNames;
  }
  
  public String getNonJavaTestServiceDefault()
  {
    return "Web Services Explorer";	
  } 
  
  public String webserviceTypeIdDefault()
  {
    return "0/org.eclipse.jst.ws.wsImpl.java";
  }
  
  public int serviceGenerationDefault()
  {
	  return ScenarioContext.WS_START;  
  }
  
  public int clientGenerationDefault()
  {
	  return ScenarioContext.WS_NONE;  
  }
  
  public boolean startWebserviceDefault()
  {
    return true;
  }
  
  public boolean installWebserviceDefault()
  {
    return true;
  }
  
  public boolean installClientDefault()
  {
    return true;
  }
  
  public boolean launchWebserviceExplorerDefault()
  {
    return false;
  }
  
  public boolean generateProxyDefault()
  {
    return false;
  }
  
  public String webserviceClientTypeDefault()
  {
    return "org.eclipse.jst.ws.client.type.java";
  }
  
  public boolean testWebserviceDefault()
  {
    return false;
  }

  public boolean getMonitorWebServiceDefault()
  {
    return false;
  }
  
  public boolean launchSample()
  {
    return true;
  }
}

Back to the top