blob: 08638af058a0467c020ac879bbb11fae3afed8cb (
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
|
/*******************************************************************************
* Copyright (c) 2004, 2007 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
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20060727 144354 kathy@ca.ibm.com - Kathy Chan
* 20070502 180304 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
/**
*/
package org.eclipse.jst.ws.internal.consumption.ui.widgets.test;
import org.eclipse.wst.command.internal.env.core.common.Condition;
import org.eclipse.wst.command.internal.env.core.fragment.BooleanFragment;
import org.eclipse.wst.command.internal.env.core.fragment.SequenceFragment;
import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment;
public class ClientTestFragment extends BooleanFragment
{
private boolean testService;
private boolean genProxy; // This actually represent whether client test is requested
private boolean launchedTest = false;
private boolean canGenProxy;
public ClientTestFragment( String id )
{
SequenceFragment clientTestRoot = new SequenceFragment();
Condition condition = new Condition()
{
public boolean evaluate()
{
return testService && genProxy;
}
};
setCondition( condition );
Condition jspCondition = new Condition()
{
public boolean evaluate()
{
return canGenProxy;
}
};
SimpleFragment simpleJSPFragment = new SimpleFragment( new WebServiceClientTestArrivalCommand(), "" );
BooleanFragment choiceJSPFragment = new BooleanFragment();
choiceJSPFragment.setTrueFragment(simpleJSPFragment);
choiceJSPFragment.setCondition(jspCondition);
clientTestRoot.add(choiceJSPFragment);
clientTestRoot.add( new SimpleFragment( id ) );
setTrueFragment( clientTestRoot );
}
public void setGenerateProxy( boolean genProxy )
{
this.genProxy = genProxy;
}
public void setCanGenerateProxy( boolean canGenProxy )
{
this.canGenProxy = canGenProxy;
}
public void setTestService( Boolean testService )
{
this.testService = testService.booleanValue();
}
public boolean getLaunchedTest()
{
return launchedTest;
}
}
|