diff options
Diffstat (limited to 'bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst')
11 files changed, 0 insertions, 994 deletions
diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistry.properties b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistry.properties deleted file mode 100644 index b0d26bc34..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistry.properties +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################### -# Copyright (c) 2004, 2005 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 -############################################################################### - -# -# PrivateUDDIConfigPage -# -PAGE_TITLE_PRIVATE_UDDI_CONFIG=Unit Test UDDI Registry Configuration -PAGE_DESC_PRIVATE_UDDI_CONFIG=Configure the unit test UDDI registry. - -# -# Tooltip for PrivateUDDIConfigPage -# -TOOLTIP_PUPR_PRIVATE_UDDI_PAGE=Deploy or remove a Unit Test UDDI Registry -TOOLTIP_PUPR_PRIVATE_UDDI_TYPE=Choose the type of Unit Test UDDI Registry you want to deploy -TOOLTIP_PUPR_DEPLOY_PRIVATE_UDDI=Deploy a Unit Test UDDI Registry -TOOLTIP_PUPR_UPDATE_PRIVATE_UDDI=Update the existing Unit Test UDDI Registry -TOOLTIP_PUPR_REMOVE_PRIVATE_UDDI=Remove the existing Unit Test UDDI Registry - -# -# Common wizard strings. -# -LABEL_PRIVATE_UDDI_REGISTRY_TYPES=Private UDDI Registry type: -BUTTON_DEPLOY_UDDI_REGISTRY=Deploy the Unit Test UDDI Registry -BUTTON_UPDATE_UDDI_REGISTRY=Update the previously deployed UDDI registry -BUTTON_REMOVE_UDDI_REGISTRY=Remove the previously deployed UDDI registry - -# -# Wizard page task labels and descriptions -# (used only for progress indication). -# - -# -# Dialog messages -# - -# -# Progress messages -# - -# -# Warning messages -# - -# -# Error messages -# -MSG_ERROR_NO_UDDI_REGISTRY_AVAILABLE=IWAB0363E No UDDI registry available. diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistryMessages.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistryMessages.java deleted file mode 100644 index ea29e8828..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/UDDIRegistryMessages.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 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.uddiregistry; - -import org.eclipse.osgi.util.NLS; - -public final class UDDIRegistryMessages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.jst.ws.internal.uddiregistry.UDDIRegistry";//$NON-NLS-1$ - - private UDDIRegistryMessages() { - // Do not instantiate - } - - public static String PAGE_TITLE_PRIVATE_UDDI_CONFIG; - public static String PAGE_DESC_PRIVATE_UDDI_CONFIG; - public static String TOOLTIP_PUPR_PRIVATE_UDDI_PAGE; - public static String TOOLTIP_PUPR_PRIVATE_UDDI_TYPE; - public static String TOOLTIP_PUPR_DEPLOY_PRIVATE_UDDI; - public static String TOOLTIP_PUPR_UPDATE_PRIVATE_UDDI; - public static String TOOLTIP_PUPR_REMOVE_PRIVATE_UDDI; - public static String LABEL_PRIVATE_UDDI_REGISTRY_TYPES; - public static String BUTTON_DEPLOY_UDDI_REGISTRY; - public static String BUTTON_UPDATE_UDDI_REGISTRY; - public static String BUTTON_REMOVE_UDDI_REGISTRY; - public static String MSG_ERROR_NO_UDDI_REGISTRY_AVAILABLE; - - static { - NLS.initializeMessages(BUNDLE_NAME, UDDIRegistryMessages.class); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/plugin/WebServiceUDDIRegistryPlugin.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/plugin/WebServiceUDDIRegistryPlugin.java deleted file mode 100644 index b687a1553..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/plugin/WebServiceUDDIRegistryPlugin.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2002, 2005 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.uddiregistry.plugin; - -import java.net.MalformedURLException; -import java.net.URL; -import java.text.MessageFormat; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.jface.resource.ImageDescriptor; - -/** -* This is the plugin class for the Web Services UDDI Registry plugin. -* <p> -* The Web Services UDDI Registry plugin's is to add the -* option to create a unit test UDDI registry -*/ -public class WebServiceUDDIRegistryPlugin extends Plugin -{ - // Copyright - public static final String copyright = "(c) Copyright IBM Corporation 2002."; - /** - * The identifier of the descriptor of this plugin in plugin.xml. - */ - public static final String ID = "org.eclipse.jst.ws.uddiregistry"; - - /** - * The reference to the singleton instance of this plugin. - */ - private static WebServiceUDDIRegistryPlugin instance_; - - /** - * Constructs a runtime plugin object for this plugin. - */ - public WebServiceUDDIRegistryPlugin () - { - super(); - instance_ = this; - } - - /** - * Returns the singleton instance of this plugin. Equivalent to calling - * (WebServiceUDDIRegistryPlugin)Platform.getPlugin("org.eclipse.jst.ws.uddiregistry"); - * @return The WebServiceUDDIRegistryPlugin singleton. - */ - public static WebServiceUDDIRegistryPlugin getInstance () - { - return instance_; - } - - /** - * Returns an image descriptor for the named resource - * as relative to the plugin install location. - * @return An image descriptor, possibly null. - */ - public static ImageDescriptor getImageDescriptor ( String name ) - { - try - { - URL installURL = instance_.getBundle().getEntry("/"); - URL imageURL = new URL(installURL,name); - return ImageDescriptor.createFromURL(imageURL); - } - catch (MalformedURLException e) - { - return null; - } - } - - /** - * Returns the message string identified by the given key from - * plugin.properties. - * @return The String message. - */ - public static String getMessage ( String key ) - { - return Platform.getResourceString(instance_.getBundle(),key); - } - - /** - * Returns the message string identified by the given key from - * plugin.properties. Substitution sequences in the message string - * are replaced by the given array of substitution objects (which - * are most frequently strings). See the JDK's - * {@link java.text.MessageFormat java.text.MessageFormat} - * class for further details on substitution. - * @return The String message. - */ - public static String getMessage ( String key, Object[] args ) - { - return MessageFormat.format(getMessage(key),args); - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommand.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommand.java deleted file mode 100644 index dc4f94988..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommand.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.widgets; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.ws.internal.uddiregistry.wizard.PrivateUDDIRegistryType; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -/* -import org.eclipse.wst.command.internal.env.core.common.Environment; -import org.eclipse.wst.command.internal.env.core.common.MessageUtils; -import org.eclipse.wst.command.internal.env.core.common.SimpleStatus; -import org.eclipse.wst.command.internal.env.core.common.Status; -import org.eclipse.jst.ws.internal.uddiregistry.plugin.WebServiceUDDIRegistryPlugin; -*/ - -public class PrivateUDDISelectionCommand extends AbstractDataModelOperation -{ - private byte operationType; - private PrivateUDDIRegistryType registryType; - - /* - public Status execute(Environment env) - { - MessageUtils msgUtils = new MessageUtils(WebServiceUDDIRegistryPlugin.ID + ".plugin", this); - if (registryType != null) - { - switch (operationType) - { - case PrivateUDDIRegistryType.OP_DEPLOY: - return registryType.deploy(env); - case PrivateUDDIRegistryType.OP_UPDATE: - return registryType.update(env); - case PrivateUDDIRegistryType.OP_REMOVE: - return registryType.remove(env); - default: - } - } - return new SimpleStatus(""); - } - */ - - public PrivateUDDIRegistryType getRegistryType() - { - return getPrivateUDDIRegistryType(); - } - - public byte getOperationType() - { - return operationType; - } - - public PrivateUDDIRegistryType getPrivateUDDIRegistryType() - { - return registryType; - } - - public void setRegistryType(PrivateUDDIRegistryType regType) - { - setPrivateUDDIRegistryType(regType); - } - - public void setOperationType(byte type) - { - operationType = type; - } - - public void setPrivateUDDIRegistryType(PrivateUDDIRegistryType regType) - { - registryType = regType; - } - - public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException - { - return Status.OK_STATUS; - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommandFragment.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommandFragment.java deleted file mode 100644 index bbfafa73b..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionCommandFragment.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.widgets; - -import org.eclipse.jst.ws.internal.uddiregistry.wizard.PrivateUDDIRegistryType; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.core.fragment.AbstractCommandFragment; -import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; -import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetRegistry; - - -public class PrivateUDDISelectionCommandFragment extends AbstractCommandFragment -{ - private PrivateUDDIRegistryType registryType; - private DataMappingRegistry dataMappingRegistry; - private CanFinishRegistry canFinishRegistry; - private WidgetRegistry widgetRegistry; - - public PrivateUDDISelectionCommandFragment() - { - super(null, ""); - } - - /** - * Gets the first child fragment for this fragment. - * - * @return returns the first child fragment for this fragment. Returns - * null when there is no first child. - **/ - public CommandFragment getFirstSubFragment() - { - if (registryType != null) - { - registryType.registerCanFinish(canFinishRegistry); - registryType.registerDataMappings(dataMappingRegistry); - registryType.registerWidgetMappings(widgetRegistry); - return registryType.create().create(); - } - else - return null; - } - - /** - * Gets the next child fragment for this fragment. - * - * @return returns the next child fragment for this fragment. Returns null - * when there is no next child. - **/ - public CommandFragment getNextSubFragment(CommandFragment fragment) - { - return null; - } - - /* - * This method is called to retrieve the data mappings for this command fragment. - */ - public void registerDataMappings(DataMappingRegistry registry) - { - dataMappingRegistry = registry; - } - - public void registerCanFinish(CanFinishRegistry canFinishRegistry) - { - this.canFinishRegistry = canFinishRegistry; - } - - public void registerWidgetMappings(WidgetRegistry widgetRegistry) - { - this.widgetRegistry = widgetRegistry; - } - - /** - * All wizard fragments need to be cloneable. - **/ - public Object clone() - { - PrivateUDDISelectionCommandFragment fragment = new PrivateUDDISelectionCommandFragment(); - fragment.registerDataMappings(dataMappingRegistry); - fragment.registerCanFinish(canFinishRegistry); - fragment.registerWidgetMappings(widgetRegistry); - fragment.setPrivateUDDIRegistryType(registryType); - return fragment; - } - - public void setPrivateUDDIRegistryType(PrivateUDDIRegistryType registryType) - { - this.registryType = registryType; - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidget.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidget.java deleted file mode 100644 index 1ea3d6aa3..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidget.java +++ /dev/null @@ -1,210 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.widgets; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jst.ws.internal.uddiregistry.UDDIRegistryMessages; -import org.eclipse.jst.ws.internal.uddiregistry.plugin.WebServiceUDDIRegistryPlugin; -import org.eclipse.jst.ws.internal.uddiregistry.wizard.PrivateUDDIRegistryType; -import org.eclipse.jst.ws.internal.uddiregistry.wizard.PrivateUDDIRegistryTypeRegistry; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.help.IWorkbenchHelpSystem; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents; - - -/** -* This UDDI configuration page prompts the user -* for the information required to configure the -* unit test UDDI registry. -*/ -public class PrivateUDDISelectionWidget extends SimpleWidgetDataContributor -{ - private Listener statusListener; - - private Button deployRadio_; - private Label typesLabel_; - private Combo typesCombo_; - private Button updateRadio_; - private Button removeRadio_; - private PrivateUDDIRegistryType[] types_; - private PrivateUDDIRegistryType installedType_; - - // Infopop - private final String INFOPOP_PUPR_PRIVATE_UDDI_PAGE = WebServiceUDDIRegistryPlugin.ID + ".pupr0001"; - private final String INFOPOP_PUPR_PRIVATE_UDDI_TYPE = WebServiceUDDIRegistryPlugin.ID + ".pupr0002"; - private final String INFOPOP_PUPR_DEPLOY_PRIVATE_UDDI = WebServiceUDDIRegistryPlugin.ID + ".pupr0003"; - private final String INFOPOP_PUPR_UPDATE_PRIVATE_UDDI = WebServiceUDDIRegistryPlugin.ID + ".pupr0005"; - private final String INFOPOP_PUPR_REMOVE_PRIVATE_UDDI = WebServiceUDDIRegistryPlugin.ID + ".pupr0004"; - - public PrivateUDDISelectionWidget() - { - } - - public WidgetDataEvents addControls(Composite parent, Listener statusListener) - { - this.statusListener = statusListener; - parent.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_PRIVATE_UDDI_PAGE); - PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, INFOPOP_PUPR_PRIVATE_UDDI_PAGE); - - GridLayout gl; - GridData gd; - - Listener listener = new Listener() - { - public void handleEvent(Event event) - { - handleWidgetEvent(event); - } - }; - - IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem(); - - deployRadio_ = new Button(parent, SWT.RADIO); - deployRadio_.setText(UDDIRegistryMessages.BUTTON_DEPLOY_UDDI_REGISTRY); - deployRadio_.setSelection(true); - deployRadio_.addListener(SWT.Selection, listener); - deployRadio_.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_DEPLOY_PRIVATE_UDDI); - helpSystem.setHelp(deployRadio_, INFOPOP_PUPR_DEPLOY_PRIVATE_UDDI); - - Composite typeComposite = new Composite(parent,SWT.NONE); - gl = new GridLayout(); - gl.numColumns = 2; - gl.marginHeight = 5; - gl.verticalSpacing = 15; - gl.marginWidth = 20; - typeComposite.setLayout(gl); - gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); - typeComposite.setLayoutData(gd); - - typesLabel_ = new Label(typeComposite, SWT.WRAP); - typesLabel_.setText(UDDIRegistryMessages.LABEL_PRIVATE_UDDI_REGISTRY_TYPES); - typesLabel_.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_PRIVATE_UDDI_TYPE); - helpSystem.setHelp(typesLabel_, INFOPOP_PUPR_PRIVATE_UDDI_TYPE); - - typesCombo_ = new Combo(typeComposite, SWT.DROP_DOWN | SWT.READ_ONLY); - gd = new GridData(GridData.FILL_HORIZONTAL); - typesCombo_.setLayoutData(gd); - typesCombo_.addListener(SWT.Selection, listener); - typesCombo_.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_PRIVATE_UDDI_TYPE); - helpSystem.setHelp(typesCombo_, INFOPOP_PUPR_PRIVATE_UDDI_TYPE); - - updateRadio_ = new Button(parent,SWT.RADIO); - updateRadio_.setText(UDDIRegistryMessages.BUTTON_UPDATE_UDDI_REGISTRY); - updateRadio_.setSelection(false); - updateRadio_.addListener(SWT.Selection,listener); - updateRadio_.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_UPDATE_PRIVATE_UDDI); - helpSystem.setHelp(updateRadio_, INFOPOP_PUPR_UPDATE_PRIVATE_UDDI); - - removeRadio_ = new Button(parent, SWT.RADIO); - removeRadio_.setText(UDDIRegistryMessages.BUTTON_REMOVE_UDDI_REGISTRY); - removeRadio_.setSelection(false); - removeRadio_.addListener(SWT.Selection, listener); - removeRadio_.setToolTipText(UDDIRegistryMessages.TOOLTIP_PUPR_REMOVE_PRIVATE_UDDI); - helpSystem.setHelp(removeRadio_, INFOPOP_PUPR_REMOVE_PRIVATE_UDDI); - - loadTypes(); - init(); - return this; - } - - private final void loadTypes() - { - types_ = PrivateUDDIRegistryTypeRegistry.getInstance().getTypes(); - } - - private final void init() - { - for (int i = 0; i < types_.length; i++) - { - if (types_[i] != null) - { - typesCombo_.add(types_[i].getName()); - if (types_[i].isPrivateUDDIRegistryInstalled()) - installedType_ = types_[i]; - } - } - if (typesCombo_.getItemCount() > 0) - typesCombo_.setText(typesCombo_.getItem(0)); - if (installedType_ != null) - { - updateRadio_.setEnabled(true); - removeRadio_.setEnabled(true); - } - else - { - updateRadio_.setEnabled(false); - removeRadio_.setEnabled(false); - } - } - - private void handleWidgetEvent(Event event) - { - if (event.widget == removeRadio_ || event.widget == updateRadio_) - { - boolean isUpdateOrRemoveSelected = ((Button)event.widget).getSelection(); - typesLabel_.setEnabled(!isUpdateOrRemoveSelected); - typesCombo_.setEnabled(!isUpdateOrRemoveSelected); - } - else if (event.widget == deployRadio_) - { - boolean isDeploySelected = ((Button)event.widget).getSelection(); - typesLabel_.setEnabled(isDeploySelected); - typesCombo_.setEnabled(isDeploySelected); - } - statusListener.handleEvent(event); - } - - public PrivateUDDIRegistryType getPrivateUDDIRegistryType() - { - if (deployRadio_.getSelection()) - { - String selectedRegistryName = typesCombo_.getText(); - for (int i = 0; i < types_.length; i++) - if (selectedRegistryName.equals(types_[i].getName())) - return types_[i]; - return null; - } - else - return installedType_; - } - - public byte getOperationType() - { - if (deployRadio_.getSelection()) - return PrivateUDDIRegistryType.OP_DEPLOY; - else if (updateRadio_.getSelection()) - return PrivateUDDIRegistryType.OP_UPDATE; - else if (removeRadio_.getSelection()) - return PrivateUDDIRegistryType.OP_REMOVE; - else - return PrivateUDDIRegistryType.OP_DEPLOY; - } - - public IStatus getStatus() - { - PrivateUDDIRegistryType privateUDDIRegistryType = getPrivateUDDIRegistryType(); - if (privateUDDIRegistryType != null) - return privateUDDIRegistryType.getOperationStatus(getOperationType()); - else - return StatusUtils.errorStatus( UDDIRegistryMessages.MSG_ERROR_NO_UDDI_REGISTRY_AVAILABLE ); - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidgetConditionCommand.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidgetConditionCommand.java deleted file mode 100644 index 28eaa9d16..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/PrivateUDDISelectionWidgetConditionCommand.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.widgets; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.wst.command.internal.env.core.common.Condition; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - - -public class PrivateUDDISelectionWidgetConditionCommand extends AbstractDataModelOperation implements Condition -{ - private boolean condition; - - public PrivateUDDISelectionWidgetConditionCommand() - { - condition = true; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - condition = !condition; - return Status.OK_STATUS; - } - - public IStatus undo( IProgressMonitor monitor, IAdaptable adaptable ) - { - condition = !condition; - return Status.OK_STATUS; - } - - public boolean evaluate() - { - return condition; - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/binding/PrivateUDDIWidgetBinding.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/binding/PrivateUDDIWidgetBinding.java deleted file mode 100644 index a444a4639..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/widgets/binding/PrivateUDDIWidgetBinding.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.widgets.binding; - -import org.eclipse.jst.ws.internal.uddiregistry.UDDIRegistryMessages; -import org.eclipse.jst.ws.internal.uddiregistry.widgets.PrivateUDDISelectionCommand; -import org.eclipse.jst.ws.internal.uddiregistry.widgets.PrivateUDDISelectionCommandFragment; -import org.eclipse.jst.ws.internal.uddiregistry.widgets.PrivateUDDISelectionWidget; -import org.eclipse.jst.ws.internal.uddiregistry.widgets.PrivateUDDISelectionWidgetConditionCommand; -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.SequenceFragment; -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; - - -public class PrivateUDDIWidgetBinding implements CommandWidgetBinding -{ - private CanFinishRegistry canFinishRegistry; - private WidgetRegistry widgetRegistry; - private DataMappingRegistry dataMappingRegistry; - private PrivateUDDISelectionCommandFragment privateUDDISelFragment; - private PrivateUDDISelectionWidgetConditionCommand conditionCommand; - - public PrivateUDDIWidgetBinding() - { - privateUDDISelFragment = new PrivateUDDISelectionCommandFragment(); - conditionCommand = new PrivateUDDISelectionWidgetConditionCommand(); - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#create() - */ - public CommandFragmentFactory create() - { - return new CommandFragmentFactory() - { - public CommandFragment create() - { - SequenceFragment root = new SequenceFragment(); - root.add(new SimpleFragment(conditionCommand, "")); - root.add(new SimpleFragment("PrivateUDDISelectionWidget")); - root.add(new SimpleFragment(conditionCommand, "")); - root.add(new SimpleFragment(new PrivateUDDISelectionCommand(), "")); - root.add(privateUDDISelFragment); - return root; - } - }; - } - - /* (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) - { - this.canFinishRegistry = canFinishRegistry; - privateUDDISelFragment.registerCanFinish(this.canFinishRegistry); - - canFinishRegistry.addCondition(conditionCommand); - } - - /* (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) - { - dataMappingRegistry = dataRegistry; - privateUDDISelFragment.registerDataMappings(dataMappingRegistry); - - // PrivateUDDISelectionCommand - dataMappingRegistry.addMapping(PrivateUDDISelectionWidget.class, "PrivateUDDIRegistryType", PrivateUDDISelectionCommand.class); - dataMappingRegistry.addMapping(PrivateUDDISelectionWidget.class, "OperationType", PrivateUDDISelectionCommand.class); - - // PrivateUDDISelectionCommandFragment - dataMappingRegistry.addMapping(PrivateUDDISelectionWidget.class, "PrivateUDDIRegistryType", PrivateUDDISelectionCommandFragment.class); - } - - /* (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) - { - this.widgetRegistry = widgetRegistry; - privateUDDISelFragment.registerWidgetMappings(this.widgetRegistry); - - widgetRegistry.add("PrivateUDDISelectionWidget", - UDDIRegistryMessages.PAGE_TITLE_PRIVATE_UDDI_CONFIG, - UDDIRegistryMessages.PAGE_DESC_PRIVATE_UDDI_CONFIG, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new PrivateUDDISelectionWidget(); - } - } - ); - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryType.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryType.java deleted file mode 100644 index 1663d6825..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryType.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2005 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.uddiregistry.wizard; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; - - -public interface PrivateUDDIRegistryType extends CommandWidgetBinding -{ - // operation types - public static byte OP_DEPLOY = 0x0; - public static byte OP_UPDATE = 0x1; - public static byte OP_REMOVE = 0x2; - - // general information - public String getID(); - public String getName(); - public boolean isPrivateUDDIRegistryInstalled(); - public IStatus getOperationStatus(byte operation); - - // registry URLs - public String getInquiryAPI(); - public String getPublishAPI(); -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeImpl.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeImpl.java deleted file mode 100644 index 412dbffd5..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2002, 2005 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.uddiregistry.wizard; - -import java.util.Enumeration; -import java.util.Vector; -import org.eclipse.jst.ws.internal.uddiregistry.widgets.binding.PrivateUDDIWidgetBinding; -import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; - - -public class PrivateUDDIRegistryTypeImpl implements org.eclipse.jst.ws.internal.ui.uddi.PrivateUDDIRegistryType -{ - public PrivateUDDIRegistryTypeImpl() { - } - - public boolean isPrivateUDDIRegistryInstalled() { - PrivateUDDIRegistryType[] types = PrivateUDDIRegistryTypeRegistry.getInstance().getTypes(); - for (int i = 0; i < types.length; i++) { - if (types[i].isPrivateUDDIRegistryInstalled()) - return true; - } - return false; - } - - public String[] getPrivateUDDIRegistryInquiryAPI() { - Vector inquiryAPIVector = new Vector(); - PrivateUDDIRegistryType[] types = PrivateUDDIRegistryTypeRegistry.getInstance().getTypes(); - for (int i = 0; i < types.length; i++) { - if (types[i].isPrivateUDDIRegistryInstalled()) { - String inquiryAPI = types[i].getInquiryAPI(); - if (inquiryAPI != null && inquiryAPI.startsWith("http")) - inquiryAPIVector.add(inquiryAPI); - } - } - - String[] inquiryAPIArray = new String[inquiryAPIVector.size()]; - Enumeration e = inquiryAPIVector.elements(); - int j = 0; - while(e.hasMoreElements()) { - inquiryAPIArray[j] = (String)e.nextElement(); - j++; - } - return inquiryAPIArray; - } - - public String[] getPrivateUDDIRegistryPublishAPI() { - Vector publishAPIVector = new Vector(); - PrivateUDDIRegistryType[] types = PrivateUDDIRegistryTypeRegistry.getInstance().getTypes(); - for (int i = 0; i < types.length; i++) { - if (types[i].isPrivateUDDIRegistryInstalled()) { - String publishAPI = types[i].getPublishAPI(); - if (publishAPI != null && publishAPI.startsWith("http")) - publishAPIVector.add(publishAPI); - } - } - - String[] publishAPIArray = new String[publishAPIVector.size()]; - Enumeration e = publishAPIVector.elements(); - int j = 0; - while(e.hasMoreElements()) { - publishAPIArray[j] = (String)e.nextElement(); - j++; - } - return publishAPIArray; - } - - public CommandWidgetBinding getBinding() - { - return new PrivateUDDIWidgetBinding(); - } -} diff --git a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeRegistry.java b/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeRegistry.java deleted file mode 100644 index 375510e49..000000000 --- a/bundles/org.eclipse.jst.ws.uddiregistry/src/org/eclipse/jst/ws/internal/uddiregistry/wizard/PrivateUDDIRegistryTypeRegistry.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2002, 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 - * -------- -------- ----------------------------------------------------------- - * 20060216 127138 pmoogk@ca.ibm.com - Peter Moogk - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.uddiregistry.wizard; - -import java.util.Vector; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import com.ibm.icu.util.StringTokenizer; - -public class PrivateUDDIRegistryTypeRegistry { - - private static PrivateUDDIRegistryTypeRegistry instance_; - private IConfigurationElement[] configElements_; - - private PrivateUDDIRegistryTypeRegistry() { - } - - /** - * Returns a singleton instance of this class. - * @return A singleton WebServiceClientTypeRegistry object. - */ - public static PrivateUDDIRegistryTypeRegistry getInstance() { - if (instance_ == null) { - instance_ = new PrivateUDDIRegistryTypeRegistry(); - instance_.getConfigElements(); - } - return instance_; - } - - public IConfigurationElement[] getConfigElements() { - IExtensionRegistry reg = Platform.getExtensionRegistry(); - configElements_ = reg.getConfigurationElementsFor( - "org.eclipse.jst.ws.uddiregistry", - "privateUDDIRegistryType"); - Vector v = new Vector(); - for (int i = 0; i < configElements_.length; i++) - { - int weight = getWeight(configElements_[i]); - int index = -1; - for (int j = v.size()-1; j >= 0; j--) - { - if (weight > getWeight((IConfigurationElement)v.get(j))) - index = j; - else - break; - } - if (index != -1) - v.add(index, configElements_[i]); - else - v.add(configElements_[i]); - } - v.copyInto(configElements_); - return configElements_; - } - - private int getWeight(IConfigurationElement e) - { - try - { - return Integer.parseInt(e.getAttribute("weight")); - } - catch (NumberFormatException nfe) - { - return -1; - } - } - - private IConfigurationElement getConfigElementByID(String id) { - for (int i = 0; i <configElements_.length; i++) { - if (configElements_[i].getAttribute("id").equals(id)) - return configElements_[i]; - } - return null; - } - - public PrivateUDDIRegistryType[] getTypes() { - Vector types = new Vector(); - for (int i = 0; i < configElements_.length; i++) { - try { - Object typeObj = configElements_[i].createExecutableExtension("class"); - if (typeObj instanceof PrivateUDDIRegistryType) - types.add(typeObj); - } - catch (Exception e) {} - } - - PrivateUDDIRegistryType[] typesArray = new PrivateUDDIRegistryType[types.size()]; - for (int j = 0; j < types.size(); j++) { - typesArray[j] = (PrivateUDDIRegistryType)types.elementAt(j); - } - return typesArray; - } - - public PrivateUDDIRegistryType getTypeByID(String id) { - try { - Object typeObj = getConfigElementByID(id).createExecutableExtension("class"); - if (typeObj instanceof PrivateUDDIRegistryType) - return (PrivateUDDIRegistryType)typeObj; - } - catch (Exception e) {} - return null; - } - - public String[] getSupportedServerFactoryIDByID(String id) { - IConfigurationElement configElement = getConfigElementByID(id); - if (configElement == null) - return new String[0]; - Vector idVector = new Vector(); - StringTokenizer st = new StringTokenizer(configElement.getAttribute("serverFactoryID"), ","); - while (st.hasMoreTokens()) { - idVector.add(st.nextToken()); - } - String[] ids = new String[idVector.size()]; - for (int i = 0; i < idVector.size(); i++) { - ids[i] = (String)idVector.elementAt(i); - } - return ids; - } - -} |