Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: 413db86375f38000feec56ffb77598c7a6ddcbb1 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*******************************************************************************
 * Copyright (c) 2000, 2006 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
 * -------- -------- -----------------------------------------------------------
 * 20060321   128827 joan - Joan Haggarty, remove redundant wsdl URI, folder and file controls
 * 20060523   143284 sengpl@ca.ibm.com - Seng Phung-Lu
 * 20060605   145407 sengpl@ca.ibm.com - Seng Phung-Lu
 *******************************************************************************/
package org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl;


import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsFragment;
import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget;
import org.eclipse.jst.ws.internal.axis.creation.ui.command.TDCodeGenOperation;
import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonDefaultingCommand;
import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidget;
import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand;
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
import org.eclipse.jst.ws.internal.consumption.ui.command.data.ProjectName2IProjectTransformer;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand;
import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry;
import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment;
import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory;
import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment;
import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry;
import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetRegistry;

/**
* This is the class for the Axis Web service type.
*/
public class WSWSDLAxisType implements CommandWidgetBinding 
{
	private String serverName_;
	private String runtimeName_;
	private boolean isWebModuleRequired_;

	/**
	* Returns a locale specific label for the Server supported by this Web Service type
	* @return A locale specific server label from server plugins
	*/
	public String getServerLabel() {
		return serverName_;
	}

	/**
	* Sets the server label to the appropriate name found in the server plugins.
	* @param server name
	*/
	public void setServerLabel(String serverLabel) {
		serverName_ = serverLabel;
	}

	/**
	* Returns a locale specific label for the deployment runtime of this Web Service type
	* @return A locale specific label for the deployment runtime
	*/
	public String getRuntimeLabel() {
		return runtimeName_;
	}

	/**
	* Sets the runtime label for the appropriate runtime
	* @param server name
	*/
	public void setRuntimeLabel(String runtimeLabel) {
		runtimeName_ = runtimeLabel;
	}

	/**
	* Returns whether or not a Web Module is required for this WebServiceServerRuntimeType
	* @return true if requireWebModule
	*/
	public boolean isWebModuleRequired() {
		return isWebModuleRequired_;
	}

	/**
	* Sets the boolean value at runtime according to requireWebModule attribute from the manifest file
	* @param requireWebModule 
	*/
	public void setWebModuleRequired(boolean requireWebModule) {
		isWebModuleRequired_ = requireWebModule;
	}


	/* (non-Javadoc)
	 * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#isEJBModuleRequired()
	 */
	public boolean isEJBModuleRequired() {

		return false;
	}


	/* (non-Javadoc)
	 * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#setEJBModuleRequired(boolean)
	 */
	public void setEJBModuleRequired(boolean arg0) {
		return;

	}

  /* (non-Javadoc)
   * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerCanFinish(org.eclipse.wst.command.env.ui.widgets.CanFinishRegistry)
   */
  public void registerCanFinish(CanFinishRegistry canFinishRegistry) 
  {
  }
  /* (non-Javadoc)
   * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerDataMappings(org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry)
   */
  public void registerDataMappings(DataMappingRegistry dataRegistry) 
  {
    // SkeletonConfigWidget
    dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", SkeletonConfigWidget.class, "ServerProject", new ProjectName2IProjectTransformer());
    dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "JavaWSDLParam", SkeletonConfigWidget.class);
    dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "EndpointURI", SkeletonConfigWidget.class);
    dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "OutputJavaFolder", SkeletonConfigWidget.class);
    dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "ShowMapping", SkeletonConfigWidget.class);

    //  BackupSkelImplCommand     
    dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", TDCodeGenOperation.class, "JavaWSDLParam", null);
    
    // AxisMappingsFragment
    dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "ShowMapping", AxisMappingsFragment.class);
    dataRegistry.addMapping(SkeletonConfigWidget.class, "ShowMapping", AxisMappingsFragment.class);

    // AxisMappingsWidget
    dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null);
    dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null);

    // WSDL2JavaCommand
    //dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class);
    //dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", WSDL2JavaCommand.class);
    dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", TDCodeGenOperation.class, "JavaWSDLParam", null);
    dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", TDCodeGenOperation.class, "JavaWSDLParam", null);
  }
  
  /* (non-Javadoc)
   * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerWidgetMappings(org.eclipse.wst.command.env.ui.widgets.WidgetRegistry)
   */
  public void registerWidgetMappings(WidgetRegistry widgetRegistry) 
  {
   
    /*
    widgetRegistry.add( "WSDLSelection", 
                        ConsumptionUIMessages.PAGE_TITLE_WS_SELECTION,
                        ConsumptionUIMessages.PAGE_DESC_WS_SELECTION,
		                new WidgetContributorFactory()
                        {
		                  public WidgetContributor create()
		                  {
		                    return new WSDLSelectionWidget();
		                  }
		                } );

    widgetRegistry.add( "WSDLSelectionTreeWidget", 
        ConsumptionUIMessages.PAGE_TITLE_WSDL_SELECTION,
        ConsumptionUIMessages.PAGE_DESC_WSDL_SELECTION,
        new WidgetContributorFactory()
        {
          public WidgetContributor create()
        {
            return new WSDLSelectionTreeWidget();
        }
        });
    */

    widgetRegistry.add( "SkeletonConfig", 
                        ConsumptionUIMessages.PAGE_TITLE_WSSKEL_CONFIG,
                        ConsumptionUIMessages.PAGE_DESC_WSSKEL_CONFIG,
                        new WidgetContributorFactory()
                        {
                          public WidgetContributor create()
                          {
                            return new SkeletonConfigWidget();
                          }
                        } );

    widgetRegistry.add( "AxisMappingsWidget", 
                        ConsumptionUIMessages.PAGE_TITLE_WS_XML2BEAN,
                        ConsumptionUIMessages.PAGE_DESC_N2P_MAPPINGS,
                        new WidgetContributorFactory()
                        {
                          public WidgetContributor create()
                          {
                            return new AxisMappingsWidget(AxisMappingsWidget.MODE_XML2BEAN);
                          }
                        } );
  }
  
  /* (non-Javadoc)
   * @see org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactoryFactory#create()
   */
  public CommandFragmentFactory create() 
  {
    return new CommandFragmentFactory()
    {
      public CommandFragment create()
      {
          //dead code - doesn't matter what gets returned here. 
    	  return new SimpleFragment();
      }
    };
  }
}

Back to the top