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
diff options
context:
space:
mode:
authorkchong2009-03-07 19:25:16 +0000
committerkchong2009-03-07 19:25:16 +0000
commitaa278b30c490ca5651e6fd228aa9ab3d8cf88a54 (patch)
tree624e90646c2d15385619d5bb7d6ac2faa110bd14 /bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi
parent2ce2336702749d6fe4d939d1f9b5678d041fbbd6 (diff)
downloadwebtools.webservices-200903071919.tar.gz
webtools.webservices-200903071919.tar.xz
webtools.webservices-200903071919.zip
This commit was manufactured by cvs2svn to create tag 'v200903071919'.v200903071919
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi')
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddItemsToFavoritesAction.java57
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddPublisherAssertionsAction.java242
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddToFavoritesAction.java242
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceAdvancedAction.java53
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceSimpleAction.java54
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusinessGetServicesAction.java81
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorFolderNodeAction.java46
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodeAction.java63
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodesAction.java53
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CommonPublisherAssertionsAction.java103
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CompletePublisherAssertionsAction.java217
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/FindAction.java266
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LoginAdvancedAction.java222
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LogoutAdvancedAction.java72
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ManageReferencedServicesAction.java383
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenCategoryBrowserAction.java59
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenRegistryAction.java250
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/PublishAction.java238
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodeAction.java254
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodesAction.java72
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessUUIDAction.java112
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesAdvancedAction.java315
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesSimpleAction.java119
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfaceUUIDAction.java112
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesAdvancedAction.java378
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesSimpleAction.java119
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceUUIDAction.java112
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesAdvancedAction.java392
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesSimpleAction.java121
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessAdvancedAction.java269
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessSimpleAction.java113
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceAdvancedAction.java377
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceAdvancedAction.java246
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceSimpleAction.java163
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceSimpleAction.java221
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemovePublisherAssertionsAction.java228
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemoveSubQueryItemAction.java78
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ResizeUDDIFramesAction.java130
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectCategoryNodeAction.java71
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectFindToolAction.java83
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectNavigatorNodeAction.java76
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectPropertiesToolAction.java83
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectSubQueryItemAction.java229
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetBusinessAction.java73
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetServiceInterfacesAction.java78
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetBusinessesAction.java85
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetServicesAction.java85
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ShowPublisherAssertionsAction.java425
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SwitchPerspectiveFromUDDIAction.java66
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleCategoryNodeAction.java79
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleNavigatorNodeAction.java77
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferSubQueryResultsAction.java148
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferToAddCategoryDataAction.java42
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIAddToWSDLPerspectiveAction.java133
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIExceptionHandler.java35
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToFileSystemAction.java115
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToWorkbenchAction.java59
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java93
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDINodeAction.java40
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIPropertiesFormAction.java51
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UnpublishAction.java171
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateAction.java185
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateBusinessAction.java416
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateRegistryAction.java127
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceAction.java497
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceInterfaceAction.java343
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIActionInputs.java209
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIFrameNames.java30
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIModelConstants.java48
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/AbstractUDDIElement.java57
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/BusinessElement.java50
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryElement.java56
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java569
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublishedItemsElement.java36
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublisherAssertionElement.java111
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryElement.java61
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryParentElement.java30
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/RegistryElement.java308
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceElement.java31
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceInterfaceElement.java31
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/UDDIMainElement.java47
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/AddToFavoritesTool.java35
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusPublishServiceTool.java110
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessDetailsTool.java71
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessNode.java54
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/CategoryNode.java76
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/DetailsTool.java78
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetBusinessesTool.java38
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServiceInterfacesTool.java38
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServicesTool.java38
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ItemsSummaryTool.java49
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/LoginTool.java73
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManagePublisherAssertionsTool.java104
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManageReferencedServicesTool.java103
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/MultipleFormToolPropertiesInterface.java19
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/OpenRegistryTool.java69
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/PublishedItemsNode.java124
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryNode.java130
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryParentNode.java82
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RefreshTool.java37
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegFindTool.java140
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegPublishTool.java126
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryDetailsTool.java33
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryNode.java249
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ResultsTool.java44
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RootCategoryNode.java59
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceDetailsTool.java74
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceDetailsTool.java82
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceNode.java60
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceNode.java61
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryKeyProperty.java32
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryTransferTarget.java93
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIAddToWSDLPerspectiveTool.java34
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToFileSystemTool.java38
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToWorkbenchTool.java36
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDILaunchWebServiceWizardTool.java36
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIMainNode.java116
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorFolderNode.java38
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorNode.java43
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIPerspective.java499
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UnpublishTool.java56
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/util/Uddi4jHelper.java423
122 files changed, 0 insertions, 15971 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddItemsToFavoritesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddItemsToFavoritesAction.java
deleted file mode 100644
index 6c87e5cc9..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddItemsToFavoritesAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public class AddItemsToFavoritesAction extends UDDIPropertiesFormAction
-{
- public AddItemsToFavoritesAction(Controller controller)
- {
- super(controller);
- }
-
- protected boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String[] selectedNodeIds = parser.getParameterValues(ActionInputs.NODEID);
- // The client Javascript enforces the rule that at least one item was selected before the form can be submitted.
- propertyTable_.put(UDDIActionInputs.SELECTED_NODEIDS,selectedNodeIds);
- return true;
- }
-
- public final boolean run()
- {
- String[] selectedNodeIds = (String[])propertyTable_.get(UDDIActionInputs.SELECTED_NODEIDS);
- AddToFavoritesAction action = new AddToFavoritesAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- for (int i=0;i<selectedNodeIds.length;i++)
- {
- propertyTable.put(ActionInputs.NODEID,selectedNodeIds[i]);
- if (action.favoriteExists()) {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- Node node = uddiPerspective.getNavigatorManager().getNode(Integer.parseInt(selectedNodeIds[i]));
- String nodeName = node.getNodeName();
- uddiPerspective.getMessageQueue().addMessage(uddiPerspective.getMessage("MSG_ERROR_FAVORITE_ALREADY_EXISTS",nodeName));
- }
- else
- action.run();
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddPublisherAssertionsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddPublisherAssertionsAction.java
deleted file mode 100644
index b96b761ba..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddPublisherAssertionsAction.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.assertion.PublisherAssertion;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.Result;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.KeyedReference;
-
-public class AddPublisherAssertionsAction extends CommonPublisherAssertionsAction
-{
- public AddPublisherAssertionsAction(Controller controller)
- {
- super(controller);
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- if (registryNode_ == null)
- return false;
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
-
- // ids from uddiObjects_table.jsp
- String[] selectedBusIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (selectedBusIds == null || selectedBusIds.length == 0) {
- // Synchronize client view and server model (uddiObject_table.jsp)
- synchronizeUDDIObjectTable();
- inputsValid = false;
- }
- else {
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, selectedBusIds);
- // Synchronize client view and server model (uddiObject_table.jsp)
- synchronizeUDDIObjectTable();
- }
-
- String[] assertionTypes = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_TYPE);
- if (assertionTypes != null && assertionTypes.length > 0)
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_TYPE, assertionTypes);
- else
- inputsValid = false;
-
- String[] directions = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_DIRECTION);
- if (directions != null && directions.length > 0)
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_DIRECTION, directions);
- else
- inputsValid = false;
-
- // if not yet logged in, validate the parameters needed to log in
- if (!isLoggedIn_) {
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userID != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- }
-
- if (!Validator.validateString(userID))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
- }
-
- return inputsValid;
- }
-
- public boolean run()
- {
- if (registryNode_ == null)
- return false;
-
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = navigatorManager.getSelectedNode();
- TreeElement selectedElement = selectedNode.getTreeElement();
-
- // if not yet logged in, log in first
- if (!isLoggedIn_) {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- try {
- registryElement.performLogin(publishURL, userID, password);
- }
- catch (TransportException te) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(te.getMessage());
- return false;
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(uddie.toString());
- return false;
- }
- catch (MalformedURLException me) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(me.getMessage());
- return false;
- }
- }
-
- UDDIProxy proxy = registryElement.getProxy();
- registryElement.getUserId();
- registryElement.getCred();
- BusinessElement busElement = (BusinessElement)selectedElement;
-
- // determine whether this is a owned business
- // if not, the AddPublisherAssertionsAction cannot be performed
- if (!isBusinessOwned(busElement)) {
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NOT_OWNED_BUSINESS"));
- return false;
- }
-
- try {
- String[] assertionTypes = (String[])propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_TYPE);
- String[] directions = (String[])propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_DIRECTION);
- String thisBusinessKey = busElement.getBusinessEntity().getBusinessKey();
-
- // get all selected businesses
- FormTool formTool = (FormTool)(selectedNode.getCurrentToolManager().getSelectedTool());
- String subQueryKey = (String)formTool.getProperty(UDDIActionInputs.SUBQUERY_KEY);
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey);
- Vector selectedBusinesses = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADD_PUBLISHER_ASSERTIONS);
- Enumeration e = selectedBusinesses.elements();
- if (!e.hasMoreElements())
- return true;
-
- // create a vector of publisher assertions based on all the selected businesses
- Vector pubAssertionVector = new Vector();
- int i = 0;
- while (e.hasMoreElements()) {
- ListElement le = (ListElement)e.nextElement();
- BusinessEntity sp = (BusinessEntity)le.getObject();
- KeyedReference keyedRef = new KeyedReference(assertionTypes[i], assertionTypes[i], TModel.RELATIONSHIPS_TMODEL_KEY);
- if (Integer.parseInt(directions[i]) == UDDIActionInputs.DIRECTION_TO)
- pubAssertionVector.add(new PublisherAssertion(sp.getBusinessKey(), thisBusinessKey, keyedRef));
- else
- pubAssertionVector.add(new PublisherAssertion(thisBusinessKey, sp.getBusinessKey(), keyedRef));
- i++;
- }
-
- // proxy.add_publisherAssertions(...)
- DispositionReport report = proxy.add_publisherAssertions(registryElement.getAuthInfoString(), pubAssertionVector);
-
- // refresh publisher assertions iff proxy reports success
- if (report.success()) {
- selectedBusinesses.removeAllElements();
- ShowPublisherAssertionsAction showPAAction = new ShowPublisherAssertionsAction(controller_);
- Hashtable propertyTable = showPAAction.getPropertyTable();
- Object ids = propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (ids != null)
- propertyTable.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, ids);
- showPAAction.run();
- }
-
- return report.success();
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- DispositionReport report = uddie.getDispositionReport();
- Vector reportErrInfo = report.getResultVector();
- for (int i = 0; i < reportErrInfo.size(); i++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(i)).getErrInfo().getText());
- }
- return false;
- }
- catch(Exception e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("Exception");
- messageQueue.addMessage(e.getMessage());
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddToFavoritesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddToFavoritesAction.java
deleted file mode 100644
index 7ac33ea0f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/AddToFavoritesAction.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.FavoritesModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesFolderElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryModel;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.BusinessNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceInterfaceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-
-public class AddToFavoritesAction extends UDDINodeAction
-{
- public AddToFavoritesAction(Controller controller)
- {
- super(controller);
- }
-
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/CheckFavoriteExistsActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean registryExists(String registryName,Node registryNode)
- {
- registryNode.getTreeElement();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_REGISTRY_NAME,registryName);
- return favoriteExists(table,FavoritesModelConstants.REL_UDDI_REGISTRY_FOLDER_NODE);
- }
-
- public final boolean businessExists(String businessName,Node businessNode)
- {
- BusinessElement busElement = (BusinessElement)businessNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String businessKey = busElement.getBusinessEntity().getBusinessKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_NAME,businessName);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_KEY, businessKey);
- return favoriteExists(table,FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE);
- }
-
- public final boolean serviceExists(String serviceName,Node serviceNode)
- {
- ServiceElement serviceElement = (ServiceElement)serviceNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String serviceKey = serviceElement.getBusinessService().getServiceKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_NAME,serviceName);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_KEY,serviceKey);
- return favoriteExists(table,FavoritesModelConstants.REL_UDDI_SERVICE_FOLDER_NODE);
- }
-
- public final boolean serviceInterfaceExists(String siName,Node siNode)
- {
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)siNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String tModelKey = siElement.getTModel().getTModelKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_NAME,siName);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_KEY,tModelKey);
- return favoriteExists(table,FavoritesModelConstants.REL_UDDI_SERVICE_INTERFACE_FOLDER_NODE);
- }
-
- public final boolean addRegistryToFavorites(String registryName,Node registryNode)
- {
- RegistryElement regElement = (RegistryElement)registryNode.getTreeElement();
- String inquiryURL = regElement.getInquiryURL();
- String publishURL = regElement.getPublishURL();
- if (publishURL == null)
- publishURL = "";
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_REGISTRY_PUBLISH_API,publishURL);
- table.put(FavoritesModelConstants.PROP_UDDI_REGISTRY_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_REGISTRY_NAME,registryName);
- Enumeration userDefinedCategoriesEnum = regElement.getUserDefinedCategories();
- if (userDefinedCategoriesEnum != null)
- {
- table.put(FavoritesModelConstants.PROP_UDDI_REGISTRY_CATEGORIES_ENUM,userDefinedCategoriesEnum);
- table.put(FavoritesModelConstants.PROP_PLUGIN_METADATA_DIRECTORY,controller_.getServletEngineStateLocation());
- }
- return addToFavorites(table,FavoritesModelConstants.REL_UDDI_REGISTRY_FOLDER_NODE);
- }
-
- public final boolean addBusinessToFavorites(String businessName,Node businessNode)
- {
- BusinessElement busElement = (BusinessElement)businessNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String businessKey = busElement.getBusinessEntity().getBusinessKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_NAME,businessName);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_KEY, businessKey);
- return addToFavorites(table,FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE);
- }
-
- public final boolean addServiceToFavorites(String serviceName,Node serviceNode)
- {
- ServiceElement serviceElement = (ServiceElement)serviceNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String serviceKey = serviceElement.getBusinessService().getServiceKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_NAME,serviceName);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_KEY,serviceKey);
- return addToFavorites(table,FavoritesModelConstants.REL_UDDI_SERVICE_FOLDER_NODE);
- }
-
- public final boolean addServiceInterfaceToFavorites(String siName,Node siNode)
- {
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)siNode.getTreeElement();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- String tModelKey = siElement.getTModel().getTModelKey();
- String inquiryURL = regElement.getInquiryURL();
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_NAME,siName);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_INQUIRY_API,inquiryURL);
- table.put(FavoritesModelConstants.PROP_UDDI_SERVICE_INTERFACE_KEY,tModelKey);
- return addToFavorites(table,FavoritesModelConstants.REL_UDDI_SERVICE_INTERFACE_FOLDER_NODE);
- }
-
- public boolean favoriteExists()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- Node node = nodeManager_.getNode(nodeId);
- String nodeName = node.getNodeName();
- if (node instanceof RegistryNode)
- return registryExists(nodeName,node);
- else if (node instanceof BusinessNode)
- return businessExists(nodeName,node);
- else if (node instanceof ServiceNode)
- return serviceExists(nodeName,node);
- else if (node instanceof ServiceInterfaceNode)
- return serviceInterfaceExists(nodeName,node);
- else
- return false;
- }
-
- public boolean run()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- Node node = nodeManager_.getNode(nodeId);
- String nodeName = node.getNodeName();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- boolean addToFavoritesResult = false;
- if (node instanceof RegistryNode)
- {
- addToFavoritesResult = addRegistryToFavorites(nodeName,node);
- RegistryElement regElement = (RegistryElement)node.getTreeElement();
- Enumeration e = regElement.getUserDefinedCategories();
- if (e != null)
- {
- while (e.hasMoreElements())
- {
- CategoryModel categoryModel = (CategoryModel)e.nextElement();
- Throwable errorException = categoryModel.getErrorException();
- if (errorException != null)
- {
- String[] args = {categoryModel.getDisplayName(),errorException.getMessage()};
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_SAVING_CATEGORY_DATA",args));
- }
- }
- }
- }
- else if (node instanceof BusinessNode)
- addToFavoritesResult = addBusinessToFavorites(nodeName,node);
- else if (node instanceof ServiceNode)
- addToFavoritesResult = addServiceToFavorites(nodeName,node);
- else if (node instanceof ServiceInterfaceNode)
- addToFavoritesResult = addServiceInterfaceToFavorites(nodeName,node);
- if (addToFavoritesResult)
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_FAVORITE_ADDED",nodeName));
- else
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_FAVORITE_NOT_ADDED",nodeName));
- return addToFavoritesResult;
- }
-
- protected boolean addToFavorites(Hashtable table, String rel)
- {
- FavoritesPerspective favPerspective = controller_.getFavoritesPerspective();
- NodeManager favNodeManager = favPerspective.getNodeManager();
- TreeElement favRootElement = favNodeManager.getRootNode().getTreeElement();
- Enumeration e = favRootElement.getElements(rel);
- if (!e.hasMoreElements())
- return false;
- FavoritesFolderElement favFolderElement = (FavoritesFolderElement)e.nextElement();
- return favFolderElement.addFavorite(table);
- }
-
- protected boolean favoriteExists(Hashtable table, String rel)
- {
- FavoritesPerspective favPerspective = controller_.getFavoritesPerspective();
- NodeManager favNodeManager = favPerspective.getNodeManager();
- TreeElement favRootElement = favNodeManager.getRootNode().getTreeElement();
- Enumeration e = favRootElement.getElements(rel);
- if (!e.hasMoreElements())
- return false;
- FavoritesFolderElement favFolderElement = (FavoritesFolderElement)e.nextElement();
- return favFolderElement.favoriteExists(table);
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceAdvancedAction.java
deleted file mode 100644
index 483d6f635..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceAdvancedAction.java
+++ /dev/null
@@ -1,53 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.datatype.business.BusinessEntity;
-
-public class BusPublishServiceAdvancedAction extends PublishAction
-{
- private RegPublishServiceAdvancedAction regPublishServiceAdvancedAction_;
- public BusPublishServiceAdvancedAction(Controller controller)
- {
- super(controller);
- regPublishServiceAdvancedAction_ = new RegPublishServiceAdvancedAction(controller);
- propertyTable_ = regPublishServiceAdvancedAction_.getPropertyTable();
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- Node businessNode = getSelectedNavigatorNode();
- BusinessElement businessElement = (BusinessElement)businessNode.getTreeElement();
- BusinessEntity businessEntity = businessElement.getBusinessEntity();
- ListElement busListElement = new ListElement(businessEntity);
- Vector serviceBusinessCopy = new Vector();
- serviceBusinessCopy.addElement(busListElement);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS_COPY,serviceBusinessCopy);
- boolean result = regPublishServiceAdvancedAction_.processOthers(parser,formToolPI);
- if (!propertyTable_.containsKey(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER))
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER,businessEntity);
- return result;
- }
-
- public final boolean run()
- {
- return regPublishServiceAdvancedAction_.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceSimpleAction.java
deleted file mode 100644
index 91c708895..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusPublishServiceSimpleAction.java
+++ /dev/null
@@ -1,54 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.datatype.business.BusinessEntity;
-
-public class BusPublishServiceSimpleAction extends PublishAction
-{
- private RegPublishServiceSimpleAction regPublishServiceSimpleAction_;
-
- public BusPublishServiceSimpleAction(Controller controller)
- {
- super(controller);
- regPublishServiceSimpleAction_ = new RegPublishServiceSimpleAction(controller);
- propertyTable_ = regPublishServiceSimpleAction_.getPropertyTable();
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- Node businessNode = getSelectedNavigatorNode();
- BusinessElement businessElement = (BusinessElement)businessNode.getTreeElement();
- BusinessEntity businessEntity = businessElement.getBusinessEntity();
- ListElement busListElement = new ListElement(businessEntity);
- Vector serviceBusinessCopy = new Vector();
- serviceBusinessCopy.addElement(busListElement);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS_COPY,serviceBusinessCopy);
- boolean result = regPublishServiceSimpleAction_.processOthers(parser,formToolPI);
- if (!propertyTable_.containsKey(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER))
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER,businessEntity);
- return result;
- }
-
- public final boolean run()
- {
- return regPublishServiceSimpleAction_.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusinessGetServicesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusinessGetServicesAction.java
deleted file mode 100644
index 5a9458a69..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/BusinessGetServicesAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.BusinessNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.business.BusinessEntity;
-
-public class BusinessGetServicesAction extends UDDINodeAction
-{
- private BusinessNode busNode_;
- public BusinessGetServicesAction(Controller controller)
- {
- super(controller);
- busNode_ = null;
- }
-
- // uddi/actions/BusinessGetServicesActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/BusinessGetServicesActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean validateBusiness()
- {
- int busNodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- busNode_ = (BusinessNode)nodeManager_.getNode(busNodeId);
- BusinessElement busElement = (BusinessElement)busNode_.getTreeElement();
- RegFindBusinessUUIDAction verifyAction = new RegFindBusinessUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,busElement.getBusinessEntity().getBusinessKey());
- boolean result = verifyAction.run();
- if (result)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,propertyTable.get(UDDIActionInputs.LATEST_OBJECT));
- return result;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- BusinessEntity sp = (BusinessEntity)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
-
- RegFindServicesAdvancedAction action = new RegFindServicesAdvancedAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("NODE_NAME_BUSINESS_SERVICES",busNode_.getNodeName()));
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER,sp);
-
- ListElement businessListElement = new ListElement(sp);
- businessListElement.setTargetViewToolInfo(busNode_.getNodeId(),busNode_.getToolManager().getSelectedToolId(),busNode_.getViewId());
- Vector businessListVector = new Vector();
- businessListVector.addElement(businessListElement);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS,businessListVector);
-
-
- return action.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorFolderNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorFolderNodeAction.java
deleted file mode 100644
index 8dbeb8781..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorFolderNodeAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-
-public class ClearNavigatorFolderNodeAction extends ClearNavigatorNodeAction
-{
- public ClearNavigatorFolderNodeAction(Controller controller)
- {
- super(controller);
- }
-
- // uddi/actions/ClearNavigatorFolderNodeAction.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ClearNavigatorFolderNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean run()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- if (!isStaleNode(nodeId))
- {
- Node node = nodeManager_.getNode(nodeId);
- TreeElement element = node.getTreeElement();
- element.disconnectRel(element.getPropertyAsString(ModelConstants.REL_CHILDREN));
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodeAction.java
deleted file mode 100644
index 3af63e4c0..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodeAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ClearNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-
-public class ClearNavigatorNodeAction extends ClearNodeAction
-{
- public ClearNavigatorNodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getNavigatorManager());
- propertyTable_.put(ActionInputs.NODEID,String.valueOf(controller.getUDDIPerspective().getNavigatorManager().getSelectedNodeId()));
- }
-
- // uddi/actions/ClearNavigatorNodeAction.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ClearNavigatorNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final String getTreeContentVar()
- {
- return "navigatorContent";
- }
-
- public final String getTreeContentPage()
- {
- return "uddi/navigator_content.jsp";
- }
-
- public final String getPropertiesContainerVar()
- {
- return "propertiesContainer";
- }
-
- public final String getPropertiesContainerPage()
- {
- return "uddi/properties_container.jsp";
- }
-
- public final String getStatusContentVar()
- {
- return "statusContent";
- }
-
- public final String getStatusContentPage()
- {
- return "uddi/status_content.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodesAction.java
deleted file mode 100644
index e92e56530..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ClearNavigatorNodesAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public class ClearNavigatorNodesAction extends UDDIPropertiesFormAction
-{
- public ClearNavigatorNodesAction(Controller controller)
- {
- super(controller);
- }
-
- protected boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String[] selectedNodeIds = parser.getParameterValues(ActionInputs.NODEID);
- if (selectedNodeIds != null)
- propertyTable_.put(UDDIActionInputs.SELECTED_NODEIDS,selectedNodeIds);
- else
- removeProperty(UDDIActionInputs.SELECTED_NODEIDS);
- return true;
- }
-
- public final boolean run()
- {
- String[] selectedNodeIds = (String[])propertyTable_.get(UDDIActionInputs.SELECTED_NODEIDS);
- if (selectedNodeIds != null)
- {
- ClearNavigatorNodeAction action = new ClearNavigatorNodeAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- for (int i=0;i<selectedNodeIds.length;i++)
- {
- propertyTable.put(ActionInputs.NODEID,selectedNodeIds[i]);
- action.run();
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CommonPublisherAssertionsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CommonPublisherAssertionsAction.java
deleted file mode 100644
index c740396c5..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CommonPublisherAssertionsAction.java
+++ /dev/null
@@ -1,103 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.response.BusinessInfo;
-import org.uddi4j.response.RegisteredInfo;
-
-public abstract class CommonPublisherAssertionsAction extends UDDIPropertiesFormAction
-{
-
- protected RegistryNode registryNode_;
- protected boolean isLoggedIn_;
-
- public CommonPublisherAssertionsAction(Controller controller)
- {
- super(controller);
-
- registryNode_ = getRegistryNode();
- if (registryNode_ != null)
- isLoggedIn_ = ((RegistryElement)registryNode_.getTreeElement()).isLoggedIn();
- }
-
- protected void synchronizeUDDIObjectTable() {
- String[] selectedBusIds = (String[])propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- Node selectedNode = controller_.getUDDIPerspective().getNavigatorManager().getSelectedNode();
- FormTool formTool = (FormTool)(selectedNode.getCurrentToolManager().getSelectedTool());
- String subQueryKey = (String)formTool.getProperty(UDDIActionInputs.SUBQUERY_KEY);
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey);
- Vector businessVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADD_PUBLISHER_ASSERTIONS);
- ListManager businessCopy = (ListManager)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADD_PUBLISHER_ASSERTIONS_COPY);
- if (selectedBusIds == null || selectedBusIds.length <= 0) {
- businessVector.removeAllElements();
- businessCopy.clear();
- }
- Enumeration e = businessCopy.getListElements();
- while (e.hasMoreElements()) {
- boolean isIdFound = false;
- ListElement le = (ListElement)e.nextElement();
- int listElementViewId = le.getViewId();
- for (int i = 0; i < selectedBusIds.length; i++) {
- if (listElementViewId == Integer.parseInt(selectedBusIds[i])) {
- isIdFound = true;
- break;
- }
- }
- if (!isIdFound)
- businessVector.remove(le);
- }
- }
-
- protected boolean isBusinessOwned(BusinessElement busElement) {
- boolean isBusinessOwned = false;
- String isBusinessOwnedString = busElement.getPropertyAsString(UDDIModelConstants.IS_BUSINESS_OWNED);
- if (isBusinessOwnedString != null) {
- isBusinessOwned = Boolean.valueOf(isBusinessOwnedString).booleanValue();
- }
- else if (isLoggedIn_) {
- try {
- RegistryElement regElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- RegisteredInfo ri = proxy.get_registeredInfo(regElement.getAuthInfoString());
- Vector beVector = ri.getBusinessInfos().getBusinessInfoVector();
- for (Iterator it = beVector.iterator(); it.hasNext();)
- {
- BusinessInfo bi = (BusinessInfo)it.next();
- if (bi.getBusinessKey().equals(busElement.getBusinessEntity().getBusinessKey()))
- {
- isBusinessOwned = true;
- break;
- }
- }
- busElement.setPropertyAsString(UDDIModelConstants.IS_BUSINESS_OWNED, String.valueOf(isBusinessOwned));
- }
- catch (Exception e) {}
- }
- return isBusinessOwned;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CompletePublisherAssertionsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CompletePublisherAssertionsAction.java
deleted file mode 100644
index c184b4fa9..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/CompletePublisherAssertionsAction.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListManager;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublisherAssertionElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.response.CompletionStatus;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.Result;
-import org.uddi4j.transport.TransportException;
-
-public class CompletePublisherAssertionsAction extends CommonPublisherAssertionsAction
-{
- public CompletePublisherAssertionsAction(Controller controller)
- {
- super(controller);
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- if (registryNode_ == null)
- return false;
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
-
- // ids from uddiObjects_table
- String[] selectedBusIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (selectedBusIds != null && selectedBusIds.length > 0)
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, selectedBusIds);
- // Synchronize client view and server model (uddiObject_table.jsp)
- synchronizeUDDIObjectTable();
-
- // if not yet logged in, validate the parameters needed to log in
- if (!isLoggedIn_) {
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userID != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- }
-
- if (!Validator.validateString(userID))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
- }
-
- // ids from publisher assertion table
- String[] pubAssertionsViewIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID);
- if (pubAssertionsViewIds == null || pubAssertionsViewIds.length == 0)
- inputsValid = false;
- else
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID, pubAssertionsViewIds);
-
- return inputsValid;
- }
-
- public boolean run()
- {
- if (registryNode_ == null)
- return false;
-
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = navigatorManager.getSelectedNode();
- TreeElement selectedElement = selectedNode.getTreeElement();
-
- // if not yet logged in, log in first
- if (!isLoggedIn_) {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- try {
- registryElement.performLogin(publishURL, userID, password);
- }
- catch (TransportException te) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(te.getMessage());
- return false;
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(uddie.toString());
- return false;
- }
- catch (MalformedURLException me) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(me.getMessage());
- return false;
- }
- }
-
- UDDIProxy proxy = registryElement.getProxy();
- registryElement.getUserId();
- registryElement.getCred();
- BusinessElement busElement = (BusinessElement)selectedElement;
- ListManager pubAssertions = busElement.getPublisherAssertions();
-
- // determine whether this is a owned business
- // if not, the AddPublisherAssertionsAction cannot be performed
- if (!isBusinessOwned(busElement)) {
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NOT_OWNED_BUSINESS"));
- return false;
- }
-
- try {
- String[] pubAssertionViewIds = (String[])propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID);
- Vector pubAssertionVector = new Vector();
-
- for (int i = 0; i < pubAssertionViewIds.length; i++) {
- int viewID = Integer.parseInt(pubAssertionViewIds[i]);
- ListElement listElement = pubAssertions.getElementWithViewId(viewID);
- PublisherAssertionElement pubAssertionElement = (PublisherAssertionElement)listElement.getObject();
- if (!(pubAssertionElement.getStatus().equals(CompletionStatus.COMPLETE)))
- pubAssertionVector.add(pubAssertionElement.getPublisherAssertion());
- }
-
- if (pubAssertionVector.size() <= 0) {
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NO_INCOMPLETE_ASSERTION_SELECTED"));
- return false;
- }
-
- DispositionReport report = proxy.add_publisherAssertions(registryElement.getAuthInfoString(), pubAssertionVector);
- //report status
- Vector reportErrInfo = report.getResultVector();
- for (int j = 0; j < reportErrInfo.size(); j++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(j)).getErrInfo().getText());
- }
-
- ShowPublisherAssertionsAction showPAAction = new ShowPublisherAssertionsAction(controller_);
- Hashtable propertyTable = showPAAction.getPropertyTable();
- Object ids = propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (ids != null)
- propertyTable.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, ids);
- showPAAction.run();
-
- return report.success();
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- DispositionReport report = uddie.getDispositionReport();
- Vector reportErrInfo = report.getResultVector();
- for (int j = 0; j < reportErrInfo.size(); j++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(j)).getErrInfo().getText());
- }
- return false;
- }
- catch (Exception e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("Exception");
- messageQueue.addMessage(e.getMessage());
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/FindAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/FindAction.java
deleted file mode 100644
index 7637f8a20..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/FindAction.java
+++ /dev/null
@@ -1,266 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.ITransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.MultipartFormDataParserTransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryParentElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.QueryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.SubQueryTransferTarget;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-
-public abstract class FindAction extends UDDIPropertiesFormAction
-{
- protected QueryElement queryElement_;
- protected String subQueryKey_;
- protected boolean isSubQueryGet_;
- protected String newSubQuery_;
- protected String newSubQueryItem_;
- protected boolean subQueryInitiated_;
- protected RegistryNode regNode_;
- private boolean isRefreshAction_;
-
- public FindAction(Controller controller)
- {
- super(controller);
- queryElement_ = null;
- subQueryKey_ = null;
- isSubQueryGet_ = false;
- subQueryInitiated_ = false;
- regNode_ = getRegistryNode();
- isRefreshAction_ = false;
- }
-
- protected abstract boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException;
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- // Setup for MultipartFormDataParserTransformer
- propertyTable_.put(ActionInputs.MULTIPART_FORM_DATA_PARSER, parser);
-
- newSubQuery_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_INITIATED);
- String isSubQueryGetString = parser.getParameter(UDDIActionInputs.SUBQUERY_GET);
- newSubQueryItem_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_QUERY_ITEM);
- subQueryKey_ = parser.getParameter(UDDIActionInputs.SUBQUERY_KEY);
- String queryName = parser.getParameter(UDDIActionInputs.QUERY_NAME);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.clearErrors();
-
- if (newSubQuery_ != null && newSubQuery_.length() > 0)
- subQueryInitiated_ = true;
- else
- subQueryInitiated_ = false;
-
- if (isSubQueryGetString != null)
- isSubQueryGet_ = Boolean.valueOf(isSubQueryGetString).booleanValue();
-
- if (queryName != null)
- propertyTable_.put(UDDIActionInputs.QUERY_NAME,queryName);
-
- if (!Validator.validateString(queryName) && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_QUERY_NAME"));
- }
-
- if (!processOthers(parser,formToolPI) && !subQueryInitiated_)
- inputsValid = false;
-
- for (int i=0;i<removedProperties_.size();i++)
- formToolPI.removeProperty(removedProperties_.elementAt(i));
- formToolPI.updatePropertyTable(propertyTable_);
-
- // Process authentication information. If valid, these should be set in the formTool (not the formToolPI).
- String ownedChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_OWNED);
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
-
- boolean validateAuthentication = (ownedChecked != null) && (!regElement.isLoggedIn()) && !overrideAuthenticationValidation();
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!subQueryInitiated_ && validateAuthentication && !Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userId != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- }
-
- if (!subQueryInitiated_ && validateAuthentication && !Validator.validateString(userId))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-
- return inputsValid;
- }
-
- protected boolean overrideAuthenticationValidation()
- {
- return false;
- }
-
- public final boolean isSubQueryInitiated()
- {
- return subQueryInitiated_;
- }
-
- public final boolean isSubQueryGet()
- {
- return isSubQueryGet_;
- }
-
- public final String getSubQueryKey()
- {
- return subQueryKey_;
- }
-
- public final String getNewSubQuery()
- {
- return newSubQuery_;
- }
-
- public final String getNewSubQueryItem()
- {
- return newSubQueryItem_;
- }
-
- public final void setRefreshAction(boolean isRefreshAction)
- {
- isRefreshAction_ = isRefreshAction;
- }
-
- public final boolean isRefreshAction()
- {
- return isRefreshAction_;
- }
-
- protected final void addQueryNode()
- {
- // If the queryElement already exists, remove it first.
- String queryName = queryElement_.getName();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- QueryParentElement queryParentElement = regElement.getQueryParentElement();
- Enumeration e = queryParentElement.getQueries();
- while (e.hasMoreElements())
- {
- QueryElement qe = (QueryElement)e.nextElement();
- if (qe.getName().equals(queryName))
- {
- SubQueryTransferTarget subQueryTransferTarget = (SubQueryTransferTarget)qe.getPropertyAsObject(UDDIModelConstants.SUBQUERY_TRANSFER_TARGET);
- if (subQueryTransferTarget != null && (qe.getQueryType() == queryElement_.getQueryType()))
- queryElement_.setPropertyAsObject(UDDIModelConstants.SUBQUERY_TRANSFER_TARGET,subQueryTransferTarget);
- qe.disconnectAll();
- break;
- }
- }
- if (!isRefreshAction_)
- {
- // We can make safe assumptions about the node that is currently selected.
- if (subQueryKey_ != null && subQueryKey_.length() > 0)
- {
- String parentQueryKey;
- int lastSeparatorPos = subQueryKey_.lastIndexOf(':');
- if (lastSeparatorPos == -1)
- parentQueryKey = "";
- else
- parentQueryKey = subQueryKey_.substring(0,lastSeparatorPos);
- FormToolPropertiesInterface parentFormToolPI = ((MultipleFormToolPropertiesInterface)getSelectedFormTool()).getFormToolProperties(parentQueryKey);
- Object queryItem = parentFormToolPI.getProperty(UDDIActionInputs.QUERY_ITEM);
- Object queryStyleBus = parentFormToolPI.getProperty(UDDIActionInputs.QUERY_STYLE_BUSINESSES);
- Object queryStyleSer = parentFormToolPI.getProperty(UDDIActionInputs.QUERY_STYLE_SERVICES);
- Object queryStyleSerInt = parentFormToolPI.getProperty(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES);
- Hashtable parentQueryData = new Hashtable();
- if (queryItem != null)
- parentQueryData.put(UDDIActionInputs.QUERY_ITEM, queryItem);
- if (queryStyleBus != null)
- parentQueryData.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES, queryStyleBus);
- if (queryStyleSer != null)
- parentQueryData.put(UDDIActionInputs.QUERY_STYLE_SERVICES, queryStyleSer);
- if (queryStyleSerInt != null)
- parentQueryData.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES, queryStyleSerInt);
- queryElement_.setPropertyAsObject(UDDIModelConstants.SUBQUERY_TRANSFER_TARGET,new SubQueryTransferTarget(getSelectedNavigatorNode(),subQueryKey_,parentQueryData));
- }
- }
- queryParentElement.connect(queryElement_,UDDIModelConstants.REL_QUERIES,ModelConstants.REL_OWNER);
- QueryNode queryNode = (QueryNode)(regNode_.getChildNode(queryParentElement).getChildNode(queryElement_));
- int newSelectedNodeId;
- // If there is only 1 result, select the result. Otherwise, select the query node to present a summary.
- if (queryNode.getChildNodes().size() == 1 && (subQueryKey_ == null || subQueryKey_.length() == 0))
- newSelectedNodeId = ((Node)(queryNode.getChildNodes().elementAt(0))).getNodeId();
- else
- newSelectedNodeId = queryNode.getNodeId();
- NodeManager nodeManager = regNode_.getNodeManager();
- nodeManager.setSelectedNodeId(newSelectedNodeId);
- queryNode.setFindToolProperties(this);
- Node selectedNode = nodeManager.getSelectedNode();
- ToolManager toolManager = selectedNode.getCurrentToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,selectedTool.getSelectToolActionHref(true));
- }
-
- public ITransformer[] getTransformers()
- {
- ITransformer[] parentTransformers = super.getTransformers();
- ITransformer[] transformers = new ITransformer[parentTransformers.length + 1];
- System.arraycopy(parentTransformers, 0, transformers, 0, parentTransformers.length);
- transformers[transformers.length - 1] = new MultipartFormDataParserTransformer(controller_);
- return transformers;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LoginAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LoginAdvancedAction.java
deleted file mode 100644
index 0d7e0abd1..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LoginAdvancedAction.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20060427 136449 brunssen@us.ibm.com - Vince Brunssen
- * 20060427 136449 clbush@us.ibm.com - Christopher Bush
- ******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Vector;
-import java.rmi.AlreadyBoundException;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessServices;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.BusinessInfo;
-import org.uddi4j.response.BusinessInfos;
-import org.uddi4j.response.RegisteredInfo;
-import org.uddi4j.response.TModelInfo;
-import org.uddi4j.response.TModelInfos;
-import org.uddi4j.transport.TransportException;
-
-public class LoginAdvancedAction extends PublishAction {
- public LoginAdvancedAction(Controller controller) {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM, String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_
- .put(UDDIActionInputs.QUERY_STYLE_BUSINESSES, String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET, String
- .valueOf(UDDIActionInputs.QUERY_MAX_SEARCH_SET));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS, String
- .valueOf(UDDIActionInputs.QUERY_MAX_RESULTS));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser, FormToolPropertiesInterface formToolPI)
- throws MultipartFormDataException {
- String ownedChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_OWNED);
-
- // Validate the data.
- boolean inputsValid = true;
- if (ownedChecked != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_OWNED, ownedChecked);
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_OWNED);
-
- return inputsValid;
- }
-
- private boolean attemptingDoubleLogin(){
- String userId = (String) propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String publishURL = (String) propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- Node rootNode = regNode_.getNodeManager().getRootNode();
- Vector allNodes = rootNode.getChildNodes();
-
- for(int k = 0; k < allNodes.size(); k++){
- Node n = (Node)allNodes.get(k);
- if (n instanceof RegistryNode){
- RegistryElement myElement = ((RegistryElement)n.getTreeElement());
- if (n.getNodeId() != regNode_.getNodeId() && publishURL.equals(myElement.getPublishURL()))
- if(userId.equals(myElement.getUserId()))
- return true;
- }
- }
- return false;
- }
-
- public final boolean run() {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- // System.out.println("+++++ Trying to login +++++");
- try {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String publishURL = (String) propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String) propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String) propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- int maxResults = 300;
-
- // The action can be run under the context of either a registry or a
- // query node.
- RegistryElement regElement = (RegistryElement) regNode_.getTreeElement();
-
-
- if(attemptingDoubleLogin())
- throw new AlreadyBoundException(uddiPerspective.getMessage("MSG_INFO_NO_MULTIPLE_LOGIN"));
-
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL, userId, password);
-
- UDDIProxy proxy = regElement.getProxy();
-
- BusinessInfos busInfos = null;
- TModelInfos tmInfos = null;
-
- RegisteredInfo ri = proxy.get_registeredInfo(regElement.getAuthInfoString());
- busInfos = ri.getBusinessInfos();
- tmInfos = ri.getTModelInfos();
-
- int finalNumberOfBusinessEntities = Math.min(maxResults, busInfos.size());
- Vector businessKeys = new Vector();
- for (int i = 0; i < finalNumberOfBusinessEntities; i++) {
- BusinessInfo busInfo = (BusinessInfo) busInfos.get(i);
- businessKeys.addElement(busInfo.getBusinessKey());
- }
-
- if (finalNumberOfBusinessEntities > 0) {
- if (shouldAddQueryNode) {
- Vector beVector = proxy.get_businessDetail(businessKeys).getBusinessEntityVector();
- BusinessEntity be = null;
- BusinessServices bs = null;
- int size = beVector.size();
- if (size > 0) {
- for (int i = 0; i < size; i++) {
- be = (BusinessEntity) beVector.elementAt(i);
- addPublishedItemNode(be, regElement);
- bs = be.getBusinessServices();
- if (bs != null) {
- Vector vServices = bs.getBusinessServiceVector();
- int services = vServices.size();
- for (int j = 0; j < services; j++) {
- addPublishedItemNode(bs.get(j), regElement);
- }
- }
- }
- messageQueue
- .addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESSES_FOUND", String.valueOf(size)));
- }
- }
- }
-
- int finalNumberOfTModels = Math.min(maxResults, tmInfos.size());
- Vector tModelKeys = new Vector();
- for (int i = 0; i < finalNumberOfTModels; i++) {
- TModelInfo tmInfo = (TModelInfo) tmInfos.get(i);
- tModelKeys.addElement(tmInfo.getTModelKey());
- }
-
- if (finalNumberOfTModels > 0) {
- if (shouldAddQueryNode) {
- Vector finalTModelVector = proxy.get_tModelDetail(tModelKeys).getTModelVector();
-
- int size = finalTModelVector.size();
- if (size > 0) {
- TModel tm = null;
- for (int i = 0; i < size; i++) {
- tm = (TModel) finalTModelVector.elementAt(i);
- addPublishedItemNode(tm, regElement);
- }
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACES_FOUND", String
- .valueOf(size)));
- }
- }
- }
-
- int id = 1;
- RegistryNode regNode = getRegistryNode();
-
- // we are logged in so change the loginTool to act as a logoutTool;
- regNode.getLoginTool().setAltText(uddiPerspective.getMessage("ALT_LOGOUT"));
- regNode.getLoginTool().setToLogoutLink();
- String registryName = regElement.getName();
- String[] s = new String[2];
- s[0] = registryName;
- s[1] = userId;
- regElement.setName(uddiPerspective.getMessage("MSG_INFO_LOGGED_IN_NODE", s));
-
- if (finalNumberOfBusinessEntities > 0) {
- Node pbeNode = regNode.getChildNode(regElement.getPublishedBusinessesElement());
- id = pbeNode.getNodeId();
- } else if (finalNumberOfTModels > 0) {
- Node psiNode = regNode.getChildNode(regElement.getPublishedServiceInterfacesElement());
- id = psiNode.getNodeId();
- }
- // System.out.println("Node id = " + id);
- uddiPerspective.getNodeManager().setSelectedNodeId(id);
- uddiPerspective.getNodeManager().makeSelectedNodeVisible();
-
- if ((finalNumberOfBusinessEntities < 1) && (finalNumberOfTModels < 1))
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_NO_BUSINESSES_OR_SERVICE_INTERFACES_FOUND"));
-
- return true;
- } catch (TransportException e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- } catch (UDDIException e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- } catch (MalformedURLException e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- } catch (AlreadyBoundException e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("AlreadyBoundException");
- messageQueue.addMessage(e.getMessage());
- }
-
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LogoutAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LogoutAdvancedAction.java
deleted file mode 100644
index e76df39fd..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/LogoutAdvancedAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20060427 136449 brunssen@us.ibm.com - Vince Brunssen
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.UDDIException;
-import org.uddi4j.transport.TransportException;
-
-public class LogoutAdvancedAction extends PublishAction
-{
- public LogoutAdvancedAction(Controller controller)
- {
- super(controller);
- regNode_.getLoginTool().setToRegistryLink();
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- // Validate the data.
- boolean inputsValid = true;
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (regElement.isLoggedIn()) {
- regElement.performLogout();
- regElement.remove();
- regNode_.getNodeManager().setSelectedNodeId(0);
- }
-
- return true;
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ManageReferencedServicesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ManageReferencedServicesAction.java
deleted file mode 100644
index 67a86f169..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ManageReferencedServicesAction.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Perspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.service.BusinessServices;
-import org.uddi4j.transport.TransportException;
-
-public class ManageReferencedServicesAction extends UDDIPropertiesFormAction
-{
- protected String subQueryKey_;
- protected boolean isSubQueryGet_;
- protected String newSubQuery_;
- protected String newSubQueryItem_;
- protected boolean subQueryInitiated_;
- protected RegistryNode regNode_;
-
- public ManageReferencedServicesAction(Controller controller)
- {
- super(controller);
- subQueryKey_ = null;
- isSubQueryGet_ = false;
- subQueryInitiated_ = false;
- regNode_ = getRegistryNode();
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- newSubQuery_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_INITIATED);
- String isSubQueryGetString = parser.getParameter(UDDIActionInputs.SUBQUERY_GET);
- newSubQueryItem_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_QUERY_ITEM);
- subQueryKey_ = parser.getParameter(UDDIActionInputs.SUBQUERY_KEY);
- String[] referencedServicesCheckboxes = parser.getParameterValues(UDDIActionInputs.REFERENCED_SERVICE_SELECT_STATE);
- String[] serviceNodeIds = parser.getParameterValues(UDDIActionInputs.NODEID_SERVICE);
- String operation = parser.getParameter(UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION);
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.clearErrors();
-
- if (newSubQuery_ != null && newSubQuery_.length() > 0)
- subQueryInitiated_ = true;
- else
- subQueryInitiated_ = false;
-
- if (isSubQueryGetString != null)
- isSubQueryGet_ = Boolean.valueOf(isSubQueryGetString).booleanValue();
-
- if (operation != null)
- propertyTable_.put(UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION,operation);
- else
- removeProperty(UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION);
-
- if (referencedServicesCheckboxes != null)
- propertyTable_.put(UDDIActionInputs.REFERENCED_SERVICE_SELECT_STATE,referencedServicesCheckboxes);
- else
- removeProperty(UDDIActionInputs.REFERENCED_SERVICE_SELECT_STATE);
-
- if (serviceNodeIds != null)
- {
- Vector services = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_SERVICES);
- if (services == null)
- services = new Vector();
- Hashtable resultHash = new Hashtable();
- for (int i=0;i<serviceNodeIds.length;i++)
- resultHash.put(serviceNodeIds[i],Boolean.TRUE);
- for (int i=0;i<services.size();i++)
- {
- ListElement listElement = (ListElement)services.elementAt(i);
- if (resultHash.get(String.valueOf(listElement.getTargetNodeId())) == null)
- {
- services.removeElementAt(i);
- i--;
- }
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SERVICES,services);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_SERVICES);
-
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- {
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!subQueryInitiated_ && !Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userId != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- }
-
- if (!subQueryInitiated_ && !Validator.validateString(userId))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
- }
-
- for (int i=0;i<removedProperties_.size();i++)
- formToolPI.removeProperty(removedProperties_.elementAt(i));
- formToolPI.updatePropertyTable(propertyTable_);
-
- return inputsValid;
- }
-
- public boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- String operationString = (String)propertyTable_.get(UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION);
- int operation = Integer.parseInt(operationString);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- BusinessElement busElement = (BusinessElement)(getSelectedNavigatorNode().getTreeElement());
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- Vector referencedServices = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_REFERENCED_SERVICES);
- boolean operationResult = true;
- try
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- UDDIProxy proxy = regElement.getProxy();
- BusinessEntity currentSP = busElement.getBusinessEntity();
- BusinessEntity sp = (BusinessEntity)proxy.get_businessDetail(currentSP.getBusinessKey()).getBusinessEntityVector().get(0);
-
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- Hashtable servicesHash = new Hashtable();
- Vector backupBusServiceVector = new Vector();
- switch (operation)
- {
- case UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION_ADD:
- Vector services = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SERVICES);
- for (int i=0;i<services.size();i++)
- {
- ListElement serviceListElement = (ListElement)services.elementAt(i);
- BusinessService bs = (BusinessService)serviceListElement.getObject();
- servicesHash.put(bs.getServiceKey(),bs);
- }
-
- // Save the current list of BusinessServices for rollback operations.
- backupAndUpdateBusinessServices(backupBusServiceVector,sp,servicesHash,true);
-
- try
- {
- Vector beVector = new Vector();
- beVector.add(sp);
- sp = (BusinessEntity)proxy.save_business(regElement.getAuthInfoString(), beVector).getBusinessEntityVector().get(0);
- for (int i=0;i<services.size();i++)
- {
- ListElement serviceElement = (ListElement)services.elementAt(i);
- BusinessService bs = (BusinessService)serviceElement.getObject();
- String bsName = bs.getDefaultNameString();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_REFERENCED",bsName));
- services.removeElementAt(i);
- i--;
- }
- }
- catch (TransportException e)
- {
- // Roll back and restore the old list of services.
- rollbackBusinessServices(sp,backupBusServiceVector,services,uddiPerspective,messageQueue,"MSG_ERROR_SERVICE_NOT_REFERENCED");
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- operationResult = false;
- }
- catch (UDDIException e)
- {
- // Roll back and restore the old list of services.
- rollbackBusinessServices(sp,backupBusServiceVector,services,uddiPerspective,messageQueue,"MSG_ERROR_SERVICE_NOT_REFERENCED");
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- operationResult = false;
- }
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_SERVICES,services);
- break;
- case UDDIActionInputs.MANAGE_REFERENCED_SERVICES_OPERATION_REMOVE:
- String[] referencedServicesCheckboxes = (String[])propertyTable_.get(UDDIActionInputs.REFERENCED_SERVICE_SELECT_STATE);
- Vector selectedReferencedServiceVector = new Vector();
- for (int i=0;i<referencedServicesCheckboxes.length;i++)
- {
- boolean isChecked = Boolean.valueOf(referencedServicesCheckboxes[i]).booleanValue();
- if (isChecked)
- {
- ListElement referencedServiceListElement = (ListElement)referencedServices.elementAt(i);
- BusinessService bs = (BusinessService)referencedServiceListElement.getObject();
- servicesHash.put(bs.getServiceKey(),bs);
- selectedReferencedServiceVector.addElement(bs);
- }
- }
-
- // Save the current list of business services for rollback operations.
- backupAndUpdateBusinessServices(backupBusServiceVector,sp,servicesHash,false);
-
- try
- {
- Vector beVector = new Vector();
- beVector.add(sp);
- sp = (BusinessEntity)proxy.save_business(regElement.getAuthInfoString(), beVector).getBusinessEntityVector().get(0);
- for (int i=0;i<selectedReferencedServiceVector.size();i++)
- {
- BusinessService bs = (BusinessService)selectedReferencedServiceVector.elementAt(i);
- String bsName = bs.getDefaultNameString();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_REFERENCE_REMOVED",bsName));
- }
- }
- catch (TransportException e)
- {
- // Roll back and restore the old list of services.
- rollbackBusinessServices(sp,backupBusServiceVector,selectedReferencedServiceVector,uddiPerspective,messageQueue,"MSG_ERROR_REFERENCE_NOT_REMOVED");
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- operationResult = false;
- }
- catch (UDDIException e)
- {
- // Roll back and restore the old list of services.
- rollbackBusinessServices(sp,backupBusServiceVector,selectedReferencedServiceVector,uddiPerspective,messageQueue,"MSG_ERROR_REFERENCE_NOT_REMOVED");
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- operationResult = false;
- }
- }
- // Ensure that the referenced services are refreshed when the form reloads.
- formToolPI.removeProperty(UDDIActionInputs.QUERY_INPUT_REFERENCED_SERVICES);
- busElement.setBusinessEntity(sp);
- return operationResult;
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- operationResult = false;
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- operationResult = false;
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- operationResult = false;
- }
- return operationResult;
- }
-
- public final boolean isSubQueryInitiated()
- {
- return subQueryInitiated_;
- }
-
- public final boolean isSubQueryGet()
- {
- return isSubQueryGet_;
- }
-
- public final String getSubQueryKey()
- {
- return subQueryKey_;
- }
-
- public final String getNewSubQuery()
- {
- return newSubQuery_;
- }
-
- public final String getNewSubQueryItem()
- {
- return newSubQueryItem_;
- }
-
- // Backup the business services and remove those in serviceHash from the current list. Return the updated list of business services
- private final void backupAndUpdateBusinessServices(Vector backupBusServiceVector,BusinessEntity be,Hashtable servicesHash,boolean isAdd)
- {
- // Save the current list of business services for rollback operations.
- BusinessServices currentBusServices = be.getBusinessServices();
- if (currentBusServices == null)
- currentBusServices = new BusinessServices();
- Vector currentBusServiceVector = currentBusServices.getBusinessServiceVector();
- for (int i=0;i<currentBusServiceVector.size();i++)
- {
- BusinessService currentBusService = (BusinessService)currentBusServiceVector.elementAt(i);
- backupBusServiceVector.addElement(currentBusService);
- // If the current business service is a member of the list to be removed/added, remove it now.
- if (servicesHash.get(currentBusService.getServiceKey()) != null)
- {
- currentBusServiceVector.removeElementAt(i);
- i--;
- }
- }
-
- if (isAdd)
- {
- Enumeration e = servicesHash.elements();
- while (e.hasMoreElements())
- currentBusServiceVector.addElement((BusinessService)e.nextElement());
- }
- be.setBusinessServices(currentBusServices);
- }
-
- private final void rollbackBusinessServices(BusinessEntity be,Vector backupBusServiceVector,Vector operatedServices,Perspective perspective,MessageQueue messageQueue,String errorMessageKey)
- {
- // Roll back and restore the old list of services.
- be.getBusinessServices().setBusinessServiceVector(backupBusServiceVector);
- for (int i=0;i<operatedServices.size();i++)
- {
- ListElement serviceListElement = (ListElement)operatedServices.elementAt(i);
- BusinessService bs = (BusinessService)serviceListElement.getObject();
- String bsName = bs.getDefaultNameString();
- messageQueue.addMessage(perspective.getMessage(errorMessageKey,bsName));
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenCategoryBrowserAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenCategoryBrowserAction.java
deleted file mode 100644
index bdcf84e39..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenCategoryBrowserAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import javax.servlet.http.HttpServletRequest;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.Action;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-
-public class OpenCategoryBrowserAction extends Action
-{
- public OpenCategoryBrowserAction()
- {
- }
-
- private static final void addSessionAndTModelKey(StringBuffer result,String sessionId,String categoryTModelKey)
- {
- result.append(ActionInputs.SESSIONID).append('=').append(sessionId).append('&').append(UDDIActionInputs.CATEGORY_TMODEL_KEY).append('=').append(categoryTModelKey);
- }
-
- // uddi/category_browser.jsp?sessionId=...&categoryTModelKey=...
- public static final String getActionLink(String sessionId,String categoryTModelKey)
- {
- StringBuffer actionLink = new StringBuffer("uddi/category_browser.jsp?");
- addSessionAndTModelKey(actionLink,sessionId,categoryTModelKey);
- return actionLink.toString();
- }
-
- public static final String getCategoryContentPage(String sessionId,String categoryTModelKey)
- {
- StringBuffer actionLink = new StringBuffer("uddi/category_content.jsp?");
- addSessionAndTModelKey(actionLink,sessionId,categoryTModelKey);
- return actionLink.toString();
- }
-
- public static final String getWildCardActionLink(String sessionId)
- {
- return getActionLink(sessionId,"%");
- }
-
- public final boolean populatePropertyTable(HttpServletRequest request)
- {
- return true;
- }
-
- public final boolean run()
- {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenRegistryAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenRegistryAction.java
deleted file mode 100644
index 9288c7d5e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/OpenRegistryAction.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * -------- -------- -----------------------------------------------------------
- * 20060912 141796 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Properties;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryModel;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.UDDIMainElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIMainNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.response.TModelInfo;
-import org.uddi4j.response.TModelInfos;
-import org.uddi4j.response.TModelList;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.KeyedReference;
-
-public class OpenRegistryAction extends UDDIPropertiesFormAction
-{
- public OpenRegistryAction(Controller controller)
- {
- super(controller);
- // Select UDDI Main.
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String registryName = parser.getParameter(UDDIActionInputs.REGISTRY_NAME);
- String inquiryURL = parser.getParameter(UDDIActionInputs.INQUIRY_URL);
- String publishURL = parser.getParameter(UDDIActionInputs.PUBLISH_URL);
- String username = parser.getParameter(UDDIActionInputs.UDDI_USERNAME);
- String password = parser.getParameter(UDDIActionInputs.UDDI_PASSWORD);
- String checkUserDefinedCategoriesChecked = parser.getParameter(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES);
- String categoriesDirectory = parser.getParameter(UDDIActionInputs.CATEGORIES_DIRECTORY);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
- if (registryName != null)
- propertyTable_.put(UDDIActionInputs.REGISTRY_NAME,registryName);
-
- if (!Validator.validateString(registryName))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.REGISTRY_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_REGISTRY_NAME"));
- }
-
- if (inquiryURL != null)
- propertyTable_.put(UDDIActionInputs.INQUIRY_URL,inquiryURL);
- if (!Validator.validateURL(inquiryURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.INQUIRY_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_INQUIRY_URL"));
- }
-
- if (publishURL != null)
- propertyTable_.put(UDDIActionInputs.PUBLISH_URL, publishURL);
-
- if (username != null)
- propertyTable_.put(UDDIActionInputs.UDDI_USERNAME, username);
-
- if (password != null)
- propertyTable_.put(UDDIActionInputs.UDDI_PASSWORD, password);
-
- if (checkUserDefinedCategoriesChecked != null)
- propertyTable_.put(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES,checkUserDefinedCategoriesChecked);
- else
- removeProperty(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES);
-
- if (categoriesDirectory != null)
- propertyTable_.put(UDDIActionInputs.CATEGORIES_DIRECTORY,categoriesDirectory);
- else
- removeProperty(UDDIActionInputs.CATEGORIES_DIRECTORY);
-
- formTool.updatePropertyTable(propertyTable_);
- return inputsValid;
- }
-
- public final void gatherWSUserDefinedCategories(UDDIProxy proxy,Hashtable categoryModels)
- {
- try
- {
- CategoryBag categoryBag = new CategoryBag();
- categoryBag.add(new KeyedReference("","categorization",TModel.TYPES_TMODEL_KEY));
- TModelList tModelList = proxy.find_tModel("%",categoryBag,null,null,100);
- TModelInfos tModelInfos = tModelList.getTModelInfos();
- Vector tModelKeyVector = new Vector();
- for (int i=0;i<tModelInfos.size();i++)
- {
- TModelInfo tModelInfo = tModelInfos.get(i);
- tModelKeyVector.addElement(tModelInfo.getTModelKey());
- }
- TModelDetail tModelDetail = proxy.get_tModelDetail(tModelKeyVector);
- Vector tModelVector = tModelDetail.getTModelVector();
- for (int i=0;i<tModelVector.size();i++)
- {
- TModel tModel = (TModel)tModelVector.elementAt(i);
- boolean checked = false;
- String displayName = null;
- String categoryKey = null;
- categoryBag = tModel.getCategoryBag();
- for (int j=0;j<categoryBag.size();j++)
- {
- KeyedReference kr = categoryBag.get(j);
- String krTModelKey = kr.getTModelKey();
- if (krTModelKey.equalsIgnoreCase(TModel.GENERAL_KEYWORDS_TMODEL_KEY))
- {
- String krKeyName = kr.getKeyName();
- if (krKeyName.equals("urn:x-ibm:uddi:customTaxonomy:key"))
- categoryKey = kr.getKeyValue();
- else if (krKeyName.equals("urn:x-ibm:uddi:customTaxonomy:displayName"))
- displayName = kr.getKeyValue();
- }
- else if (krTModelKey.equalsIgnoreCase(TModel.TYPES_TMODEL_KEY))
- checked = kr.getKeyValue().equals("checked");
- }
- if (categoryKey != null)
- {
- if (displayName == null)
- displayName = tModel.getNameString();
- CategoryModel categoryModel = new CategoryModel();
- categoryModel.setCategoryKey(categoryKey);
- categoryModel.enableChecked(checked);
- categoryModel.setDisplayName(displayName);
- String tModelKey = tModel.getTModelKey();
- categoryModel.setTModelKey(tModelKey);
- categoryModels.put(tModelKey,categoryModel);
- }
- }
- }
- catch (UDDIException e)
- {
- }
- catch (TransportException e)
- {
- }
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- String registryName = (String)propertyTable_.get(UDDIActionInputs.REGISTRY_NAME);
- String inquiryURL = (String)propertyTable_.get(UDDIActionInputs.INQUIRY_URL);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.PUBLISH_URL);
- String registrationURL = (String)propertyTable_.get(UDDIActionInputs.REGISTRATION_URL);
- String username = (String)propertyTable_.get(UDDIActionInputs.UDDI_USERNAME);
- String password = (String)propertyTable_.get(UDDIActionInputs.UDDI_PASSWORD);
- boolean checkForUserDefinedCategoriesChecked = (propertyTable_.get(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES) != null);
- String categoriesDirectory = (String)propertyTable_.get(UDDIActionInputs.CATEGORIES_DIRECTORY);
-
- String recognizedPublishURL = uddiPerspective.getKnownRegistryPublishURL(inquiryURL);
- String recognizedRegistrationURL = uddiPerspective.getKnownRegistryRegistrationURL(inquiryURL);
-
- if (publishURL == null)
- publishURL = recognizedPublishURL;
- if (registrationURL == null)
- registrationURL = recognizedRegistrationURL;
-
- UDDIMainNode uddiMainNode = (UDDIMainNode)(controller_.getUDDIPerspective().getNavigatorManager().getRootNode());
- UDDIMainElement uddiMainElement = (UDDIMainElement)uddiMainNode.getTreeElement();
- Properties props = new Properties();
- props.put(ActionInputs.TRANSPORT_CLASS_NAME, ActionInputs.TRASPORT_CLASS);
- UDDIProxy proxy = new UDDIProxy(props);
- proxy.setInquiryURL(new URL(inquiryURL));
- RegistryElement registryElement = new RegistryElement(proxy,inquiryURL,registryName,uddiMainElement.getModel());
- // Set registry element's publish URL and registration URL provided by external callers (e.g. favorites).
- if (publishURL != null)
- registryElement.setCachedPublishURL(publishURL);
- if (registrationURL != null)
- registryElement.setRegistrationURL(registrationURL);
- if (username != null)
- registryElement.setUserId(username);
- if (password != null)
- registryElement.setCred(password);
- registryElement.setCheckForUserDefinedCategories(checkForUserDefinedCategoriesChecked);
- if (checkForUserDefinedCategoriesChecked)
- {
- Hashtable categoryModels = new Hashtable();
- gatherWSUserDefinedCategories(proxy,categoryModels);
- if (categoryModels.size() > 0)
- registryElement.setUserDefinedCategories(categoryModels);
- }
- registryElement.setCategoriesDirectory(categoriesDirectory);
- uddiMainElement.connect(registryElement,UDDIModelConstants.REL_REGISTRIES,ModelConstants.REL_OWNER);
- NodeManager nodeManager = uddiMainNode.getNodeManager();
- int newRegistryNodeId = uddiMainNode.getChildNode(registryElement).getNodeId();
- // Select the new registry node and add the select action to the history.
- nodeManager.setSelectedNodeId(newRegistryNodeId);
- Node registryNode = nodeManager.getSelectedNode();
- ToolManager toolManager = registryNode.getCurrentToolManager();
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,toolManager.getSelectedTool().getSelectToolActionHref(true));
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_REGISTRY_OPENED",new String[]{registryName,inquiryURL}));
- return true;
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- FormTool formTool = getSelectedFormTool();
- formTool.flagError(UDDIActionInputs.INQUIRY_URL);
- }
- /*
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- */
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/PublishAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/PublishAction.java
deleted file mode 100644
index 8e29b626d..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/PublishAction.java
+++ /dev/null
@@ -1,238 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.ITransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.MultipartFormDataParserTransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublishedItemsElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public abstract class PublishAction extends UDDIPropertiesFormAction
-{
- protected String subQueryKey_;
- protected boolean subQueryInitiated_;
- protected String newSubQuery_;
- protected boolean isSubQueryGet_;
- protected String newSubQueryItem_;
- protected RegistryNode regNode_;
-
- public PublishAction(Controller controller)
- {
- super(controller);
- subQueryKey_ = null;
- isSubQueryGet_ = false;
- subQueryInitiated_ = false;
- regNode_ = getRegistryNode();
- }
-
- protected abstract boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException;
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- // Setup for MultipartFormDataParserTransformer
- propertyTable_.put(ActionInputs.MULTIPART_FORM_DATA_PARSER, parser);
-
- newSubQuery_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_INITIATED);
- String isSubQueryGetString = parser.getParameter(UDDIActionInputs.SUBQUERY_GET);
- newSubQueryItem_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_QUERY_ITEM);
- subQueryKey_ = parser.getParameter(UDDIActionInputs.SUBQUERY_KEY);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.clearErrors();
-
- if (newSubQuery_ != null && newSubQuery_.length() > 0)
- subQueryInitiated_ = true;
- else
- subQueryInitiated_ = false;
-
- if (isSubQueryGetString != null)
- isSubQueryGet_ = Boolean.valueOf(isSubQueryGetString).booleanValue();
-
- if (!processOthers(parser,formToolPI) && !subQueryInitiated_)
- inputsValid = false;
-
- for (int i=0;i<removedProperties_.size();i++)
- formToolPI.removeProperty(removedProperties_.elementAt(i));
- formToolPI.updatePropertyTable(propertyTable_);
-
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
-
- boolean validateAuthentication = !regElement.isLoggedIn();
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!subQueryInitiated_ && validateAuthentication && !Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userId != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- }
-
- if (!subQueryInitiated_ && validateAuthentication && !Validator.validateString(userId))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-
- return inputsValid;
- }
-
- protected final void addPublishedItemNode(BusinessEntity be,RegistryElement regElement)
- {
- BusinessElement beElement = new BusinessElement(be,regElement.getModel());
- PublishedItemsElement publishedBusinessesElement = regElement.getPublishedBusinessesElement();
- Enumeration e = publishedBusinessesElement.getItems();
- while (e.hasMoreElements())
- {
- BusinessElement element = (BusinessElement)e.nextElement();
- BusinessEntity elementBE = element.getBusinessEntity();
- if (elementBE.getBusinessKey().equals(be.getBusinessKey()))
- {
- element.disconnectAll();
- break;
- }
- }
- connectElements(publishedBusinessesElement,beElement);
- }
-
- protected final void addPublishedItemNode(BusinessService bs,RegistryElement regElement)
- {
- ServiceElement sElement = new ServiceElement(bs,regElement.getModel());
- PublishedItemsElement publishedServicesElement = regElement.getPublishedServicesElement();
- Enumeration e = publishedServicesElement.getItems();
- while (e.hasMoreElements())
- {
- ServiceElement element = (ServiceElement)e.nextElement();
- BusinessService elementBS = element.getBusinessService();
- if (elementBS.getServiceKey().equals(bs.getServiceKey()))
- {
- element.disconnectAll();
- break;
- }
- }
- connectElements(publishedServicesElement,sElement);
- }
-
- protected final void addPublishedItemNode(TModel tModel,RegistryElement regElement)
- {
- ServiceInterfaceElement siElement = new ServiceInterfaceElement(tModel,regElement.getModel());
- PublishedItemsElement publishedServiceInterfacesElement = regElement.getPublishedServiceInterfacesElement();
- Enumeration e = publishedServiceInterfacesElement.getItems();
- while (e.hasMoreElements())
- {
- ServiceInterfaceElement element = (ServiceInterfaceElement)e.nextElement();
- TModel elementTModel = element.getTModel();
- if (tModel.getTModelKey().equals(elementTModel.getTModelKey()))
- {
- element.disconnectAll();
- break;
- }
- }
- connectElements(publishedServiceInterfacesElement,siElement);
- }
-
- private final void connectElements(PublishedItemsElement publishedItemsElement,TreeElement itemElement)
- {
- publishedItemsElement.connect(itemElement,UDDIModelConstants.REL_PUBLISHED_ITEMS,ModelConstants.REL_OWNER);
- int newNodeId = regNode_.getChildNode(publishedItemsElement).getChildNode(itemElement).getNodeId();
- NodeManager nodeManager = regNode_.getNodeManager();
- nodeManager.setSelectedNodeId(newNodeId);
- Node newNode = nodeManager.getSelectedNode();
- ToolManager toolManager = newNode.getToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,selectedTool.getSelectToolActionHref(true));
- }
-
- public final boolean isSubQueryInitiated()
- {
- return subQueryInitiated_;
- }
-
- public final boolean isSubQueryGet()
- {
- return isSubQueryGet_;
- }
-
- public final String getSubQueryKey()
- {
- return subQueryKey_;
- }
-
- public final String getNewSubQuery()
- {
- return newSubQuery_;
- }
-
- public final String getNewSubQueryItem()
- {
- return newSubQueryItem_;
- }
-
- public ITransformer[] getTransformers()
- {
- ITransformer[] parentTransformers = super.getTransformers();
- ITransformer[] transformers = new ITransformer[parentTransformers.length + 1];
- System.arraycopy(parentTransformers, 0, transformers, 0, parentTransformers.length);
- transformers[transformers.length - 1] = new MultipartFormDataParserTransformer(controller_);
- return transformers;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodeAction.java
deleted file mode 100644
index 3c1ada630..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodeAction.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.AddRegistryToUDDIPerspectiveAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.BusinessNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.PublishedItemsNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.QueryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.QueryParentNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceInterfaceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class RefreshUDDINodeAction extends UDDINodeAction
-{
- private Vector staleNodes_;
- public RefreshUDDINodeAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(ActionInputs.NODEID,String.valueOf(controller.getUDDIPerspective().getNavigatorManager().getSelectedNodeId()));
- staleNodes_ = new Vector();
- }
-
- // uddi/actions/RefreshUDDINodeActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/RefreshUDDINodeActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean verifyNodeData()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- Node node = nodeManager_.getNode(nodeId);
- if (node instanceof BusinessNode)
- return refreshBusinessElement((BusinessNode)node);
- else if (node instanceof ServiceNode)
- return refreshServiceElement((ServiceNode)node);
- else if (node instanceof ServiceInterfaceNode)
- return refreshServiceInterfaceElement((ServiceInterfaceNode)node);
- else if (node instanceof QueryNode)
- {
- // Nothing to verify
- return true;
- }
- else if (node != null)
- {
- // RegistryNode
- if (node instanceof RegistryNode)
- refreshRegistryElement((RegistryNode)node);
-
- // FolderNodes
- Vector childNodes = node.getChildNodes();
- Vector refreshActions = new Vector();
- for (int i=0;i<childNodes.size();i++)
- {
- Node childNode = (Node)childNodes.elementAt(i);
- RefreshUDDINodeAction action = new RefreshUDDINodeAction(controller_);
- action.setStaleNodes(staleNodes_);
- Hashtable propertyTable = action.getPropertyTable();
- String childNodeIdString = String.valueOf(childNode.getNodeId());
- propertyTable.put(ActionInputs.NODEID,childNodeIdString);
- if (!action.verifyNodeData())
- staleNodes_.addElement(childNode);
- else
- refreshActions.addElement(action);
- }
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,refreshActions);
- return true;
- }
- return true;
- }
-
- private final void refreshRegistryElement(RegistryNode regNode)
- {
- RegistryElement regElement = (RegistryElement)regNode.getTreeElement();
- Hashtable userDefinedCategories = null;
- if (regElement.getCheckForUserDefinedCategories())
- {
- userDefinedCategories = new Hashtable();
- OpenRegistryAction openRegAction = new OpenRegistryAction(controller_);
- openRegAction.gatherWSUserDefinedCategories(regElement.getProxy(),userDefinedCategories);
- if (!userDefinedCategories.keys().hasMoreElements())
- {
- userDefinedCategories = null;
- regNode.setImagePath(RegistryNode.IMAGE_PATH_STANDARD);
- }
- else
- {
- String categoriesDirectory = regElement.getCategoriesDirectory();
- AddRegistryToUDDIPerspectiveAction addAction = new AddRegistryToUDDIPerspectiveAction(controller_);
- if (categoriesDirectory != null)
- addAction.linkCategoryModelsWithSavedData(userDefinedCategories.elements(),categoriesDirectory);
- else
- addAction.linkCategoryModelsWithSavedData(regElement.getName(),userDefinedCategories.elements());
- regNode.setImagePath(RegistryNode.IMAGE_PATH_WITH_USER_DEFINED_CATEGORIES);
- }
- }
- regElement.setUserDefinedCategories(userDefinedCategories);
- }
-
- private final boolean refreshBusinessElement(BusinessNode busNode)
- {
- BusinessElement busElement = (BusinessElement)busNode.getTreeElement();
- String uuidKey = busElement.getBusinessEntity().getBusinessKey();
- RegFindBusinessUUIDAction verifyAction = new RegFindBusinessUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,uuidKey);
- propertyTable.put(UDDIActionInputs.REFRESH_NODE,busNode);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- boolean verifyResult = verifyAction.run();
- if (verifyResult)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,new BusinessElement((BusinessEntity)propertyTable.get(UDDIActionInputs.LATEST_OBJECT),busElement.getModel()));
- return verifyResult;
- }
-
- private final boolean refreshServiceElement(ServiceNode serviceNode)
- {
- ServiceElement serviceElement = (ServiceElement)serviceNode.getTreeElement();
- String uuidKey = serviceElement.getBusinessService().getServiceKey();
- RegFindServiceUUIDAction verifyAction = new RegFindServiceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,uuidKey);
- propertyTable.put(UDDIActionInputs.REFRESH_NODE,serviceNode);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- boolean verifyResult = verifyAction.run();
- if (verifyResult)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,new ServiceElement((BusinessService)propertyTable.get(UDDIActionInputs.LATEST_OBJECT),serviceElement.getModel()));
- return verifyResult;
- }
-
- private final boolean refreshServiceInterfaceElement(ServiceInterfaceNode siNode)
- {
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)siNode.getTreeElement();
- String uuidKey = siElement.getTModel().getTModelKey();
- RegFindServiceInterfaceUUIDAction verifyAction = new RegFindServiceInterfaceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,uuidKey);
- propertyTable.put(UDDIActionInputs.REFRESH_NODE,siNode);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- boolean verifyResult = verifyAction.run();
- if (verifyResult)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,new ServiceInterfaceElement((TModel)propertyTable.get(UDDIActionInputs.LATEST_OBJECT),siElement.getModel()));
- return verifyResult;
- }
-
- public final void connectElements(Node parentNode,TreeElement newElement)
- {
- TreeElement parentElement = parentNode.getTreeElement();
- String rel = null;
- if (parentNode instanceof PublishedItemsNode)
- rel = UDDIModelConstants.REL_PUBLISHED_ITEMS;
- else if (parentNode instanceof QueryNode)
- rel = UDDIModelConstants.REL_QUERY_RESULTS;
- else if (parentNode instanceof QueryParentNode)
- rel = UDDIModelConstants.REL_QUERIES;
- parentElement.connect(newElement,rel,ModelConstants.REL_OWNER);
- Node newNode = parentNode.getChildNode(newElement);
- int newNodeId = newNode.getNodeId();
- nodeManager_.setSelectedNodeId(newNodeId);
- ToolManager toolManager = newNode.getToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,selectedTool.getSelectToolActionHref(true));
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- if (!isStaleNode(nodeId))
- {
- Node node = nodeManager_.getNode(nodeId);
- Object latestObject = propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
- if (latestObject != null)
- {
- if (latestObject instanceof Vector)
- {
- Vector refreshActions = (Vector)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
- for (int i=0;i<refreshActions.size();i++)
- {
- RefreshUDDINodeAction refreshAction = (RefreshUDDINodeAction)refreshActions.elementAt(i);
- refreshAction.run();
- }
- nodeManager_.setSelectedNodeId(nodeId);
- }
- else
- {
- TreeElement oldElement = node.getTreeElement();
- oldElement.disconnectAll();
- connectElements(node.getParent(),(TreeElement)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT));
- }
- }
- else
- {
- // QueryNodes
- QueryNode queryNode = (QueryNode)node;
- FindAction findAction = queryNode.getFindAction();
- findAction.setRefreshAction(true);
- if (!findAction.run())
- queryNode.removeChildNodes(true);
- findAction.setRefreshAction(false);
- }
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_NODE_REFRESHED",node.getNodeName()));
- return true;
- }
- return false;
- }
-
- public final Vector getStaleNodes()
- {
- return staleNodes_;
- }
-
- public final void setStaleNodes(Vector staleNodes)
- {
- staleNodes_ = staleNodes;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodesAction.java
deleted file mode 100644
index fe3cadc53..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RefreshUDDINodesAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public class RefreshUDDINodesAction extends UDDIPropertiesFormAction
-{
- private Vector staleNodes_;
-
- public RefreshUDDINodesAction(Controller controller)
- {
- super(controller);
- staleNodes_ = new Vector();
- }
-
- protected boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String[] selectedNodeIds = parser.getParameterValues(ActionInputs.NODEID);
- // The client Javascript enforces the rule that at least one item was selected before the form can be submitted.
- propertyTable_.put(UDDIActionInputs.SELECTED_NODEIDS,selectedNodeIds);
- return true;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- int collectorNodeId = getSelectedNavigatorNode().getNodeId();
- String[] selectedNodeIds = (String[])propertyTable_.get(UDDIActionInputs.SELECTED_NODEIDS);
- RefreshUDDINodeAction action = new RefreshUDDINodeAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- for (int i=0;i<selectedNodeIds.length;i++)
- {
- propertyTable.put(ActionInputs.NODEID,selectedNodeIds[i]);
- if (action.verifyNodeData())
- action.run();
- else
- {
- int nodeId = Integer.parseInt(selectedNodeIds[i]);
- staleNodes_.addElement(navigatorManager.getNode(nodeId));
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NODE_DATA_VALIDATION_FAILED",navigatorManager.getNode(nodeId).getNodeName()));
- }
- }
- navigatorManager.setSelectedNodeId(collectorNodeId);
- return true;
- }
-
- public final Vector getStaleNodes()
- {
- return staleNodes_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessUUIDAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessUUIDAction.java
deleted file mode 100644
index 79317283a..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessUUIDAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindBusinessUUIDAction extends FindAction
-{
- public RegFindBusinessUUIDAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES,String.valueOf(UDDIActionInputs.QUERY_STYLE_UUID));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_KEY);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,uuidKey);
-
- if (!subQueryInitiated_ && !Validator.validateString(uuidKey))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_UUID_KEY"));
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
-
- // The action can be run under the context of either a registry or a query node or even UDDIMainNode.
- if (regNode_ == null)
- regNode_ = getRegistryNode((Node)propertyTable_.get(UDDIActionInputs.REFRESH_NODE));
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- BusinessEntity[] beList = new BusinessEntity[1];
- Vector beVector = proxy.get_businessDetail(uuidKey).getBusinessEntityVector();
- if (beVector.size() > 0)
- {
- beVector.toArray(beList);
- if (shouldAddQueryNode)
- {
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(beList,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESSES_FOUND",String.valueOf(beList.length)));
- }
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,beList[0]);
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_BUSINESSES_FOUND"));
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesAdvancedAction.java
deleted file mode 100644
index 51a575796..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesAdvancedAction.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.BusinessInfo;
-import org.uddi4j.response.BusinessInfos;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.DiscoveryURL;
-import org.uddi4j.util.DiscoveryURLs;
-import org.uddi4j.util.FindQualifier;
-import org.uddi4j.util.FindQualifiers;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-import org.uddi4j.util.TModelBag;
-
-public class RegFindBusinessesAdvancedAction extends FindAction
-{
- public RegFindBusinessesAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET,String.valueOf(UDDIActionInputs.QUERY_MAX_SEARCH_SET));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS,String.valueOf(UDDIActionInputs.QUERY_MAX_RESULTS));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String ownedChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_OWNED);
- String[] languages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
- String[] siNodeIds = parser.getParameterValues(UDDIActionInputs.NODEID_SERVICE_INTERFACE);
- String[] discoveryURLValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DISCOVERYURL);
- String[] findQualifierValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_FINDQUALIFIER);
- String maxSearchSet = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_SEARCH_SET);
- String maxResults = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_RESULTS);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- getSelectedNavigatorNode();
- getRegistryNode();
- regNode_.getTreeElement();
-
- if (ownedChecked != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_OWNED,ownedChecked);
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_OWNED);
-
- if (languages != null && names != null)
- {
- Vector nameVector = new Vector();
- for (int i=0;i<names.length;i++)
- {
- Name uddi4jName;
- if (languages[i].length() > 0)
- uddi4jName = new Name(names[i],languages[i]);
- else
- uddi4jName = new Name(names[i]);
- nameVector.addElement(uddi4jName);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,nameVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
-
- if (idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- IdentifierBag idBag = new IdentifierBag();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- idBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS,idBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
-
- if (siNodeIds != null)
- {
- // Although we already have the "submitted" data, deletions occur on the client side and thus the need to track this using hidden form elements.
- Vector busServiceInterfaces = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES);
- if (busServiceInterfaces == null)
- busServiceInterfaces = new Vector();
- else
- busServiceInterfaces.removeAllElements();
- Vector busServiceInterfacesCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES_COPY);
- Vector tModelKeyStringVector = new Vector();
- Hashtable resultHash = new Hashtable();
- for (int i=0;i<siNodeIds.length;i++)
- resultHash.put(siNodeIds[i],Boolean.TRUE);
- for (int i=0;i<busServiceInterfacesCopy.size();i++)
- {
- ListElement listElement = (ListElement)busServiceInterfacesCopy.elementAt(i);
- if (resultHash.get(String.valueOf(listElement.getTargetNodeId())) != null)
- {
- busServiceInterfaces.addElement(listElement);
- TModel tModel = (TModel)listElement.getObject();
- tModelKeyStringVector.addElement(tModel.getTModelKey());
- }
- }
- TModelBag tModelBag = new TModelBag(tModelKeyStringVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES,busServiceInterfaces);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_TMODELBAG,tModelBag);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_TMODELBAG);
- }
-
- if (discoveryURLValues != null)
- {
- DiscoveryURLs discoveryURLs = new DiscoveryURLs();
- Vector discoveryURLVector = new Vector();
- for (int i=0;i<discoveryURLValues.length;i++)
- {
- DiscoveryURL discoveryURL = new DiscoveryURL(discoveryURLValues[i],"");
- discoveryURLVector.addElement(discoveryURL);
- }
- discoveryURLs.setDiscoveryURLVector(discoveryURLVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,discoveryURLs);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
-
- if (findQualifierValues != null)
- {
- FindQualifiers findQualifiers = new FindQualifiers();
- Vector findQualifierVector = new Vector();
- for (int i=0;i<findQualifierValues.length;i++)
- {
- FindQualifier findQualifier = new FindQualifier(findQualifierValues[i]);
- findQualifierVector.addElement(findQualifier);
- }
- findQualifiers.setFindQualifierVector(findQualifierVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_FINDQUALIFIERS,findQualifiers);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_FINDQUALIFIERS);
-
- if (maxSearchSet != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET,maxSearchSet);
- if (!subQueryInitiated_ && !Validator.validateInteger(maxSearchSet))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_SEARCH_SET"));
- inputsValid = false;
- }
-
- if (maxResults != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS,maxResults);
- if (!subQueryInitiated_ && !Validator.validateInteger(maxResults))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_RESULTS"));
- inputsValid = false;
- }
- return inputsValid;
- }
-
- private DiscoveryURLs dupDiscoveryURLs(DiscoveryURLs discoveryURLs, String useType, String dupUseType) {
- if (discoveryURLs == null)
- return discoveryURLs;
- Vector discoveryURLVector = discoveryURLs.getDiscoveryURLVector();
- if (discoveryURLVector == null)
- return discoveryURLs;
- Vector newDiscoveryURLVector = new Vector(discoveryURLVector);
- Enumeration e = discoveryURLVector.elements();
- while (e.hasMoreElements()) {
- DiscoveryURL discoveryURL = (DiscoveryURL)e.nextElement();
- if (discoveryURL.getUseType().equals(useType)) {
- newDiscoveryURLVector.add(new DiscoveryURL(discoveryURL.getText(), dupUseType));
- }
- }
- DiscoveryURLs newDiscoveryURLs = new DiscoveryURLs();
- newDiscoveryURLs.setDiscoveryURLVector(newDiscoveryURLVector);
- return newDiscoveryURLs;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- FindQualifiers findQualifiers = (FindQualifiers)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_FINDQUALIFIERS);
- Vector nameVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- DiscoveryURLs discoveryURLs = (DiscoveryURLs)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
- IdentifierBag identifierBag = (IdentifierBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
- TModelBag tModelBag = (TModelBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_TMODELBAG);
- boolean owned = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_OWNED) != null);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- int maxSearchSet = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET));
- int maxResults = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS));
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (owned && !regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- UDDIProxy proxy = regElement.getProxy();
-
- BusinessInfos busInfos = null;
- if (owned)
- busInfos = proxy.get_registeredInfo(regElement.getAuthInfoString()).getBusinessInfos();
- else
- busInfos = proxy.find_business(nameVector, dupDiscoveryURLs(discoveryURLs,"",UDDIActionInputs.DISCOVERY_URL_TYPE), identifierBag, categoryBag, tModelBag, findQualifiers, maxSearchSet).getBusinessInfos();
-
- int finalNumberOfBusinessEntities = Math.min(maxResults, busInfos.size());
- Vector businessKeys = new Vector();
- for (int i = 0; i < finalNumberOfBusinessEntities; i++)
- {
- BusinessInfo busInfo = (BusinessInfo)busInfos.get(i);
- businessKeys.addElement(busInfo.getBusinessKey());
- }
-
- if (finalNumberOfBusinessEntities > 0)
- {
- if (shouldAddQueryNode)
- {
- Vector beVector = proxy.get_businessDetail(businessKeys).getBusinessEntityVector();
- BusinessEntity[] beList = new BusinessEntity[beVector.size()];
- beVector.toArray(beList);
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(beList,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESSES_FOUND",String.valueOf(beList.length)));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_BUSINESSES_FOUND"));
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesSimpleAction.java
deleted file mode 100644
index 9a304ca76..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindBusinessesSimpleAction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.response.BusinessInfo;
-import org.uddi4j.response.BusinessInfos;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindBusinessesSimpleAction extends FindAction
-{
- public RegFindBusinessesSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME);
-
- // Validate the data.
- boolean inputsValid = true;
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME,name);
- else
- {
- // This shouldn't occur.
- inputsValid = false;
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME);
- Vector nameVector = new Vector();
- nameVector.addElement(new Name(name));
-
- // The action can be run under the context of either a registry or a query node.
- getSelectedNavigatorNode();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
-
- BusinessInfos busInfos = proxy.find_business(nameVector, null, null, null, null, null, UDDIActionInputs.QUERY_MAX_SEARCH_SET).getBusinessInfos();
- int finalNumberOfBusinessEntities = Math.min(UDDIActionInputs.QUERY_MAX_RESULTS, busInfos.size());
- Vector businessKeys = new Vector();
- for (int i = 0; i < finalNumberOfBusinessEntities; i++)
- {
- BusinessInfo busInfo = busInfos.get(i);
- businessKeys.addElement(busInfo.getBusinessKey());
- }
-
- if (finalNumberOfBusinessEntities > 0)
- {
- if (shouldAddQueryNode)
- {
- Vector beVector = proxy.get_businessDetail(businessKeys).getBusinessEntityVector();
- BusinessEntity[] beList = new BusinessEntity[beVector.size()];
- beVector.toArray(beList);
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(beList,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESSES_FOUND",String.valueOf(beList.length)));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_BUSINESSES_FOUND"));
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfaceUUIDAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfaceUUIDAction.java
deleted file mode 100644
index 1b5bd43cc..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfaceUUIDAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindServiceInterfaceUUIDAction extends FindAction
-{
- public RegFindServiceInterfaceUUIDAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,String.valueOf(UDDIActionInputs.QUERY_STYLE_UUID));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_KEY);
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,uuidKey);
-
- if (!subQueryInitiated_ && !Validator.validateString(uuidKey))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_UUID_KEY"));
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY);
-
- // The action can be run under the context of either a registry or a query node or even UDDIMainNode.
- if (regNode_ == null)
- regNode_ = getRegistryNode((Node)propertyTable_.get(UDDIActionInputs.REFRESH_NODE));
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- TModelDetail tModelDetail = proxy.get_tModelDetail(uuidKey);
- Vector tModelVector = tModelDetail.getTModelVector();
- if (tModelVector.size() > 0)
- {
- TModel tModel = (TModel)tModelVector.elementAt(0);
- if (shouldAddQueryNode)
- {
- TModel[] tModelArray = new TModel[1];
- tModelArray[0] = tModel;
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(tModelArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACES_FOUND",String.valueOf(tModelArray.length)));
- }
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,tModel);
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICE_INTERFACES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesAdvancedAction.java
deleted file mode 100644
index 371fd84ec..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesAdvancedAction.java
+++ /dev/null
@@ -1,378 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.binding.BindingTemplate;
-import org.uddi4j.datatype.binding.BindingTemplates;
-import org.uddi4j.datatype.binding.TModelInstanceDetails;
-import org.uddi4j.datatype.binding.TModelInstanceInfo;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.RegisteredInfo;
-import org.uddi4j.response.Result;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.response.TModelInfo;
-import org.uddi4j.response.TModelInfos;
-import org.uddi4j.response.TModelList;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.FindQualifier;
-import org.uddi4j.util.FindQualifiers;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-
-public class RegFindServiceInterfacesAdvancedAction extends FindAction
-{
- public RegFindServiceInterfacesAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET,String.valueOf(UDDIActionInputs.QUERY_MAX_SEARCH_SET));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS,String.valueOf(UDDIActionInputs.QUERY_MAX_RESULTS));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String useServiceChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE);
- String[] serviceNodeIds = parser.getParameterValues(UDDIActionInputs.NODEID_SERVICE);
- String ownedChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_OWNED);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
- String[] findQualifierValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_FINDQUALIFIER);
- String maxSearchSet = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_SEARCH_SET);
- String maxResults = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_RESULTS);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- regNode_.getTreeElement();
-
- if (useServiceChecked != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE,useServiceChecked);
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE);
-
- if (serviceNodeIds != null)
- {
- // Although we already have the "submitted" data, deletions occur on the client side and thus the need to track this using hidden form elements.
- Vector siService = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE);
- if (siService == null)
- siService = new Vector();
- else
- siService.removeAllElements();
- Vector siServiceCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE_COPY);
- // The browser will enforce the rule of having only one service in this list.
- ListElement listElement = (ListElement)siServiceCopy.elementAt(0);
- siService.addElement(listElement);
- BusinessService bs = (BusinessService)listElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE,siService);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_BUSINESS_SERVICE,bs);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_BUSINESS_SERVICE);
- if (!subQueryInitiated_ && useServiceChecked != null)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_SERVICE"));
- }
- }
-
- if (ownedChecked != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_OWNED,ownedChecked);
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_OWNED);
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,name);
-
- if (idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- IdentifierBag idBag = new IdentifierBag();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- idBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS,idBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
-
- if (findQualifierValues != null)
- {
- FindQualifiers findQualifiers = new FindQualifiers();
- Vector findQualifierVector = new Vector();
- for (int i=0;i<findQualifierValues.length;i++)
- {
- FindQualifier findQualifier = new FindQualifier(findQualifierValues[i]);
- findQualifierVector.addElement(findQualifier);
- }
- findQualifiers.setFindQualifierVector(findQualifierVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_FINDQUALIFIERS,findQualifiers);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_FINDQUALIFIERS);
-
- if (maxSearchSet != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_SEARCH_SET,maxSearchSet);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET,maxSearchSet);
- }
- if (!subQueryInitiated_ && !Validator.validateInteger(maxSearchSet))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_SEARCH_SET"));
- inputsValid = false;
- }
-
- if (maxResults != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_RESULTS,maxResults);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS,maxResults);
- }
- if (!subQueryInitiated_ && !Validator.validateInteger(maxResults))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_RESULTS"));
- inputsValid = false;
- }
- return inputsValid;
- }
-
- public final boolean overrideAuthenticationValidation()
- {
- return (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE) != null);
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- boolean useService = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE) != null);
- BusinessService bs = (BusinessService)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_BUSINESS_SERVICE);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- FindQualifiers findQualifiers = (FindQualifiers)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_FINDQUALIFIERS);
- IdentifierBag identifierBag = (IdentifierBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
- boolean owned = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_OWNED) != null);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- int maxSearchSet = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET));
- int maxResults = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS));
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- Vector tModelKeyVector = new Vector();
-
- if (owned)
- {
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- tModelKeyVector = findAllOwnedTModels(proxy, regElement.getAuthInfoString(), maxResults);
- }
- if (useService)
- {
- BindingTemplates bindingTemplates = bs.getBindingTemplates();
- boolean endSearch = false;
- if (bindingTemplates != null)
- {
- for (int i=0;i<bindingTemplates.size();i++)
- {
- BindingTemplate bt = bindingTemplates.get(i);
- TModelInstanceDetails tModelInstanceDetails = bt.getTModelInstanceDetails();
- for (int j=0;j<tModelInstanceDetails.size();j++)
- {
- TModelInstanceInfo tModelInstanceInfo = tModelInstanceDetails.get(j);
- if (tModelKeyVector.size() < maxResults)
- tModelKeyVector.addElement(tModelInstanceInfo.getTModelKey());
- else
- {
- endSearch = true;
- break;
- }
- }
- if (endSearch)
- break;
- }
- }
- }
- else
- {
- TModelList tModelList = proxy.find_tModel(name,categoryBag,identifierBag,findQualifiers,maxSearchSet);
- TModelInfos tModelInfos = tModelList.getTModelInfos();
- for (int i=0;i<tModelInfos.size();i++)
- {
- TModelInfo tModelInfo = tModelInfos.get(i);
- if (tModelKeyVector.size() < maxResults)
- tModelKeyVector.addElement(tModelInfo.getTModelKey());
- else
- break;
- }
- }
-
- int finalNumberOfTModelKeys = tModelKeyVector.size();
- if (finalNumberOfTModelKeys > 0)
- {
- if (shouldAddQueryNode)
- {
- Vector finalTModelVector = new Vector();
- int currentIndex = 0;
- int windowSize = finalNumberOfTModelKeys;
- while (currentIndex < tModelKeyVector.size())
- {
- int subListToIndex = Math.min(currentIndex+windowSize,tModelKeyVector.size());
- try
- {
- TModelDetail tModelDetail = proxy.get_tModelDetail(new Vector(tModelKeyVector.subList(currentIndex,subListToIndex)));
- Vector tModelVector = tModelDetail.getTModelVector();
- for (int i=0;i<tModelVector.size();i++)
- finalTModelVector.addElement(tModelVector.elementAt(i));
- if (tModelDetail.getTruncatedBoolean())
- windowSize = tModelVector.size();
- currentIndex += windowSize;
- }
- catch (UDDIException e)
- {
- DispositionReport dr = e.getDispositionReport();
- if (((Result) dr.getResultVector().get(0)).getErrInfo().getErrCode() == DispositionReport.E_invalidKeyPassed)
- {
- String errInfoText = ((Result) dr.getResultVector().get(0)).getErrInfo().getText();
- for (int i=currentIndex;i<subListToIndex;i++)
- {
- String tModelKey = (String)tModelKeyVector.elementAt(i);
- if (errInfoText.indexOf(tModelKey) != -1 || errInfoText.indexOf(tModelKey.toUpperCase()) != -1 || errInfoText.indexOf(tModelKey.toLowerCase()) != -1)
- {
- tModelKeyVector.removeElementAt(i);
- break;
- }
- }
- }
- else
- throw e;
- }
- catch (TransportException e)
- {
- throw e;
- }
- }
-
- int finalNumberOfTModels = finalTModelVector.size();
- if (finalNumberOfTModels > 0)
- {
- TModel[] tModelArray = new TModel[finalNumberOfTModels];
- finalTModelVector.toArray(tModelArray);
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(tModelArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACES_FOUND",String.valueOf(tModelArray.length)));
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICE_INTERFACES_FOUND"));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICE_INTERFACES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-
- // Copied directly from UDDIWSDLProxy's findAllServiceInterfaces() method with minor modifications. The hardcoded strings should NOT be translated.
- private final Vector findAllOwnedTModels(UDDIProxy proxy, String authInfoString, int maxResults) throws UDDIException, TransportException
- {
- RegisteredInfo registeredInfo = null;
-
- // Get the complete list of owned (registered) info.
- // (A RegisteredInfo consists of BusinessInfos and TModelInfos.
- // BusinessInfos also contain ServiceInfos.)
- registeredInfo = proxy.get_registeredInfo(authInfoString);
-
- //Create a Vector to add the TModelKeys from the registeredInfo.
- Vector tModelKeyList = new Vector();
-
- //Get the TModelInfos from the registeredInfo.
- TModelInfos tModelInfos = registeredInfo.getTModelInfos();
-
- //Get all the TModelKeys from within the TModelInfos
- for (int i = 0; i < tModelInfos.size(); i++)
- {
- TModelInfo tModelInfo = tModelInfos.get(i);
- if (tModelKeyList.size() < maxResults)
- tModelKeyList.addElement(tModelInfo.getTModelKey());
- else
- break;
- }
- return tModelKeyList;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesSimpleAction.java
deleted file mode 100644
index 88bfed51a..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceInterfacesSimpleAction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.response.TModelInfo;
-import org.uddi4j.response.TModelInfos;
-import org.uddi4j.response.TModelList;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindServiceInterfacesSimpleAction extends FindAction
-{
- public RegFindServiceInterfacesSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- uddiPerspective.getMessageQueue();
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME,name);
- else
- {
- // This should never occur.
- inputsValid = false;
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME);
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- TModelList tModelList = proxy.find_tModel(name,null,null,null,UDDIActionInputs.QUERY_MAX_SEARCH_SET);
- TModelInfos tModelInfos = tModelList.getTModelInfos();
- Vector tModelKeyVector = new Vector();
-
- for (int i=0;i<tModelInfos.size();i++)
- {
- TModelInfo tModelInfo = tModelInfos.get(i);
- if (tModelKeyVector.size() < UDDIActionInputs.QUERY_MAX_RESULTS)
- tModelKeyVector.addElement(tModelInfo.getTModelKey());
- else
- break;
- }
-
- if (tModelKeyVector.size() > 0)
- {
- if (shouldAddQueryNode)
- {
- TModelDetail tModelDetail = proxy.get_tModelDetail(tModelKeyVector);
- Vector tModelVector = tModelDetail.getTModelVector();
- TModel[] tModelArray = new TModel[tModelVector.size()];
- tModelVector.toArray(tModelArray);
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(tModelArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACES_FOUND",String.valueOf(tModelArray.length)));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICE_INTERFACES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceUUIDAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceUUIDAction.java
deleted file mode 100644
index 75ea5d17f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServiceUUIDAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.response.ServiceDetail;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindServiceUUIDAction extends FindAction
-{
- public RegFindServiceUUIDAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_UUID));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_KEY);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,uuidKey);
-
- if (!subQueryInitiated_ && !Validator.validateString(uuidKey))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_UUID_KEY"));
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY);
-
- // The action can be run under the context of either a registry or a query node or even UDDIMainNode.
- if (regNode_ == null)
- regNode_ = getRegistryNode((Node)propertyTable_.get(UDDIActionInputs.REFRESH_NODE));
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- BusinessService[] bsArray = new BusinessService[1];
- ServiceDetail serviceDetail = proxy.get_serviceDetail(uuidKey);
- Vector bsVector = serviceDetail.getBusinessServiceVector();
- if (bsVector.size() > 0)
- {
- bsVector.toArray(bsArray);
- if (shouldAddQueryNode)
- {
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(bsArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICES_FOUND",String.valueOf(bsArray.length)));
- }
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,bsArray[0]);
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesAdvancedAction.java
deleted file mode 100644
index 9b6d2c560..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesAdvancedAction.java
+++ /dev/null
@@ -1,392 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.BusinessInfo;
-import org.uddi4j.response.BusinessInfos;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.RegisteredInfo;
-import org.uddi4j.response.Result;
-import org.uddi4j.response.ServiceDetail;
-import org.uddi4j.response.ServiceInfo;
-import org.uddi4j.response.ServiceInfos;
-import org.uddi4j.response.ServiceList;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.FindQualifier;
-import org.uddi4j.util.FindQualifiers;
-import org.uddi4j.util.KeyedReference;
-import org.uddi4j.util.TModelBag;
-
-public class RegFindServicesAdvancedAction extends FindAction
-{
- public RegFindServicesAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET,String.valueOf(UDDIActionInputs.QUERY_MAX_SEARCH_SET));
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS,String.valueOf(UDDIActionInputs.QUERY_MAX_RESULTS));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String ownedChecked = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_OWNED);
- String[] busNodeIds = parser.getParameterValues(UDDIActionInputs.NODEID_BUSINESS);
- String[] languages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
- String[] siNodeIds = parser.getParameterValues(UDDIActionInputs.NODEID_SERVICE_INTERFACE);
- String[] findQualifierValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_FINDQUALIFIER);
- String maxSearchSet = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_SEARCH_SET);
- String maxResults = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_RESULTS);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- regNode_.getTreeElement();
-
- if (ownedChecked != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_OWNED,ownedChecked);
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_OWNED);
-
- if (busNodeIds != null)
- {
- // Although we already have the "submitted" data, deletions occur on the client side and thus the need to track this using hidden form elements.
- Vector serviceBusiness = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS);
- if (serviceBusiness == null)
- serviceBusiness = new Vector();
- else
- serviceBusiness.removeAllElements();
- Vector serviceBusinessCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS_COPY);
- // The browser will enforce the rule of having only one business in this list.
- ListElement listElement = (ListElement)serviceBusinessCopy.elementAt(0);
- serviceBusiness.addElement(listElement);
- BusinessEntity sp = (BusinessEntity)listElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS,serviceBusiness);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER,sp);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER);
- }
-
- if (languages != null && names != null)
- {
- Vector nameVector = new Vector();
- for (int i=0;i<names.length;i++)
- {
- Name uddi4jName;
- if (languages[i].length() > 0)
- uddi4jName = new Name(names[i],languages[i]);
- else
- uddi4jName = new Name(names[i]);
- nameVector.addElement(uddi4jName);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,nameVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- if (siNodeIds != null)
- {
- // Although we already have the "submitted" data, deletions occur on the client side and thus the need to track this using hidden form elements.
- Vector serviceServiceInterfaces = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES);
- if (serviceServiceInterfaces == null)
- serviceServiceInterfaces = new Vector();
- else
- serviceServiceInterfaces.removeAllElements();
- Vector serviceServiceInterfacesCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES_COPY);
- Vector tModelKeyStringVector = new Vector();
- Hashtable resultHash = new Hashtable();
- for (int i=0;i<siNodeIds.length;i++)
- resultHash.put(siNodeIds[i],Boolean.TRUE);
- for (int i=0;i<serviceServiceInterfacesCopy.size();i++)
- {
- ListElement listElement = (ListElement)serviceServiceInterfacesCopy.elementAt(i);
- if (resultHash.get(String.valueOf(listElement.getTargetNodeId())) != null)
- {
- serviceServiceInterfaces.addElement(listElement);
- TModel tModel = (TModel)listElement.getObject();
- tModelKeyStringVector.addElement(tModel.getTModelKey());
- }
- }
- TModelBag tModelBag = new TModelBag(tModelKeyStringVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES,serviceServiceInterfaces);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODELBAG,tModelBag);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODELBAG);
- }
-
- if (findQualifierValues != null)
- {
- FindQualifiers findQualifiers = new FindQualifiers();
- Vector findQualifierVector = new Vector();
- for (int i=0;i<findQualifierValues.length;i++)
- {
- FindQualifier findQualifier = new FindQualifier(findQualifierValues[i]);
- findQualifierVector.addElement(findQualifier);
- }
- findQualifiers.setFindQualifierVector(findQualifierVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_FINDQUALIFIERS,findQualifiers);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_FINDQUALIFIERS);
-
- if (maxSearchSet != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_SEARCH_SET,maxSearchSet);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET,maxSearchSet);
- }
- if (!subQueryInitiated_ && !Validator.validateInteger(maxSearchSet))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_SEARCH_SET"));
- inputsValid = false;
- }
-
- if (maxResults != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_MAX_RESULTS,maxResults);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS,maxResults);
- }
- if (!subQueryInitiated_ && !Validator.validateInteger(maxResults))
- {
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_MAX_RESULTS"));
- inputsValid = false;
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- FindQualifiers findQualifiers = (FindQualifiers)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_FINDQUALIFIERS);
- BusinessEntity sp = (BusinessEntity)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER);
- Vector nameVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
- TModelBag tModelBag = (TModelBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODELBAG);
- boolean owned = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_OWNED) != null);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- int maxSearchSet = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET));
- int maxResults = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS));
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (owned && !regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- UDDIProxy proxy = regElement.getProxy();
- String businessKey;
- if (sp != null)
- businessKey = sp.getBusinessKey();
- else
- businessKey = "";
-
- int finalNumberOfServiceKeys;
- Vector serviceKeyVector;
- if (owned)
- {
- serviceKeyVector = findAllOwnedServices(proxy,regElement.getAuthInfoString(),businessKey,maxResults);
- finalNumberOfServiceKeys = serviceKeyVector.size();
- }
- else
- {
- ServiceList serviceList = proxy.find_service(businessKey,nameVector,categoryBag,tModelBag,findQualifiers,maxSearchSet);
- ServiceInfos sInfos = serviceList.getServiceInfos();
- finalNumberOfServiceKeys = Math.min(maxResults,sInfos.size());
- serviceKeyVector = new Vector();
- for (int i=0;i<finalNumberOfServiceKeys;i++)
- {
- ServiceInfo sInfo = sInfos.get(i);
- serviceKeyVector.addElement(sInfo.getServiceKey());
- }
- }
-
- if (finalNumberOfServiceKeys > 0)
- {
- if (shouldAddQueryNode)
- {
- Vector finalBusServiceVector = new Vector();
- int currentIndex = 0;
- int windowSize = finalNumberOfServiceKeys;
- while (currentIndex < serviceKeyVector.size())
- {
- int subListToIndex = Math.min(currentIndex+windowSize,serviceKeyVector.size());
- try
- {
- ServiceDetail serviceDetail = proxy.get_serviceDetail(new Vector(serviceKeyVector.subList(currentIndex,subListToIndex)));
- Vector busServiceVector = serviceDetail.getBusinessServiceVector();
- for (int i=0;i<busServiceVector.size();i++)
- finalBusServiceVector.addElement(busServiceVector.elementAt(i));
- if (serviceDetail.getTruncatedBoolean())
- windowSize = busServiceVector.size();
- currentIndex += windowSize;
- }
- catch (UDDIException e)
- {
- DispositionReport dr = e.getDispositionReport();
- if (((Result) dr.getResultVector().get(0)).getErrInfo().getErrCode() == DispositionReport.E_invalidKeyPassed)
- {
- String errInfoText = ((Result) dr.getResultVector().get(0)).getErrInfo().getText();
- for (int i=currentIndex;i<subListToIndex;i++)
- {
- String serviceKey = (String)serviceKeyVector.elementAt(i);
- if (errInfoText.indexOf(serviceKey) != -1 || errInfoText.indexOf(serviceKey.toUpperCase()) != -1 || errInfoText.indexOf(serviceKey.toLowerCase()) != -1)
- {
- serviceKeyVector.removeElementAt(i);
- break;
- }
- }
- }
- else
- throw e;
- }
- catch (TransportException e)
- {
- throw e;
- }
- }
-
- int finalNumberOfBusinessServices = finalBusServiceVector.size();
- if (finalNumberOfBusinessServices > 0)
- {
- BusinessService[] bsArray = new BusinessService[finalNumberOfBusinessServices];
- finalBusServiceVector.toArray(bsArray);
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- queryElement_ = new QueryElement(bsArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICES_FOUND",String.valueOf(bsArray.length)));
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICES_FOUND"));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- }
- return false;
- }
-
- // Copied directly from UDDIWSDLProxy's findAllOwnedServices() method with minor modifications. The hardcoded strings should NOT be translated.
- private final Vector findAllOwnedServices(UDDIProxy proxy,String authInfoString,String businessKey,int maxResults) throws UDDIException, TransportException
- {
- RegisteredInfo registeredInfo = null;
-
- // Get the complete list of owned (registered) info.
- // (A RegisteredInfo consists of BusinessInfos and TModelInfos.
- // BusinessInfos also contain ServiceInfos.)
- registeredInfo = proxy.get_registeredInfo(authInfoString);
-
- //Create a vector to add the serviceKeys from the registeredInfo to.
- Vector serviceKeyList = new Vector();
-
- //Get the businessInfos from the registeredInfo.
- BusinessInfos businessInfos = registeredInfo.getBusinessInfos();
-
- //Get all the serviceKeys from the serviceInfos within the businessInfos,
- //and add them to the serviceKeyList.
- boolean endSearch = false;
- for (int i = 0; i < businessInfos.size(); i++)
- {
- BusinessInfo businessInfo = businessInfos.get(i);
- String currentBusinessKey = businessInfo.getBusinessKey();
- if (businessKey.length() > 0 && currentBusinessKey.equals(businessKey))
- endSearch = true;
- ServiceInfos serviceInfos = businessInfo.getServiceInfos();
- for (int j = 0; j < serviceInfos.size(); j++)
- {
- ServiceInfo serviceInfo = serviceInfos.get(j);
- if (serviceInfo.getBusinessKey().equals(currentBusinessKey))
- {
- if (serviceKeyList.size() < maxResults)
- serviceKeyList.add(serviceInfo.getServiceKey());
- else
- {
- endSearch = true;
- break;
- }
- }
- }
- if (endSearch)
- break;
- }
- return serviceKeyList;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesSimpleAction.java
deleted file mode 100644
index d857541ed..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegFindServicesSimpleAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormInputException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.response.ServiceDetail;
-import org.uddi4j.response.ServiceInfo;
-import org.uddi4j.response.ServiceInfos;
-import org.uddi4j.response.ServiceList;
-import org.uddi4j.transport.TransportException;
-
-public class RegFindServicesSimpleAction extends FindAction
-{
- public RegFindServicesSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME);
-
- // Validate the data.
- boolean inputsValid = true;
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME,name);
- else
- {
- // This shouldn't occur.
- inputsValid = false;
- }
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- boolean shouldAddQueryNode = (propertyTable_.get(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE) == null);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME);
- Vector nameVector = new Vector();
- nameVector.addElement(new Name(name));
-
- // The action can be run under the context of either a registry or a query node.
- getSelectedNavigatorNode();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- ServiceList serviceList = proxy.find_service("",nameVector,null,null,null,UDDIActionInputs.QUERY_MAX_SEARCH_SET);
-
- ServiceInfos sInfos = serviceList.getServiceInfos();
- int finalNumberOfBusinessServices = Math.min(UDDIActionInputs.QUERY_MAX_RESULTS,sInfos.size());
- Vector serviceKeyVector = new Vector();
- for (int i=0;i<finalNumberOfBusinessServices;i++)
- {
- ServiceInfo sInfo = sInfos.get(i);
- serviceKeyVector.addElement(sInfo.getServiceKey());
- }
-
- if (finalNumberOfBusinessServices > 0)
- {
- if (shouldAddQueryNode)
- {
- ServiceDetail serviceDetail = proxy.get_serviceDetail(serviceKeyVector);
- Vector businessServiceVector = serviceDetail.getBusinessServiceVector();
- String queryName = (String)propertyTable_.get(UDDIActionInputs.QUERY_NAME);
- BusinessService[] bsArray = new BusinessService[finalNumberOfBusinessServices];
- businessServiceVector.toArray(bsArray);
- queryElement_ = new QueryElement(bsArray,queryName,regElement.getModel());
- addQueryNode();
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICES_FOUND",String.valueOf(bsArray.length)));
- }
- return true;
- }
- else
- throw new FormInputException(uddiPerspective.getMessage("MSG_ERROR_NO_SERVICES_FOUND"));
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (FormInputException e)
- {
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessAdvancedAction.java
deleted file mode 100644
index e340ccd22..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessAdvancedAction.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.DiscoveryURL;
-import org.uddi4j.util.DiscoveryURLs;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-
-public class RegPublishBusinessAdvancedAction extends PublishAction
-{
- public RegPublishBusinessAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String[] nameLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
- String[] discoveryURLValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DISCOVERYURL);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- Hashtable languageHash = new Hashtable();
- if (nameLanguages != null && names != null)
- {
- Vector nameVector = new Vector();
- // UDDI's save API (Appendix C of the UDDI V2 Programmers API Specification) requires the following:
- // 1) Only the first row can have a blank language.
- // 2) Only 1 name per language.
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_NAME");
- for (int i=0;i<names.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Name uddi4jName;
- if (nameLanguages[i].length() > 0)
- uddi4jName = new Name(names[i],nameLanguages[i]);
- else
- {
- uddi4jName = new Name(names[i]);
- if (i != 0 && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(nameLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(nameLanguages[i],Boolean.TRUE);
- if (names[i].trim().length() < 1)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- nameVector.addElement(uddi4jName);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,nameVector);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- if (!subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NO_NAMES"));
- }
- }
-
- if (descriptionLanguages != null && descriptions != null)
- {
- Vector descriptionVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0 && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (descriptions[i].trim().length() < 1)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- descriptionVector.addElement(uddi4jDescription);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,descriptionVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS);
-
- if (idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- IdentifierBag idBag = new IdentifierBag();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- idBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS,idBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
-
- if (discoveryURLValues != null)
- {
- DiscoveryURLs discoveryURLs = new DiscoveryURLs();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DISCOVERYURL");
- for (int i=0;i<discoveryURLValues.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- if (!subQueryInitiated_ && !Validator.validateURL(discoveryURLValues[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- discoveryURLs.add(new DiscoveryURL(discoveryURLValues[i],""));
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,discoveryURLs);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
-
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- Vector nameVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- Vector descriptionVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS);
- IdentifierBag identifierBag = (IdentifierBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
- DiscoveryURLs discoveryURLs = (DiscoveryURLs)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
-
- BusinessEntity be = new BusinessEntity();
- be.setBusinessKey("");
- be.setNameVector(nameVector);
- be.setDescriptionVector(descriptionVector);
- be.setIdentifierBag(identifierBag);
- be.setCategoryBag(categoryBag);
- be.setDiscoveryURLs(discoveryURLs);
- Vector beVector = new Vector();
- beVector.add(be);
-
- be = (BusinessEntity)proxy.save_business(regElement.getAuthInfoString(), beVector).getBusinessEntityVector().get(0);
- addPublishedItemNode(be,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESS_PUBLISHED",be.getDefaultNameString()));
- return true;
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessSimpleAction.java
deleted file mode 100644
index e2199b7e7..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishBusinessSimpleAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.transport.TransportException;
-
-public class RegPublishBusinessSimpleAction extends PublishAction
-{
- public RegPublishBusinessSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_BUSINESSES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME);
- String description = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_DESCRIPTION);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME,name);
-
- if (!subQueryInitiated_ && !Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
-
- if (description != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_DESCRIPTION,description);
-
- return inputsValid;
- }
-
- public final boolean run()
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME);
- String description = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_DESCRIPTION);
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- try
- {
- UDDIProxy proxy = regElement.getProxy();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- BusinessEntity be = new BusinessEntity();
- be.setBusinessKey("");
- be.setDefaultName(new Name(name));
- be.setDefaultDescriptionString(description);
- Vector beVector = new Vector();
- beVector.add(be);
-
- be = (BusinessEntity)proxy.save_business(regElement.getAuthInfoString(), beVector).getBusinessEntityVector().get(0);
- addPublishedItemNode(be,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESS_PUBLISHED",be.getDefaultNameString()));
- return true;
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceAdvancedAction.java
deleted file mode 100644
index 2d241f625..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceAdvancedAction.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
- * 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.KeyedReference;
-
-public class RegPublishServiceAdvancedAction extends PublishAction
-{
- public RegPublishServiceAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String busNodeIds = parser.getParameter(UDDIActionInputs.NODEID_BUSINESS);
- String[] serIntIds = parser.getParameterValues(UDDIActionInputs.NODEID_SERVICE_INTERFACE);
- String wsdlURL = parser.getParameter(ActionInputs.QUERY_INPUT_WSDL_URL);
- String[] nameLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (busNodeIds != null)
- {
- Vector serviceBusiness = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS);
- if (serviceBusiness == null)
- serviceBusiness = new Vector();
- else
- serviceBusiness.removeAllElements();
- Vector serviceBusinessCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS_COPY);
- // The browser will enforce the rule of having only one business in this list.
- ListElement listElement = (ListElement)serviceBusinessCopy.elementAt(0);
- serviceBusiness.addElement(listElement);
- BusinessEntity sp = (BusinessEntity)listElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS,serviceBusiness);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER,sp);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,sp.getBusinessKey());
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER);
- if (!subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_BUSINESS"));
- }
- }
-
- if (serIntIds != null && serIntIds.length > 0)
- {
- Vector serviceInterfaces = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES);
- if (serviceInterfaces == null)
- serviceInterfaces = new Vector();
- else
- serviceInterfaces.removeAllElements();
- Vector serviceInterfacesCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES_COPY);
- Vector tmodels = new Vector();
- for (Iterator it = serviceInterfacesCopy.iterator(); it.hasNext();)
- {
- ListElement listElement = (ListElement)it.next();
- int targetNodeId = listElement.getTargetNodeId();
- for (int i = 0; i < serIntIds.length; i++)
- {
- try
- {
- if (targetNodeId == Integer.parseInt(serIntIds[i]))
- {
- serviceInterfaces.add(listElement);
- tmodels.add(listElement.getObject());
- break;
- }
- }
- catch (NumberFormatException nfe)
- {
- }
- }
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES, serviceInterfaces);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODEL, tmodels);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES);
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODEL);
- }
-
- if (wsdlURL != null)
- {
- propertyTable_.put(ActionInputs.QUERY_INPUT_WSDL_URL,wsdlURL);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL,wsdlURL);
- }
-
- if (!subQueryInitiated_ && !Validator.validateString(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
-
- Hashtable languageHash = new Hashtable();
- if (nameLanguages != null && names != null)
- {
- Vector nameVector = new Vector();
- // UDDI's save API (Appendix C of the UDDI V2 Programmers API Specification) requires the following:
- // 1) Only the first row can have a blank language.
- // 2) Only 1 name per language.
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_NAME");
- for (int i=0;i<names.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Name uddi4jName;
- if (nameLanguages[i].length() > 0)
- uddi4jName = new Name(names[i],nameLanguages[i]);
- else
- {
- uddi4jName = new Name(names[i]);
- if (i != 0 && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(nameLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(nameLanguages[i],Boolean.TRUE);
- if (names[i].trim().length() < 1)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- nameVector.addElement(uddi4jName);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,nameVector);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- if (!subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NO_NAMES"));
- }
- }
-
- if (descriptionLanguages != null && descriptions != null)
- {
- Vector descriptionVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0 && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (descriptions[i].trim().length() < 1)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- descriptionVector.addElement(uddi4jDescription);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,descriptionVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- BusinessEntity be = (BusinessEntity)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER);
- String businessKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- Vector tModelVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODEL);
- String wsdlURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- Vector nameVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- Vector descriptionVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
-
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- Definition def = uddi4jHelper.getWSDLDefinition(wsdlURL);
-
- BusinessService bs;
- if (tModelVector != null && tModelVector.size() > 0)
- bs = uddi4jHelper.newBusinessService(wsdlURL, def, (TModel[])tModelVector.toArray(new TModel[0]));
- else
- {
- RegPublishServiceInterfaceSimpleAction regPublishSIAction = new RegPublishServiceInterfaceSimpleAction(controller_);
- int currentNodeId = getSelectedNavigatorNode().getNodeId();
- NodeManager nodeManager = regNode_.getNodeManager();
- TModel[] tModels = null;
- if (uddi4jHelper.isMonolithicWSDL(def))
- {
- tModels = new TModel[1];
- tModels[0] = uddi4jHelper.newTModel(wsdlURL, def);
- }
- else
- {
- String[] imports = uddi4jHelper.getImports(def, wsdlURL);
- tModels = new TModel[imports.length];
- for (int i = 0; i < tModels.length; i++)
- tModels[i] = uddi4jHelper.newTModel(imports[i]);
- }
- Hashtable tModelsTable = new Hashtable();
- if (tModels != null)
- {
- for (int i=0;i<tModels.length;i++)
- {
- boolean inputsValid = regPublishSIAction.populatePropertyTable(uddi4jHelper.getWSDL(tModels[i]), tModels[i]);
- if (inputsValid)
- {
- regPublishSIAction.run();
- Object savedTModel = regPublishSIAction.getPropertyTable().get(UDDIActionInputs.QUERY_OUTPUT_SAVED_TMODEL);
- if (savedTModel != null)
- tModelsTable.put(((TModel)savedTModel).getNameString(), savedTModel);
- // Reselect the current node.
- nodeManager.setSelectedNodeId(currentNodeId);
- }
- }
- }
- bs = uddi4jHelper.newBusinessService(wsdlURL, def, tModelsTable);
- }
-
- if (be != null)
- bs.setBusinessKey(be.getBusinessKey());
- else if (businessKey != null)
- bs.setBusinessKey(businessKey);
- bs.setNameVector(nameVector);
- bs.setDescriptionVector(descriptionVector);
- bs.setCategoryBag(categoryBag);
- Vector bsVector = new Vector();
- bsVector.add(bs);
- regElement.handlePreInvocation(bs);
- bs = (BusinessService)proxy.save_service(regElement.getAuthInfoString(), bsVector).getBusinessServiceVector().get(0);
- addPublishedItemNode(bs,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_PUBLISHED",bs.getDefaultNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("WSDLException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e)){
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- regElement.setDefaults();
- }
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceAdvancedAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceAdvancedAction.java
deleted file mode 100644
index 001f5c7cc..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceAdvancedAction.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-
-public class RegPublishServiceInterfaceAdvancedAction extends PublishAction
-{
- public RegPublishServiceInterfaceAdvancedAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
- }
-
- protected final boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String wsdlURL = parser.getParameter(ActionInputs.QUERY_INPUT_WSDL_URL);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
-
- // Validate the data.
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- Hashtable languageHash = new Hashtable();
-
- if (wsdlURL != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL,wsdlURL);
-
- if (!subQueryInitiated_ && !Validator.validateString(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,name);
-
- if (!subQueryInitiated_ && !Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
-
- if (descriptionLanguages != null && descriptions != null)
- {
- Vector descriptionVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0 && !subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (descriptions[i].trim().length() < 1)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
- descriptionVector.addElement(uddi4jDescription);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,descriptionVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS);
-
- if (idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- IdentifierBag idBag = new IdentifierBag();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- idBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS,idBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
-
- if (catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- CategoryBag catBag = new CategoryBag();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- catBag.add(kr);
- }
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES,catBag);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
-
- return inputsValid;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- String wsdlURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- Vector descriptionVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS);
- IdentifierBag identifierBag = (IdentifierBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
- CategoryBag categoryBag = (CategoryBag)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
-
- // The action can be run under the context of either a registry or a query node.
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
-
- TModel tModel = (new Uddi4jHelper()).newTModel(wsdlURL);
- tModel.setName(name);
- tModel.setDescriptionVector(descriptionVector);
- tModel.setIdentifierBag(identifierBag);
-
- // The category bag may contain wsdlSpec.
- CategoryBag defaultCategoryBag = tModel.getCategoryBag();
- Vector defaultKeyedReferenceVector = null;
- if (defaultCategoryBag != null)
- {
- if (categoryBag == null)
- categoryBag = defaultCategoryBag;
- else
- {
- defaultKeyedReferenceVector = defaultCategoryBag.getKeyedReferenceVector();
- for (int i=0;i<defaultKeyedReferenceVector.size();i++)
- {
- KeyedReference kr = (KeyedReference)defaultKeyedReferenceVector.elementAt(i);
- if (categoryBag != null)
- categoryBag.add(kr);
- }
- }
- }
- tModel.setCategoryBag(categoryBag);
-
- Vector tModelVector = new Vector();
- tModelVector.add(tModel);
- tModel = (TModel)proxy.save_tModel(regElement.getAuthInfoString(), tModelVector).getTModelVector().get(0);
- propertyTable_.put(UDDIActionInputs.QUERY_OUTPUT_SAVED_TMODEL, tModel);
- addPublishedItemNode(tModel,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACE_PUBLISHED",tModel.getNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("WSDLException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e)){
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- regElement.setDefaults();
- }
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceSimpleAction.java
deleted file mode 100644
index ba7ffe6c6..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceInterfaceSimpleAction.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Vector;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.transport.TransportException;
-
-public class RegPublishServiceInterfaceSimpleAction extends PublishAction
-{
- public RegPublishServiceInterfaceSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String wsdlURL = parser.getParameter(ActionInputs.QUERY_INPUT_WSDL_URL);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME);
- String description = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (wsdlURL != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL,wsdlURL);
-
- if (!subQueryInitiated_ && !Validator.validateString(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME,name);
-
- if (!subQueryInitiated_ && !Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
-
- if (description != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION,description);
-
- return inputsValid;
- }
-
- public final boolean populatePropertyTable(String wsdlURL, TModel tModel)
- {
- boolean inputsValid = true;
- String name = tModel.getNameString();
- String description = tModel.getDefaultDescriptionString();
- if (wsdlURL != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL,wsdlURL);
- else
- inputsValid = false;
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME,name);
- else
- inputsValid = false;
-
- if (description != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION,description);
- else
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION,"");
- return inputsValid;
- }
-
- public final boolean run()
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- String wsdlURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME);
- String description = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION);
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- try
- {
- UDDIProxy proxy = regElement.getProxy();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- TModel tModel = (new Uddi4jHelper()).newTModel(wsdlURL);
- tModel.setName(name);
- tModel.setDefaultDescriptionString(description);
-
- Vector tModelVector = new Vector();
- tModelVector.add(tModel);
- tModel = (TModel)proxy.save_tModel(regElement.getAuthInfoString(), tModelVector).getTModelVector().get(0);
- propertyTable_.put(UDDIActionInputs.QUERY_OUTPUT_SAVED_TMODEL, tModel);
- addPublishedItemNode(tModel,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACE_PUBLISHED",tModel.getNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- e.printStackTrace();
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("WSDLException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (TransportException e)
- {
- e.printStackTrace();
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- e.printStackTrace();
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceSimpleAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceSimpleAction.java
deleted file mode 100644
index dac66084d..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RegPublishServiceSimpleAction.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.transport.TransportException;
-
-public class RegPublishServiceSimpleAction extends PublishAction
-{
- public RegPublishServiceSimpleAction(Controller controller)
- {
- super(controller);
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- propertyTable_.put(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE));
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String busNodeIds = parser.getParameter(UDDIActionInputs.NODEID_BUSINESS);
- String wsdlURL = parser.getParameter(ActionInputs.QUERY_INPUT_WSDL_URL);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME);
- String description = parser.getParameter(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (busNodeIds != null)
- {
- Vector serviceBusiness = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS);
- if (serviceBusiness == null)
- serviceBusiness = new Vector();
- else
- serviceBusiness.removeAllElements();
- Vector serviceBusinessCopy = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS_COPY);
- // The browser will enforce the rule of having only one business in this list.
- ListElement listElement = (ListElement)serviceBusinessCopy.elementAt(0);
- serviceBusiness.addElement(listElement);
- BusinessEntity be = (BusinessEntity)listElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS,serviceBusiness);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER,be);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,be.getBusinessKey());
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS);
- removeProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER);
- if (!subQueryInitiated_)
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_BUSINESS"));
- }
- }
-
- if (wsdlURL != null)
- {
- propertyTable_.put(ActionInputs.QUERY_INPUT_WSDL_URL,wsdlURL);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL,wsdlURL);
- }
-
- if (!subQueryInitiated_ && !Validator.validateString(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
-
- if (name != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME,name);
-
- if (!subQueryInitiated_ && !Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
-
- if (description != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION,description);
-
- return inputsValid;
- }
-
- public final boolean run()
- {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- BusinessEntity be = (BusinessEntity)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER);
- String businessKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- String wsdlURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL);
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME);
- String description = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION);
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- try
- {
- UDDIProxy proxy = regElement.getProxy();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
-
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- Definition def = uddi4jHelper.getWSDLDefinition(wsdlURL);
- RegPublishServiceInterfaceSimpleAction regPublishSIAction = new RegPublishServiceInterfaceSimpleAction(controller_);
- int currentNodeId = getSelectedNavigatorNode().getNodeId();
- NodeManager nodeManager = regNode_.getNodeManager();
-
- Hashtable tModelsTable = new Hashtable();
- TModel[] tModels = null;
- if (uddi4jHelper.isMonolithicWSDL(def))
- {
- tModels = new TModel[1];
- tModels[0] = uddi4jHelper.newTModel(wsdlURL, def);
- }
- else
- {
- String[] imports = uddi4jHelper.getImports(def, wsdlURL);
- tModels = new TModel[imports.length];
- for (int i = 0; i < tModels.length; i++)
- tModels[i] = uddi4jHelper.newTModel(imports[i]);
- }
-
- if (tModels != null)
- {
- for (int i=0;i<tModels.length;i++)
- {
- boolean inputsValid = regPublishSIAction.populatePropertyTable(uddi4jHelper.getWSDL(tModels[i]), tModels[i]);
- if (inputsValid)
- {
- regPublishSIAction.run();
- Object savedTModel = regPublishSIAction.getPropertyTable().get(UDDIActionInputs.QUERY_OUTPUT_SAVED_TMODEL);
- if (savedTModel != null)
- {
- tModelsTable.put(((TModel)savedTModel).getNameString(), savedTModel);
- }
- // Reselect the current node.
- nodeManager.setSelectedNodeId(currentNodeId);
- }
- }
- }
-
- BusinessService bs = uddi4jHelper.newBusinessService(wsdlURL, def, tModelsTable);
- if (be != null)
- bs.setBusinessKey(be.getBusinessKey());
- else if (businessKey != null)
- bs.setBusinessKey(businessKey);
- bs.setDefaultName(new Name(name));
- bs.setDefaultDescriptionString(description);
- Vector bsVector = new Vector();
- bsVector.add(bs);
- regElement.handlePreInvocation(bs);
- bs = (BusinessService)proxy.save_service(regElement.getAuthInfoString(), bsVector).getBusinessServiceVector().get(0);
- addPublishedItemNode(bs,regElement);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_PUBLISHED",bs.getDefaultNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("WSDLException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (TransportException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(e.getMessage());
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(e.getMessage());
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemovePublisherAssertionsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemovePublisherAssertionsAction.java
deleted file mode 100644
index 7fec49200..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemovePublisherAssertionsAction.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListManager;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublisherAssertionElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.assertion.PublisherAssertion;
-import org.uddi4j.response.CompletionStatus;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.Result;
-import org.uddi4j.transport.TransportException;
-
-public class RemovePublisherAssertionsAction extends CommonPublisherAssertionsAction
-{
- public RemovePublisherAssertionsAction(Controller controller)
- {
- super(controller);
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- if (registryNode_ == null)
- return false;
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
-
- // ids from uddiObjects_table
- String[] selectedBusIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (selectedBusIds != null && selectedBusIds.length > 0)
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, selectedBusIds);
- // Synchronize client view and server model (uddiObject_table.jsp)
- synchronizeUDDIObjectTable();
-
- // if not yet logged in, validate the parameters needed to log in
- if (!isLoggedIn_) {
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (!Validator.validateURL(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userID!= null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- }
-
- if (!Validator.validateString(userID))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
- }
-
- // ids from publisher assertion table
- String[] pubAssertionsViewIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID);
- if (pubAssertionsViewIds == null || pubAssertionsViewIds.length == 0)
- inputsValid = false;
- else
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID, pubAssertionsViewIds);
-
- return inputsValid;
- }
-
- public boolean run()
- {
- if (registryNode_ == null)
- return false;
-
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = navigatorManager.getSelectedNode();
- TreeElement selectedElement = selectedNode.getTreeElement();
-
- if (!(selectedElement instanceof BusinessElement))
- return false;
-
- // if not yet logged in, log in first
- if (!isLoggedIn_) {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- try {
- registryElement.performLogin(publishURL, userID, password);
- }
- catch (TransportException te) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(te.getMessage());
- return false;
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(uddie.toString());
- return false;
- }
- catch (MalformedURLException me) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(me.getMessage());
- return false;
- }
- }
-
- UDDIProxy proxy = registryElement.getProxy();
- registryElement.getUserId();
- registryElement.getCred();
- BusinessElement busElement = (BusinessElement)selectedElement;
- ListManager pubAssertions = busElement.getPublisherAssertions();
-
- // determine whether this is a owned business
- // if not, the AddPublisherAssertionsAction cannot be performed
- if (!isBusinessOwned(busElement)) {
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NOT_OWNED_BUSINESS"));
- return false;
- }
-
- try {
- String[] pubAssertionViewIds = (String[])propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_VIEWID);
- Vector pubAssertionVector = new Vector();
- boolean refreshRequired = false;
-
- for (int i = 0; i < pubAssertionViewIds.length; i++) {
- int viewID = Integer.parseInt(pubAssertionViewIds[i]);
- ListElement listElement = pubAssertions.getElementWithViewId(viewID);
- PublisherAssertionElement pubAssertionElement = (PublisherAssertionElement)listElement.getObject();
- PublisherAssertion pubAssertion = pubAssertionElement.getPublisherAssertion();
- pubAssertionVector.add(pubAssertion);
- if (pubAssertionElement.getStatus().equals(CompletionStatus.COMPLETE))
- refreshRequired = true;
- }
-
- DispositionReport report = proxy.delete_publisherAssertions(registryElement.getAuthInfoString(), pubAssertionVector);
- //report status
- Vector reportErrInfo = report.getResultVector();
- for (int i = 0; i < reportErrInfo.size(); i++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(i)).getErrInfo().getText());
- }
-
- // refresh is required, refresh the whole publisher assertion table
- if (refreshRequired) {
- ShowPublisherAssertionsAction showPAAction = new ShowPublisherAssertionsAction(controller_);
- Hashtable propertyTable = showPAAction.getPropertyTable();
- Object ids = propertyTable_.get(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (ids != null)
- propertyTable.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, ids);
- showPAAction.run();
- }
- // refresh is not required, delete the selected publisher assertion elements
- else {
- for (int k = 0; k < pubAssertionViewIds.length; k++) {
- pubAssertions.removeElementWithViewId(Integer.parseInt(pubAssertionViewIds[k]));
- }
- }
-
- return report.success();
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- DispositionReport report = uddie.getDispositionReport();
- Vector reportErrInfo = report.getResultVector();
- for (int i = 0; i < reportErrInfo.size(); i++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(i)).getErrInfo().getText());
- }
- return false;
- }
- catch (Exception e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("Exception");
- messageQueue.addMessage(e.getMessage());
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemoveSubQueryItemAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemoveSubQueryItemAction.java
deleted file mode 100644
index e984e2511..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/RemoveSubQueryItemAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import javax.servlet.http.HttpServletRequest;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.Action;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-
-public class RemoveSubQueryItemAction extends Action
-{
- private Controller controller_;
-
- public RemoveSubQueryItemAction(Controller controller)
- {
- super();
- controller_ = controller;
- }
-
- // uddi/actions/RemoveSubQueryItemActionJSP.jsp?subQueryKey=...&subQueryListKey=...&subQueryListItemId=...
- public static final String getActionLink(String subQueryKey,String subQueryListKey,int subQueryListItemId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/RemoveSubQueryItemActionJSP.jsp?");
- actionLink.append(UDDIActionInputs.SUBQUERY_KEY).append('=').append(subQueryKey);
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_LIST_KEY).append('=').append(subQueryListKey);
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_LIST_ITEMID).append('=').append(subQueryListItemId);
- return actionLink.toString();
- }
-
- public boolean populatePropertyTable(HttpServletRequest request)
- {
- String subQueryKey = request.getParameter(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryListKey = request.getParameter(UDDIActionInputs.SUBQUERY_LIST_KEY);
- String subQueryListItemId = request.getParameter(UDDIActionInputs.SUBQUERY_LIST_ITEMID);
-
- if (subQueryKey != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_KEY,subQueryKey);
-
- if (subQueryListKey != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_LIST_KEY,subQueryListKey);
-
- if (subQueryListItemId != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_LIST_ITEMID,subQueryListItemId);
-
- return true;
- }
-
- public boolean run()
- {
- propertyTable_.get(UDDIActionInputs.SUBQUERY_KEY);
- propertyTable_.get(UDDIActionInputs.SUBQUERY_LIST_KEY);
- int subQueryListItemId = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_LIST_ITEMID));
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node currentNode = navigatorManager.getSelectedNode();
- FormTool formTool = (FormTool)(currentNode.getCurrentToolManager().getSelectedTool());
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_KEY));
- Vector list = (Vector)formToolPI.getProperty((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_LIST_KEY));
- list.removeElementAt(subQueryListItemId);
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ResizeUDDIFramesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ResizeUDDIFramesAction.java
deleted file mode 100644
index 1ede38f0e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ResizeUDDIFramesAction.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ResizeFramesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIFrameNames;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public class ResizeUDDIFramesAction extends ResizeFramesAction
-{
- public ResizeUDDIFramesAction(Controller controller)
- {
- super(controller);
- }
-
- protected boolean processOthers(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String perspectiveContentFramesetCols = parser.getParameter(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT);
- String actionsContainerFramesetRows = parser.getParameter(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER);
- if (perspectiveContentFramesetCols != null && actionsContainerFramesetRows != null)
- {
- propertyTable_.put(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT,perspectiveContentFramesetCols);
- propertyTable_.put(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER,actionsContainerFramesetRows);
- return true;
- }
- return false;
- }
-
- public final boolean run()
- {
- // Save the current frameset sizes.
- String frameName = (String)propertyTable_.get(ActionInputs.FRAME_NAME);
- String perspectiveContentFramesetCols = (String)propertyTable_.get(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT);
- String actionsContainerFramesetRows = (String)propertyTable_.get(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER);
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
-
- // Set the new frameset sizes.
- if (frameName.equals(UDDIFrameNames.NAVIGATOR_CONTAINER))
- {
- uddiPerspective.setActionsContainerFramesetRows(actionsContainerFramesetRows);
- uddiPerspective.setSavedActionsContainerFramesetRows(actionsContainerFramesetRows);
- if (perspectiveContentFramesetCols.startsWith("100%"))
- {
- // Restore.
- uddiPerspective.setPerspectiveContentFramesetCols(uddiPerspective.getSavedPerspectiveContentFramesetCols());
- }
- else
- {
- // Maximize.
- uddiPerspective.setSavedPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
- uddiPerspective.setPerspectiveContentFramesetCols("100%,0%");
- }
- }
- else if (frameName.equals(UDDIFrameNames.PROPERTIES_CONTAINER))
- {
- if (actionsContainerFramesetRows.startsWith("100%"))
- {
- if (perspectiveContentFramesetCols.endsWith("100%"))
- {
- // Restore.
- uddiPerspective.setPerspectiveContentFramesetCols(uddiPerspective.getSavedPerspectiveContentFramesetCols());
- uddiPerspective.setActionsContainerFramesetRows(uddiPerspective.getSavedActionsContainerFramesetRows());
- }
- else
- {
- // Maximize.
- uddiPerspective.setSavedPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
- uddiPerspective.setSavedActionsContainerFramesetRows(actionsContainerFramesetRows);
- uddiPerspective.setPerspectiveContentFramesetCols("0%,100%");
- }
- }
- else
- {
- // Maximize.
- uddiPerspective.setSavedActionsContainerFramesetRows(actionsContainerFramesetRows);
- uddiPerspective.setActionsContainerFramesetRows("100%,0%");
- if (!perspectiveContentFramesetCols.endsWith("100%"))
- {
- uddiPerspective.setSavedPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
- uddiPerspective.setPerspectiveContentFramesetCols("0%,100%");
- }
- }
- }
- else if (frameName.equals(UDDIFrameNames.STATUS_CONTAINER))
- {
- if (actionsContainerFramesetRows.endsWith("100%"))
- {
- if (perspectiveContentFramesetCols.endsWith("100%"))
- {
- // Restore.
- uddiPerspective.setPerspectiveContentFramesetCols(uddiPerspective.getSavedPerspectiveContentFramesetCols());
- uddiPerspective.setActionsContainerFramesetRows(uddiPerspective.getSavedActionsContainerFramesetRows());
- }
- else
- {
- // Maximize.
- uddiPerspective.setSavedPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
- uddiPerspective.setSavedActionsContainerFramesetRows(actionsContainerFramesetRows);
- uddiPerspective.setPerspectiveContentFramesetCols("0%,100%");
- }
- }
- else
- {
- // Maximize.
- uddiPerspective.setSavedActionsContainerFramesetRows(actionsContainerFramesetRows);
- uddiPerspective.setActionsContainerFramesetRows("0%,100%");
- if (!perspectiveContentFramesetCols.endsWith("100%"))
- {
- uddiPerspective.setSavedPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
- uddiPerspective.setPerspectiveContentFramesetCols("0%,100%");
- }
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectCategoryNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectCategoryNodeAction.java
deleted file mode 100644
index 8a165f49f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectCategoryNodeAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.SelectNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-
-public class SelectCategoryNodeAction extends SelectNodeAction
-{
- public SelectCategoryNodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getCategoryManager());
- }
-
- // uddi/actions/SelectCategoryNodeAction.jsp?sessionId=...&nodeId=...
- public static String getActionLink(String sessionId,int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/SelectCategoryNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.SESSIONID).append('=').append(sessionId);
- actionLink.append('&').append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final String getActionLinkForHistory()
- {
- // Do not add this action to the history.
- return null;
- }
-
- public final boolean run()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- performBaseAction(nodeId);
- return true;
- }
-
- public final String getTreeContentVar()
- {
- return "categoryBrowserWindowContent";
- }
-
- public final String getTreeContentPage()
- {
- return null;
- }
-
- public final String getPropertiesContainerVar()
- {
- return null;
- }
-
- public final String getPropertiesContainerPage()
- {
- return null;
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectFindToolAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectFindToolAction.java
deleted file mode 100644
index cfe477412..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectFindToolAction.java
+++ /dev/null
@@ -1,83 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import javax.servlet.http.HttpServletRequest;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-
-public class SelectFindToolAction extends SelectPropertiesToolAction
-{
- protected String subQueryKey_;
- protected boolean toolLinkChanged_;
-
- public SelectFindToolAction(Controller controller)
- {
- super(controller);
- subQueryKey_ = null;
- toolLinkChanged_ = false;
- }
-
- public boolean processLinkParameters(HttpServletRequest request)
- {
- boolean result = super.processLinkParameters(request);
- subQueryKey_ = request.getParameter(UDDIActionInputs.SUBQUERY_KEY);
- return result;
- }
-
- // /uddi/actions/SelectFindToolAction.jsp?nodeId=...&toolId=...<&viewId=...&viewToolId=...>&subQueryKey=...<&isHistory=1>
- public static final String getActionLink(int nodeId,int toolId,int viewId,int viewToolId,String subQueryKey,boolean forHistory)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/SelectFindToolActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- actionLink.append('&').append(ActionInputs.TOOLID).append('=').append(toolId);
- if (viewId != ActionInputs.VIEWID_DEFAULT)
- {
- actionLink.append('&').append(ActionInputs.VIEWID).append('=').append(viewId);
- actionLink.append('&').append(ActionInputs.VIEWTOOLID).append('=').append(viewToolId);
- }
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_KEY).append('=').append(subQueryKey);
-
- if (forHistory)
- actionLink.append('&').append(ActionInputs.ISHISTORY).append("=1");
- return actionLink.toString();
- }
-
- public boolean run()
- {
- if (!super.run())
- return false;
- FormTool formTool = (FormTool)(selectedNode_.getCurrentToolManager().getSelectedTool());
- String currentSubQueryKey = (String)formTool.getProperty(UDDIActionInputs.SUBQUERY_KEY);
- if (subQueryKey_ != null && !subQueryKey_.equals(currentSubQueryKey))
- {
- toolLinkChanged_ = true;
- formTool.setProperty(UDDIActionInputs.SUBQUERY_KEY,subQueryKey_);
- }
- return true;
- }
-
- public boolean requiresViewSelection()
- {
- return toolLinkChanged_;
- }
-
- protected String getActionLinkForHistory()
- {
- int nodeId = selectedNode_.getNodeId();
- int toolId = selectedTool_.getToolId();
- int viewId = selectedNode_.getViewId();
- int viewToolId = selectedNode_.getViewToolId();
- return getActionLink(nodeId,toolId,viewId,viewToolId,subQueryKey_,true);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectNavigatorNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectNavigatorNodeAction.java
deleted file mode 100644
index 9cbee39f0..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectNavigatorNodeAction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.SelectNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ToolTypes;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-
-public class SelectNavigatorNodeAction extends SelectNodeAction
-{
- public SelectNavigatorNodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getNavigatorManager());
- }
-
- // uddi/actions/SelectNavigatorNodeAction.jsp?nodeId=...<&isHistory=1>
- public static String getActionLink(int nodeId,boolean forHistory)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/SelectNavigatorNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- if (forHistory)
- actionLink.append('&').append(ActionInputs.ISHISTORY).append("=1");
- return actionLink.toString();
- }
-
- public String getActionLinkForHistory()
- {
- ToolManager toolManager = selectedNode_.getToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- int nodeId = selectedNode_.getNodeId();
- selectedTool.getToolId();
- selectedNode_.getViewId();
- selectedNode_.getViewToolId();
- if (selectedTool.getToolType() != ToolTypes.ACTION)
- return selectedTool.getSelectToolActionHref(true);
- else
- return getActionLink(nodeId,true);
- }
-
- public final String getTreeContentVar()
- {
- return "navigatorContent";
- }
-
- public final String getTreeContentPage()
- {
- return "uddi/navigator_content.jsp";
- }
-
- public final String getPropertiesContainerVar()
- {
- return "propertiesContainer";
- }
-
- public final String getPropertiesContainerPage()
- {
- return "uddi/properties_container.jsp";
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectPropertiesToolAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectPropertiesToolAction.java
deleted file mode 100644
index b86e157d6..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectPropertiesToolAction.java
+++ /dev/null
@@ -1,83 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.SelectNodeToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-
-public class SelectPropertiesToolAction extends SelectNodeToolAction
-{
- public SelectPropertiesToolAction(Controller controller)
- {
- super(controller, controller.getUDDIPerspective().getNavigatorManager());
- }
-
- // /uddi/actions/SelectPropertiesToolAction.jsp?nodeId=...&toolId=...<&viewId=...&viewToolId=...><&isHistory=1>
- public static final String getActionLink(int nodeId,int toolId,int viewId,int viewToolId,boolean forHistory)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/SelectPropertiesToolActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- actionLink.append('&').append(ActionInputs.TOOLID).append('=').append(toolId);
- if (viewId != ActionInputs.VIEWID_DEFAULT)
- {
- actionLink.append('&').append(ActionInputs.VIEWID).append('=').append(viewId);
- actionLink.append('&').append(ActionInputs.VIEWTOOLID).append('=').append(viewToolId);
- }
- if (forHistory)
- actionLink.append('&').append(ActionInputs.ISHISTORY).append("=1");
- return actionLink.toString();
- }
-
- protected String getActionLinkForHistory()
- {
- int nodeId = selectedNode_.getNodeId();
- int toolId = selectedTool_.getToolId();
- int viewId = selectedNode_.getViewId();
- int viewToolId = selectedNode_.getViewToolId();
- return getActionLink(nodeId,toolId,viewId,viewToolId,true);
- }
-
- public final String getTreeContentVar()
- {
- return "navigatorContent";
- }
-
- public final String getTreeContentPage()
- {
- return "uddi/navigator_content.jsp";
- }
-
- public final String getPropertiesContainerVar()
- {
- return "propertiesContainer";
- }
-
- public final String getPropertiesContainerPage()
- {
- return "uddi/properties_container.jsp";
- }
-
- public final String getPropertiesContentVar()
- {
- return "propertiesContent";
- }
-
- public final String getPropertiesContentPage()
- {
- return "uddi/properties_content.jsp";
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectSubQueryItemAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectSubQueryItemAction.java
deleted file mode 100644
index e7bb5be75..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SelectSubQueryItemAction.java
+++ /dev/null
@@ -1,229 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import javax.servlet.http.HttpServletRequest;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ViewTool;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class SelectSubQueryItemAction extends SelectPropertiesToolAction
-{
- private boolean requiresTreeViewRefresh_;
- private boolean requiresViewSelection_;
- private boolean newUUIDQueryCreated_;
- private String itemName_;
- public SelectSubQueryItemAction(Controller controller)
- {
- super(controller);
- requiresTreeViewRefresh_ = false;
- requiresViewSelection_ = false;
- newUUIDQueryCreated_ = false;
- itemName_ = null;
- }
-
- // /uddi/actions/SelectSubQueryItemAction.jsp?nodeId=...&toolId=...<&viewId=...>&subQueryKey=...&subQueryListKey=...&subQueryListItemId=...&queryItem=...<&isHistory=1>
- public static final String getActionLink(int nodeId,int toolId,int viewId,String subQueryKey,String subQueryListKey,int subQueryListItemId,int queryItem,boolean forHistory)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/SelectSubQueryItemActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- actionLink.append('&').append(ActionInputs.TOOLID).append('=').append(toolId);
- if (viewId != ActionInputs.VIEWID_DEFAULT)
- actionLink.append('&').append(ActionInputs.VIEWID).append('=').append(viewId);
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_KEY).append('=').append(subQueryKey);
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_LIST_KEY).append('=').append(subQueryListKey);
- actionLink.append('&').append(UDDIActionInputs.SUBQUERY_LIST_ITEMID).append('=').append(subQueryListItemId);
- actionLink.append('&').append(UDDIActionInputs.QUERY_ITEM).append('=').append(queryItem);
-
- if (forHistory)
- actionLink.append('&').append(ActionInputs.ISHISTORY).append("=1");
- return actionLink.toString();
- }
-
- public boolean processLinkParameters(HttpServletRequest request)
- {
- boolean result = super.processLinkParameters(request);
- String subQueryKey = request.getParameter(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryListKey = request.getParameter(UDDIActionInputs.SUBQUERY_LIST_KEY);
- String subQueryListItemId = request.getParameter(UDDIActionInputs.SUBQUERY_LIST_ITEMID);
- String queryItemString = request.getParameter(UDDIActionInputs.QUERY_ITEM);
-
- if (subQueryKey != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_KEY,subQueryKey);
-
- if (subQueryListKey != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_LIST_KEY,subQueryListKey);
-
- if (subQueryListItemId != null)
- propertyTable_.put(UDDIActionInputs.SUBQUERY_LIST_ITEMID,subQueryListItemId);
-
- if (queryItemString != null)
- propertyTable_.put(UDDIActionInputs.QUERY_ITEM,queryItemString);
- return result;
- }
-
- private final boolean findByUUID()
- {
- Node currentNode = nodeManager_.getSelectedNode();
- FormTool formTool = (FormTool)(currentNode.getCurrentToolManager().getSelectedTool());
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_KEY));
- Vector list = (Vector)formToolPI.getProperty((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_LIST_KEY));
- ListElement listElement = (ListElement)list.elementAt(Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.SUBQUERY_LIST_ITEMID)));
- int queryItem = Integer.parseInt((String)propertyTable_.get(UDDIActionInputs.QUERY_ITEM));
- FindAction findAction = null;
- String uuidKey = null;
- String uuidKeyValue = null;
- switch (queryItem)
- {
- case UDDIActionInputs.QUERY_ITEM_BUSINESSES:
- findAction = new RegFindBusinessUUIDAction(controller_);
- uuidKey = UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY;
- BusinessEntity sp = (BusinessEntity)listElement.getObject();
- uuidKeyValue = sp.getBusinessKey();
- itemName_ = sp.getDefaultNameString();
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICES:
- findAction = new RegFindServiceUUIDAction(controller_);
- uuidKey = UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY;
- BusinessService bs = (BusinessService)listElement.getObject();
- uuidKeyValue = bs.getServiceKey();
- itemName_ = bs.getDefaultNameString();
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES:
- default:
- findAction = new RegFindServiceInterfaceUUIDAction(controller_);
- uuidKey = UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY;
- TModel tModel = (TModel)listElement.getObject();
- uuidKeyValue = tModel.getTModelKey();
- itemName_ = tModel.getNameString();
- }
- Hashtable propertyTable = findAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uuidKeyValue);
- propertyTable.put(uuidKey,uuidKeyValue);
- boolean result = findAction.run();
- if (result)
- {
- Node itemNode = nodeManager_.getSelectedNode();
- int nodeId = itemNode.getNodeId();
- int toolId = itemNode.getToolManager().getSelectedToolId();
- int viewId = ActionInputs.VIEWID_DEFAULT;
- int viewToolId = ActionInputs.VIEWTOOLID_DEFAULT;
- propertyTable_.put(ActionInputs.NODEID,String.valueOf(nodeId));
- propertyTable_.put(ActionInputs.TOOLID,String.valueOf(toolId));
- propertyTable_.put(ActionInputs.VIEWID,String.valueOf(viewId));
- propertyTable_.put(ActionInputs.VIEWTOOLID,String.valueOf(viewToolId));
- super.run();
- requiresTreeViewRefresh_ = true;
- requiresViewSelection_ = true;
- newUUIDQueryCreated_ = true;
- listElement.setTargetViewToolInfo(nodeId,toolId,viewId);
- return true;
- }
- else
- {
- // The item is no longer in the registry.
- return false;
- }
- }
-
- public final String getItemName()
- {
- return itemName_;
- }
-
- public boolean run()
- {
- // Given the nodeId, toolId and viewId, check if the node or view is stale.
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- int toolId = Integer.parseInt((String)propertyTable_.get(ActionInputs.TOOLID));
- int viewId = ActionInputs.VIEWID_DEFAULT;
- try
- {
- viewId = Integer.parseInt((String)propertyTable_.get(ActionInputs.VIEWID));
- }
- catch (NumberFormatException e)
- {
- }
- int viewToolId = 0;
- if (!isStaleNode(nodeId))
- {
- // Enusre the node is visible.
- requiresTreeViewRefresh_ = makeNodeVisible(nodeManager_.getNode(nodeId));
-
- Node node = nodeManager_.getNode(nodeId);
- if (viewId != ActionInputs.VIEWID_DEFAULT)
- {
- ViewTool viewTool = (ViewTool)(node.getToolManager().getTool(toolId));
- ToolManager elementToolManager = viewTool.getToolManager(viewId);
- if (elementToolManager != null)
- viewToolId = elementToolManager.getSelectedToolId();
- else
- {
- // Stale view
- return findByUUID();
- }
- }
- propertyTable_.put(ActionInputs.VIEWTOOLID,String.valueOf(viewToolId));
- return super.run();
- }
- else
- {
- // Stale node
- return findByUUID();
- }
- }
-
- protected String getActionLinkForHistory()
- {
- int nodeId = selectedNode_.getNodeId();
- int toolId = selectedTool_.getToolId();
- int viewId = selectedNode_.getViewId();
- int viewToolId = selectedNode_.getViewToolId();
- return SelectPropertiesToolAction.getActionLink(nodeId,toolId,viewId,viewToolId,true);
- }
-
- public boolean requiresTreeViewRefresh()
- {
- return super.requiresTreeViewRefresh()|requiresTreeViewRefresh_;
- }
-
- public boolean requiresViewSelection()
- {
- return super.requiresViewSelection()|requiresViewSelection_;
- }
-
- public boolean requiresStatusUpdate()
- {
- return newUUIDQueryCreated_;
- }
-
- public final String getStatusContentVar()
- {
- return "statusContent";
- }
-
- public final String getStatusContentPage()
- {
- return "uddi/status_content.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetBusinessAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetBusinessAction.java
deleted file mode 100644
index 1995301c9..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetBusinessAction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.NodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.service.BusinessService;
-
-public class ServiceGetBusinessAction extends NodeAction
-{
- private ServiceNode serviceNode_;
- public ServiceGetBusinessAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getNavigatorManager());
- serviceNode_ = null;
- }
-
- // uddi/actions/ServiceGetBusinessActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ServiceGetBusinessActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean validateService()
- {
- int serviceNodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- serviceNode_ = (ServiceNode)nodeManager_.getNode(serviceNodeId);
- ServiceElement serviceElement = (ServiceElement)serviceNode_.getTreeElement();
- RegFindServiceUUIDAction verifyAction = new RegFindServiceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,serviceElement.getBusinessService().getServiceKey());
- boolean result = verifyAction.run();
- if (result)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,propertyTable.get(UDDIActionInputs.LATEST_OBJECT));
- return result;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- BusinessService bs = (BusinessService)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
-
- RegFindBusinessUUIDAction action = new RegFindBusinessUUIDAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("NODE_NAME_SERVICE_BUSINESS",serviceNode_.getNodeName()));
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,bs.getBusinessKey());
-
- return action.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetServiceInterfacesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetServiceInterfacesAction.java
deleted file mode 100644
index 336ef1aa7..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceGetServiceInterfacesAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.service.BusinessService;
-
-public class ServiceGetServiceInterfacesAction extends UDDINodeAction
-{
- private ServiceNode serviceNode_;
- public ServiceGetServiceInterfacesAction(Controller controller)
- {
- super(controller);
- serviceNode_ = null;
- }
-
- // uddi/actions/ServiceGetServiceInterfacesActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ServiceGetServiceInterfacesActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean validateService()
- {
- int serviceNodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- serviceNode_ = (ServiceNode)nodeManager_.getNode(serviceNodeId);
- ServiceElement serviceElement = (ServiceElement)serviceNode_.getTreeElement();
- RegFindServiceUUIDAction verifyAction = new RegFindServiceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,serviceElement.getBusinessService().getServiceKey());
- boolean result = verifyAction.run();
- if (result)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,propertyTable.get(UDDIActionInputs.LATEST_OBJECT));
- return result;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- BusinessService bs = (BusinessService)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
- RegFindServiceInterfacesAdvancedAction action = new RegFindServiceInterfacesAdvancedAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("NODE_NAME_SERVICE_SERVICE_INTERFACES",serviceNode_.getNodeName()));
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE,Boolean.TRUE);
- ListElement serviceListElement = new ListElement(bs);
- serviceListElement.setTargetViewToolInfo(serviceNode_.getNodeId(),serviceNode_.getToolManager().getSelectedToolId(),serviceNode_.getViewId());
- Vector serviceListVector = new Vector();
- serviceListVector.addElement(serviceListElement);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE,serviceListVector);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_BUSINESS_SERVICE,bs);
- return action.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetBusinessesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetBusinessesAction.java
deleted file mode 100644
index 683b728cc..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetBusinessesAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceInterfaceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.util.TModelBag;
-
-public class ServiceInterfaceGetBusinessesAction extends UDDINodeAction
-{
- private ServiceInterfaceNode siNode_;
- public ServiceInterfaceGetBusinessesAction(Controller controller)
- {
- super(controller);
- siNode_ = null;
- }
-
- // uddi/actions/ServiceInterfacGetBusinessesActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ServiceInterfaceGetBusinessesActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean validateServiceInterface()
- {
- int siNodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- siNode_ = (ServiceInterfaceNode)nodeManager_.getNode(siNodeId);
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)siNode_.getTreeElement();
- RegFindServiceInterfaceUUIDAction verifyAction = new RegFindServiceInterfaceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,siElement.getTModel().getTModelKey());
- boolean result = verifyAction.run();
- if (result)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,propertyTable.get(UDDIActionInputs.LATEST_OBJECT));
- return result;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- TModel tModel = (TModel)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
-
- RegFindBusinessesAdvancedAction action = new RegFindBusinessesAdvancedAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("NODE_NAME_SI_BUSINESSES",siNode_.getNodeName()));
-
- ListElement siListElement = new ListElement(tModel);
- siListElement.setTargetViewToolInfo(siNode_.getNodeId(),siNode_.getToolManager().getSelectedToolId(),siNode_.getViewId());
- Vector siListVector = new Vector();
- siListVector.addElement(siListElement);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES,siListVector);
-
- Vector tModelKeyStringVector = new Vector();
- tModelKeyStringVector.addElement(tModel.getTModelKey());
- TModelBag tModelBag = new TModelBag(tModelKeyStringVector);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_TMODELBAG,tModelBag);
-
- return action.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetServicesAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetServicesAction.java
deleted file mode 100644
index e53a47940..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ServiceInterfaceGetServicesAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.ServiceInterfaceNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.util.TModelBag;
-
-public class ServiceInterfaceGetServicesAction extends UDDINodeAction
-{
- private ServiceInterfaceNode siNode_;
- public ServiceInterfaceGetServicesAction(Controller controller)
- {
- super(controller);
- siNode_ = null;
- }
-
- // uddi/actions/ServiceInterfacGetServicesActionJSP.jsp?nodeId=...
- public static String getActionLink(int nodeId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ServiceInterfaceGetServicesActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- return actionLink.toString();
- }
-
- public final boolean validateServiceInterface()
- {
- int siNodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- siNode_ = (ServiceInterfaceNode)nodeManager_.getNode(siNodeId);
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)siNode_.getTreeElement();
- RegFindServiceInterfaceUUIDAction verifyAction = new RegFindServiceInterfaceUUIDAction(controller_);
- Hashtable propertyTable = verifyAction.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE,Boolean.TRUE);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,siElement.getTModel().getTModelKey());
- boolean result = verifyAction.run();
- if (result)
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,propertyTable.get(UDDIActionInputs.LATEST_OBJECT));
- return result;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- TModel tModel = (TModel)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
-
- RegFindServicesAdvancedAction action = new RegFindServicesAdvancedAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("NODE_NAME_SI_SERVICES",siNode_.getNodeName()));
-
- ListElement siListElement = new ListElement(tModel);
- siListElement.setTargetViewToolInfo(siNode_.getNodeId(),siNode_.getToolManager().getSelectedToolId(),siNode_.getViewId());
- Vector siListVector = new Vector();
- siListVector.addElement(siListElement);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES,siListVector);
-
- Vector tModelKeyStringVector = new Vector();
- tModelKeyStringVector.addElement(tModel.getTModelKey());
- TModelBag tModelBag = new TModelBag(tModelKeyStringVector);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_TMODELBAG,tModelBag);
-
- return action.run();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ShowPublisherAssertionsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ShowPublisherAssertionsAction.java
deleted file mode 100644
index aab8643c5..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ShowPublisherAssertionsAction.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListManager;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublisherAssertionElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.response.AssertionStatusItem;
-import org.uddi4j.response.AssertionStatusReport;
-import org.uddi4j.response.CompletionStatus;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.RelatedBusinessInfo;
-import org.uddi4j.response.RelatedBusinessesList;
-import org.uddi4j.response.Result;
-import org.uddi4j.response.SharedRelationships;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.FindQualifiers;
-import org.uddi4j.util.KeyedReference;
-
-public class ShowPublisherAssertionsAction extends CommonPublisherAssertionsAction
-{
-
- protected String subQueryKey_;
- protected boolean isSubQueryGet_;
- protected boolean subQueryInitiated_;
- protected String newSubQuery_;
- protected String newSubQueryItem_;
-
- public ShowPublisherAssertionsAction(Controller controller)
- {
- super(controller);
-
- subQueryKey_ = null;
- isSubQueryGet_ = false;
- subQueryInitiated_ = false;
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- if (registryNode_ == null)
- return false;
-
- // ids from uddiObjects_table
- String[] selectedBusIds = parser.getParameterValues(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID);
- if (selectedBusIds != null && selectedBusIds.length > 0)
- propertyTable_.put(UDDIActionInputs.PUBLISHER_ASSERTIONS_SELECTED_BUS_ID, selectedBusIds);
-
- newSubQuery_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_INITIATED);
- String isSubQueryGetString = parser.getParameter(UDDIActionInputs.SUBQUERY_GET);
- newSubQueryItem_ = parser.getParameter(UDDIActionInputs.NEW_SUBQUERY_QUERY_ITEM);
- subQueryKey_ = parser.getParameter(UDDIActionInputs.SUBQUERY_KEY);
-
- // Validate the data.
- controller_.getUDDIPerspective();
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.clearErrors();
-
- if (newSubQuery_ != null && newSubQuery_.length() > 0)
- subQueryInitiated_ = true;
- else
- subQueryInitiated_ = false;
-
- if (isSubQueryGetString != null)
- isSubQueryGet_ = Boolean.valueOf(isSubQueryGetString).booleanValue();
-
- // if not yet logged in, validate the parameters needed to log in
- // NOTE: This action does NOT require the user to be logged in.
- if (!isLoggedIn_) {
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (userID != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userID);
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
- }
-
- return true;
- }
-
- public final boolean isSubQueryInitiated()
- {
- return subQueryInitiated_;
- }
-
- public final boolean isSubQueryGet()
- {
- return isSubQueryGet_;
- }
-
- public final String getSubQueryKey()
- {
- return subQueryKey_;
- }
-
- public final String getNewSubQuery()
- {
- return newSubQuery_;
- }
-
- public final String getNewSubQueryItem()
- {
- return newSubQueryItem_;
- }
-
- public boolean run()
- {
- // Synchronize client view and server model (uddiObject_table.jsp)
- synchronizeUDDIObjectTable();
-
- if (registryNode_ == null)
- return false;
-
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = navigatorManager.getSelectedNode();
- TreeElement selectedElement = selectedNode.getTreeElement();
-
- if (!(selectedElement instanceof BusinessElement))
- return false;
-
- // if not yet logged in, log in first
- if (!isLoggedIn_) {
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userID = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- try {
- if (Validator.validateURL(publishURL) &&
- Validator.validateString(userID) &&
- password != null) {
- registryElement.performLogin(publishURL, userID, password);
- isLoggedIn_ = registryElement.isLoggedIn();
- }
- }
- catch (TransportException te) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("TransportException");
- messageQueue.addMessage(te.getMessage());
- return false;
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(uddie.toString());
- return false;
- }
- catch (MalformedURLException me) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("MalformedURLException");
- messageQueue.addMessage(me.getMessage());
- return false;
- }
- }
-
- // show all assertion iff is logged in and business is owned
- // else show only completed ones
- BusinessElement busElement = (BusinessElement)selectedElement;
- if (isLoggedIn_ && isBusinessOwned(busElement))
- return showPublisherAssertionsForOwnedBus(busElement);
- else
- return showPublisherAssertionsForNonOwnedBus(busElement);
- }
-
- private boolean showPublisherAssertionsForOwnedBus(BusinessElement busElement) {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- // try to get a list of all publisher assertion based on the current registry's authToken
- ListManager listManager = new ListManager();
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.removeProperty(UDDIActionInputs.QUERY_INPUT_EXISTING_PUBLISHER_ASSERTIONS);
- Vector queryInputVector = new Vector();
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- registryElement.getUserId();
- registryElement.getCred();
-
- // show all publisher assertions
- UDDIProxy proxy = ((RegistryElement)registryNode_.getTreeElement()).getProxy();
- AssertionStatusReport assertionReport;
- try {
- assertionReport = proxy.get_assertionStatusReport(registryElement.getAuthInfoString(), (CompletionStatus)null);
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- DispositionReport report = uddie.getDispositionReport();
- Vector reportErrInfo = report.getResultVector();
- for (int i = 0; i < reportErrInfo.size(); i++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(i)).getErrInfo().getText());
- }
- return false;
- }
- catch (Exception e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("Exception");
- messageQueue.addMessage(e.getMessage());
- return false;
- }
- Vector assertionVector = assertionReport.getAssertionStatusItemVector();
- Vector otherBusinessKeys = new Vector();
- Vector pubAssertionElements = new Vector();
-
- for (int i = 0; i < assertionVector.size(); i++) {
- AssertionStatusItem assertionItem = (AssertionStatusItem)assertionVector.elementAt(i);
- // determine the from/to business keys
- String fromKey = assertionItem.getFromKey().getText();
- String toKey = assertionItem.getToKey().getText();
- String owningBusinessKey = busElement.getBusinessEntity().getBusinessKey();
- // ignore this assertion if neither the from key nor the to key equals to this business's key
- if (!owningBusinessKey.equals(fromKey) && !owningBusinessKey.equals(toKey))
- continue;
- String otherBusinessKey = ((owningBusinessKey.equals(fromKey)) ? toKey : fromKey);
- // retrieve the information of the "other business"
- otherBusinessKeys.add(otherBusinessKey);
-
- // retrieve the status of the publisher assertion
- String status = assertionItem.getCompletionStatus().getText();
- KeyedReference keyedRef = assertionItem.getKeyedReference();
- PublisherAssertionElement pubAssertionElement = new PublisherAssertionElement(
- fromKey,
- toKey,
- owningBusinessKey,
- null,
- -1,
- status,
- keyedRef);
- pubAssertionElements.add(pubAssertionElement);
- }
- if (otherBusinessKeys.size() > 0) {
- Vector busEntities;
- try {
- busEntities = proxy.get_businessDetail(otherBusinessKeys).getBusinessEntityVector();
- }
- catch (Exception ex) {
- busEntities = new Vector();
- if (otherBusinessKeys.size() > 1) {
- for (int j = 0; j < otherBusinessKeys.size(); j++) {
- try {
- busEntities.add(proxy.get_businessDetail((String)otherBusinessKeys.get(j)).getBusinessEntityVector().get(0));
- }
- catch (Exception exception) {
- pubAssertionElements.remove(j);
- }
- }
- }
- else
- pubAssertionElements.remove(0);
- }
- for (int j = 0; j < busEntities.size(); j++) {
- BusinessEntity be = (BusinessEntity)busEntities.get(j);
- PublisherAssertionElement pubAssertionElement = (PublisherAssertionElement)pubAssertionElements.get(j);
- ListElement le = new ListElement(be);
- queryInputVector.add(le);
- int subQueryItemId = queryInputVector.indexOf(le);
- pubAssertionElement.setServiceProvider(le);
- pubAssertionElement.setSubQueryItemId(subQueryItemId);
- listManager.add(new ListElement(pubAssertionElement));
- }
- }
- busElement.setPublisherAssertions(listManager);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_EXISTING_PUBLISHER_ASSERTIONS, queryInputVector);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_PUBLISHER_ASSERTIONS_REFRESHED"));
- return true;
- }
-
- private boolean showPublisherAssertionsForNonOwnedBus(BusinessElement busElement) {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- // try to get a list of publisher assertions based on the business key
- ListManager listManager = new ListManager();
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = ((MultipleFormToolPropertiesInterface)formTool).getFormToolProperties(subQueryKey_);
- formToolPI.removeProperty(UDDIActionInputs.QUERY_INPUT_EXISTING_PUBLISHER_ASSERTIONS);
- Vector queryInputVector = new Vector();
- UDDIProxy proxy = ((RegistryElement)registryNode_.getTreeElement()).getProxy();
- RelatedBusinessesList relatedBusList;
- try {
- relatedBusList = proxy.find_relatedBusinesses(busElement.getBusinessEntity().getBusinessKey(),
- (KeyedReference)null,
- (FindQualifiers)null);
- }
- catch (UDDIException uddie) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- DispositionReport report = uddie.getDispositionReport();
- Vector reportErrInfo = report.getResultVector();
- for (int i = 0; i < reportErrInfo.size(); i++) {
- messageQueue.addMessage(((Result) reportErrInfo.get(i)).getErrInfo().getText());
- }
- return false;
- }
- catch (Exception e) {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("Exception");
- messageQueue.addMessage(e.getMessage());
- return false;
- }
- Vector relatedBusVector = relatedBusList.getRelatedBusinessInfos().getRelatedBusinessInfoVector();
- Vector otherBusinessKeys = new Vector();
- Vector pubAssertionElements = new Vector();
- for (int i = 0; i < relatedBusVector.size(); i++) {
- RelatedBusinessInfo relatedBusInfo = (RelatedBusinessInfo)relatedBusVector.elementAt(i);
- // determine the from/to business keys
- String fromKey;
- String toKey;
- String owningBusinessKey;
- if (relatedBusInfo.getDefaultSharedRelationships().getDirection().equals(SharedRelationships.DIRECTION_FROMKEY)) {
- fromKey = busElement.getBusinessEntity().getBusinessKey();
- toKey = relatedBusInfo.getBusinessKey();
- owningBusinessKey = fromKey;
- otherBusinessKeys.add(toKey);
- }
- else {
- fromKey = relatedBusInfo.getBusinessKey();
- toKey = busElement.getBusinessEntity().getBusinessKey();
- owningBusinessKey = toKey;
- otherBusinessKeys.add(fromKey);
- }
-
- Vector keyedRefVector = relatedBusInfo.getDefaultSharedRelationships().getKeyedReferenceVector();
- PublisherAssertionElement[] pubAssertionElementArray = new PublisherAssertionElement[keyedRefVector.size()];
- for (int k = 0; k < keyedRefVector.size(); k++) {
- // retrieve the status of the publisher assertion
- String status = CompletionStatus.COMPLETE;
- KeyedReference keyedRef = (KeyedReference)keyedRefVector.elementAt(k);
- PublisherAssertionElement pubAssertionElement = new PublisherAssertionElement(
- fromKey,
- toKey,
- owningBusinessKey,
- null,
- -1,
- status,
- keyedRef);
- pubAssertionElementArray[k] = pubAssertionElement;
- }
- pubAssertionElements.add(pubAssertionElementArray);
- }
- if (otherBusinessKeys.size() > 0) {
- Vector busEntities;
- try {
- busEntities = proxy.get_businessDetail(otherBusinessKeys).getBusinessEntityVector();
- }
- catch (Exception ex) {
- busEntities = new Vector();
- if (otherBusinessKeys.size() > 1) {
- for (int j = 0; j < otherBusinessKeys.size(); j++) {
- try {
- busEntities.add(proxy.get_businessDetail((String)otherBusinessKeys.get(j)).getBusinessEntityVector().get(0));
- }
- catch (Exception exception) {
- pubAssertionElements.remove(j);
- }
- }
- }
- else
- pubAssertionElements.remove(0);
- }
- for (int j = 0; j < busEntities.size(); j++) {
- BusinessEntity be = (BusinessEntity)busEntities.get(j);
- ListElement le = new ListElement(be);
- queryInputVector.add(le);
- int subQueryItemId = queryInputVector.indexOf(le);
- PublisherAssertionElement[] pubAssertionElementArray = (PublisherAssertionElement[])pubAssertionElements.get(j);
- for (int k = 0; k < pubAssertionElementArray.length; k++) {
- pubAssertionElementArray[k].setServiceProvider(le);
- pubAssertionElementArray[k].setSubQueryItemId(subQueryItemId);
- listManager.add(new ListElement(pubAssertionElementArray[k]));
- }
- }
- }
- busElement.setPublisherAssertions(listManager);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_EXISTING_PUBLISHER_ASSERTIONS, queryInputVector);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_PUBLISHER_ASSERTIONS_REFRESHED"));
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SwitchPerspectiveFromUDDIAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SwitchPerspectiveFromUDDIAction.java
deleted file mode 100644
index e9019b533..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/SwitchPerspectiveFromUDDIAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ShowPerspectiveAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public final class SwitchPerspectiveFromUDDIAction extends ShowPerspectiveAction
-{
- public SwitchPerspectiveFromUDDIAction(Controller controller)
- {
- super(controller);
- }
-
- protected boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String perspectiveContentFramesetCols = parser.getParameter(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT);
- String actionsContainerFramesetRows = parser.getParameter(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER);
- if (perspectiveContentFramesetCols != null && actionsContainerFramesetRows != null)
- {
- propertyTable_.put(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT,perspectiveContentFramesetCols);
- propertyTable_.put(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER,actionsContainerFramesetRows);
- return true;
- }
- return false;
- }
-
- public final boolean run()
- {
- String perspectiveContentFramesetCols = (String)propertyTable_.get(UDDIActionInputs.FRAMESET_COLS_PERSPECTIVE_CONTENT);
- String actionsContainerFramesetRows = (String)propertyTable_.get(UDDIActionInputs.FRAMESET_ROWS_ACTIONS_CONTAINER);
-
- // Save the frameset sizes iff no frame is maximized.
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- if (!perspectiveContentFramesetCols.startsWith("100%") && !perspectiveContentFramesetCols.endsWith("100%"))
- uddiPerspective.setPerspectiveContentFramesetCols(perspectiveContentFramesetCols);
-
- if (!actionsContainerFramesetRows.startsWith("100%") && !actionsContainerFramesetRows.endsWith("100%"))
- uddiPerspective.setActionsContainerFramesetRows(actionsContainerFramesetRows);
-
- return super.run();
- }
-
- public static final String getFormActionLink(int targetPerspectiveId,boolean forHistory)
- {
- StringBuffer formLink = new StringBuffer("uddi/actions/SwitchPerspectiveFromUDDIActionJSP.jsp?");
- formLink.append(ActionInputs.PERSPECTIVE).append('=').append(targetPerspectiveId);
- if (forHistory)
- formLink.append('&').append(ActionInputs.ISHISTORY).append("=1");
- return formLink.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleCategoryNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleCategoryNodeAction.java
deleted file mode 100644
index 513d36625..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleCategoryNodeAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ToggleNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-
-public class ToggleCategoryNodeAction extends ToggleNodeAction
-{
- public ToggleCategoryNodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getCategoryManager());
- }
-
- // uddi/actions/ToggleNavigatorNodeAction.jsp?sId=...&nodeId=...&open=...
- public static final String getActionLink(String sessionId,int nodeId,boolean open)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ToggleCategoryNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.SESSIONID).append('=').append(sessionId);
- actionLink.append('&').append(ActionInputs.NODEID).append('=').append(nodeId);
- actionLink.append('&').append(ActionInputs.OPEN).append('=').append(open?ActionInputs.OPEN_NODE:ActionInputs.CLOSE_NODE);
- return actionLink.toString();
- }
-
- public final boolean run()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- performBaseAction(nodeId);
- return true;
- }
-
- public final String getActionLinkForHistory()
- {
- return null;
- }
-
- public final String getTreeContentVar()
- {
- return "categoryBrowserWindowContent";
- }
-
- public final String getTreeContentPage()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- return OpenCategoryBrowserAction.getCategoryContentPage(controller_.getSessionId(),uddiPerspective.getCategoryTModelKey());
- }
-
- public final String getTreeContainerPage()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- return OpenCategoryBrowserAction.getActionLink(controller_.getSessionId(),uddiPerspective.getCategoryTModelKey());
- }
-
- public final String getPropertiesContainerVar()
- {
- return null;
- }
-
- public final String getPropertiesContainerPage()
- {
- return null;
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleNavigatorNodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleNavigatorNodeAction.java
deleted file mode 100644
index a66d5645f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/ToggleNavigatorNodeAction.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ToggleNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ToolTypes;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-
-public class ToggleNavigatorNodeAction extends ToggleNodeAction
-{
- public ToggleNavigatorNodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getNavigatorManager());
- }
-
- // uddi/actions/ToggleNavigatorNodeAction.jsp?nodeId=...&open=...
- public static String getActionLink(int nodeId,boolean open)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/ToggleNavigatorNodeActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID).append('=').append(nodeId);
- actionLink.append('&').append(ActionInputs.OPEN).append('=').append(open?ActionInputs.OPEN_NODE:ActionInputs.CLOSE_NODE);
- return actionLink.toString();
- }
-
- // This should be called only to select the toggled node when, at the time of
- // the collapse event, a descendant node was selected.
- public final String getActionLinkForHistory()
- {
- ToolManager toolManager = toggledNode_.getToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- int nodeId = toggledNode_.getNodeId();
- int toolId = selectedTool.getToolId();
- int viewId = toggledNode_.getViewId();
- int viewToolId = toggledNode_.getViewToolId();
- if (selectedTool.getToolType() != ToolTypes.ACTION)
- return SelectPropertiesToolAction.getActionLink(nodeId,toolId,viewId,viewToolId,true);
- else
- return SelectNavigatorNodeAction.getActionLink(nodeId,true);
- }
-
- public final String getTreeContentVar()
- {
- return "navigatorContent";
- }
-
- public final String getTreeContentPage()
- {
- return "uddi/navigator_content.jsp";
- }
-
- public final String getPropertiesContainerVar()
- {
- return "propertiesContainer";
- }
-
- public final String getPropertiesContainerPage()
- {
- return "uddi/properties_container.jsp";
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferSubQueryResultsAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferSubQueryResultsAction.java
deleted file mode 100644
index fa629313e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferSubQueryResultsAction.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.MultipleFormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.SubQueryTransferTarget;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-
-public class TransferSubQueryResultsAction extends UDDIPropertiesFormAction
-{
- private Node targetNode_;
- public TransferSubQueryResultsAction(Controller controller)
- {
- super(controller);
- targetNode_ = null;
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- String[] selectedNodeIds = parser.getParameterValues(ActionInputs.NODEID);
- // The client Javascript enforces the rule that at least one item was selected before the form can be submitted.
- propertyTable_.put(UDDIActionInputs.SELECTED_NODEIDS,selectedNodeIds);
- return true;
- }
-
- public static final String getActionLinkForReturn()
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/TransferSubQueryResultsActionJSP.jsp?");
- actionLink.append(UDDIActionInputs.SHOW_RESULTS_TARGET).append("=1");
- return actionLink.toString();
- }
-
- public final void enableShowResultsTarget()
- {
- // This should only be called if the user clicks on the target link on the query results page. Insert a zero element
- // array so that no results are transferred but the jump back to the correct query and its info occurs.
- propertyTable_.put(UDDIActionInputs.SELECTED_NODEIDS,new String[0]);
- }
-
- public final boolean run()
- {
- // Transfer the results in this Query node into the property expected by the originating node.
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- uddiPerspective.getMessageQueue();
-
- String[] selectedNodeIds = (String[])propertyTable_.get(UDDIActionInputs.SELECTED_NODEIDS);
- Node currentNode = getSelectedNavigatorNode();
- TreeElement currentElement = currentNode.getTreeElement();
- SubQueryTransferTarget target = (SubQueryTransferTarget)(currentElement.getPropertyAsObject(UDDIModelConstants.SUBQUERY_TRANSFER_TARGET));
- String subQueryKey = target.getSubQueryKey();
- String targetQueryKey;
-
- int lastSeparatorPos = subQueryKey.lastIndexOf(':');
- if (lastSeparatorPos == -1)
- targetQueryKey = "";
- else
- targetQueryKey = subQueryKey.substring(0,lastSeparatorPos);
-
- String targetProperty = subQueryKey.substring(lastSeparatorPos+1,subQueryKey.length());
- FormTool targetFormTool = target.getTargetFormTool();
- ((MultipleFormToolPropertiesInterface)targetFormTool).getFormToolProperties(subQueryKey);
- FormToolPropertiesInterface targetQueryFormToolPI = ((MultipleFormToolPropertiesInterface)targetFormTool).getFormToolProperties(targetQueryKey);
- Vector targetList = (Vector)targetQueryFormToolPI.getProperty(targetProperty);
- if (targetList == null)
- targetList = new Vector();
-
- NodeManager nodeManager = currentNode.getNodeManager();
- for (int i=0;i<selectedNodeIds.length;i++)
- {
- int selectedNodeId = Integer.parseInt(selectedNodeIds[i]);
- Node selectedNode = nodeManager.getNode(selectedNodeId);
- TreeElement treeElement = selectedNode.getTreeElement();
- Object object;
- if (treeElement instanceof BusinessElement)
- object = ((BusinessElement)treeElement).getBusinessEntity();
- else if (treeElement instanceof ServiceElement)
- object = ((ServiceElement)treeElement).getBusinessService();
- else
- {
- // Service interface
- object = ((ServiceInterfaceElement)treeElement).getTModel();
- }
- ListElement targetListElement = new ListElement(object);
- targetListElement.setTargetViewToolInfo(selectedNodeId,selectedNode.getToolManager().getSelectedToolId(),selectedNode.getViewId());
- if (targetProperty.equals(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_BUSINESS) || targetProperty.equals(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_BUSINESS) || targetProperty.equals(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE))
- {
- // Clear the manager so a replacement occurs.
- targetList.removeAllElements();
- }
- targetList.addElement(targetListElement);
- }
- targetQueryFormToolPI.setProperty(targetProperty,targetList);
- Hashtable savedParentQueryProperties = target.getParentQueryData();
- Enumeration e = savedParentQueryProperties.keys();
- while (e.hasMoreElements())
- {
- String key = (String)e.nextElement();
- targetQueryFormToolPI.setProperty(key,savedParentQueryProperties.get(key));
- }
-
- // Select the node and the datastructure which is the target of the subquery.
- int targetNodeId = target.getNodeId();
- int targetToolId = target.getToolId();
- int targetViewId = target.getViewId();
- int targetViewToolId = target.getViewToolId();
- nodeManager.setSelectedNodeId(targetNodeId);
- targetNode_ = nodeManager.getSelectedNode();
- targetNode_.getToolManager().setSelectedToolId(targetToolId);
- targetNode_.setViewId(targetViewId);
- if (targetViewId != ActionInputs.VIEWID_DEFAULT)
- targetNode_.getViewToolManager().setSelectedToolId(targetViewToolId);
- targetFormTool.setProperty(UDDIActionInputs.SUBQUERY_KEY,targetQueryKey);
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,SelectFindToolAction.getActionLink(targetNodeId,targetToolId,targetViewId,targetViewToolId,targetQueryKey,true));
- return true;
- }
-
- public final Node getTargetNode()
- {
- return targetNode_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferToAddCategoryDataAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferToAddCategoryDataAction.java
deleted file mode 100644
index 41b5083e0..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/TransferToAddCategoryDataAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import javax.servlet.http.HttpServletRequest;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.Action;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-
-public class TransferToAddCategoryDataAction extends Action
-{
- public TransferToAddCategoryDataAction()
- {
- }
-
- // uddi/actions/TransferToAddCategoryDataActionJSP.jsp?sessionId=...&categoryTModelKey=...
- public static final String getActionLink(String sessionId,String categoryTModelKey)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/TransferToAddCategoryDataActionJSP.jsp?");
- actionLink.append(ActionInputs.SESSIONID).append('=').append(sessionId).append('&').append(UDDIActionInputs.CATEGORY_TMODEL_KEY).append('=').append(categoryTModelKey);
- return actionLink.toString();
- }
-
- public final boolean populatePropertyTable(HttpServletRequest request)
- {
- return true;
- }
-
- public final boolean run()
- {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIAddToWSDLPerspectiveAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIAddToWSDLPerspectiveAction.java
deleted file mode 100644
index b99e81b5d..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIAddToWSDLPerspectiveAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import javax.servlet.http.HttpServletRequest;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.LinkAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.wsdl.actions.OpenWSDLAction;
-import org.uddi4j.datatype.service.BusinessService;
-
-public class UDDIAddToWSDLPerspectiveAction extends LinkAction
-{
- public UDDIAddToWSDLPerspectiveAction(Controller controller)
- {
- super(controller);
- }
-
- public static final String getActionLink(int nodeId,int toolId,int viewId,int viewToolId)
- {
- StringBuffer actionLink = new StringBuffer("uddi/actions/UDDIAddToWSDLPerspectiveActionJSP.jsp?");
- actionLink.append(ActionInputs.NODEID);
- actionLink.append('=');
- actionLink.append(nodeId);
- actionLink.append('&');
- actionLink.append(ActionInputs.TOOLID);
- actionLink.append('=');
- actionLink.append(toolId);
- actionLink.append('&');
- actionLink.append(ActionInputs.VIEWID);
- actionLink.append('=');
- actionLink.append(viewId);
- actionLink.append('&');
- actionLink.append(ActionInputs.VIEWTOOLID);
- actionLink.append('=');
- actionLink.append(viewToolId);
- return actionLink.toString();
- }
-
- protected boolean processLinkParameters(HttpServletRequest request)
- {
- String nodeIdString = request.getParameter(ActionInputs.NODEID);
- // Perform data validation.
- try
- {
- Integer.parseInt(nodeIdString);
- }
- catch (NumberFormatException e)
- {
- // Validation failed!
- return false;
- }
- propertyTable_.put(ActionInputs.NODEID,nodeIdString);
- return true;
- }
-
- public boolean run()
- {
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager nodeManager = uddiPerspective.getNavigatorManager();
- Node node = nodeManager.getNode(nodeId);
- TreeElement element = node.getTreeElement();
- if (element instanceof ServiceElement)
- {
- ServiceElement serviceElement = (ServiceElement)element;
- BusinessService bs = serviceElement.getBusinessService();
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- String wsdlURL = uddi4jHelper.getWSDL(bs, serviceElement.getRegistryElement().getProxy());
- if (wsdlURL == null)
- {
- try
- {
- Definition def = uddi4jHelper.getWSDLDefinition(wsdlURL);
- File tempFile = File.createTempFile("temp",".wsdl");
- UDDIImportWSDLToFileSystemAction action = new UDDIImportWSDLToFileSystemAction(controller_);
- action.writeWSDLDefinition(new FileOutputStream(tempFile),def);
- wsdlURL = tempFile.toURL().toString();
- }
- catch (WSDLException e)
- {
- wsdlURL = null;
- }
- catch (MalformedURLException e)
- {
- wsdlURL = null;
- }
- catch (IOException e)
- {
- wsdlURL = null;
- }
- }
-
- if (wsdlURL != null)
- {
- OpenWSDLAction openWSDLAction = new OpenWSDLAction(controller_);
- Hashtable propertyTable = openWSDLAction.getPropertyTable();
- propertyTable.put(ActionInputs.QUERY_INPUT_WSDL_URL,wsdlURL);
- boolean actionResult = openWSDLAction.run();
- if (actionResult) {
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_WSDL_ADDED_TO_WSDL_PERSPECTIVE",wsdlURL));
- return true;
- }
- }
- }
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_WSDL_NOT_ADDED_TO_WSDL_PERSPECTIVE"));
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIExceptionHandler.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIExceptionHandler.java
deleted file mode 100644
index cffa842e2..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIExceptionHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-
-import org.uddi4j.UDDIException;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.response.Result;
-
-public class UDDIExceptionHandler {
-
- public static boolean requiresReset(UDDIException e){
-
- DispositionReport dp = e.getDispositionReport();
- Vector rv = dp.getResultVector();
- for(int i = 0;i < rv.size();i++){
- Result result = (Result)rv.get(i);
- if(result.getErrno().equals("10140"))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToFileSystemAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToFileSystemAction.java
deleted file mode 100644
index bbfdd65eb..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToFileSystemAction.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.io.OutputStream;
-import javax.wsdl.Definition;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ImportToFileSystemAction;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.WSDLFileNameHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class UDDIImportWSDLToFileSystemAction extends ImportToFileSystemAction
-{
- private NodeManager nodeManager_;
- private Definition def_;
- private String defaultWSDLFileName_;
-
- public UDDIImportWSDLToFileSystemAction(Controller controller)
- {
- super(controller);
- nodeManager_ = controller.getUDDIPerspective().getNavigatorManager();
- def_ = null;
- defaultWSDLFileName_ = "temp.wsdl";
- }
-
- public static final String getActionLink(int nodeId,int toolId,int viewId,int viewToolId)
- {
- return ImportToFileSystemAction.getActionLink(nodeId,toolId,viewId,viewToolId,"uddi/actions/UDDIImportWSDLToFileSystemActionJSP.jsp");
- }
-
- public final boolean write(OutputStream os)
- {
- return writeWSDLDefinition(os,def_);
- }
-
- public final String getDefaultFileName()
- {
- return defaultWSDLFileName_;
- }
-
- public final boolean run()
- {
- MessageQueue messageQueue = controller_.getUDDIPerspective().getMessageQueue();
- int nodeId = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID));
- Node node = nodeManager_.getNode(nodeId);
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- String wsdlUrl = null;
- if (node != null)
- {
- TreeElement element = node.getTreeElement();
- if (element instanceof ServiceElement)
- {
- ServiceElement serviceElement = (ServiceElement)element;
- BusinessService bs = serviceElement.getBusinessService();
- wsdlUrl = uddi4jHelper.getWSDL(bs, serviceElement.getRegistryElement().getProxy());
- }
- else if (element instanceof ServiceInterfaceElement)
- {
- TModel tModel = ((ServiceInterfaceElement)element).getTModel();
- wsdlUrl = uddi4jHelper.getWSDL(tModel);
- }
- }
- if (wsdlUrl != null)
- {
- try
- {
- def_ = uddi4jHelper.getWSDLDefinition(wsdlUrl);
- if (def_ != null)
- {
- String wsdlPathname;
- int index = wsdlUrl.indexOf('/');
- if (index != -1)
- wsdlPathname = wsdlUrl.substring(index+1, wsdlUrl.length());
- else
- wsdlPathname = wsdlUrl;
- defaultWSDLFileName_ = WSDLFileNameHelper.getWSDLFileName(wsdlPathname);
- }
- return true;
- }
- catch (Throwable t)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_RETRIEVING_WSDL_DOC"));
- }
- }
- return false;
- }
-
- public final String getStatusContentVar()
- {
- return controller_.getUDDIPerspective().getStatusContentVar();
- }
-
- public final String getStatusContentPage()
- {
- return controller_.getUDDIPerspective().getStatusContentPage();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToWorkbenchAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToWorkbenchAction.java
deleted file mode 100644
index 7f823d96f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIImportWSDLToWorkbenchAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ImportToFileSystemAction;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ImportToWorkbenchAction;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-
-public class UDDIImportWSDLToWorkbenchAction extends ImportToWorkbenchAction
-{
- public UDDIImportWSDLToWorkbenchAction(Controller controller)
- {
- super(controller);
- }
-
- public FormTool getSelectedFormTool()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- return (FormTool)uddiPerspective.getNavigatorManager().getSelectedNode().getCurrentToolManager().getSelectedTool();
- }
-
- public ImportToFileSystemAction newImportToFileSystemAction() {
- UDDIImportWSDLToFileSystemAction action = new UDDIImportWSDLToFileSystemAction(controller_);
- Hashtable table = action.getPropertyTable();
-
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- NodeManager nodeManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = nodeManager.getSelectedNode();
-
- table.put(ActionInputs.NODEID, String.valueOf(selectedNode.getNodeId()));
-
- return action;
- }
-
- public final String getStatusContentVar()
- {
- return controller_.getUDDIPerspective().getStatusContentVar();
- }
-
- public final String getStatusContentPage()
- {
- return controller_.getUDDIPerspective().getStatusContentPage();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java
deleted file mode 100644
index 6095284a0..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDILaunchWebServiceWizardAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import javax.wsdl.Definition;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.LaunchWebServiceWizardAction;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class UDDILaunchWebServiceWizardAction extends LaunchWebServiceWizardAction
-{
- public UDDILaunchWebServiceWizardAction(Controller controller)
- {
- super(controller);
- }
-
- public FormTool getSelectedFormTool()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- return (FormTool)uddiPerspective.getNavigatorManager().getSelectedNode().getCurrentToolManager().getSelectedTool();
- }
-
- public boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager nodeManager = uddiPerspective.getNavigatorManager();
- Node node = nodeManager.getSelectedNode();
- TreeElement element = node.getTreeElement();
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- String wsdlUrl = null;
- if (element instanceof ServiceElement)
- {
- ServiceElement serviceElement = (ServiceElement)element;
- BusinessService bs = serviceElement.getBusinessService();
- wsdlUrl = uddi4jHelper.getWSDL(bs, serviceElement.getRegistryElement().getProxy());
- }
- else if (element instanceof ServiceInterfaceElement)
- {
- TModel tModel = ((ServiceInterfaceElement)element).getTModel();
- wsdlUrl = uddi4jHelper.getWSDL(tModel);
- }
-
- try
- {
- if (wsdlUrl != null)
- {
- Definition def = uddi4jHelper.getWSDLDefinition(wsdlUrl);
- File tempFile = File.createTempFile("temp",".wsdl");
- UDDIImportWSDLToFileSystemAction action = new UDDIImportWSDLToFileSystemAction(controller_);
- action.writeWSDLDefinition(new FileOutputStream(tempFile),def);
- wsdlUrl = tempFile.toURL().toString();
- return launchWizard(wsdlUrl);
- }
- }
- catch (Throwable t)
- {
- messageQueue.addMessage(controller_.getMessage("MSG_ERROR_RETRIEVING_WSDL_DOC"));
- }
- return false;
- }
-
- public final String getStatusContentVar()
- {
- return controller_.getUDDIPerspective().getStatusContentVar();
- }
-
- public final String getStatusContentPage()
- {
- return controller_.getUDDIPerspective().getStatusContentPage();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDINodeAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDINodeAction.java
deleted file mode 100644
index 9a5892a80..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDINodeAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.NodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIMainNode;
-
-public abstract class UDDINodeAction extends NodeAction
-{
- protected RegistryNode regNode_;
- public UDDINodeAction(Controller controller)
- {
- super(controller,controller.getUDDIPerspective().getNavigatorManager());
- regNode_ = getRegistryNode();
- }
-
- public final Node getSelectedNavigatorNode()
- {
- Node selectedNavigatorNode = nodeManager_.getSelectedNode();
- return selectedNavigatorNode;
- }
-
- public final RegistryNode getRegistryNode()
- {
- UDDIMainNode uddiMainNode = (UDDIMainNode)nodeManager_.getRootNode();
- return uddiMainNode.getRegistryNode(getSelectedNavigatorNode());
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIPropertiesFormAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIPropertiesFormAction.java
deleted file mode 100644
index 15801dfdb..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UDDIPropertiesFormAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.FormAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIMainNode;
-
-public abstract class UDDIPropertiesFormAction extends FormAction
-{
- protected NodeManager navigatorManager_;
- public UDDIPropertiesFormAction(Controller controller)
- {
- super(controller);
- navigatorManager_ = controller.getUDDIPerspective().getNavigatorManager();
- }
-
- public final Node getSelectedNavigatorNode()
- {
- return navigatorManager_.getSelectedNode();
- }
-
- public final FormTool getSelectedFormTool()
- {
- return (FormTool)(getSelectedNavigatorNode().getCurrentToolManager().getSelectedTool());
- }
-
- public final RegistryNode getRegistryNode()
- {
- return getRegistryNode(getSelectedNavigatorNode());
- }
-
- public final RegistryNode getRegistryNode(Node registryChildNode)
- {
- UDDIMainNode uddiMainNode = (UDDIMainNode)navigatorManager_.getRootNode();
- return uddiMainNode.getRegistryNode(registryChildNode);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UnpublishAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UnpublishAction.java
deleted file mode 100644
index 9dc37d37d..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UnpublishAction.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.response.DispositionReport;
-import org.uddi4j.transport.TransportException;
-
-public class UnpublishAction extends UDDIPropertiesFormAction
-{
- protected RegistryNode registryNode_;
- protected boolean isLoggedIn_;
-
- public UnpublishAction(Controller controller)
- {
- super(controller);
- registryNode_ = getRegistryNode();
- }
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- RegistryElement regElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
-
- // if not yet logged in, validate the parameters needed to log in
- if (!regElement.isLoggedIn())
- {
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- boolean inputsValid = true;
- if (publishURL != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL, publishURL);
-
- if (!Validator.validateURL(publishURL))
- {
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- inputsValid = false;
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userId != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
-
- if (!Validator.validateString(userId))
- {
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- inputsValid = false;
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD, password);
-
- formTool.updatePropertyTable(propertyTable_);
-
- return inputsValid;
- }
-
- return true;
- }
-
- public boolean run()
- {
-
- RegistryElement registryElement = (RegistryElement)registryNode_.getTreeElement();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
- Node selectedNode = navigatorManager.getSelectedNode();
- TreeElement selectedElement = selectedNode.getTreeElement();
-
- try
- {
- if (!registryElement.isLoggedIn())
- {
- // if not yet logged in, log in first
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
-
- registryElement.performLogin(publishURL,userId,password);
- }
-
- String selectedElementKey = selectedElement.getKey();
- String unpublishTypeMessageKey = null;
- UDDIProxy proxy = registryElement.getProxy();
- String authInfo = registryElement.getAuthInfoString();
- DispositionReport dr = null;
- if (selectedElement instanceof BusinessElement)
- {
- unpublishTypeMessageKey = "MSG_INFO_BUSINESS_UNPUBLISHED";
- dr = proxy.delete_business(authInfo,selectedElementKey);
- }
- else if (selectedElement instanceof ServiceElement)
- {
- unpublishTypeMessageKey = "MSG_INFO_SERVICE_UNPUBLISHED";
- dr = proxy.delete_service(authInfo,selectedElementKey);
- }
- else if (selectedElement instanceof ServiceInterfaceElement)
- {
- unpublishTypeMessageKey = "MSG_INFO_SERVICE_INTERFACE_UNPUBLISHED";
- dr = proxy.delete_tModel(authInfo,selectedElementKey);
- }
- if (!dr.success())
- throw new Exception(dr.toString());
- else
- {
- selectedElement.disconnectAll();
- messageQueue.addMessage(uddiPerspective.getMessage(unpublishTypeMessageKey,selectedElement.getName()));
- return true;
- }
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- return false;
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e))
- registryElement.setDefaults();
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- return false;
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- return false;
- }
- catch (Exception e)
- {
- handleUnexpectedException(uddiPerspective, messageQueue, "Exception", e);
- return false;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateAction.java
deleted file mode 100644
index 62e466aea..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateAction.java
+++ /dev/null
@@ -1,185 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.ITransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.MultipartFormDataParserTransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.PublishedItemsNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegistryNode;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public abstract class UpdateAction extends UDDIPropertiesFormAction
-{
- protected RegistryNode regNode_;
- private boolean requiresAuthentication_;
- public UpdateAction(Controller controller,boolean requiresAuthentication)
- {
- super(controller);
- regNode_ = getRegistryNode();
- requiresAuthentication_ = requiresAuthentication;
- }
-
- protected abstract boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException;
-
- protected final boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException
- {
- // Setup for MultipartFormDataParserTransformer
- propertyTable_.put(ActionInputs.MULTIPART_FORM_DATA_PARSER, parser);
-
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- FormTool formTool = getSelectedFormTool();
- FormToolPropertiesInterface formToolPI = formTool;
- formToolPI.clearErrors();
- boolean inputsValid = processOthers(parser,formToolPI);
- for (int i=0;i<removedProperties_.size();i++)
- formToolPI.removeProperty(removedProperties_.elementAt(i));
- formToolPI.updatePropertyTable(propertyTable_);
-
- String publishURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
-
- boolean validateAuthentication = !regElement.isLoggedIn() & requiresAuthentication_;
-
- if (publishURL != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- }
-
- if (validateAuthentication && !Validator.validateString(publishURL))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_PUBLISH_URL"));
- }
-
- if (userId != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- }
-
- if (validateAuthentication && !Validator.validateString(userId))
- {
- inputsValid = false;
- formTool.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USERID"));
- }
-
- if (password != null)
- {
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- formTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-
- return inputsValid;
- }
-
- public abstract boolean refreshFromRegistry();
-
- protected final void refreshNode(BusinessEntity be)
- {
- Node node = getSelectedNavigatorNode();
- Node parentNode = node.getParent();
- TreeElement element = node.getTreeElement();
- element.disconnectAll();
- BusinessElement newBusinessElement = new BusinessElement(be,regNode_.getTreeElement().getModel());
- connectElements(parentNode,newBusinessElement);
- }
-
- protected final void refreshNode(BusinessService bs)
- {
- Node node = getSelectedNavigatorNode();
- Node parentNode = node.getParent();
- TreeElement element = node.getTreeElement();
- element.disconnectAll();
- ServiceElement newServiceElement = new ServiceElement(bs,regNode_.getTreeElement().getModel());
- connectElements(parentNode,newServiceElement);
- }
-
- protected final void refreshNode(TModel tModel)
- {
- Node node = getSelectedNavigatorNode();
- Node parentNode = node.getParent();
- TreeElement element = node.getTreeElement();
- element.disconnectAll();
- ServiceInterfaceElement newServiceInterfaceElement = new ServiceInterfaceElement(tModel,regNode_.getTreeElement().getModel());
- connectElements(parentNode,newServiceInterfaceElement);
- }
-
- private final void connectElements(Node parentNode,TreeElement newElement)
- {
- TreeElement parentElement = parentNode.getTreeElement();
- String rel = null;
- if (parentNode instanceof PublishedItemsNode)
- rel = UDDIModelConstants.REL_PUBLISHED_ITEMS;
- else
- {
- // QueryNode
- rel = UDDIModelConstants.REL_QUERY_RESULTS;
- }
- parentElement.connect(newElement,rel,ModelConstants.REL_OWNER);
- Node newNode = parentNode.getChildNode(newElement);
- int newNodeId = newNode.getNodeId();
- NodeManager nodeManager = parentNode.getNodeManager();
- nodeManager.setSelectedNodeId(newNodeId);
- ToolManager toolManager = newNode.getToolManager();
- Tool selectedTool = toolManager.getSelectedTool();
- addToHistory(ActionInputs.PERSPECTIVE_UDDI,selectedTool.getSelectToolActionHref(true));
- }
-
- protected final void reindexListElementVector(Vector v)
- {
- for (int i=0;i<v.size();i++)
- {
- ListElement listElement = (ListElement)v.elementAt(i);
- listElement.setViewId(i);
- // targetViewId determines whether or not a successfully validated list element remains in edit state.
- }
- }
-
- public ITransformer[] getTransformers()
- {
- ITransformer[] parentTransformers = super.getTransformers();
- ITransformer[] transformers = new ITransformer[parentTransformers.length + 1];
- System.arraycopy(parentTransformers, 0, transformers, 0, parentTransformers.length);
- transformers[transformers.length - 1] = new MultipartFormDataParserTransformer(controller_);
- return transformers;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateBusinessAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateBusinessAction.java
deleted file mode 100644
index 7b51d034d..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateBusinessAction.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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:
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.DiscoveryURL;
-import org.uddi4j.util.DiscoveryURLs;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-
-public class UpdateBusinessAction extends UpdateAction
-{
- private boolean isUpdate_;
- public UpdateBusinessAction(Controller controller)
- {
- super(controller,true);
- isUpdate_ = true;
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- String[] discoveryURLModifiedStates = parser.getParameterValues(UDDIActionInputs.DISCOVERYURL_MODIFIED);
- String[] discoveryURLViewIds = parser.getParameterValues(UDDIActionInputs.DISCOVERYURL_VIEWID);
- String[] discoveryURLs = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DISCOVERYURL);
- String[] nameModifiedStates = parser.getParameterValues(UDDIActionInputs.NAME_MODIFIED);
- String[] nameViewIds = parser.getParameterValues(UDDIActionInputs.NAME_VIEWID);
- String[] nameLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] descriptionModifiedStates = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_MODIFIED);
- String[] descriptionViewIds = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_VIEWID);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] idModifiedStates = parser.getParameterValues(UDDIActionInputs.IDENTIFIER_MODIFIED);
- String[] idViewIds = parser.getParameterValues(UDDIActionInputs.IDENTIFIER_VIEWID);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catModifiedStates = parser.getParameterValues(UDDIActionInputs.CATEGORY_MODIFIED);
- String[] catViewIds = parser.getParameterValues(UDDIActionInputs.CATEGORY_VIEWID);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,uuidKey);
-
-
- if (discoveryURLModifiedStates != null && discoveryURLViewIds != null && discoveryURLs != null)
- {
- Vector oldDiscoveryURLListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
- Vector newDiscoveryURLListElementVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DISCOVERYURL");
- for (int i=0;i<discoveryURLs.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- DiscoveryURL discoveryURL = new DiscoveryURL(discoveryURLs[i],"");
- if (!Validator.validateURL(discoveryURLs[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int discoveryURLViewId = Integer.parseInt(discoveryURLViewIds[i]);
- boolean isModified = Boolean.valueOf(discoveryURLModifiedStates[i]).booleanValue();
-
- if (discoveryURLViewId == -1 || isModified)
- newDiscoveryURLListElementVector.addElement(new ListElement(discoveryURL));
- else
- newDiscoveryURLListElementVector.addElement(oldDiscoveryURLListElementVector.elementAt(discoveryURLViewId));
- }
- reindexListElementVector(newDiscoveryURLListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,newDiscoveryURLListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
-
- Hashtable languageHash = new Hashtable();
- if (nameModifiedStates != null && nameViewIds != null && nameLanguages != null && names != null)
- {
- Vector oldNameListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- Vector newNameListElementVector = new Vector();
- // UDDI's save API (Appendix C of the UDDI V2 Programmers API Specification) requires the following:
- // 1) Only the first row can have a blank language.
- // 2) Only 1 name per language.
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_NAME");
- for (int i=0;i<names.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Name uddi4jName;
- if (nameLanguages[i].length() > 0)
- uddi4jName = new Name(names[i],nameLanguages[i]);
- else
- {
- uddi4jName = new Name(names[i]);
- if (i != 0)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(nameLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(nameLanguages[i],Boolean.TRUE);
- if (!Validator.validateString(names[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int nameViewId = Integer.parseInt(nameViewIds[i]);
- boolean isModified = Boolean.valueOf(nameModifiedStates[i]).booleanValue();
-
- if (nameViewId == -1 || isModified)
- newNameListElementVector.addElement(new ListElement(uddi4jName));
- else
- newNameListElementVector.addElement(oldNameListElementVector.elementAt(nameViewId));
- }
- reindexListElementVector(newNameListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,newNameListElementVector);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NO_NAMES"));
- }
-
- if (descriptionModifiedStates != null && descriptionViewIds != null && descriptionLanguages != null && descriptions != null)
- {
- Vector oldDescriptionListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS);
- Vector newDescriptionListElementVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (!Validator.validateString(descriptions[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int descriptionViewId = Integer.parseInt(descriptionViewIds[i]);
- boolean isModified = Boolean.valueOf(descriptionModifiedStates[i]).booleanValue();
-
- if (descriptionViewId == -1 || isModified)
- newDescriptionListElementVector.addElement(new ListElement(uddi4jDescription));
- else
- newDescriptionListElementVector.addElement(oldDescriptionListElementVector.elementAt(descriptionViewId));
- }
- reindexListElementVector(newDescriptionListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,newDescriptionListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS);
-
- if (idModifiedStates != null && idViewIds != null && idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- Vector oldIdListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
- Vector newIdListElementVector = new Vector();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- int idViewId = Integer.parseInt(idViewIds[i]);
- boolean isModified = Boolean.valueOf(idModifiedStates[i]).booleanValue();
- if (idViewId == -1 || isModified)
- newIdListElementVector.addElement(new ListElement(kr));
- else
- newIdListElementVector.addElement(oldIdListElementVector.elementAt(idViewId));
- }
- reindexListElementVector(newIdListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS,newIdListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
-
- if (catModifiedStates != null && catViewIds != null && catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- Vector oldCatListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
- Vector newCatListElementVector = new Vector();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- int catViewId = Integer.parseInt(catViewIds[i]);
- boolean isModified = Boolean.valueOf(catModifiedStates[i]).booleanValue();
- if (catViewId == -1 || isModified)
- newCatListElementVector.addElement(new ListElement(kr));
- else
- newCatListElementVector.addElement(oldCatListElementVector.elementAt(catViewId));
- }
- reindexListElementVector(newCatListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES,newCatListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
- return inputsValid;
- }
-
- public final boolean refreshFromRegistry()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- uddiPerspective.getMessageQueue();
- try
- {
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- Vector beVector = proxy.get_businessDetail(uuidKey).getBusinessEntityVector();
- BusinessEntity be;
- if (beVector.size() > 0)
- be = (BusinessEntity)beVector.get(0);
- else
- be = null;
- if (be != null)
- {
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,be);
- return true;
- }
- }
- catch (TransportException e)
- {
- // Feedback via Javascript popups.
- }
- catch (UDDIException e)
- {
- // Feedback via Javascript popups.
- }
- isUpdate_ = false;
- return false;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- BusinessEntity be = (BusinessEntity)propertyTable_.get(UDDIActionInputs.LATEST_OBJECT);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- Vector discoveryURLListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS);
- Vector nameListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES);
- Vector descriptionListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS);
- Vector idListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS);
- Vector catListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES);
-
- Vector discoveryURLVector = new Vector();
- if (discoveryURLListElementVector != null)
- {
- for (int i=0;i<discoveryURLListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)discoveryURLListElementVector.elementAt(i);
- DiscoveryURL discoveryURL = (DiscoveryURL)listElement.getObject();
- discoveryURLVector.addElement(discoveryURL);
- }
- }
-
- Vector nameVector = new Vector();
- for (int i=0;i<nameListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)nameListElementVector.elementAt(i);
- Name name = (Name)listElement.getObject();
- nameVector.addElement(name);
- }
-
- Vector descriptionVector = null;
- if (descriptionListElementVector != null)
- {
- descriptionVector = new Vector();
- for (int i=0;i<descriptionListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)descriptionListElementVector.elementAt(i);
- Description description = (Description)listElement.getObject();
- descriptionVector.addElement(description);
- }
- }
-
- IdentifierBag idBag = null;
- if (idListElementVector != null)
- {
- idBag = new IdentifierBag();
- for (int i=0;i<idListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)idListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- idBag.add(kr);
- }
- }
-
- CategoryBag catBag = null;
- if (catListElementVector != null)
- {
- catBag = new CategoryBag();
- for (int i=0;i<catListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)catListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- catBag.add(kr);
- }
- }
-
- if (discoveryURLVector.size() > 0)
- be.setDiscoveryURLs(new DiscoveryURLs(discoveryURLVector));
- else
- be.setDiscoveryURLs(null);
- be.setNameVector(nameVector);
- be.setDescriptionVector(descriptionVector);
- be.setIdentifierBag(idBag);
- be.setCategoryBag(catBag);
-
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
- Vector beVector = new Vector();
- beVector.add(be);
- be = (BusinessEntity)proxy.save_business(regElement.getAuthInfoString(), beVector).getBusinessEntityVector().get(0);
- refreshNode(be);
- if (isUpdate_)
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESS_UPDATED",be.getDefaultNameString()));
- else
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_BUSINESS_PUBLISHED",be.getDefaultNameString()));
- return true;
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e)){
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- regElement.setDefaults();
- }
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateRegistryAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateRegistryAction.java
deleted file mode 100644
index 0f6f173cc..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateRegistryAction.java
+++ /dev/null
@@ -1,127 +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.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.io.BufferedReader;
-import java.io.StringReader;
-import java.text.ParseException;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryModel;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-
-public class UpdateRegistryAction extends UpdateAction
-{
- public UpdateRegistryAction(Controller controller)
- {
- super(controller,false);
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String nameModifiedState = parser.getParameter(UDDIActionInputs.NAME_MODIFIED);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
- String[] userDefinedCategoryTModelKeys = parser.getParameterValues(UDDIActionInputs.CATEGORY_TMODEL_KEY);
- String[] userDefinedCategoryData = parser.getParameterValues(UDDIActionInputs.CATEGORY_FILENAME);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (nameModifiedState != null && name != null)
- {
- boolean isModified = Boolean.valueOf(nameModifiedState).booleanValue();
- String newName;
- if (isModified)
- newName = name;
- else
- newName = (String)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME,newName);
- if (!Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
-
- if (userDefinedCategoryTModelKeys != null && userDefinedCategoryData != null)
- {
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- for (int i=0;i<userDefinedCategoryTModelKeys.length;i++)
- {
- CategoryModel userDefinedCategory = regElement.getUserDefinedCategory(userDefinedCategoryTModelKeys[i]);
-// TODO: Move UDDIPreferenceContext down to org.eclipse.wst.ws
-// UDDIPreferenceContext context = WebServicePlugin.getInstance().getUDDIPreferenceContext();
-// userDefinedCategory.setColumnDelimiter(context.getUddiCatDataColumnDelimiter());
-// userDefinedCategory.setStringDelimiter(context.getUddiCatDataStringDelimiter());
- userDefinedCategory.setColumnDelimiter("#");
- userDefinedCategory.setStringDelimiter("\"");
- String displayName = userDefinedCategory.getDisplayName();
- if (userDefinedCategoryData[i] == null || userDefinedCategoryData[i].length() < 1)
- {
- inputsValid = false;
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USER_DEFINED_CATEGORY_DATA_FILE",displayName));
- formToolPI.flagRowError(UDDIActionInputs.USER_DEFINED_CATEGORIES,userDefinedCategoryTModelKeys[i]);
- }
- else
- {
- byte rc = userDefinedCategory.loadData(new BufferedReader(new StringReader(userDefinedCategoryData[i])));
- switch (rc)
- {
- case CategoryModel.OPERATION_SUCCESSFUL:
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_USER_DEFINED_CATEGORY_DATA_LOADED",displayName));
- break;
- case CategoryModel.ERROR_FILE:
- inputsValid = false;
- ParseException pe = (ParseException)userDefinedCategory.getErrorException();
- String[] args1 = {String.valueOf(pe.getErrorOffset()),displayName,pe.getMessage(),userDefinedCategory.getCategoryKey()};
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USER_DEFINED_CATEGORY_DATA_FILE_FORMAT",args1));
- formToolPI.flagRowError(UDDIActionInputs.USER_DEFINED_CATEGORIES,userDefinedCategoryTModelKeys[i]);
- break;
- case CategoryModel.ERROR_CATEGORY_KEY:
- default:
- inputsValid = false;
- String[] args2 = {displayName,userDefinedCategory.getErrorException().getMessage(),userDefinedCategory.getCategoryKey()};
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_USER_DEFINED_CATEGORY_DATA_FILE_KEY",args2));
- formToolPI.flagRowError(UDDIActionInputs.USER_DEFINED_CATEGORIES,userDefinedCategoryTModelKeys[i]);
- }
- }
- }
- }
- return inputsValid;
- }
-
- public final boolean refreshFromRegistry()
- {
- return true;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- String name = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- regElement.setName(name);
- regNode_.getTreeElement().setName(name);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_REGISTRY_UPDATED",name));
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceAction.java
deleted file mode 100644
index aaabfb66a..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceAction.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.RegPublishTool;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.Name;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.ServiceDetail;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.KeyedReference;
-
-public class UpdateServiceAction extends UpdateAction
-{
- private boolean isUpdate_;
- public UpdateServiceAction(Controller controller)
- {
- super(controller,true);
- isUpdate_ = true;
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidBusinessKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- String uuidServiceKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY);
- String wsdlURLModifiedState = parser.getParameter(UDDIActionInputs.WSDL_URL_MODIFIED);
- String wsdlURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- String[] nameModifiedStates = parser.getParameterValues(UDDIActionInputs.NAME_MODIFIED);
- String[] nameViewIds = parser.getParameterValues(UDDIActionInputs.NAME_VIEWID);
- String[] nameLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME_LANGUAGE);
- String[] names = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_NAME);
- String[] descriptionModifiedStates = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_MODIFIED);
- String[] descriptionViewIds = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_VIEWID);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] catModifiedStates = parser.getParameterValues(UDDIActionInputs.CATEGORY_MODIFIED);
- String[] catViewIds = parser.getParameterValues(UDDIActionInputs.CATEGORY_VIEWID);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidBusinessKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,uuidBusinessKey);
-
- if (uuidServiceKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,uuidServiceKey);
-
- if (wsdlURLModifiedState != null && wsdlURL != null)
- {
- ListElement wsdlURLListElement = (ListElement)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- boolean isModified = Boolean.valueOf(wsdlURLModifiedState).booleanValue();
- if (isModified)
- wsdlURLListElement = new ListElement(wsdlURL);
- else
- wsdlURL = (String)wsdlURLListElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL,wsdlURLListElement);
- if (!Validator.validateURL(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
-
- Hashtable languageHash = new Hashtable();
- if (nameModifiedStates != null && nameViewIds != null && nameLanguages != null && names != null)
- {
- Vector oldNameListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- Vector newNameListElementVector = new Vector();
- // UDDI's save API (Appendix C of the UDDI V2 Programmers API Specification) requires the following:
- // 1) Only the first row can have a blank language.
- // 2) Only 1 name per language.
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_NAME");
- for (int i=0;i<names.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Name uddi4jName;
- if (nameLanguages[i].length() > 0)
- uddi4jName = new Name(names[i],nameLanguages[i]);
- else
- {
- uddi4jName = new Name(names[i]);
- if (i != 0)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(nameLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(nameLanguages[i],Boolean.TRUE);
- if (!Validator.validateString(names[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int nameViewId = Integer.parseInt(nameViewIds[i]);
- boolean isModified = Boolean.valueOf(nameModifiedStates[i]).booleanValue();
-
- if (nameViewId == -1 || isModified)
- newNameListElementVector.addElement(new ListElement(uddi4jName));
- else
- newNameListElementVector.addElement(oldNameListElementVector.elementAt(nameViewId));
- }
- reindexListElementVector(newNameListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,newNameListElementVector);
- }
- else
- {
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_NO_NAMES"));
- }
-
- if (descriptionModifiedStates != null && descriptionViewIds != null && descriptionLanguages != null && descriptions != null)
- {
- Vector oldDescriptionListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
- Vector newDescriptionListElementVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (!Validator.validateString(descriptions[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int descriptionViewId = Integer.parseInt(descriptionViewIds[i]);
- boolean isModified = Boolean.valueOf(descriptionModifiedStates[i]).booleanValue();
-
- if (descriptionViewId == -1 || isModified)
- newDescriptionListElementVector.addElement(new ListElement(uddi4jDescription));
- else
- newDescriptionListElementVector.addElement(oldDescriptionListElementVector.elementAt(descriptionViewId));
- }
- reindexListElementVector(newDescriptionListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,newDescriptionListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
-
- if (catModifiedStates != null && catViewIds != null && catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- Vector oldCatListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
- Vector newCatListElementVector = new Vector();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- int catViewId = Integer.parseInt(catViewIds[i]);
- boolean isModified = Boolean.valueOf(catModifiedStates[i]).booleanValue();
- if (catViewId == -1 || isModified)
- newCatListElementVector.addElement(new ListElement(kr));
- else
- newCatListElementVector.addElement(oldCatListElementVector.elementAt(catViewId));
- }
- reindexListElementVector(newCatListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES,newCatListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
- return inputsValid;
- }
-
- public final boolean refreshBusinessFromRegistry()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- uddiPerspective.getMessageQueue();
- try
- {
- String uuidBusinessKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- Vector beVector = proxy.get_businessDetail(uuidBusinessKey).getBusinessEntityVector();
- BusinessEntity be;
- if (beVector.size() > 0)
- be = (BusinessEntity)beVector.get(0);
- else
- be = null;
- if (be != null)
- {
- propertyTable_.put(UDDIActionInputs.LATEST_BUSINESS,be);
- return true;
- }
- }
- catch (TransportException e)
- {
- // Feedback via Javascript popups.
- }
- catch (UDDIException e)
- {
- // Feedback via Javascript popups.
- }
- return false;
- }
-
- public final boolean refreshFromRegistry()
- {
- controller_.getUDDIPerspective();
- try
- {
- String uuidServiceKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- ServiceDetail serviceDetail = proxy.get_serviceDetail(uuidServiceKey);
- Vector businessServiceVector = serviceDetail.getBusinessServiceVector();
- if (businessServiceVector.size() > 0)
- {
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,businessServiceVector.elementAt(0));
- return true;
- }
- }
- catch (UDDIException e)
- {
- // Feedback via Javascript popups.
- }
- catch (TransportException e)
- {
- // Feedback via Javascript popups.
- }
- isUpdate_ = false;
- return false;
- }
-
- public final RegPublishTool setupRegPublishTool()
- {
- // Prepare for re-publishing a now-stale service whose business has also been eliminated.
- RegPublishTool regPublishTool = regNode_.getRegPublishTool();
- regPublishTool.setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
- regPublishTool.setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- regPublishTool.setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,String.valueOf(UDDIActionInputs.QUERY_STYLE_ADVANCED));
-
- regPublishTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL,propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL));
-
- Vector nameListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- Vector descriptionListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
- Vector catListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- Vector nameVector = new Vector();
- for (int i=0;i<nameListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)nameListElementVector.elementAt(i);
- Name name = (Name)listElement.getObject();
- nameVector.addElement(name);
- }
-
- Vector descriptionVector = null;
- if (descriptionListElementVector != null)
- {
- descriptionVector = new Vector();
- for (int i=0;i<descriptionListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)descriptionListElementVector.elementAt(i);
- Description description = (Description)listElement.getObject();
- descriptionVector.addElement(description);
- }
- }
- else
- regPublishTool.removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
-
- CategoryBag catBag = null;
- if (catListElementVector != null)
- {
- catBag = new CategoryBag();
- for (int i=0;i<catListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)catListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- catBag.add(kr);
- }
- }
- else
- regPublishTool.removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- regPublishTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,nameVector);
- if (descriptionVector != null)
- regPublishTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,descriptionVector);
- if (catBag != null)
- regPublishTool.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES,catBag);
- return regPublishTool;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- try
- {
- BusinessEntity be = (BusinessEntity)propertyTable_.get(UDDIActionInputs.LATEST_BUSINESS);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- String uuidServiceKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY);
- ListElement wsdlURLListElement = (ListElement)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- Vector nameListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES);
- Vector descriptionListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS);
- Vector catListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES);
-
- String wsdlURL = (String)wsdlURLListElement.getObject();
-
- Vector nameVector = new Vector();
- for (int i=0;i<nameListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)nameListElementVector.elementAt(i);
- Name name = (Name)listElement.getObject();
- nameVector.addElement(name);
- }
-
- Vector descriptionVector = null;
- if (descriptionListElementVector != null)
- {
- descriptionVector = new Vector();
- for (int i=0;i<descriptionListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)descriptionListElementVector.elementAt(i);
- Description description = (Description)listElement.getObject();
- descriptionVector.addElement(description);
- }
- }
-
- CategoryBag catBag = null;
- if (catListElementVector != null)
- {
- catBag = new CategoryBag();
- for (int i=0;i<catListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)catListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- catBag.add(kr);
- }
- }
-
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
-
- // Note: The JSP will prevent this routine from executing if be is null.
- Uddi4jHelper uddi4jHelper = new Uddi4jHelper();
- Definition def = uddi4jHelper.getWSDLDefinition(wsdlURL);
-
- // Publish/update the service interfaces first.
- RegPublishServiceInterfaceSimpleAction regPublishSIAction = new RegPublishServiceInterfaceSimpleAction(controller_);
- int currentNodeId = getSelectedNavigatorNode().getNodeId();
- NodeManager nodeManager = regNode_.getNodeManager();
-
- Hashtable tModelsTable = new Hashtable();
- TModel[] tModels = null;
- if (uddi4jHelper.isMonolithicWSDL(def))
- {
- tModels = new TModel[1];
- tModels[0] = uddi4jHelper.newTModel(wsdlURL, def);
- }
- else
- {
- String[] imports = uddi4jHelper.getImports(def, wsdlURL);
- tModels = new TModel[imports.length];
- for (int i = 0; i < tModels.length; i++)
- tModels[i] = uddi4jHelper.newTModel(imports[i]);
- }
-
- if (tModels != null)
- {
- for (int i=0;i<tModels.length;i++)
- {
- boolean inputsValid = regPublishSIAction.populatePropertyTable(uddi4jHelper.getWSDL(tModels[i]), tModels[i]);
- if (inputsValid)
- {
- regPublishSIAction.run();
- Object savedTModel = regPublishSIAction.getPropertyTable().get(UDDIActionInputs.QUERY_OUTPUT_SAVED_TMODEL);
- if (savedTModel != null)
- {
- tModelsTable.put(((TModel)savedTModel).getNameString(), savedTModel);
- }
- // Reselect the current node.
- nodeManager.setSelectedNodeId(currentNodeId);
- }
- }
- }
-
- BusinessService busService = uddi4jHelper.newBusinessService(wsdlURL, def, tModelsTable);
- if (isUpdate_)
- busService.setServiceKey(uuidServiceKey);
- busService.setBusinessKey(be.getBusinessKey());
- busService.setNameVector(nameVector);
- busService.setDescriptionVector(descriptionVector);
- busService.setCategoryBag(catBag);
- regElement.handlePreInvocation(busService);
- Vector bsVector = new Vector();
- bsVector.add(busService);
- busService = (BusinessService)proxy.save_service(regElement.getAuthInfoString(), bsVector).getBusinessServiceVector().get(0);
- refreshNode(busService);
- if (isUpdate_)
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_UPDATED",busService.getDefaultNameString()));
- else
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_PUBLISHED",busService.getDefaultNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"WSDLException",e);
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e))
- regElement.setDefaults();
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceInterfaceAction.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceInterfaceAction.java
deleted file mode 100644
index b8456b253..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/actions/UpdateServiceInterfaceAction.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.actions;
-
-import java.net.MalformedURLException;
-import java.util.Hashtable;
-import java.util.Vector;
-import javax.wsdl.WSDLException;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.MessageQueue;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.util.Uddi4jHelper;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException;
-import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.IdentifierBag;
-import org.uddi4j.util.KeyedReference;
-
-public class UpdateServiceInterfaceAction extends UpdateAction
-{
- private boolean isUpdate_;
- public UpdateServiceInterfaceAction(Controller controller)
- {
- super(controller,true);
- isUpdate_ = true;
- }
-
- protected boolean processOthers(MultipartFormDataParser parser,FormToolPropertiesInterface formToolPI) throws MultipartFormDataException
- {
- String uuidKey = parser.getParameter(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY);
- String wsdlURLModifiedState = parser.getParameter(UDDIActionInputs.WSDL_URL_MODIFIED);
- String wsdlURL = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- String nameModifiedState = parser.getParameter(UDDIActionInputs.NAME_MODIFIED);
- String name = parser.getParameter(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- String[] descriptionModifiedStates = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_MODIFIED);
- String[] descriptionViewIds = parser.getParameterValues(UDDIActionInputs.DESCRIPTION_VIEWID);
- String[] descriptionLanguages = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE);
- String[] descriptions = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_DESCRIPTION);
- String[] idModifiedStates = parser.getParameterValues(UDDIActionInputs.IDENTIFIER_MODIFIED);
- String[] idViewIds = parser.getParameterValues(UDDIActionInputs.IDENTIFIER_VIEWID);
- String[] idTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE);
- String[] idKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME);
- String[] idKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE);
- String[] catModifiedStates = parser.getParameterValues(UDDIActionInputs.CATEGORY_MODIFIED);
- String[] catViewIds = parser.getParameterValues(UDDIActionInputs.CATEGORY_VIEWID);
- String[] catTypes = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_TYPE);
- String[] catKeyNames = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME);
- String[] catKeyValues = parser.getParameterValues(UDDIActionInputs.QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE);
-
- boolean inputsValid = true;
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
-
- if (uuidKey != null)
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,uuidKey);
-
- if (wsdlURLModifiedState != null && wsdlURL != null)
- {
- ListElement wsdlURLListElement = (ListElement)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- boolean isModified = Boolean.valueOf(wsdlURLModifiedState).booleanValue();
- if (isModified)
- wsdlURLListElement = new ListElement(wsdlURL);
- else
- wsdlURL = (String)wsdlURLListElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL,wsdlURLListElement);
- if (!Validator.validateURL(wsdlURL))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_WSDL_URL"));
- }
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
-
- if (nameModifiedState != null && name != null)
- {
- ListElement nameListElement = (ListElement)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- boolean isModified = Boolean.valueOf(nameModifiedState).booleanValue();
- if (isModified)
- nameListElement = new ListElement(name);
- else
- name = (String)nameListElement.getObject();
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,nameListElement);
- if (!Validator.validateString(name))
- {
- inputsValid = false;
- formToolPI.flagError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_INVALID_NAME"));
- }
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
-
- Hashtable languageHash = new Hashtable();
- if (descriptionModifiedStates != null && descriptionViewIds != null && descriptionLanguages != null && descriptions != null)
- {
- Vector oldDescriptionListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS);
- Vector newDescriptionListElementVector = new Vector();
- String[] parameters = new String[2];
- parameters[0] = uddiPerspective.getMessage("FORM_LABEL_DESCRIPTION");
- languageHash.clear();
- for (int i=0;i<descriptions.length;i++)
- {
- parameters[1] = String.valueOf(i+1);
- Description uddi4jDescription;
- if (descriptionLanguages[i].length() > 0)
- uddi4jDescription = new Description(descriptions[i],descriptionLanguages[i]);
- else
- {
- uddi4jDescription = new Description(descriptions[i]);
- if (i != 0)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_BLANK_LANGUAGE",parameters));
- }
- }
- if (languageHash.get(descriptionLanguages[i]) != null)
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_DUPLICATE_LANGUAGE",parameters));
- }
- else
- languageHash.put(descriptionLanguages[i],Boolean.TRUE);
- if (!Validator.validateString(descriptions[i]))
- {
- inputsValid = false;
- formToolPI.flagRowError(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,i);
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_ERROR_ROW_INVALID_TEXT",parameters));
- }
-
- int descriptionViewId = Integer.parseInt(descriptionViewIds[i]);
- boolean isModified = Boolean.valueOf(descriptionModifiedStates[i]).booleanValue();
-
- if (descriptionViewId == -1 || isModified)
- newDescriptionListElementVector.addElement(new ListElement(uddi4jDescription));
- else
- newDescriptionListElementVector.addElement(oldDescriptionListElementVector.elementAt(descriptionViewId));
- }
- reindexListElementVector(newDescriptionListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,newDescriptionListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS);
-
- if (idModifiedStates != null && idViewIds != null && idTypes != null && idKeyNames != null && idKeyValues != null)
- {
- Vector oldIdListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
- Vector newIdListElementVector = new Vector();
- for (int i=0;i<idKeyNames.length;i++)
- {
- KeyedReference kr = new KeyedReference(idKeyNames[i],idKeyValues[i],idTypes[i]);
- int idViewId = Integer.parseInt(idViewIds[i]);
- boolean isModified = Boolean.valueOf(idModifiedStates[i]).booleanValue();
- if (idViewId == -1 || isModified)
- newIdListElementVector.addElement(new ListElement(kr));
- else
- newIdListElementVector.addElement(oldIdListElementVector.elementAt(idViewId));
- }
- reindexListElementVector(newIdListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS,newIdListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
-
- if (catModifiedStates != null && catViewIds != null && catTypes != null && catKeyNames != null && catKeyValues != null)
- {
- Vector oldCatListElementVector = (Vector)formToolPI.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
- Vector newCatListElementVector = new Vector();
- for (int i=0;i<catTypes.length;i++)
- {
- KeyedReference kr = new KeyedReference(catKeyNames[i],catKeyValues[i],catTypes[i]);
- int catViewId = Integer.parseInt(catViewIds[i]);
- boolean isModified = Boolean.valueOf(catModifiedStates[i]).booleanValue();
- if (catViewId == -1 || isModified)
- newCatListElementVector.addElement(new ListElement(kr));
- else
- newCatListElementVector.addElement(oldCatListElementVector.elementAt(catViewId));
- }
- reindexListElementVector(newCatListElementVector);
- propertyTable_.put(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES,newCatListElementVector);
- }
- else
- removeProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
- return inputsValid;
- }
-
- public final boolean refreshFromRegistry()
- {
- controller_.getUDDIPerspective();
- try
- {
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY);
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- UDDIProxy proxy = regElement.getProxy();
- TModelDetail tModelDetail = proxy.get_tModelDetail(uuidKey);
- Vector tModelVector = tModelDetail.getTModelVector();
- if (tModelVector.size() > 0)
- {
- propertyTable_.put(UDDIActionInputs.LATEST_OBJECT,tModelVector.elementAt(0));
- return true;
- }
- }
- catch (UDDIException e)
- {
- // Feedback via Javascript popups.
- }
- catch (TransportException e)
- {
- // Feedback via Javascript popups.
- }
- isUpdate_ = false;
- return false;
- }
-
- public final boolean run()
- {
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
- MessageQueue messageQueue = uddiPerspective.getMessageQueue();
- try
- {
- String uuidKey = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY);
- String publishURL = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL);
- String userId = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID);
- String password = (String)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD);
- ListElement wsdlURLListElement = (ListElement)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- ListElement nameListElement = (ListElement)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME);
- Vector descriptionListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS);
- Vector idListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS);
- Vector catListElementVector = (Vector)propertyTable_.get(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES);
-
- String wsdlURL = (String)wsdlURLListElement.getObject();
-
- String name = (String)nameListElement.getObject();
-
- Vector descriptionVector = null;
- if (descriptionListElementVector != null)
- {
- descriptionVector = new Vector();
- for (int i=0;i<descriptionListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)descriptionListElementVector.elementAt(i);
- Description description = (Description)listElement.getObject();
- descriptionVector.addElement(description);
- }
- }
-
- IdentifierBag idBag = null;
- if (idListElementVector != null)
- {
- idBag = new IdentifierBag();
- for (int i=0;i<idListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)idListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- idBag.add(kr);
- }
- }
-
- CategoryBag catBag = null;
- if (catListElementVector != null)
- {
- catBag = new CategoryBag();
- for (int i=0;i<catListElementVector.size();i++)
- {
- ListElement listElement = (ListElement)catListElementVector.elementAt(i);
- KeyedReference kr = (KeyedReference)listElement.getObject();
- catBag.add(kr);
- }
- }
-
- TModel tModel = (new Uddi4jHelper()).newTModel(wsdlURL);
- if (isUpdate_)
- tModel.setTModelKey(uuidKey);
- tModel.setName(name);
- tModel.setDescriptionVector(descriptionVector);
- tModel.setIdentifierBag(idBag);
- tModel.setCategoryBag(catBag);
-
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- if (!regElement.isLoggedIn())
- regElement.performLogin(publishURL,userId,password);
- UDDIProxy proxy = regElement.getProxy();
- Vector tModelVector = new Vector();
- tModelVector.add(tModel);
- tModel = (TModel)proxy.save_tModel(regElement.getAuthInfoString(), tModelVector).getTModelVector().get(0);
- refreshNode(tModel);
- if (isUpdate_)
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACE_UPDATED",tModel.getNameString()));
- else
- messageQueue.addMessage(uddiPerspective.getMessage("MSG_INFO_SERVICE_INTERFACE_PUBLISHED",tModel.getNameString()));
- return true;
- }
- catch (WSDLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"WSDLException",e);
- }
- catch (TransportException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"TransportException",e);
- }
- catch (UDDIException e)
- {
- if(UDDIExceptionHandler.requiresReset(e)){
- RegistryElement regElement = (RegistryElement)regNode_.getTreeElement();
- regElement.setDefaults();
- }
- messageQueue.addMessage(uddiPerspective.getController().getMessage("MSG_ERROR_UNEXPECTED"));
- messageQueue.addMessage("UDDIException");
- messageQueue.addMessage(e.toString());
- }
- catch (MalformedURLException e)
- {
- handleUnexpectedException(uddiPerspective,messageQueue,"MalformedURLException",e);
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIActionInputs.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIActionInputs.java
deleted file mode 100644
index f47b2b09c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIActionInputs.java
+++ /dev/null
@@ -1,209 +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.wst.ws.internal.explorer.platform.uddi.constants;
-
-public class UDDIActionInputs
-{
- // OpenRegistryAction
- public static final String REGISTRY_NAME = "registryName";
- public static final String INQUIRY_URL = "inquiryURL";
- public static final String PUBLISH_URL = "publishURL";
- public static final String REGISTRATION_URL = "registrationURL";
- public static final String CHECK_USER_DEFINED_CATEGORIES = "checkUserDefinedCategories";
- public static final String UDDI_USERNAME = "uddiUsername";
- public static final String UDDI_PASSWORD = "uddiPassword";
-
- // Fixed and user-defined categories
- public static final String CATEGORIES_DIRECTORY = "categoriesDirectory";
- public static final String CATEGORY_TMODEL_KEY = "categoryTModelKey";
- public static final String CATEGORY_FILENAME = "categoryFileName";
- public static final String USER_DEFINED_CATEGORIES = "userDefinedCategories";
-
- // Discovery URL use type
- public static final String DISCOVERY_URL_TYPE = "businessEntity";
-
- // Results (NODEID)
- public static final String NODEID_SERVICE_INTERFACE = "nodeId_ServiceInterface";
- public static final String NODEID_SERVICE = "nodeId_Service";
- public static final String NODEID_BUSINESS = "nodeId_Business";
-
- // RegFind..Actions/RegPublish..Actions
- public static final String QUERY_INPUT_OVERRIDE_ADD_QUERY_NODE = "overrideAddQueryNode";
- public static final String QUERY_NAME = "queryName";
- public static final String QUERY_ITEM = "queryItem";
- public static final int QUERY_ITEM_QUERIES = -1;
- public static final int QUERY_ITEM_BUSINESSES = 0;
- public static final int QUERY_ITEM_SERVICES = 1;
- public static final int QUERY_ITEM_SERVICE_INTERFACES = 2;
- public static final int QUERY_STYLE_SIMPLE = 0;
- public static final int QUERY_STYLE_ADVANCED = 1;
- public static final int QUERY_STYLE_UUID = 2;
- public static final String QUERY_INPUT_ADVANCED_OWNED = "advancedOwned";
- public static final String QUERY_INPUT_ADVANCED_PUBLISH_URL = "advancedPublishURL";
- public static final String QUERY_INPUT_ADVANCED_USERID = "advancedUserId";
- public static final String QUERY_INPUT_ADVANCED_PASSWORD = "advancedPassword";
- public static final String QUERY_INPUT_ADVANCED_NAME_LANGUAGE = "advancedNameLanguage";
- public static final String QUERY_INPUT_ADVANCED_NAME = "advancedName";
- public static final String QUERY_INPUT_ADVANCED_IDENTIFIER_TYPE = "advancedIdentifierType";
- public static final String QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_NAME = "advancedIdentifierKeyName";
- public static final String QUERY_INPUT_ADVANCED_IDENTIFIER_KEY_VALUE = "advancedIdentifierKeyValue";
- public static final String QUERY_INPUT_ADVANCED_CATEGORY_TYPE = "advancedCategoryType";
- public static final String QUERY_INPUT_ADVANCED_CATEGORY_KEY_NAME = "advancedCategoryKeyName";
- public static final String QUERY_INPUT_ADVANCED_CATEGORY_KEY_VALUE = "advancedCategoryKeyValue";
- public static final String QUERY_INPUT_ADVANCED_DISCOVERYURL = "advancedDiscoveryURL";
- public static final String QUERY_INPUT_ADVANCED_FINDQUALIFIER = "advancedFindQualifier";
- public static final String QUERY_INPUT_ADVANCED_SORT_BY_NAME = "advancedSortByName";
- public static final String QUERY_INPUT_ADVANCED_SORT_BY_DATE = "advancedSortByDate";
- public static final String QUERY_INPUT_ADVANCED_MAX_SEARCH_SET = "advancedMaxSearchSet";
- public static final int QUERY_MAX_SEARCH_SET = 100;
- public static final String QUERY_INPUT_ADVANCED_MAX_RESULTS = "advancedMaxResults";
- public static final int QUERY_MAX_RESULTS = 10;
-
- public static final String QUERY_STYLE_BUSINESSES = "queryStyleBusinesses";
- public static final String QUERY_INPUT_SIMPLE_BUSINESS_NAME = "simpleBusinessName";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_OWNED = "advancedBusinessOwned";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_NAMES = "advancedBusinessNames";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS = "advancedBusinessIdentifiers";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES = "advancedBusinessCategories";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS = "advancedBusinessDiscoveryURLs";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES = "advancedBusinessServiceInterfaces";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_SERVICE_INTERFACES_COPY = "advancedBusinessServiceInterfacesCopy";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_TMODELBAG = "advancedBusinessTModelBag";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_FINDQUALIFIERS = "advancedBusinessFindQualifiers";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET = "advancedBusinessMaxSearchSet";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS = "advancedBusinessMaxResults";
-
- public static final String QUERY_STYLE_SERVICES = "queryStyleServices";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_NAME = "simpleServiceName";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_OWNED = "advancedServiceOwned";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_BUSINESS = "advancedServiceBusiness";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_BUSINESS_COPY = "advancedServiceBusinessCopy";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_SERVICE_PROVIDER = "advancedServiceServiceProvider";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_NAMES = "advancedServiceNames";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES = "advancedServiceCategories";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES = "advancedServiceServiceInterfaces";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_SERVICE_INTERFACES_COPY = "advancedServiceServiceInterfacesCopy";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_TMODEL = "advancedServiceTModel";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_TMODELBAG = "advancedServiceTModelBag";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_FINDQUALIFIERS = "advancedServiceFindQualifiers";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET = "advancedServiceMaxSearchSet";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS = "advancedServiceMaxResults";
-
- public static final String QUERY_STYLE_SERVICE_INTERFACES = "queryStyleServiceInterfaces";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME = "simpleServiceInterfaceName";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_USE_SERVICE = "advancedUseService";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE = "advancedServiceInterfaceService";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_SERVICE_COPY = "advancedServiceInterfaceServiceCopy";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_BUSINESS_SERVICE = "advancedServiceInterfaceBusinessService";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_OWNED = "advancedServiceInterfaceOwned";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME = "advancedServiceInterfaceName";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS = "advancedServiceInterfaceIdentifiers";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES = "advancedServiceInterfaceCategories";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_FINDQUALIFIERS = "advancedServiceInterfaceFindQualifiers";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET = "advancedServiceInterfaceMaxSearchSet";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS = "advancedServiceInterfaceMaxResults";
-
- public static final String QUERY_INPUT_ADVANCED_REGISTRY_NAME = "advancedRegistryName";
-
- public static final String QUERY_INPUT_UUID_KEY = "uuidKey";
- public static final String QUERY_INPUT_UUID_BUSINESS_KEY = "uuidBusinessKey";
- public static final String QUERY_INPUT_UUID_SERVICE_KEY = "uuidServiceKey";
- public static final String QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY = "uuidServiceInterfaceKey";
-
- public static final String QUERY_OUTPUT_SAVED_TMODEL = "savedTModel";
-
- // Sub Queries:
- public static final String SUBQUERIES_PROPERTIES = "subQueriesProperties";
- public static final String SUBQUERY_KEY = "subQueryKey";
- public static final String NEW_SUBQUERY_INITIATED = "newSubQueryInitiated";
- public static final String NEW_SUBQUERY_QUERY_ITEM = "newSubQueryQueryItem";
- public static final String SELECTED_NODEIDS = "selectedNodeIds";
- public static final String SUBQUERY_LIST_KEY = "subQueryListKey";
- public static final String SUBQUERY_LIST_ITEMID = "subQueryListItemId";
- public static final String SHOW_RESULTS_TARGET = "showResultsTarget";
- public static final String SUBQUERY_GET = "subQueryGet";
-
- // RegPublish..Actions (some constants from the RegFind...Actions will be reused.
- public static final String QUERY_INPUT_SIMPLE_BUSINESS_DESCRIPTION = "simpleBusinessDescription";
-
- public static final String QUERY_INPUT_ADVANCED_DESCRIPTION_LANGUAGE = "advancedDescriptionLanguage";
- public static final String QUERY_INPUT_ADVANCED_DESCRIPTION = "advancedDescription";
- public static final String QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS = "advancedBusinessDescriptions";
-
- public static final String QUERY_INPUT_WSDL_URL = "wsdlURL";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL = "simpleServiceInterfaceWSDLURL";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION = "simpleServiceInterfaceDescription";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL = "advancedServiceInterfaceWSDLURL";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS = "advancedServiceInterfaceDescriptions";
-
- public static final String QUERY_INPUT_SIMPLE_SERVICE_BUSINESS = "simpleServiceBusiness";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_BUSINESS_COPY = "simpleServiceBusinessCopy";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_SERVICE_PROVIDER = "simpleServiceServiceProvider";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL = "simpleServiceWSDLURL";
- public static final String QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION = "simpleServiceDescription";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL = "advancedServiceWSDLURL";
- public static final String QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS = "advancedServiceDescriptions";
-
- // WSDL Browser
- public static final String PROJECT = "project";
- public static final String WSDL_TYPE = "wsdlType";
- public static final int WSDL_TYPE_SERVICE_INTERFACE = 0;
- public static final int WSDL_TYPE_SERVICE = 1;
- public static final String QUERY_INPUT_WEBPROJECT_WSDL_URL = "webProjectWSDLURL";
- public static final String QUERY_INPUT_FAVORITE_WSDL_URL = "favoriteWSDLURL";
-
- // Details
- public static final String LATEST_OBJECT = "latestObject";
- public static final String DISCOVERYURL_MODIFIED = "discoveryURLModified";
- public static final String DISCOVERYURL_VIEWID = "discoveryURLViewId";
- public static final String NAME_MODIFIED = "nameModified";
- public static final String NAME_VIEWID = "businessViewId";
- public static final String DESCRIPTION_MODIFIED = "descriptionModified";
- public static final String DESCRIPTION_VIEWID = "descriptionViewId";
- public static final String IDENTIFIER_MODIFIED = "identifierModified";
- public static final String IDENTIFIER_VIEWID = "identifierViewId";
- public static final String CATEGORY_MODIFIED = "categoryModified";
- public static final String CATEGORY_VIEWID = "categoryViewId";
- public static final String WSDL_URL_MODIFIED = "wsdlURLModified";
- public static final String PUBLISH_ACTION = "publishAction";
- public static final String LATEST_BUSINESS = "latestBusiness";
-
- // Refresh action
- public static final String REFRESH_NODE = "refreshNode";
-
- // Manage PublisherAssertions
- // "To" means from another business to my owning business
- public static final int DIRECTION_TO = 0;
- // "From" means from my owning business to another business
- public static final int DIRECTION_FROM = 1;
- public static final String PUBLISHER_ASSERTIONS_VIEWID = "publisherAssertionsViewId";
- public static final String PUBLISHER_ASSERTIONS_SELECTED_BUS_ID = "publisherAssertionsSelectedBusID";
- public static final String PUBLISHER_ASSERTIONS_DIRECTION = "publisherAssertionsDirection";
- public static final String QUERY_INPUT_ADD_PUBLISHER_ASSERTIONS = "queryInputAddPublisherAssertions";
- public static final String QUERY_INPUT_ADD_PUBLISHER_ASSERTIONS_COPY = "queryInputAddPublisherAssertionsCopy";
- public static final String QUERY_INPUT_EXISTING_PUBLISHER_ASSERTIONS = "queryInputExistingPublisherAssertions";
- public static final String PUBLISHER_ASSERTIONS_TYPE = "publisherAssertionsType";
- public static final String PUBLISHER_ASSERTIONS_TYPE_PARENT_CHILD = "parent-child";
- public static final String PUBLISHER_ASSERTIONS_TYPE_PEER_TO_PEER = "peer-peer";
- public static final String PUBLISHER_ASSERTIONS_TYPE_IDENTITY = "identity";
-
- // Manage Referenced Services
- public static final String QUERY_INPUT_REFERENCED_SERVICES = "referencedServices";
- public static final String QUERY_INPUT_SERVICES = "services";
- public static final String MANAGE_REFERENCED_SERVICES_OPERATION = "managedReferencedServicesOperation";
- public static final int MANAGE_REFERENCED_SERVICES_OPERATION_ADD = 0;
- public static final int MANAGE_REFERENCED_SERVICES_OPERATION_REMOVE = 1;
- public static final String REFERENCED_SERVICE_SELECT_STATE = "referencedServiceSelectState";
-
- // ResizeUDDIFrameAction
- public static final String FRAMESET_COLS_PERSPECTIVE_CONTENT = "framesetColsPerspectiveContent";
- public static final String FRAMESET_ROWS_ACTIONS_CONTAINER = "framesetRowsActionsContainer";
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIFrameNames.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIFrameNames.java
deleted file mode 100644
index f3d0b4d50..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIFrameNames.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.constants;
-
-public class UDDIFrameNames
-{
- public final static String NAVIGATOR_CONTAINER = "uddi_navigator_container";
- public final static String NAVIGATOR_TOOLBAR = "uddi_navigator_toolbar";
- public final static String NAVIGATOR_CONTENT = "uddi_navigator_content";
- public final static String ACTIONS_CONTAINER = "uddi_actions_container";
- public final static String PROPERTIES_CONTAINER = "uddi_properties_container";
- public final static String PROPERTIES_TOOLBAR = "uddi_properties_toolbar";
- public final static String PROPERTIES_CONTENT = "uddi_properties_content";
- public final static String STATUS_CONTAINER = "uddi_status_container";
- public final static String STATUS_TOOLBAR = "uddi_status_toolbar";
- public final static String STATUS_CONTENT = "uddi_status_content";
-
- public final static String CATEGORIES_WORKAREA = "categories_workarea";
- public final static String CATEGORIES_TOOLBAR = "categories_toolbar";
- public final static String CATEGORIES_CONTENT = "categories_content";
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIModelConstants.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIModelConstants.java
deleted file mode 100644
index ee3c9a272..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/constants/UDDIModelConstants.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.constants;
-
-public class UDDIModelConstants
-{
- // Registries under UDDIMain.
- public static final String REL_REGISTRIES = "registries";
-
- // Executed Queries folder under a registry.
- public static final String REL_QUERIES_PARENT = "queriesParent";
-
- // Published Businesses folder under a registry.
- public static final String REL_PUBLISHED_BUSINESSES_PARENT = "publishedBusinessesParent";
-
- // Published Services folder under a registry.
- public static final String REL_PUBLISHED_SERVICES_PARENT = "publishedServicesParent";
-
- // Published Service interfaces folder under a registry.
- public static final String REL_PUBLISHED_SERVICE_INTERFACES_PARENT = "publishedServiceInterfacesParent";
-
- // Queries under the Queries folder.
- public static final String REL_QUERIES = "queries";
- public static final String INITIAL_RESULTS = "initialResults";
- public static final String QUERY_TYPE = "queryType";
- public static final String SUBQUERY_TRANSFER_TARGET = "subQueryTransferTarget";
-
- // Objects under a Query node.
- public static final String REL_QUERY_RESULTS = "queryResults";
-
- // Categories
- public static final String REL_SUBCATEGORIES = "subCategories";
-
- // Published items inside the Published items folder.
- public static final String REL_PUBLISHED_ITEMS = "publishedItems";
-
- // Businesses
- public static final String IS_BUSINESS_OWNED = "isBusinessOwned";
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/AbstractUDDIElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/AbstractUDDIElement.java
deleted file mode 100644
index 0cb5d0237..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/AbstractUDDIElement.java
+++ /dev/null
@@ -1,57 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-
-public abstract class AbstractUDDIElement extends TreeElement
-{
- public AbstractUDDIElement(String name, Model model)
- {
- super(name, model);
- }
-
- public final TreeElement getParentElement()
- {
- return getParentElement(this);
- }
-
- public final TreeElement getParentElement(TreeElement child)
- {
- Enumeration e = child.getElements(ModelConstants.REL_OWNER);
- if (e.hasMoreElements())
- return (TreeElement)e.nextElement();
- else
- return null;
- }
-
- public final RegistryElement getRegistryElement()
- {
- if (this instanceof RegistryElement)
- return (RegistryElement)this;
- else
- {
- TreeElement childElement = this;
- TreeElement parentElement = getParentElement(childElement);
- while (parentElement != null && parentElement != childElement)
- {
- if (parentElement instanceof RegistryElement)
- return (RegistryElement)parentElement;
- childElement = parentElement;
- parentElement = getParentElement(childElement);
- }
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/BusinessElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/BusinessElement.java
deleted file mode 100644
index 61e613d60..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/BusinessElement.java
+++ /dev/null
@@ -1,50 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListManager;
-import org.uddi4j.datatype.business.BusinessEntity;
-
-public class BusinessElement extends AbstractUDDIElement
-{
- private BusinessEntity be_;
- private ListManager publisherAssertions_;
-
- public BusinessElement(BusinessEntity be,Model model)
- {
- super(be.getDefaultNameString(),model);
- be_ = be;
- setKey(be_.getBusinessKey());
- publisherAssertions_ = null;
- }
-
- public final BusinessEntity getBusinessEntity()
- {
- return be_;
- }
-
- public final void setBusinessEntity(BusinessEntity be)
- {
- be_ = be;
- setKey(be_.getBusinessKey());
- }
-
- public ListManager getPublisherAssertions()
- {
- return publisherAssertions_;
- }
-
- public void setPublisherAssertions(ListManager listManager)
- {
- publisherAssertions_ = listManager;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryElement.java
deleted file mode 100644
index 907f3a18c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryElement.java
+++ /dev/null
@@ -1,56 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.uddi4j.util.KeyedReference;
-
-public class CategoryElement extends AbstractUDDIElement
-{
- private KeyedReference category_;
-
- public CategoryElement(String name,KeyedReference category,Model model)
- {
- super(name,model);
- category_ = category;
- saveCategoryProperties();
- }
-
- private final void saveCategoryProperties()
- {
- if (category_ != null)
- {
- String keyName = category_.getKeyName();
- if (keyName != null)
- setName(keyName);
- }
- }
-
- public final KeyedReference getCategory()
- {
- return category_;
- }
-
- public final String getNameForTree()
- {
- StringBuffer nameForTree = new StringBuffer("[");
- nameForTree.append(category_.getKeyValue()).append("] ").append(category_.getKeyName());
- return nameForTree.toString();
- }
-
- public final void updateCategory(String keyName,String keyValue,String tModelKey)
- {
- category_.setKeyName(keyName);
- category_.setKeyValue(keyValue);
- category_.setTModelKey(tModelKey);
- saveCategoryProperties();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java
deleted file mode 100644
index f2966562b..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java
+++ /dev/null
@@ -1,569 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.text.ParseException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Vector;
-import javax.servlet.ServletContext;
-import org.eclipse.wst.ws.internal.datamodel.BasicModel;
-import org.eclipse.wst.ws.internal.datamodel.Element;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.util.HTMLUtils;
-import org.eclipse.wst.ws.internal.model.v10.taxonomy.Category;
-import org.eclipse.wst.ws.internal.model.v10.taxonomy.Taxonomy;
-import org.uddi4j.util.KeyedReference;
-
-public class CategoryModel extends BasicModel
-{
- private ServletContext application_;
- private String defaultDataFile_;
- private Hashtable categoryElements_;
- private String columnDelimiter_;
- private String stringDelimiter_;
- private String categoryKey_;
- private boolean checked_;
- private String displayName_;
- private String tModelKey_;
- private Throwable errorException_;
-
- // Return codes for loading and saving category data.
- public static final byte OPERATION_SUCCESSFUL = 0x00;
- public static final byte ERROR_FILE = 0x01;
- public static final byte ERROR_SECURITY = 0x02;
- public static final byte ERROR_ENCODING = 0x03;
- public static final byte ERROR_IO = 0x04;
- public static final byte ERROR_CATEGORY_KEY = 0x05;
-
- private final String defaultColumnDelimiter_ = "#";
- private final String defaultStringDelimiter_ = "\"";
-
- public CategoryModel()
- {
- super("categories");
- application_ = null;
- defaultDataFile_ = null;
- columnDelimiter_ = defaultColumnDelimiter_;
- stringDelimiter_ = defaultStringDelimiter_;
- categoryElements_ = null;
- categoryKey_ = null;
- checked_ = true;
- displayName_ = null;
- tModelKey_ = null;
- errorException_ = null;
- }
-
- /**
- * CategoryModels load their data from the file named via the
- * {@link #setDefaultDataFile(String)} method. The data file
- * name is interpretted as either a physical pathname or a
- * context-root relative pathname depending on whether the
- * servlet context or "application" is null (default) or not.
- * @param application The application context, null by default.
- * Value can be the ServletContext of the WSExplorer or null.
- */
- public final void setServletContext(ServletContext application)
- {
- application_ = application;
- }
-
- public final void setDefaultDataFile(String defaultDataFile)
- {
- defaultDataFile_ = defaultDataFile;
- }
-
- public final void setCategoryKey(String categoryKey)
- {
- categoryKey_ = categoryKey;
- }
-
- public final String getCategoryKey()
- {
- return categoryKey_;
- }
-
- public final void setColumnDelimiter(String columnDelimiter)
- {
- columnDelimiter_ = columnDelimiter;
- }
-
- public final String getColumnDelimiter()
- {
- return columnDelimiter_;
- }
-
- public final void setStringDelimiter(String stringDelimiter)
- {
- stringDelimiter_ = stringDelimiter;
- }
-
- public final String getStringDelimiter()
- {
- return stringDelimiter_;
- }
-
- public final void enableChecked(boolean isChecked)
- {
- checked_ = isChecked;
- }
-
- public final boolean isChecked()
- {
- return checked_;
- }
-
- public final void setDisplayName(String displayName)
- {
- displayName_ = displayName;
- }
-
- public final String getDisplayName()
- {
- return displayName_;
- }
-
- public final void setTModelKey(String tModelKey)
- {
- tModelKey_ = tModelKey;
- }
-
- public final String getTModelKey()
- {
- return tModelKey_;
- }
-
- public final boolean isDataLoaded()
- {
- return (categoryElements_ != null);
- }
-
- public final Throwable getErrorException()
- {
- return errorException_;
- }
-
- private final boolean isEnclosedInQuotes(String string)
- {
- return string.startsWith("\"") && string.endsWith("\"");
- }
-
- public final void loadFromTaxonomy(Taxonomy taxonomy)
- {
- String name = taxonomy.getName();
- CategoryElement root = new CategoryElement(name,null,this);
- setRootElement(root);
- categoryElements_ = new Hashtable();
- for (Iterator it = taxonomy.getCategory().iterator(); it.hasNext();)
- {
- addCategory(root, (Category)it.next());
- }
- }
-
- private void addCategory(CategoryElement parent, Category category)
- {
- String keyName = category.getName();
- String keyValue = category.getCode();
- CategoryElement child = new CategoryElement(keyName,new KeyedReference(keyName,keyValue,tModelKey_),this);
- parent.connect(child,UDDIModelConstants.REL_SUBCATEGORIES,ModelConstants.REL_OWNER);
- categoryElements_.put(keyValue, child);
- for (Iterator it = category.getCategory().iterator(); it.hasNext();)
- {
- addCategory(child, (Category)it.next());
- }
- }
-
- public final byte loadFromDefaultDataFile()
- {
- try
- {
- if (defaultDataFile_ == null)
- throw new FileNotFoundException();
- BufferedReader br = null;
- if (application_ == null)
- br = new BufferedReader(new InputStreamReader(new FileInputStream(defaultDataFile_),HTMLUtils.UTF8_ENCODING));
- else
- br = new BufferedReader(new InputStreamReader(application_.getResourceAsStream(defaultDataFile_),HTMLUtils.UTF8_ENCODING));
- return loadData(br);
- }
- catch (FileNotFoundException e)
- {
- errorException_ = e;
- return ERROR_FILE;
- }
- catch (SecurityException e)
- {
- errorException_ = e;
- return ERROR_SECURITY;
- }
- catch (UnsupportedEncodingException e)
- {
- errorException_ = e;
- return ERROR_ENCODING;
- }
- }
-
- public final byte loadFromDelimiterFile()
- {
- // Get the associated .properties file and set the delimiters. The defaultDataFile_ is set to the delimiter file in this case.
- // The properties file contains the following keys:
- // wsad.dataFile - location of the category data file.
- // wsad.checked - whether or not the category is checked.
- // wsad.name - the display name of the category.
- // column.delimiter - the delimiter character used for separating columns.
- // string.delimiter - the delimiter character used to encapsulate data such that column delimiter characters are treated as data.
- try
- {
- Properties p = new Properties();
- InputStream fin = null;
- if (application_ == null)
- fin = new FileInputStream(defaultDataFile_);
- else
- fin = application_.getResourceAsStream(defaultDataFile_);
- p.load(fin);
- fin.close();
- columnDelimiter_ = p.getProperty("column.delimiter");
- stringDelimiter_ = p.getProperty("string.delimiter");
- defaultDataFile_ = p.getProperty("wsad.dataFile");
- return loadFromDefaultDataFile();
- }
- catch (FileNotFoundException e)
- {
- errorException_ = e;
- return ERROR_FILE;
- }
- catch (SecurityException e)
- {
- errorException_ = e;
- return ERROR_SECURITY;
- }
- catch (IOException e)
- {
- errorException_ = e;
- return ERROR_IO;
- }
- }
-
- public final byte loadData(BufferedReader br)
- {
- errorException_ = null;
- CategoryElement rootElement = null;
- categoryElements_ = new Hashtable();
- byte returnCode = OPERATION_SUCCESSFUL;
- String line = null;
- int lineNumber = 0;
- try
- {
- char columnDelimiterChar = columnDelimiter_.charAt(0);
- char stringDelimiterChar = stringDelimiter_.charAt(0);
- Vector values = new Vector();
- while((line = br.readLine()) != null)
- {
- lineNumber++;
- // Ignore blank lines.
- if (line.trim().length() == 0)
- continue;
- int index = 0;
- int length = line.length();
- boolean inStringDelimiters = false;
- values.removeAllElements();
- StringBuffer currentToken = new StringBuffer();
- while (index < length)
- {
- char currentChar = line.charAt(index);
- if (inStringDelimiters)
- {
- // In quote so ignoring delimiters
- if (currentChar == stringDelimiterChar)
- {
- if (index < length - 1)
- {
- // currentChar could be a closing string delimiter or escape
- // Need to look ahead to be sure...
- char followingChar = line.charAt(index + 1);
- if (followingChar == stringDelimiterChar)
- {
- // There is an escaped quote
- currentToken.append(stringDelimiterChar);
- // jump forward two characters.
- index += 2;
- }
- else
- {
- // There was a closing string delimiter...jump forward to the next delimiter
- inStringDelimiters = false;
- //look for the next column delimiter character
- int nextDelimiter = line.indexOf(columnDelimiterChar, index);
- if (nextDelimiter == -1)
- {
- // There were no more delimiters so break out of the loop
- break;
- }
- else
- {
- values.addElement(currentToken.toString());
- //values[tokenCount++] = currentToken.toString();
- currentToken.setLength(0);
- inStringDelimiters = false;
- index = nextDelimiter + 1;
- }
- }
- }
- else
- {
- // This is the last character and it's a closing string delimiter.
- index++;
- inStringDelimiters = false;
- }
- }
- else
- {
- currentToken.append(currentChar);
- index++;
- }
- }
- else if (currentChar == columnDelimiterChar)
- {
- // There was a delimiter outside of quotes
- values.addElement(currentToken.toString());
- //values[tokenCount++] = currentToken.toString();
- currentToken.setLength(0);
- index++;
- }
- else if (currentChar == stringDelimiterChar)
- {
- // A quote appearing outside of quotes must be a opening quote
- inStringDelimiters = true;
- index++;
- }
- else
- {
- // There is a normal char outside of quotes
- currentToken.append(currentChar);
- index++;
- }
- }
- // Expect token count to be values.length - 1 at this point if everything is ok
- if (inStringDelimiters)
- {
- br.close();
- throw new ParseException(line,lineNumber);
- }
-
- // Add the final token.
- values.addElement(currentToken.toString());
-
- // 3 columns format. From left to right, these are:
- // 1) category's key value
- // 2) category's key name
- // 3) category's parent key value
- // Convert to 4 columns format.
- if (values.size() == 3)
- {
- if (categoryKey_ != null)
- values.insertElementAt(categoryKey_, 0);
- else
- values.insertElementAt(tModelKey_, 0);
- }
-
- // 4 columns format. From left to right, these are:
- // 1) type of category (categoryKey)
- // 2) category's key value
- // 3) category's key name
- // 4) category's parent key value
- if (values.size() == 4)
- {
- String categoryKey = (String)values.elementAt(0);
- if (categoryKey_ == null)
- categoryKey_ = categoryKey;
- else if (!categoryKey_.equals(categoryKey))
- throw new Exception(categoryKey);
- String keyValue = (String)values.elementAt(1);
- String keyName = (String)values.elementAt(2);
- String parentKeyValue = (String)values.elementAt(3);
- if (rootElement == null)
- {
- rootElement = new CategoryElement(displayName_,null,this);
- setRootElement(rootElement);
- }
- if (isEnclosedInQuotes(keyName))
- keyName = keyName.substring(1,keyName.length()-1);
- // Check if the CategoryElement already exists. If it does, refresh the Category.
- CategoryElement categoryElement = (CategoryElement)categoryElements_.get(keyValue);
- if (categoryElement != null)
- categoryElement.updateCategory(keyName,keyValue,tModelKey_);
- else
- categoryElement = new CategoryElement(keyName,new KeyedReference(keyName,keyValue,tModelKey_),this);
- Element parentElement;
- if (parentKeyValue.equals(keyValue))
- parentElement = rootElement;
- else
- parentElement = (Element)categoryElements_.get(parentKeyValue);
- if (parentElement == null)
- {
- parentElement = new CategoryElement("temp",new KeyedReference("",parentKeyValue,tModelKey_),this);
- categoryElements_.put(parentKeyValue,parentElement);
- }
- else
- parentElement.connect(categoryElement,UDDIModelConstants.REL_SUBCATEGORIES,ModelConstants.REL_OWNER);
- categoryElements_.put(keyValue,categoryElement);
- }
- else
- {
- br.close();
- throw new ParseException(line,lineNumber);
- }
- }
- br.close();
- return returnCode;
- }
- catch (IOException e)
- {
- errorException_ = e;
- returnCode = ERROR_IO;
- }
- catch (ParseException e)
- {
- errorException_ = e;
- returnCode = ERROR_FILE;
- }
- catch (Exception e)
- {
- errorException_ = e;
- returnCode = ERROR_CATEGORY_KEY;
- }
- categoryElements_ = null;
- return returnCode;
- }
-
- private final void saveData(PrintWriter pw,CategoryElement categoryElement,CategoryElement parentElement,boolean isFirst)
- {
- // File format:
- // <categoryKey>#<keyValue>#<keyName>#<parentKeyValue>
- KeyedReference kr = categoryElement.getCategory();
- // Check if this is not the root element.
- if (kr != null)
- {
- String keyName = kr.getKeyName();
- String keyValue = kr.getKeyValue();
- String parentKeyValue;
- if (parentElement == null)
- parentKeyValue = keyValue;
- else
- {
- KeyedReference parentKr = parentElement.getCategory();
- // Check if the parent is the root element.
- if (parentKr == null)
- parentKeyValue = keyValue;
- else
- parentKeyValue = parentKr.getKeyValue();
- }
- if (!isFirst)
- pw.println();
- else
- isFirst = false;
- pw.print(mangle(categoryKey_));
- pw.print(columnDelimiter_);
- pw.print(mangle(keyValue));
- pw.print(columnDelimiter_);
- pw.print(mangle(keyName));
- pw.print(columnDelimiter_);
- pw.print(mangle(parentKeyValue));
- }
- Enumeration e = categoryElement.getElements(UDDIModelConstants.REL_SUBCATEGORIES);
- if (e != null)
- {
- while (e.hasMoreElements())
- saveData(pw,(CategoryElement)e.nextElement(),categoryElement,isFirst);
- }
- }
-
- // Mangle an input string if it contains default column delimiter characters by surrounding it with the string delimiters.
- private final String mangle(String input)
- {
- if (input != null && input.indexOf(columnDelimiter_) != -1)
- {
- StringBuffer s = new StringBuffer(input);
- s.insert(0,stringDelimiter_).append(stringDelimiter_);
- return s.toString();
- }
- return input;
- }
-
- public final byte saveData(String fileName)
- {
- // The fileName should already be URLEncoded.
- byte returnCode = OPERATION_SUCCESSFUL;
- errorException_ = null;
- if (isDataLoaded())
- {
- try
- {
- PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(fileName),HTMLUtils.UTF8_ENCODING),true);
- CategoryElement rootElement = (CategoryElement)getRootElement();
- saveData(pw,rootElement,null,true);
- pw.flush();
- pw.close();
- // Save the properties file.
- Properties p = new Properties();
- p.setProperty("wsad.dataFile",fileName);
- p.setProperty("wsad.checked",String.valueOf(checked_));
- p.setProperty("wsad.name",displayName_);
- p.setProperty("column.delimiter",columnDelimiter_);
- p.setProperty("string.delimiter",stringDelimiter_);
- StringBuffer propertiesFileName = new StringBuffer(fileName.substring(0,fileName.lastIndexOf('.')));
- propertiesFileName.append(".properties");
- FileOutputStream fout = new FileOutputStream(propertiesFileName.toString());
- p.store(fout,null);
- fout.close();
- }
- catch (FileNotFoundException e)
- {
- errorException_ = e;
- returnCode = ERROR_FILE;
- }
- catch (SecurityException e)
- {
- errorException_ = e;
- returnCode = ERROR_SECURITY;
- }
- catch (UnsupportedEncodingException e)
- {
- errorException_ = e;
- returnCode = ERROR_ENCODING;
- }
- catch (IOException e)
- {
- errorException_ = e;
- returnCode = ERROR_IO;
- }
- }
- return returnCode;
- }
-
- public String toString()
- {
- return displayName_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublishedItemsElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublishedItemsElement.java
deleted file mode 100644
index c275efe26..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublishedItemsElement.java
+++ /dev/null
@@ -1,36 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-
-public class PublishedItemsElement extends AbstractUDDIElement
-{
- public PublishedItemsElement(int type,String name,Model model)
- {
- super(name,model);
- setPropertyAsString(ModelConstants.REL_CHILDREN,UDDIModelConstants.REL_PUBLISHED_ITEMS);
- setPropertyAsString(UDDIModelConstants.QUERY_TYPE,String.valueOf(type));
- }
-
- public final int getType()
- {
- return Integer.parseInt(getPropertyAsString(UDDIModelConstants.QUERY_TYPE));
- }
-
- public Enumeration getItems()
- {
- return getElements(UDDIModelConstants.REL_PUBLISHED_ITEMS);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublisherAssertionElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublisherAssertionElement.java
deleted file mode 100644
index 5232c835e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/PublisherAssertionElement.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.uddi4j.datatype.assertion.PublisherAssertion;
-import org.uddi4j.util.KeyedReference;
-
-public class PublisherAssertionElement {
-
- // owningBusinessKey_ is the key of the business element that owns this
- // publisherAssertionElement
- private String fromKey_;
- private String toKey_;
- private String owningBusinessKey_;
-
- // the other business that the containing business is asserted from or to
- private ListElement sp_;
- private int subQueryItemId_;
-
- // status of this publisherAssertion
- private String status_;
- private KeyedReference keyedReference_;
-
- public PublisherAssertionElement(String fromKey, String toKey, String owningBusinessKey, ListElement sp, int subQueryItemId, String status, KeyedReference keyedRef) {
- fromKey_ = fromKey;
- toKey_ = toKey;
- owningBusinessKey_ = owningBusinessKey;
- sp_ = sp;
- subQueryItemId_ = subQueryItemId;
- status_ = status;
- keyedReference_ = keyedRef;
- }
-
- public void setFromKey(String fromKey) {
- fromKey_ = fromKey;
- }
-
- public String getFromKey() {
- return fromKey_;
- }
-
- public void setToKey(String toKey) {
- toKey_ = toKey;
- }
-
- public String getToKey() {
- return toKey_;
- }
-
- public void setOwningBusinessKey(String key) {
- owningBusinessKey_ = key;
- }
-
- public String getOwningBusinessKey() {
- return owningBusinessKey_;
- }
-
- public void setServiceProvider(ListElement sp) {
- sp_ = sp;
- }
-
- public ListElement getServiceProvider() {
- return sp_;
- }
-
- public void setSubQueryItemId(int id) {
- subQueryItemId_ = id;
- }
-
- public int getSubQueryItemId() {
- return subQueryItemId_;
- }
-
- public void setStatus(String status) {
- status_ = status;
- }
-
- public String getStatus() {
- return status_;
- }
-
- public void setKeyedRef(KeyedReference keyedRef) {
- keyedReference_ = keyedRef;
- }
-
- public KeyedReference getKeyedRef() {
- return keyedReference_;
- }
-
- public PublisherAssertion getPublisherAssertion() {
- if (fromKey_ == null ||
- toKey_ == null ||
- keyedReference_ == null) {
- return null;
- }
-
- PublisherAssertion pubAssertion = new PublisherAssertion(fromKey_, toKey_, keyedReference_);
- return pubAssertion;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryElement.java
deleted file mode 100644
index 046de917b..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryElement.java
+++ /dev/null
@@ -1,61 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class QueryElement extends AbstractUDDIElement
-{
- private final void initQueryProperties(int itemType,Object[] results)
- {
- Vector resultsVector = new Vector();
- for (int i=0;i<results.length;i++)
- resultsVector.addElement(results[i]);
- setPropertyAsString(ModelConstants.REL_CHILDREN,UDDIModelConstants.REL_QUERY_RESULTS);
- setPropertyAsObject(UDDIModelConstants.INITIAL_RESULTS,resultsVector);
- setPropertyAsString(UDDIModelConstants.QUERY_TYPE,String.valueOf(itemType));
- }
-
- public QueryElement(BusinessEntity[] spList,String name,Model model)
- {
- super(name,model);
- initQueryProperties(UDDIActionInputs.QUERY_ITEM_BUSINESSES,spList);
- }
-
- public QueryElement(BusinessService[] bsList,String name,Model model)
- {
- super(name,model);
- initQueryProperties(UDDIActionInputs.QUERY_ITEM_SERVICES,bsList);
- }
-
- public QueryElement(TModel[] tModelList,String name,Model model)
- {
- super(name,model);
- initQueryProperties(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES,tModelList);
- }
-
- public int getQueryType()
- {
- return Integer.parseInt(getPropertyAsString(UDDIModelConstants.QUERY_TYPE));
- }
-
- public QueryParentElement getQueryParentElement()
- {
- return (QueryParentElement)getParentElement();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryParentElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryParentElement.java
deleted file mode 100644
index 126f37e1c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/QueryParentElement.java
+++ /dev/null
@@ -1,30 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-
-public class QueryParentElement extends AbstractUDDIElement
-{
- public QueryParentElement(String name,Model model)
- {
- super(name,model);
- setPropertyAsString(ModelConstants.REL_CHILDREN,UDDIModelConstants.REL_QUERIES);
- }
-
- public Enumeration getQueries()
- {
- return getElements(UDDIModelConstants.REL_QUERIES);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/RegistryElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/RegistryElement.java
deleted file mode 100644
index 7209f2a6e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/RegistryElement.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * -------- -------- -----------------------------------------------------------
- * 20060427 136449 brunssen@us.ibm.com - Vince Brunssen
- * 20060912 141796 gilberta@ca.ibm.com - Gilbert Andrews
- * 20070419 182864 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.model.v10.registry.Registry;
-import org.eclipse.wst.ws.internal.model.v10.taxonomy.Taxonomy;
-import org.eclipse.wst.ws.internal.model.v10.uddiregistry.UDDIRegistry;
-import org.eclipse.wst.ws.internal.parser.discovery.NetUtils;
-import org.eclipse.wst.ws.internal.registry.IRegistryManager;
-import org.eclipse.wst.ws.internal.registry.RegistryService;
-import org.eclipse.wst.ws.internal.registry.UDDIRegistryService;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.Description;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.response.AuthToken;
-import org.uddi4j.transport.TransportException;
-
-public class RegistryElement extends AbstractUDDIElement
-{
- private final long AUTH_INFO_TIMEOUT = 3000000;
- private UDDIProxy proxy_;
- private long authTokenTimestamp_;
- private AuthToken authToken_;
- private String id_;
- private String password_;
- private String inquiryURL_;
- private String publishURL_;
- private String cachedPublishURL_;
- private String registrationURL_;
- private Hashtable userDefinedCategories_;
- private boolean checkForUserDefinedCategories_;
- private String categoriesDirectory_;
-
- public RegistryElement(UDDIProxy proxy, String inquiryURL, String name, Model model)
- {
- super(name, model);
- proxy_ = proxy;
- inquiryURL_ = inquiryURL;
- publishURL_ = null;
- authTokenTimestamp_ = -1;
- authToken_ = null;
- id_ = null;
- password_ = null;
- cachedPublishURL_ = null;
- registrationURL_ = null;
- userDefinedCategories_ = null;
- checkForUserDefinedCategories_ = false;
- categoriesDirectory_ = null;
- }
-
- public final UDDIProxy getProxy()
- {
- return proxy_;
- }
-
- public void setDefaults()
- {
-
- authTokenTimestamp_ = -1;
- authToken_ = null;
- cachedPublishURL_ = null;
- }
-
- public final String getInquiryURL()
- {
- return inquiryURL_;
- }
-
- public final QueryParentElement getQueryParentElement()
- {
- return (QueryParentElement) (getElements(UDDIModelConstants.REL_QUERIES_PARENT).nextElement());
- }
-
- public final PublishedItemsElement getPublishedBusinessesElement()
- {
- return (PublishedItemsElement) (getElements(UDDIModelConstants.REL_PUBLISHED_BUSINESSES_PARENT).nextElement());
- }
-
- public final PublishedItemsElement getPublishedServicesElement()
- {
- return (PublishedItemsElement) (getElements(UDDIModelConstants.REL_PUBLISHED_SERVICES_PARENT).nextElement());
- }
-
- public final PublishedItemsElement getPublishedServiceInterfacesElement()
- {
- return (PublishedItemsElement) (getElements(UDDIModelConstants.REL_PUBLISHED_SERVICE_INTERFACES_PARENT).nextElement());
- }
-
- public final void performLogin(String publishURL, String userId, String password) throws TransportException, UDDIException, MalformedURLException
- {
- publishURL_ = publishURL;
- proxy_.setPublishURL(NetUtils.createURL(publishURL));
- authToken_ = proxy_.get_authToken(userId, password);
- authTokenTimestamp_ = System.currentTimeMillis();
- id_ = userId;
- password_ = password;
- }
-
- public final void performLogout() throws TransportException, UDDIException
- {
- proxy_.discard_authToken(authToken_.getAuthInfoString());
- }
-
- public final String getAuthInfoString()
- {
- if (!isLoggedIn())
- return null;
- if ((System.currentTimeMillis() - authTokenTimestamp_) > AUTH_INFO_TIMEOUT)
- {
- try
- {
- authToken_ = proxy_.get_authToken(id_, password_);
- authTokenTimestamp_ = System.currentTimeMillis();
- }
- catch (Throwable t)
- {
- }
- }
- return authToken_.getAuthInfoString();
- }
-
- public final boolean isLoggedIn()
- {
- return authToken_ != null;
- }
-
- public final void setCachedPublishURL(String publishURL)
- {
- cachedPublishURL_ = publishURL;
- }
-
- public final String getPublishURL()
- {
- if (isLoggedIn() && publishURL_ != null)
- return publishURL_;
- return cachedPublishURL_;
- }
-
- public final void setRegistrationURL(String registrationURL)
- {
- registrationURL_ = registrationURL;
- }
-
- public final String getRegistrationURL()
- {
- return registrationURL_;
- }
-
- public final String getUserId()
- {
- return id_;
- }
-
- public final void setUserId(String userId)
- {
- id_ = userId;
- }
-
- public final String getCred()
- {
- return password_;
- }
-
- public final void setCred(String cred)
- {
- password_ = cred;
- }
-
- public final void setUserDefinedCategories(Hashtable userDefinedCategories)
- {
- userDefinedCategories_ = userDefinedCategories;
- }
-
- public final Enumeration getUserDefinedCategories()
- {
- if (userDefinedCategories_ != null)
- return userDefinedCategories_.elements();
- else
- return null;
- }
-
- public final CategoryModel getUserDefinedCategory(String tModelKey)
- {
- return (CategoryModel) userDefinedCategories_.get(tModelKey);
- }
-
- // Special handler to be invoked before sending a message to the registry.
- public final void handlePreInvocation(BusinessService busService)
- {
- // For XMethods, business services must contain a description of the form:
- // IMPLEMENTATION: ibmws
- if (getInquiryURL().equals("http://uddi.xmethods.net/inquire"))
- {
- Vector descriptionVector = busService.getDescriptionVector();
- if (descriptionVector == null)
- descriptionVector = new Vector();
- boolean containsImplementationDescription = false;
- for (int i = 0; i < descriptionVector.size(); i++)
- {
- Description description = (Description) descriptionVector.elementAt(i);
- if (description.getText().startsWith("IMPLEMENTATION: "))
- {
- containsImplementationDescription = true;
- break;
- }
- }
- if (!containsImplementationDescription)
- {
- descriptionVector.addElement(new Description("IMPLEMENTATION: ibmws"));
- busService.setDescriptionVector(descriptionVector);
- }
- }
- }
-
- public final void setCheckForUserDefinedCategories(boolean checkForUserDefinedCategories)
- {
- checkForUserDefinedCategories_ = checkForUserDefinedCategories;
- }
-
- public final boolean getCheckForUserDefinedCategories()
- {
- return checkForUserDefinedCategories_;
- }
-
- public final void setCategoriesDirectory(String directory)
- {
- categoriesDirectory_ = directory;
- }
-
- public final String getCategoriesDirectory()
- {
- return categoriesDirectory_;
- }
-
- public void refreshMeta(){
-
- RegistryService regService = RegistryService.instance();
- IRegistryManager regManager = regService.getDefaultRegistryManager();
-
-
- try
- {
- regManager.refreshManager();
- String[] regURIs = regManager.getRegistryURIs();
- for (int i = 0; i < regURIs.length; i++)
- {
- Registry reg = regManager.loadRegistry(regURIs[i]);
- if (reg instanceof UDDIRegistry)
- {
- UDDIRegistry uddiReg = (UDDIRegistry)reg;
- if(uddiReg.getDiscoveryURL().equals(getInquiryURL())){
-
-
-
- Taxonomy[] taxonomies = regManager.loadTaxonomies(UDDIRegistryService.instance().getTaxonomyURIs(uddiReg));
- if (taxonomies != null)
- {
- Hashtable taxonomyTable = new Hashtable();
- for (int j=0; j<taxonomies.length; j++)
- {
- Taxonomy taxonomy = taxonomies[j];
- String name = taxonomy.getName();
- String tmodelKey = taxonomy.getTmodelKey();
- CategoryModel catModel = new CategoryModel();
- catModel.setDisplayName(name);
- catModel.setCategoryKey(name);
- catModel.setTModelKey(tmodelKey);
- catModel.loadFromTaxonomy(taxonomy);
- taxonomyTable.put(tmodelKey, catModel);
- }
-
- setUserDefinedCategories(taxonomyTable);
- }
- }
-
- }
-
- }
- }catch (CoreException ce)
- {
- // TODO: Better error reporting
- ce.printStackTrace();
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceElement.java
deleted file mode 100644
index 4f37cbcb8..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceElement.java
+++ /dev/null
@@ -1,31 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.uddi4j.datatype.service.BusinessService;
-
-public class ServiceElement extends AbstractUDDIElement
-{
- private BusinessService bs_;
-
- public ServiceElement(BusinessService bs,Model model)
- {
- super(bs.getDefaultNameString(),model);
- setKey(bs.getServiceKey());
- bs_ = bs;
- }
-
- public final BusinessService getBusinessService()
- {
- return bs_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceInterfaceElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceInterfaceElement.java
deleted file mode 100644
index b72d881f4..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/ServiceInterfaceElement.java
+++ /dev/null
@@ -1,31 +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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class ServiceInterfaceElement extends AbstractUDDIElement
-{
- private TModel tModel_;
-
- public ServiceInterfaceElement(TModel tModel,Model model)
- {
- super(tModel.getNameString(),model);
- tModel_ = tModel;
- setKey(tModel.getTModelKey());
- }
-
- public final TModel getTModel()
- {
- return tModel_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/UDDIMainElement.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/UDDIMainElement.java
deleted file mode 100644
index 2371200d9..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/UDDIMainElement.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.datamodel;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-
-public class UDDIMainElement extends TreeElement
-{
- private Hashtable registryNames_;
-
- public UDDIMainElement(String name,Model model)
- {
- super(name,model);
- registryNames_ = new Hashtable();
- }
-
- public final boolean containsRegistryName(String name)
- {
- return (registryNames_.get(name) != null);
- }
-
- public final void addRegistryName(String name)
- {
- registryNames_.put(name,Boolean.TRUE);
- }
-
- public final void removeRegistryName(String name)
- {
- registryNames_.remove(name);
- }
-
- public final void clearRegistryNames()
- {
- registryNames_.clear();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/AddToFavoritesTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/AddToFavoritesTool.java
deleted file mode 100644
index 2853a4059..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/AddToFavoritesTool.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ActionTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.AddToFavoritesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class AddToFavoritesTool extends ActionTool {
- public AddToFavoritesTool(ToolManager toolManager, String alt) {
- super(toolManager, "images/favorites_enabled.gif", "images/favorites_highlighted.gif", alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory) {
- Node selectedNode = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(selectedNode.getNodeId(), toolId_, selectedNode.getViewId(), selectedNode.getViewToolId(), forHistory);
- }
-
- public String getActionLink() {
- Node selectedNode = toolManager_.getNode();
- return AddToFavoritesAction.getActionLink(selectedNode.getNodeId());
- }
-
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusPublishServiceTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusPublishServiceTool.java
deleted file mode 100644
index 9e791022a..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusPublishServiceTool.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectFindToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class BusPublishServiceTool extends FormTool implements MultipleFormToolPropertiesInterface
-{
- private RegFindTool regFindTool_;
-
- public BusPublishServiceTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"uddi/images/publish_service_enabled.gif","uddi/images/publish_service_highlighted.gif",alt);
- regFindTool_ = new RegFindTool(new ToolManager(toolManager.getNode()), "");
- }
-
- protected final void initDefaultProperties()
- {
- toolManager_.getNode().getNodeManager().getController().getUDDIPerspective();
-
- setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
-
- setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- String simpleStyleString = String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,simpleStyleString);
-
- // RegPublishServiceSimpleAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION,"");
-
- // RegPublishServiceAdvancedAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL,"");
- }
-
- public final void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- regFindTool_.addAuthenticationProperties(regElement);
- }
-
- public final FormToolPropertiesInterface getFormToolProperties(Object subQueryKeyObject)
- {
- // Empty/Non-existent subquerykey implies publish form. All else implies query form.
- String subQueryKey = (String)subQueryKeyObject;
- if (subQueryKey == null || subQueryKey.length() < 1)
- return this;
- else
- return regFindTool_.getFormToolProperties(subQueryKeyObject);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- String subQueryKey = (String)getProperty(UDDIActionInputs.SUBQUERY_KEY);
- return SelectFindToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),subQueryKey,forHistory);
- }
-
- public String getFormLink()
- {
- Object subQueryKeyObject = getProperty(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryKey = null;
- if (subQueryKeyObject != null)
- {
- getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = getFormToolProperties(subQueryKeyObject);
- Object subQueryGetObject = subQueryProperties.getProperty(UDDIActionInputs.SUBQUERY_GET);
- if (subQueryGetObject != null)
- {
- boolean isSubQueryGet = ((Boolean)subQueryGetObject).booleanValue();
- if (isSubQueryGet)
- return "uddi/forms/GetForm.jsp";
- }
- subQueryKey = (String)subQueryKeyObject;
- }
-
- if (subQueryKey == null || subQueryKey.length() < 1)
- return "uddi/forms/BusPublishServiceForm.jsp";
- else
- return regFindTool_.getFormLink();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessDetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessDetailsTool.java
deleted file mode 100644
index 2d1f63c34..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessDetailsTool.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.DiscoveryURLs;
-import org.uddi4j.util.IdentifierBag;
-
-public class BusinessDetailsTool extends DetailsTool
-{
- public BusinessDetailsTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt,ProxyLoadPageAction.getActionLink("uddi/forms/BusinessDetailsForm.jsp"));
- }
-
- public final void initDefaultProperties()
- {
- clearPropertyTable();
- BusinessElement busElement = (BusinessElement)(toolManager_.getNode().getTreeElement());
- BusinessEntity be = busElement.getBusinessEntity();
-
- setProperty(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,be.getBusinessKey());
-
- Vector nameVector = new Vector();
- copyIndexVector(be.getNameVector(),nameVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_NAMES,nameVector);
-
- Vector descriptionVector = new Vector();
- copyIndexVector(be.getDescriptionVector(),descriptionVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DESCRIPTIONS,descriptionVector);
-
- IdentifierBag idBag = be.getIdentifierBag();
- if (idBag != null)
- {
- Vector idVector = new Vector();
- copyIndexVector(idBag.getKeyedReferenceVector(),idVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_IDENTIFIERS,idVector);
- }
-
- CategoryBag catBag = be.getCategoryBag();
- if (catBag != null)
- {
- Vector catVector = new Vector();
- copyIndexVector(catBag.getKeyedReferenceVector(),catVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_CATEGORIES,catVector);
- }
-
- DiscoveryURLs discoveryURLs = be.getDiscoveryURLs();
- if (discoveryURLs != null)
- {
- Vector discoveryURLVector = new Vector();
- copyIndexVector(discoveryURLs.getDiscoveryURLVector(),discoveryURLVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_DISCOVERYURLS,discoveryURLVector);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessNode.java
deleted file mode 100644
index 756bae8b0..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/BusinessNode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.BusinessGetServicesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class BusinessNode extends UDDINavigatorNode
-{
- private DetailsTool detailsTool_;
- private BusPublishServiceTool publishServiceTool_;
- private ManagePublisherAssertionsTool managePublisherAssertionsTool_;
- private ManageReferencedServicesTool manageReferencedServicesTool_;
- private UnpublishTool unpublishTool_;
-
- public BusinessNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth,"uddi/images/business_highlighted.gif");
- }
-
- protected final void initTools()
- {
- Controller controller = nodeManager_.getController();
- UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
- detailsTool_ = new BusinessDetailsTool(toolManager_,uddiPerspective.getMessage("ALT_BUSINESS_DETAILS"));
- new GetServicesTool(toolManager_,uddiPerspective.getMessage("ALT_GET_SERVICES"),BusinessGetServicesAction.getActionLink(nodeId_));
- publishServiceTool_ = new BusPublishServiceTool(toolManager_,uddiPerspective.getMessage("ALT_PUBLISH_SERVICE"));
- manageReferencedServicesTool_ = new ManageReferencedServicesTool(toolManager_,uddiPerspective.getMessage("ALT_MANAGE_REFERENCED_SERVICES"));
- managePublisherAssertionsTool_ = new ManagePublisherAssertionsTool(toolManager_,uddiPerspective.getMessage("ALT_MANAGE_PUBLISHER_ASSERTIONS"));
- new AddToFavoritesTool(toolManager_, uddiPerspective.getMessage("ALT_ADD_TO_FAVORITES"));
- unpublishTool_ = new UnpublishTool(toolManager_,"uddi/images/unpublish_bus_enabled.gif","uddi/images/unpublish_bus_highlighted.gif",uddiPerspective.getMessage("ALT_UNPUBLISH_BUSINESS"));
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- detailsTool_.addAuthenticationProperties(regElement);
- publishServiceTool_.addAuthenticationProperties(regElement);
- manageReferencedServicesTool_.addAuthenticationProperties(regElement);
- managePublisherAssertionsTool_.addAuthenticationProperties(regElement);
- unpublishTool_.addAuthenticationProperties(regElement);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/CategoryNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/CategoryNode.java
deleted file mode 100644
index 0c7fecc1e..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/CategoryNode.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectCategoryNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ToggleCategoryNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIFrameNames;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryElement;
-
-public class CategoryNode extends Node
-{
- public CategoryNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth,"uddi/images/category.gif");
- setVisibilityOfChildren(false);
- }
-
- public final void createChildren()
- {
- Enumeration children = element_.getElements(UDDIModelConstants.REL_SUBCATEGORIES);
- if (children != null)
- {
- while (children.hasMoreElements())
- {
- CategoryElement categoryElement = (CategoryElement)children.nextElement();
- CategoryNode categoryNode = new CategoryNode(categoryElement,nodeManager_,nodeDepth_+1);
- addChild(categoryNode);
- categoryNode.createChildren();
- }
- }
- }
-
- public final String getNodeName()
- {
- CategoryElement categoryElement = (CategoryElement)element_;
- return categoryElement.getNameForTree();
- }
-
- protected final String getToggleNodeActionHref()
- {
- return ToggleCategoryNodeAction.getActionLink(getNodeManager().getController().getSessionId(),nodeId_,isOpen_);
- }
-
- protected final String getLinkActionHref()
- {
- return SelectCategoryNodeAction.getActionLink(getNodeManager().getController().getSessionId(),nodeId_);
- }
-
- protected final String getToggleNodeActionTarget()
- {
- return UDDIFrameNames.CATEGORIES_WORKAREA;
- }
-
- protected final String getLinkActionTarget()
- {
- return UDDIFrameNames.CATEGORIES_WORKAREA;
- }
-
- protected final void initTools()
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/DetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/DetailsTool.java
deleted file mode 100644
index 11d6c5b70..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/DetailsTool.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class DetailsTool extends FormTool
-{
- private String formLink_;
-
- public DetailsTool(ToolManager toolManager,String alt,String formLink)
- {
- super(toolManager,"images/details_enabled.gif","images/details_highlighted.gif",alt);
- formLink_ = formLink;
- }
-
- public void initDefaultProperties()
- {
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getFormLink()
- {
- return formLink_;
- }
-
- protected final void copyIndexVector(Vector source,Vector destination)
- {
- destination.removeAllElements();
- for (int i=0;i<source.size();i++)
- {
- ListElement listElement = new ListElement(source.elementAt(i));
- listElement.setViewId(i);
- // The next item indicates that this element is to be in non-edit state.
- listElement.setTargetViewToolInfo(-1,-1,i);
- destination.addElement(listElement);
- }
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetBusinessesTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetBusinessesTool.java
deleted file mode 100644
index 808911596..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetBusinessesTool.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ActionTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class GetBusinessesTool extends ActionTool
-{
- private String actionLink_;
- public GetBusinessesTool(ToolManager toolManager,String enabledImagePath,String highlightedImagePath,String alt,String actionLink)
- {
- super(toolManager,enabledImagePath,highlightedImagePath,alt);
- actionLink_ = actionLink;
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getActionLink()
- {
- return actionLink_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServiceInterfacesTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServiceInterfacesTool.java
deleted file mode 100644
index b71f48a3f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServiceInterfacesTool.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ActionTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class GetServiceInterfacesTool extends ActionTool
-{
- private String actionLink_;
- public GetServiceInterfacesTool(ToolManager toolManager,String alt,String actionLink)
- {
- super(toolManager,"uddi/images/service_interfaces_closed_enabled.gif","uddi/images/service_interfaces_closed_highlighted.gif",alt);
- actionLink_ = actionLink;
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getActionLink()
- {
- return actionLink_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServicesTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServicesTool.java
deleted file mode 100644
index 6e568687f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/GetServicesTool.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ActionTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class GetServicesTool extends ActionTool
-{
- private String actionLink_;
- public GetServicesTool(ToolManager toolManager,String alt,String actionLink)
- {
- super(toolManager,"uddi/images/services_closed_enabled.gif","uddi/images/services_closed_highlighted.gif",alt);
- actionLink_ = actionLink;
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getActionLink()
- {
- return actionLink_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ItemsSummaryTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ItemsSummaryTool.java
deleted file mode 100644
index 1807b8bc8..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ItemsSummaryTool.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.util.URLUtils;
-
-public class ItemsSummaryTool extends FormTool
-{
- private String formLink_;
-
- public ItemsSummaryTool(ToolManager toolManager,String enabledImage,String highlightedImage,String alt,int queryItem)
- {
- super(toolManager,enabledImage,highlightedImage,alt);
- StringBuffer formLink = new StringBuffer("uddi/forms/ItemsSummaryForm.jsp?");
- formLink.append(UDDIActionInputs.QUERY_ITEM).append('=').append(queryItem);
- String encodedFormLink = URLUtils.encode(formLink.toString());
- formLink_ = ProxyLoadPageAction.getActionLink(encodedFormLink);
- }
-
- public final void initDefaultProperties()
- {
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getFormLink()
- {
- return formLink_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/LoginTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/LoginTool.java
deleted file mode 100644
index f36b256a1..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/LoginTool.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20060427 136449 brunssen@us.ibm.com - Vince Brunssen
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.FavoritesModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class LoginTool extends FormTool
-{
- private Controller controller_;
- private String formLink = "uddi/forms/LoginUddiForm.jsp";
-
- public LoginTool(ToolManager toolManager, String alt)
- {
- super(toolManager,"uddi/images/open_registry_enabled.gif","uddi/images/open_registry_highlighted.gif",alt);
- }
-
- protected final void initDefaultProperties()
- {
- controller_ = toolManager_.getNode().getNodeManager().getController();
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getFormLink()
- {
- return formLink;
- }
-
- public void setToLogoutLink()
- {
- formLink = "uddi/actions/LogoutAdvancedActionJSP.jsp";
- }
-
- public void setToRegistryLink()
- {
- formLink = "";
- }
-
- public final Enumeration getFavoriteRegistryElements()
- {
- FavoritesPerspective favPerspective = controller_.getFavoritesPerspective();
- NodeManager favoritesNodeManager = favPerspective.getNodeManager();
- TreeElement favoritesMainElement = favoritesNodeManager.getRootNode().getTreeElement();
- TreeElement favoriteRegistriesElement = (TreeElement)(favoritesMainElement.getElements(FavoritesModelConstants.REL_UDDI_REGISTRY_FOLDER_NODE).nextElement());
- return favoriteRegistriesElement.getElements(FavoritesModelConstants.REL_UDDI_REGISTRY_NODE);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManagePublisherAssertionsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManagePublisherAssertionsTool.java
deleted file mode 100644
index 1457d1eae..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManagePublisherAssertionsTool.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectFindToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class ManagePublisherAssertionsTool extends FormTool implements MultipleFormToolPropertiesInterface
-{
- ToolManager invisibleToolManager_;
- private RegFindTool regFindTool_;
-
- public ManagePublisherAssertionsTool(ToolManager toolManager, String alt)
- {
- super(toolManager, "uddi/images/publisher_assertions_enabled.gif", "uddi/images/publisher_assertions_highlighted.gif", alt);
- invisibleToolManager_ = new ToolManager(toolManager.getNode());
- regFindTool_ = new RegFindTool(invisibleToolManager_,"");
- }
-
- protected final void initDefaultProperties()
- {
- setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
- setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- String simpleStyleString = String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE);
- setProperty(UDDIActionInputs.QUERY_STYLE_BUSINESSES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,simpleStyleString);
- }
-
- public final FormToolPropertiesInterface getFormToolProperties(Object subQueryKeyObject)
- {
- // Empty/Non-existent subquerykey implies publish form. All else implies query form.
- String subQueryKey = (String)subQueryKeyObject;
- if (subQueryKey == null || subQueryKey.length() < 1)
- return this;
- else
- return regFindTool_.getFormToolProperties(subQueryKeyObject);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- String subQueryKey = (String)getProperty(UDDIActionInputs.SUBQUERY_KEY);
- return SelectFindToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),subQueryKey,forHistory);
- }
-
- public final void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- regFindTool_.addAuthenticationProperties(regElement);
- }
-
- public String getFormLink()
- {
- Object subQueryKeyObject = getProperty(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryKey = null;
- if (subQueryKeyObject != null)
- {
- getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = getFormToolProperties(subQueryKeyObject);
- Object subQueryGetObject = subQueryProperties.getProperty(UDDIActionInputs.SUBQUERY_GET);
- if (subQueryGetObject != null)
- {
- boolean isSubQueryGet = ((Boolean)subQueryGetObject).booleanValue();
- if (isSubQueryGet)
- return "uddi/forms/GetForm.jsp";
- }
- subQueryKey = (String)subQueryKeyObject;
- }
-
- if (subQueryKey == null || subQueryKey.length() < 1)
- return ProxyLoadPageAction.getActionLink("uddi/forms/ManagePublisherAssertionsForm.jsp");
- else
- return regFindTool_.getFormLink();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManageReferencedServicesTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManageReferencedServicesTool.java
deleted file mode 100644
index 9b789feeb..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ManageReferencedServicesTool.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectFindToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class ManageReferencedServicesTool extends FormTool implements MultipleFormToolPropertiesInterface
-{
- ToolManager invisibleToolManager_;
- private RegFindTool regFindTool_;
-
- public ManageReferencedServicesTool(ToolManager toolManager, String alt)
- {
- super(toolManager, "uddi/images/referenced_services_enabled.gif", "uddi/images/referenced_services_highlighted.gif", alt);
- invisibleToolManager_ = new ToolManager(toolManager.getNode());
- regFindTool_ = new RegFindTool(invisibleToolManager_,"");
- }
-
- protected final void initDefaultProperties()
- {
- setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
- setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_SERVICES));
- String simpleStyleString = String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE);
- setProperty(UDDIActionInputs.QUERY_STYLE_BUSINESSES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,simpleStyleString);
- }
-
- public final FormToolPropertiesInterface getFormToolProperties(Object subQueryKeyObject)
- {
- // Empty/Non-existent subquerykey implies publish form. All else implies query form.
- String subQueryKey = (String)subQueryKeyObject;
- if (subQueryKey == null || subQueryKey.length() < 1)
- return this;
- else
- return regFindTool_.getFormToolProperties(subQueryKeyObject);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- String subQueryKey = (String)getProperty(UDDIActionInputs.SUBQUERY_KEY);
- return SelectFindToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),subQueryKey,forHistory);
- }
-
- public final void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- regFindTool_.addAuthenticationProperties(regElement);
- }
-
- public String getFormLink()
- {
- Object subQueryKeyObject = getProperty(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryKey = null;
- if (subQueryKeyObject != null)
- {
- getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = getFormToolProperties(subQueryKeyObject);
- Object subQueryGetObject = subQueryProperties.getProperty(UDDIActionInputs.SUBQUERY_GET);
- if (subQueryGetObject != null)
- {
- boolean isSubQueryGet = ((Boolean)subQueryGetObject).booleanValue();
- if (isSubQueryGet)
- return "uddi/forms/GetForm.jsp";
- }
- subQueryKey = (String)subQueryKeyObject;
- }
-
- if (subQueryKey == null || subQueryKey.length() < 1)
- return "uddi/forms/ManageReferencedServicesForm.jsp";
- else
- return regFindTool_.getFormLink();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/MultipleFormToolPropertiesInterface.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/MultipleFormToolPropertiesInterface.java
deleted file mode 100644
index c10c88715..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/MultipleFormToolPropertiesInterface.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-
-public abstract interface MultipleFormToolPropertiesInterface
-{
- public abstract FormToolPropertiesInterface getFormToolProperties(Object key);
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/OpenRegistryTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/OpenRegistryTool.java
deleted file mode 100644
index 6101cb21c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/OpenRegistryTool.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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
- * -------- -------- -----------------------------------------------------------
- * 20060224 122752 cbrealey@ca.ibm.com - Chris Brealey
- * 20080513 231351 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.FavoritesModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-
-public class OpenRegistryTool extends FormTool
-{
- private Controller controller_;
-
- public OpenRegistryTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"uddi/images/open_registry_enabled.gif","uddi/images/open_registry_highlighted.gif",alt);
- }
-
- protected final void initDefaultProperties()
- {
- controller_ = toolManager_.getNode().getNodeManager().getController();
- UDDIPerspective uddiPerspective = controller_.getUDDIPerspective();
-
- if(uddiPerspective.getDefaultUDDIRegistry() != null){
- setProperty(UDDIActionInputs.REGISTRY_NAME,uddiPerspective.getDefaultUDDIRegistry().getName());
- setProperty(UDDIActionInputs.INQUIRY_URL,uddiPerspective.getDefaultUDDIRegistry().getInquiryURL());
- }
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getFormLink()
- {
- return "uddi/forms/OpenRegistryForm.jsp";
- }
-
- public final Enumeration getFavoriteRegistryElements()
- {
- FavoritesPerspective favPerspective = controller_.getFavoritesPerspective();
- NodeManager favoritesNodeManager = favPerspective.getNodeManager();
- TreeElement favoritesMainElement = favoritesNodeManager.getRootNode().getTreeElement();
- TreeElement favoriteRegistriesElement = (TreeElement)(favoritesMainElement.getElements(FavoritesModelConstants.REL_UDDI_REGISTRY_FOLDER_NODE).nextElement());
- return favoriteRegistriesElement.getElements(FavoritesModelConstants.REL_UDDI_REGISTRY_NODE);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/PublishedItemsNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/PublishedItemsNode.java
deleted file mode 100644
index 69904ed76..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/PublishedItemsNode.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.datamodel.ElementAdapter;
-import org.eclipse.wst.ws.internal.datamodel.RelAddEvent;
-import org.eclipse.wst.ws.internal.datamodel.RelRemoveEvent;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublishedItemsElement;
-
-public class PublishedItemsNode extends UDDINavigatorFolderNode
-{
- public PublishedItemsNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth);
- element.addListener(new ElementAdapter()
- {
- public void relAdded(RelAddEvent event)
- {
- String rel = event.getOutBoundRelName();
- if (rel.equals(UDDIModelConstants.REL_PUBLISHED_ITEMS))
- {
- TreeElement treeElement = (TreeElement)event.getParentElement();
- createChildNode(treeElement);
- }
- }
-
- public void relRemoved(RelRemoveEvent event)
- {
- TreeElement treeElement = null;
- if (event.getInBoundRelName().equals(UDDIModelConstants.REL_PUBLISHED_ITEMS))
- treeElement = (TreeElement)event.getInboundElement();
- else if (event.getOutBoundRelName().equals(UDDIModelConstants.REL_PUBLISHED_ITEMS))
- treeElement = (TreeElement)event.getOutBoundElement();
-
- if (treeElement != null)
- removeChildNode(treeElement);
- }
- });
- }
-
- private final void createChildNode(TreeElement element)
- {
- PublishedItemsElement publishedItemsElement = (PublishedItemsElement)element_;
- Node childNode = null;
- switch (publishedItemsElement.getType())
- {
- case UDDIActionInputs.QUERY_ITEM_BUSINESSES:
- childNode = new BusinessNode(element,nodeManager_,nodeDepth_+1);
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICES:
- childNode = new ServiceNode(element,nodeManager_,nodeDepth_+1);
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES:
- childNode = new ServiceInterfaceNode(element,nodeManager_,nodeDepth_+1);
- }
- if (childNode != null)
- addChild(childNode);
- }
-
- protected final void initTools()
- {
- PublishedItemsElement publishedItemsElement = (PublishedItemsElement)element_;
- UDDIPerspective uddiPerspective = nodeManager_.getController().getUDDIPerspective();
- int publishedItemsType = publishedItemsElement.getType();
- switch (publishedItemsType)
- {
- case UDDIActionInputs.QUERY_ITEM_BUSINESSES:
- new ItemsSummaryTool(toolManager_,"uddi/images/businesses_closed_enabled.gif","uddi/images/businesses_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_BUSINESSES"),publishedItemsType);
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICES:
- new ItemsSummaryTool(toolManager_,"uddi/images/services_closed_enabled.gif","uddi/images/services_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_SERVICES"),publishedItemsType);
- break;
- case UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES:
- default:
- new ItemsSummaryTool(toolManager_,"uddi/images/service_interfaces_closed_enabled.gif","uddi/images/service_interfaces_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_SERVICE_INTERFACES"),publishedItemsType);
- }
- }
-
- public String getOpenImagePath()
- {
- PublishedItemsElement publishedItemsElement = (PublishedItemsElement)element_;
- int publishedItemsType = publishedItemsElement.getType();
- switch (publishedItemsType)
- {
- case UDDIActionInputs.QUERY_ITEM_BUSINESSES:
- return "uddi/images/businesses_open_highlighted.gif";
- case UDDIActionInputs.QUERY_ITEM_SERVICES:
- return "uddi/images/services_open_highlighted.gif";
- case UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES:
- return "uddi/images/service_interfaces_open_highlighted.gif";
- }
- return super.getOpenImagePath();
- }
-
- public String getClosedImagePath()
- {
- PublishedItemsElement publishedItemsElement = (PublishedItemsElement)element_;
- int publishedItemsType = publishedItemsElement.getType();
- switch (publishedItemsType)
- {
- case UDDIActionInputs.QUERY_ITEM_BUSINESSES:
- return "uddi/images/businesses_closed_highlighted.gif";
- case UDDIActionInputs.QUERY_ITEM_SERVICES:
- return "uddi/images/services_closed_highlighted.gif";
- case UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES:
- return "uddi/images/service_interfaces_closed_highlighted.gif";
- }
- return super.getClosedImagePath();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryNode.java
deleted file mode 100644
index a02b8ceed..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryNode.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.datamodel.ElementAdapter;
-import org.eclipse.wst.ws.internal.datamodel.RelAddEvent;
-import org.eclipse.wst.ws.internal.datamodel.RelRemoveEvent;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.FindAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.BusinessElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.uddi4j.datatype.business.BusinessEntity;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class QueryNode extends UDDINavigatorNode
-{
- private FormTool regFindTool_;
- private FindAction findAction_;
- public QueryNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth,"uddi/images/query.gif");
- element.addListener(new ElementAdapter()
- {
- public void relAdded(RelAddEvent event)
- {
- String rel = event.getOutBoundRelName();
- if (rel.equals(UDDIModelConstants.REL_QUERY_RESULTS))
- {
- TreeElement treeElement = (TreeElement)event.getParentElement();
- createChildNode(treeElement);
- }
- }
-
- public void relRemoved(RelRemoveEvent event)
- {
- TreeElement treeElement = null;
- if (event.getInBoundRelName().equals(UDDIModelConstants.REL_QUERY_RESULTS))
- treeElement = (TreeElement)event.getInboundElement();
- else if (event.getOutBoundRelName().equals(UDDIModelConstants.REL_QUERY_RESULTS))
- treeElement = (TreeElement)event.getOutBoundElement();
-
- if (treeElement != null)
- removeChildNode(treeElement);
- }
- });
- createChildren();
- setVisibilityOfChildren(false);
- findAction_ = null;
- }
-
- private final void createChildren()
- {
- Vector initialResults = (Vector)element_.getPropertyAsObject(UDDIModelConstants.INITIAL_RESULTS);
- for (int i=0;i<initialResults.size();i++)
- {
- Object object = initialResults.elementAt(i);
- TreeElement childElement = null;
- if (object instanceof BusinessEntity)
- childElement = new BusinessElement((BusinessEntity)object,element_.getModel());
- else if (object instanceof BusinessService)
- childElement = new ServiceElement((BusinessService)object,element_.getModel());
- else if (object instanceof TModel)
- childElement = new ServiceInterfaceElement((TModel)object,element_.getModel());
- if (childElement != null)
- element_.connect(childElement,UDDIModelConstants.REL_QUERY_RESULTS,ModelConstants.REL_OWNER);
- }
- }
-
- private final void createChildNode(TreeElement element)
- {
- Node childNode = null;
- if (element instanceof BusinessElement)
- childNode = new BusinessNode(element,nodeManager_,nodeDepth_+1);
- else if (element instanceof ServiceElement)
- childNode = new ServiceNode(element,nodeManager_,nodeDepth_+1);
- else if (element instanceof ServiceInterfaceElement)
- childNode = new ServiceInterfaceNode(element,nodeManager_,nodeDepth_+1);
- if (childNode != null)
- addChild(childNode);
- }
-
- protected final void initTools()
- {
- Controller controller = nodeManager_.getController();
- UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
- new ResultsTool(toolManager_,controller.getMessage("ALT_RESULTS"));
- regFindTool_ = new RegFindTool(toolManager_,uddiPerspective.getMessage("ALT_FIND"));
- }
-
- public final void setFindToolProperties(FindAction findAction)
- {
- findAction_ = findAction;
- regFindTool_.updatePropertyTable(findAction.getPropertyTable());
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- ((RegFindTool)regFindTool_).addAuthenticationProperties(regElement);
- Vector childNodes = getChildNodes();
- for (int i=0;i<childNodes.size();i++)
- {
- UDDINavigatorNode navigatorNode = (UDDINavigatorNode)childNodes.elementAt(i);
- navigatorNode.addAuthenticationProperties(regElement);
- }
- }
-
- public final FindAction getFindAction()
- {
- return findAction_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryParentNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryParentNode.java
deleted file mode 100644
index b7f42d0bd..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/QueryParentNode.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.datamodel.ElementAdapter;
-import org.eclipse.wst.ws.internal.datamodel.RelAddEvent;
-import org.eclipse.wst.ws.internal.datamodel.RelRemoveEvent;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class QueryParentNode extends UDDINavigatorFolderNode
-{
- public QueryParentNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth);
- element.addListener(new ElementAdapter()
- {
- public void relAdded(RelAddEvent event)
- {
- String rel = event.getOutBoundRelName();
- if (rel.equals(UDDIModelConstants.REL_QUERIES))
- {
- QueryElement queryElement = (QueryElement)event.getParentElement();
- createChildNode(queryElement);
- }
- }
-
- public void relRemoved(RelRemoveEvent event)
- {
- QueryElement queryElement = null;
- if (event.getInBoundRelName().equals(UDDIModelConstants.REL_QUERIES))
- queryElement = (QueryElement)event.getInboundElement();
- else if (event.getOutBoundRelName().equals(UDDIModelConstants.REL_QUERIES))
- queryElement = (QueryElement)event.getOutBoundElement();
-
- if (queryElement != null)
- removeChildNode(queryElement);
- }
- });
- }
-
- private final void createChildNode(QueryElement element)
- {
- QueryNode queryNode = new QueryNode(element,nodeManager_,nodeDepth_+1);
- // Add registry authentication properties.
- RegistryElement regElement = (RegistryElement)(getParent().getTreeElement());
- queryNode.addAuthenticationProperties(regElement);
- addChild(queryNode);
- }
-
- protected final void initTools()
- {
- UDDIPerspective uddiPerspective = nodeManager_.getController().getUDDIPerspective();
- new ItemsSummaryTool(toolManager_,"uddi/images/queries_closed_enabled.gif","uddi/images/queries_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_QUERIES"),UDDIActionInputs.QUERY_ITEM_QUERIES);
- new ItemsSummaryTool(toolManager_,"uddi/images/businesses_closed_enabled.gif","uddi/images/businesses_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_BUSINESSES"),UDDIActionInputs.QUERY_ITEM_BUSINESSES);
- new ItemsSummaryTool(toolManager_,"uddi/images/services_closed_enabled.gif","uddi/images/services_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_SERVICES"),UDDIActionInputs.QUERY_ITEM_SERVICES);
- new ItemsSummaryTool(toolManager_,"uddi/images/service_interfaces_closed_enabled.gif","uddi/images/service_interfaces_closed_highlighted.gif",uddiPerspective.getMessage("ALT_SUMMARY_SERVICE_INTERFACES"),UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES);
- }
-
- public String getOpenImagePath()
- {
- return "uddi/images/queries_open_highlighted.gif";
- }
-
- public String getClosedImagePath()
- {
- return "uddi/images/queries_closed_highlighted.gif";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RefreshTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RefreshTool.java
deleted file mode 100644
index f28a1be58..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RefreshTool.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ActionTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.RefreshUDDINodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class RefreshTool extends ActionTool
-{
- public RefreshTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"images/refresh_enabled.gif","images/refresh_highlighted.gif",alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getActionLink()
- {
- return RefreshUDDINodeAction.getActionLink(toolManager_.getNode().getNodeId());
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegFindTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegFindTool.java
deleted file mode 100644
index 2045169cf..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegFindTool.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolProperties;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectFindToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class RegFindTool extends FormTool implements MultipleFormToolPropertiesInterface
-{
- public RegFindTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"uddi/images/find_enabled.gif","uddi/images/find_highlighted.gif",alt);
- }
-
- protected final void initDefaultProperties()
- {
- initDefaultProperties(this);
- setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
- setProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES,new Hashtable());
- UDDIPerspective uddiPerspective = toolManager_.getNode().getNodeManager().getController().getUDDIPerspective();
- setProperty(UDDIActionInputs.QUERY_NAME,uddiPerspective.getMessage("DEFAULT_QUERY_NAME"));
- }
-
- private final void initDefaultProperties(FormToolPropertiesInterface formToolPI)
- {
- toolManager_.getNode().getNodeManager().getController().getUDDIPerspective();
-
- formToolPI.setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- String simpleStyleString = String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE);
- formToolPI.setProperty(UDDIActionInputs.QUERY_STYLE_BUSINESSES,simpleStyleString);
- formToolPI.setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,simpleStyleString);
- formToolPI.setProperty(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,simpleStyleString);
-
- String maxSearchSet = String.valueOf(UDDIActionInputs.QUERY_MAX_SEARCH_SET);
- String maxResults = String.valueOf(UDDIActionInputs.QUERY_MAX_RESULTS);
-
- // RegFindBusinessesSimpleAction inputs
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME,"");
-
- // RegFindBusinessesAdvancedAction inputs
- // The authentication inputs must be added later as this method is called before we can get a valid handle
- // to the RegistryElement in the case of a query node.
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_SEARCH_SET,maxSearchSet);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_BUSINESS_MAX_RESULTS,maxResults);
-
- // RegFindServicesSimpleAction inputs
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME,"");
-
- // RegFindServicesAdvancedAction inputs
- // The authentication inputs must be added later as this method is called before we can get a valid handle
- // to the RegistryElement in the case of a query node.
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_SEARCH_SET,maxSearchSet);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_MAX_RESULTS,maxResults);
-
- // RegFindServiceInterfacesSimpleAction inputs
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME,"");
-
- // RegFindServiceInterfacesAdvancedAction inputs
- // The authentication inputs must be added later as this method is called before we can get a valid handle
- // to the RegistryElement in the case of a query node.
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,"");
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_SEARCH_SET,maxSearchSet);
- formToolPI.setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_MAX_RESULTS,maxResults);
- }
-
- public final void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-
- public final FormToolPropertiesInterface getFormToolProperties(Object subQueryKeyObject)
- {
- String subQueryKey = (String)subQueryKeyObject;
- if (subQueryKey == null || subQueryKey.length() < 1)
- return this;
- Hashtable subQueriesProperties = (Hashtable)getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = (FormToolPropertiesInterface)subQueriesProperties.get(subQueryKey);
- if (subQueryProperties == null)
- {
- subQueryProperties = new FormToolProperties();
- initDefaultProperties(subQueryProperties);
- subQueriesProperties.put(subQueryKey,subQueryProperties);
- }
- return subQueryProperties;
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- String subQueryKey = (String)getProperty(UDDIActionInputs.SUBQUERY_KEY);
- return SelectFindToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),subQueryKey,forHistory);
- }
-
- public String getFormLink()
- {
- Object subQueryKeyObject = getProperty(UDDIActionInputs.SUBQUERY_KEY);
- if (subQueryKeyObject != null)
- {
- getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = getFormToolProperties(subQueryKeyObject);
- Object subQueryGetObject = subQueryProperties.getProperty(UDDIActionInputs.SUBQUERY_GET);
- if (subQueryGetObject != null)
- {
- boolean isSubQueryGet = ((Boolean)subQueryGetObject).booleanValue();
- if (isSubQueryGet)
- return "uddi/forms/GetForm.jsp";
- }
- }
- return "uddi/forms/RegFindForm.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegPublishTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegPublishTool.java
deleted file mode 100644
index d1b2e7c34..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegPublishTool.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormToolPropertiesInterface;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectFindToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class RegPublishTool extends FormTool implements MultipleFormToolPropertiesInterface
-{
- ToolManager invisibleToolManager_;
- private RegFindTool regFindTool_;
- public RegPublishTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"uddi/images/publish_enabled.gif","uddi/images/publish_highlighted.gif",alt);
- invisibleToolManager_ = new ToolManager(toolManager.getNode());
- regFindTool_ = new RegFindTool(invisibleToolManager_,"");
- }
-
- protected final void initDefaultProperties()
- {
- toolManager_.getNode().getNodeManager().getController().getUDDIPerspective();
-
- setProperty(UDDIActionInputs.SUBQUERY_KEY,"");
-
- setProperty(UDDIActionInputs.QUERY_ITEM,String.valueOf(UDDIActionInputs.QUERY_ITEM_BUSINESSES));
- String simpleStyleString = String.valueOf(UDDIActionInputs.QUERY_STYLE_SIMPLE);
- setProperty(UDDIActionInputs.QUERY_STYLE_BUSINESSES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICES,simpleStyleString);
- setProperty(UDDIActionInputs.QUERY_STYLE_SERVICE_INTERFACES,simpleStyleString);
-
- // RegPublishBusinessSimpleAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_NAME,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_BUSINESS_DESCRIPTION,"");
-
- // RegPublishServiceSimpleAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_WSDL_URL,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_NAME,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_DESCRIPTION,"");
-
- // RegPublishServiceAdvancedAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL,"");
-
- // RegPublishServiceInterfaceSimpleAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_WSDL_URL,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_NAME,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_SIMPLE_SERVICE_INTERFACE_DESCRIPTION,"");
-
- // RegPublishServiceInterfaceAdvancedAction inputs
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL,"");
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,"");
- }
-
- public final void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- regFindTool_.addAuthenticationProperties(regElement);
- }
-
- public final FormToolPropertiesInterface getFormToolProperties(Object subQueryKeyObject)
- {
- // Empty/Non-existent subquerykey implies publish form. All else implies query form.
- String subQueryKey = (String)subQueryKeyObject;
- if (subQueryKey == null || subQueryKey.length() < 1)
- return this;
- else
- return regFindTool_.getFormToolProperties(subQueryKeyObject);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- String subQueryKey = (String)getProperty(UDDIActionInputs.SUBQUERY_KEY);
- return SelectFindToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),subQueryKey,forHistory);
- }
-
- public String getFormLink()
- {
- Object subQueryKeyObject = getProperty(UDDIActionInputs.SUBQUERY_KEY);
- String subQueryKey = null;
- if (subQueryKeyObject != null)
- {
- getProperty(UDDIActionInputs.SUBQUERIES_PROPERTIES);
- FormToolPropertiesInterface subQueryProperties = getFormToolProperties(subQueryKeyObject);
- Object subQueryGetObject = subQueryProperties.getProperty(UDDIActionInputs.SUBQUERY_GET);
- if (subQueryGetObject != null)
- {
- boolean isSubQueryGet = ((Boolean)subQueryGetObject).booleanValue();
- if (isSubQueryGet)
- return "uddi/forms/GetForm.jsp";
- }
- subQueryKey = (String)subQueryKeyObject;
- }
-
- if (subQueryKey == null || subQueryKey.length() < 1)
- return "uddi/forms/RegPublishForm.jsp";
- else
- return regFindTool_.getFormLink();
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryDetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryDetailsTool.java
deleted file mode 100644
index ad9758ee7..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryDetailsTool.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class RegistryDetailsTool extends DetailsTool
-{
- public RegistryDetailsTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt,ProxyLoadPageAction.getActionLink("uddi/forms/RegDetailsForm.jsp"));
- }
-
- public final void initDefaultProperties()
- {
- clearPropertyTable();
- toolManager_.getNode().getNodeManager().getController();
- RegistryElement regElement = (RegistryElement)(toolManager_.getNode().getTreeElement());
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME,regElement.getName());
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryNode.java
deleted file mode 100644
index 728784343..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RegistryNode.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * -------- -------- -----------------------------------------------------------
- * 20060427 136449 brunssen@us.ibm.com - Vince Brunssen
- *******************************************************************************/
-
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.datamodel.ElementAdapter;
-import org.eclipse.wst.ws.internal.datamodel.RelAddEvent;
-import org.eclipse.wst.ws.internal.datamodel.RelRemoveEvent;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.PublishedItemsElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.QueryParentElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class RegistryNode extends UDDINavigatorNode
-{
- private RegistryDetailsTool regDetailsTool_;
- private RegPublishTool regPublishTool_;
- private LoginTool loginTool_;
-
- public static final String IMAGE_PATH_STANDARD = "uddi/images/registry.gif";
- public static final String IMAGE_PATH_WITH_USER_DEFINED_CATEGORIES = "uddi/images/regstrycat_obj.gif";
-
- public RegistryNode(TreeElement element,NodeManager nodeManager,int nodeDepth,String imagePath)
- {
- super(element,nodeManager,nodeDepth,imagePath);
- element.addListener(new ElementAdapter()
- {
- public void relAdded(RelAddEvent event)
- {
- String rel = event.getOutBoundRelName();
- if (rel.equals(UDDIModelConstants.REL_QUERIES_PARENT))
- {
- QueryParentElement queryParentElement = (QueryParentElement)event.getParentElement();
- createChildNode(queryParentElement);
- }
- else if (isPublishedItemsRel(rel))
- {
- PublishedItemsElement publishedItemsElement = (PublishedItemsElement)event.getParentElement();
- createChildNode(publishedItemsElement);
- }
- }
- public void relRemoved(RelRemoveEvent event)
- {
- TreeElement childElement = null;
- String inBoundRelName = event.getInBoundRelName();
- String outBoundRelName = event.getOutBoundRelName();
- if (inBoundRelName.equals(UDDIModelConstants.REL_QUERIES_PARENT) || isPublishedItemsRel(inBoundRelName))
- childElement = (TreeElement)event.getInboundElement();
- else if (outBoundRelName.equals(UDDIModelConstants.REL_QUERIES_PARENT) || isPublishedItemsRel(outBoundRelName))
- childElement = (TreeElement)event.getOutBoundElement();
-
- if (childElement != null)
- removeChildNode(childElement);
- }
- });
- UDDIPerspective uddiPerspective = nodeManager_.getController().getUDDIPerspective();
- element.connect(new QueryParentElement(uddiPerspective.getMessage("NODE_NAME_QUERIES_FOLDER"),element_.getModel()),UDDIModelConstants.REL_QUERIES_PARENT,ModelConstants.REL_OWNER);
- element.connect(new PublishedItemsElement(UDDIActionInputs.QUERY_ITEM_BUSINESSES,uddiPerspective.getMessage("NODE_NAME_PUBLISHED_BUSINESSES_FOLDER"),element_.getModel()),UDDIModelConstants.REL_PUBLISHED_BUSINESSES_PARENT,ModelConstants.REL_OWNER);
- element.connect(new PublishedItemsElement(UDDIActionInputs.QUERY_ITEM_SERVICES,uddiPerspective.getMessage("NODE_NAME_PUBLISHED_SERVICES_FOLDER"),element_.getModel()),UDDIModelConstants.REL_PUBLISHED_SERVICES_PARENT,ModelConstants.REL_OWNER);
- element.connect(new PublishedItemsElement(UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES,uddiPerspective.getMessage("NODE_NAME_PUBLISHED_SERVICE_INTERFACES_FOLDER"),element_.getModel()),UDDIModelConstants.REL_PUBLISHED_SERVICE_INTERFACES_PARENT,ModelConstants.REL_OWNER);
- setVisibilityOfChildren(false);
- }
-
- private final boolean isPublishedItemsRel(String rel)
- {
- return rel.equals(UDDIModelConstants.REL_PUBLISHED_BUSINESSES_PARENT) || rel.equals(UDDIModelConstants.REL_PUBLISHED_SERVICES_PARENT) || rel.equals(UDDIModelConstants.REL_PUBLISHED_SERVICE_INTERFACES_PARENT);
- }
-
- private final void createChildNode(QueryParentElement queryParentElement)
- {
- QueryParentNode queryParentNode = new QueryParentNode(queryParentElement,nodeManager_,nodeDepth_+1);
- addChild(queryParentNode);
- }
-
- private final void createChildNode(PublishedItemsElement publishedItemsElement)
- {
- PublishedItemsNode publishedItemsNode = new PublishedItemsNode(publishedItemsElement,nodeManager_,nodeDepth_+1);
- addChild(publishedItemsNode);
- }
-
- protected final void initTools()
- {
- nodeManager_.getController();
- UDDIPerspective uddiPerspective = nodeManager_.getController().getUDDIPerspective();
- regDetailsTool_ = new RegistryDetailsTool(toolManager_ ,uddiPerspective.getMessage("ALT_REGISTRY_DETAILS"));
- RegFindTool regFindTool = new RegFindTool(toolManager_,uddiPerspective.getMessage("ALT_FIND"));
- regPublishTool_ = new RegPublishTool(toolManager_,uddiPerspective.getMessage("ALT_PUBLISH"));
- loginTool_ = new LoginTool(toolManager_, uddiPerspective.getMessage("ALT_LOGIN"));
- new AddToFavoritesTool(toolManager_,uddiPerspective.getMessage("ALT_ADD_TO_FAVORITES"));
- regFindTool.addAuthenticationProperties((RegistryElement)element_);
- regPublishTool_.addAuthenticationProperties((RegistryElement)element_);
- }
-
- public final RegistryDetailsTool getRegDetailsTool()
- {
- return regDetailsTool_;
- }
-
- public final RegPublishTool getRegPublishTool()
- {
- return regPublishTool_;
- }
-
- public final LoginTool getLoginTool()
- {
- return loginTool_;
- }
-
- private final void addDiscoveredNodes(Vector allNodes,Node queryParentNode,int queryType)
- {
- Vector queryNodes = queryParentNode.getChildNodes();
- for (int i=0;i<queryNodes.size();i++)
- {
- QueryNode queryNode = (QueryNode)queryNodes.elementAt(i);
- QueryElement queryElement = (QueryElement)queryNode.getTreeElement();
- if (queryType == UDDIActionInputs.QUERY_ITEM_QUERIES)
- allNodes.addElement(queryNode);
- else if (queryElement.getQueryType() == queryType)
- {
- Vector discoveredNodes = queryNode.getChildNodes();
- for (int j=0;j<discoveredNodes.size();j++)
- allNodes.addElement(discoveredNodes.elementAt(j));
- }
- }
- }
-
- private final void addPublishedNodes(Vector allNodes,Node publishedItemsNode)
- {
- Vector itemNodes = publishedItemsNode.getChildNodes();
- for (int i=0;i<itemNodes.size();i++)
- allNodes.addElement(itemNodes.elementAt(i));
- }
-
- public final void getAllBusinessNodes(Vector allBusinessNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node queryParentNode = getChildNode(regElement.getQueryParentElement());
- Node publishedBusinessesNode = getChildNode(regElement.getPublishedBusinessesElement());
- addDiscoveredNodes(allBusinessNodes,queryParentNode,UDDIActionInputs.QUERY_ITEM_BUSINESSES);
- addPublishedNodes(allBusinessNodes,publishedBusinessesNode);
- }
-
- public final void getAllServiceNodes(Vector allServicesNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node queryParentNode = getChildNode(regElement.getQueryParentElement());
- Node publishedServicesNode = getChildNode(regElement.getPublishedServicesElement());
- addDiscoveredNodes(allServicesNodes,queryParentNode,UDDIActionInputs.QUERY_ITEM_SERVICES);
- addPublishedNodes(allServicesNodes,publishedServicesNode);
- }
-
- public final void getAllServiceInterfaceNodes(Vector allServiceInterfaceNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node queryParentNode = getChildNode(regElement.getQueryParentElement());
- Node publishedServiceInterfacesNode = getChildNode(regElement.getPublishedServiceInterfacesElement());
- addDiscoveredNodes(allServiceInterfaceNodes,queryParentNode,UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES);
- addPublishedNodes(allServiceInterfaceNodes,publishedServiceInterfacesNode);
- }
-
- public final void getPublishedBusinessNodes(Vector publishedBusinessNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedBusinessesNode = getChildNode(regElement.getPublishedBusinessesElement());
- addPublishedNodes(publishedBusinessNodes,publishedBusinessesNode);
- }
-
- public final void getPublishedServiceNodes(Vector publishedServiceNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedServicesNode = getChildNode(regElement.getPublishedServicesElement());
- addPublishedNodes(publishedServiceNodes,publishedServicesNode);
- }
-
- public final void getPublishedServiceInterfaceNodes(Vector publishedServiceInterfaceNodes)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedServiceInterfacesNode = getChildNode(regElement.getPublishedServiceInterfacesElement());
- addPublishedNodes(publishedServiceInterfaceNodes,publishedServiceInterfacesNode);
- }
-
- public final void getDiscoveredNodes(Vector discoveredNodes,int queryItem)
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node queryParentNode = getChildNode(regElement.getQueryParentElement());
- addDiscoveredNodes(discoveredNodes,queryParentNode,queryItem);
- }
-
- private final boolean hasQueryResults(Node queryParentNode,int queryType)
- {
- Vector queries = queryParentNode.getChildNodes();
- for (int i=0;i<queries.size();i++)
- {
- QueryNode queryNode = (QueryNode)queries.elementAt(i);
- if (queryNode.getChildNodes().size() > 0)
- {
- QueryElement queryElement = (QueryElement)queryNode.getTreeElement();
- if (queryElement.getQueryType() == queryType)
- return true;
- }
- }
- return false;
- }
-
- public final boolean hasBusiness()
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedBusinessesNode = getChildNode(regElement.getPublishedBusinessesElement());
- if (publishedBusinessesNode.getChildNodes().size() > 0)
- return true;
- return hasQueryResults(getChildNode(regElement.getQueryParentElement()),UDDIActionInputs.QUERY_ITEM_BUSINESSES);
- }
-
- public final boolean hasService()
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedServicesNode = getChildNode(regElement.getPublishedServicesElement());
- if (publishedServicesNode.getChildNodes().size() > 0)
- return true;
- return hasQueryResults(getChildNode(regElement.getQueryParentElement()),UDDIActionInputs.QUERY_ITEM_SERVICES);
- }
-
- public final boolean hasServiceInterface()
- {
- RegistryElement regElement = (RegistryElement)element_;
- Node publishedServiceInterfacesNode = getChildNode(regElement.getPublishedServiceInterfacesElement());
- if (publishedServiceInterfacesNode.getChildNodes().size() > 0)
- return true;
- return hasQueryResults(getChildNode(regElement.getQueryParentElement()),UDDIActionInputs.QUERY_ITEM_SERVICE_INTERFACES);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ResultsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ResultsTool.java
deleted file mode 100644
index e257f6c62..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ResultsTool.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class ResultsTool extends FormTool
-{
- private String formLink_;
-
- public ResultsTool(ToolManager toolManager,String alt)
- {
- super(toolManager,"images/details_enabled.gif","images/details_highlighted.gif",alt);
- formLink_ = ProxyLoadPageAction.getActionLink("uddi/forms/ResultsForm.jsp");
- }
-
- public final void initDefaultProperties()
- {
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public String getFormLink()
- {
- return formLink_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RootCategoryNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RootCategoryNode.java
deleted file mode 100644
index fb1c0ce37..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/RootCategoryNode.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryElement;
-
-public class RootCategoryNode extends Node
-{
- public RootCategoryNode(TreeElement element,NodeManager nodeManager)
- {
- super(element,nodeManager,1,"images/root_main.gif");
- setVisibilityOfChildren(true);
- }
-
- public final void createChildren()
- {
- Enumeration children = element_.getElements(UDDIModelConstants.REL_SUBCATEGORIES);
- if (children != null)
- {
- while (children.hasMoreElements())
- {
- CategoryElement categoryElement = (CategoryElement)children.nextElement();
- CategoryNode categoryNode = new CategoryNode(categoryElement,nodeManager_,nodeDepth_+1);
- addChild(categoryNode);
- categoryNode.createChildren();
- }
- }
- }
-
- // Root node: no need for toggle action.
- protected final String getToggleNodeActionHref()
- {
- return null;
- }
-
- // Text only node.
- protected final String getLinkActionHref()
- {
- return null;
- }
-
- protected final void initTools()
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceDetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceDetailsTool.java
deleted file mode 100644
index f506bde86..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceDetailsTool.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceElement;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.util.CategoryBag;
-
-public class ServiceDetailsTool extends DetailsTool
-{
- public ServiceDetailsTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt,ProxyLoadPageAction.getActionLink("uddi/forms/ServiceDetailsForm.jsp"));
- }
-
- public final void initDefaultProperties()
- {
- clearPropertyTable();
- toolManager_.getNode().getNodeManager().getController();
- ServiceElement serviceElement = (ServiceElement)(toolManager_.getNode().getTreeElement());
- BusinessService busService = serviceElement.getBusinessService();
-
- setProperty(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,busService.getServiceKey());
- setProperty(UDDIActionInputs.QUERY_INPUT_UUID_BUSINESS_KEY,busService.getBusinessKey());
-
- Vector nameVector = new Vector();
- copyIndexVector(busService.getNameVector(),nameVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_NAMES,nameVector);
-
- Vector descriptionVector = new Vector();
- copyIndexVector(busService.getDescriptionVector(),descriptionVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_DESCRIPTIONS,descriptionVector);
-
- CategoryBag catBag = busService.getCategoryBag();
- if (catBag != null)
- {
- Vector catVector = new Vector();
- copyIndexVector(catBag.getKeyedReferenceVector(),catVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_CATEGORIES,catVector);
- }
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceDetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceDetailsTool.java
deleted file mode 100644
index c7c984752..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceDetailsTool.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Vector;
-import org.eclipse.wst.ws.internal.explorer.platform.actions.ProxyLoadPageAction;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.ServiceInterfaceElement;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.IdentifierBag;
-
-public class ServiceInterfaceDetailsTool extends DetailsTool
-{
- public ServiceInterfaceDetailsTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt,ProxyLoadPageAction.getActionLink("uddi/forms/ServiceInterfaceDetailsForm.jsp"));
- }
-
- public final void initDefaultProperties()
- {
- clearPropertyTable();
- toolManager_.getNode().getNodeManager().getController();
- ServiceInterfaceElement siElement = (ServiceInterfaceElement)(toolManager_.getNode().getTreeElement());
- TModel tModel = siElement.getTModel();
-
- setProperty(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_INTERFACE_KEY,tModel.getTModelKey());
- ListElement nameListElement = new ListElement(tModel.getNameString());
- nameListElement.setTargetViewToolInfo(-1,-1,0);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_NAME,nameListElement);
-
- Vector descriptionVector = new Vector();
- copyIndexVector(tModel.getDescriptionVector(),descriptionVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_DESCRIPTIONS,descriptionVector);
-
- IdentifierBag idBag = tModel.getIdentifierBag();
- if (idBag != null)
- {
- Vector idVector = new Vector();
- copyIndexVector(idBag.getKeyedReferenceVector(),idVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_IDENTIFIERS,idVector);
- }
-
- CategoryBag catBag = tModel.getCategoryBag();
- if (catBag != null)
- {
- Vector catVector = new Vector();
- copyIndexVector(catBag.getKeyedReferenceVector(),catVector);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_CATEGORIES,catVector);
- }
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceNode.java
deleted file mode 100644
index c8938f867..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceInterfaceNode.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ServiceInterfaceGetBusinessesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ServiceInterfaceGetServicesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class ServiceInterfaceNode extends UDDINavigatorNode
-{
- private DetailsTool detailsTool_;
- private UnpublishTool unpublishTool_;
- public ServiceInterfaceNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth,"uddi/images/service_interface_highlighted.gif");
- }
-
- protected final void initTools()
- {
- Controller controller = nodeManager_.getController();
- UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
- detailsTool_ = new ServiceInterfaceDetailsTool(toolManager_,uddiPerspective.getMessage("ALT_SERVICE_INTERFACE_DETAILS"));
- new GetServicesTool(toolManager_,uddiPerspective.getMessage("ALT_GET_SERVICES"),ServiceInterfaceGetServicesAction.getActionLink(nodeId_));
- new GetBusinessesTool(toolManager_,"uddi/images/businesses_closed_enabled.gif","uddi/images/businesses_closed_highlighted.gif",uddiPerspective.getMessage("ALT_GET_BUSINESSES"),ServiceInterfaceGetBusinessesAction.getActionLink(nodeId_));
- new UDDIImportWSDLToWorkbenchTool(toolManager_,controller.getMessage("ALT_IMPORT_WSDL_TO_WORKBENCH"));
- new UDDIImportWSDLToFileSystemTool(toolManager_,controller.getMessage("ALT_WSDL_IMPORT_TO_FS"));
- new UDDILaunchWebServiceWizardTool(toolManager_,controller.getMessage("ALT_LAUNCH_WEB_SERVICE_WIZARD"));
- new AddToFavoritesTool(toolManager_, uddiPerspective.getMessage("ALT_ADD_TO_FAVORITES"));
- unpublishTool_ = new UnpublishTool(toolManager_,"uddi/images/unpublish_service_interface_enabled.gif","uddi/images/unpublish_service_interface_highlighted.gif",uddiPerspective.getMessage("ALT_UNPUBLISH_SERVICE_INTERFACE"));
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- detailsTool_.addAuthenticationProperties(regElement);
- unpublishTool_.addAuthenticationProperties(regElement);
- }
-
- public String getWSDLURLFromDetailsTool()
- {
- ListElement wsdlURLListElement = (ListElement)detailsTool_.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_INTERFACE_WSDL_URL);
- if (wsdlURLListElement != null)
- return (String)wsdlURLListElement.getObject();
- else
- return "temp.wsdl";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceNode.java
deleted file mode 100644
index bbeac5f88..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/ServiceNode.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.ListElement;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ServiceGetBusinessAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ServiceGetServiceInterfacesAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class ServiceNode extends UDDINavigatorNode
-{
- private DetailsTool detailsTool_;
- private UnpublishTool unpublishTool_;
- public ServiceNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth,"uddi/images/service_highlighted.gif");
- }
-
- protected final void initTools()
- {
- Controller controller = nodeManager_.getController();
- UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
- detailsTool_ = new ServiceDetailsTool(toolManager_,uddiPerspective.getMessage("ALT_SERVICE_DETAILS"));
- new GetBusinessesTool(toolManager_,"uddi/images/business_enabled.gif","uddi/images/business_highlighted.gif",uddiPerspective.getMessage("ALT_GET_BUSINESS"),ServiceGetBusinessAction.getActionLink(nodeId_));
- new GetServiceInterfacesTool(toolManager_,uddiPerspective.getMessage("ALT_GET_SERVICE_INTERFACES"),ServiceGetServiceInterfacesAction.getActionLink(nodeId_));
- new UDDIImportWSDLToWorkbenchTool(toolManager_,controller.getMessage("ALT_IMPORT_WSDL_TO_WORKBENCH"));
- new UDDIImportWSDLToFileSystemTool(toolManager_,controller.getMessage("ALT_WSDL_IMPORT_TO_FS"));
- new UDDILaunchWebServiceWizardTool(toolManager_,controller.getMessage("ALT_LAUNCH_WEB_SERVICE_WIZARD"));
- new UDDIAddToWSDLPerspectiveTool(toolManager_,uddiPerspective.getMessage("ALT_ADD_TO_WSDL_PERSPECTIVE"));
- new AddToFavoritesTool(toolManager_,uddiPerspective.getMessage("ALT_ADD_TO_FAVORITES"));
- unpublishTool_ = new UnpublishTool(toolManager_,"uddi/images/unpublish_service_enabled.gif","uddi/images/unpublish_service_highlighted.gif",uddiPerspective.getMessage("ALT_UNPUBLISH_SERVICE"));
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- detailsTool_.addAuthenticationProperties(regElement);
- unpublishTool_.addAuthenticationProperties(regElement);
- }
-
- public String getWSDLURLFromDetailsTool()
- {
- ListElement wsdlURLListElement = (ListElement)detailsTool_.getProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_SERVICE_WSDL_URL);
- if (wsdlURLListElement != null)
- return (String)wsdlURLListElement.getObject();
- else
- return "temp.wsdl";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryKeyProperty.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryKeyProperty.java
deleted file mode 100644
index bca7dd193..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryKeyProperty.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-public class SubQueryKeyProperty
-{
- private String subQueryKey_;
-
- public SubQueryKeyProperty()
- {
- subQueryKey_ = "";
- }
-
- public final void setSubQueryKey(String subQueryKey)
- {
- subQueryKey_ = subQueryKey;
- }
-
- public final String getSubQueryKey()
- {
- return subQueryKey_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryTransferTarget.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryTransferTarget.java
deleted file mode 100644
index 819e619cf..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/SubQueryTransferTarget.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Hashtable;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Tool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ViewTool;
-
-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_;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIAddToWSDLPerspectiveTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIAddToWSDLPerspectiveTool.java
deleted file mode 100644
index a9e2b6ecb..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIAddToWSDLPerspectiveTool.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.AddToWSDLPerspectiveTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.UDDIAddToWSDLPerspectiveAction;
-
-public class UDDIAddToWSDLPerspectiveTool extends AddToWSDLPerspectiveTool {
- public UDDIAddToWSDLPerspectiveTool(ToolManager toolManager, String alt) {
- super(toolManager,alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory) {
- Node selectedNode = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(selectedNode.getNodeId(), toolId_, selectedNode.getViewId(), selectedNode.getViewToolId(), forHistory);
- }
-
- public String getActionLink() {
- Node selectedNode = toolManager_.getNode();
- return UDDIAddToWSDLPerspectiveAction.getActionLink(selectedNode.getNodeId(), toolId_, selectedNode.getViewId(), selectedNode.getViewToolId());
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToFileSystemTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToFileSystemTool.java
deleted file mode 100644
index 7d85a02ce..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToFileSystemTool.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ImportToFileSystemTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.UDDIImportWSDLToFileSystemAction;
-
-public class UDDIImportWSDLToFileSystemTool extends ImportToFileSystemTool
-{
- public UDDIImportWSDLToFileSystemTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt);
- }
-
- public final String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public final String getActionLink()
- {
- Node node = toolManager_.getNode();
- return UDDIImportWSDLToFileSystemAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId());
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToWorkbenchTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToWorkbenchTool.java
deleted file mode 100644
index 16c36218f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIImportWSDLToWorkbenchTool.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ImportToWorkbenchTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class UDDIImportWSDLToWorkbenchTool extends ImportToWorkbenchTool
-{
- public UDDIImportWSDLToWorkbenchTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public final String getFormLink()
- {
- return "uddi/forms/UDDIImportWSDLToWorkbenchForm.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDILaunchWebServiceWizardTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDILaunchWebServiceWizardTool.java
deleted file mode 100644
index 3d7e36f10..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDILaunchWebServiceWizardTool.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.LaunchWebServiceWizardTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-
-public class UDDILaunchWebServiceWizardTool extends LaunchWebServiceWizardTool
-{
- public UDDILaunchWebServiceWizardTool(ToolManager toolManager,String alt)
- {
- super(toolManager,alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public final String getFormLink()
- {
- return "uddi/forms/UDDILaunchWebServiceWizardForm.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIMainNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIMainNode.java
deleted file mode 100644
index 6c9000d25..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIMainNode.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.util.Enumeration;
-import org.eclipse.wst.ws.internal.datamodel.ElementAdapter;
-import org.eclipse.wst.ws.internal.datamodel.RelAddEvent;
-import org.eclipse.wst.ws.internal.datamodel.RelRemoveEvent;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.UDDIMainElement;
-
-// Root node for the UDDI Navigator Tree View
-public class UDDIMainNode extends UDDINavigatorNode
-{
- public UDDIMainNode(TreeElement element,NodeManager nodeManager)
- {
- super(element,nodeManager,1,"images/root_main.gif");
- element.addListener(new ElementAdapter()
- {
- public void relAdded(RelAddEvent event)
- {
- String rel = event.getOutBoundRelName();
- if (rel.equals(UDDIModelConstants.REL_REGISTRIES))
- {
- RegistryElement registryElement = (RegistryElement)event.getParentElement();
- UDDIMainElement uddiMainElement = (UDDIMainElement)element_;
- uddiMainElement.addRegistryName(registryElement.getName());
- createChildNode(registryElement);
- }
- }
-
- public void relRemoved(RelRemoveEvent event)
- {
- RegistryElement childElement = null;
- if (event.getInBoundRelName().equals(UDDIModelConstants.REL_REGISTRIES))
- childElement = (RegistryElement)event.getInboundElement();
- else if (event.getOutBoundRelName().equals(UDDIModelConstants.REL_REGISTRIES))
- childElement = (RegistryElement)event.getOutBoundElement();
-
- if (childElement != null)
- {
- UDDIMainElement uddiMainElement = (UDDIMainElement)element_;
- uddiMainElement.removeRegistryName(childElement.getName());
- removeChildNode(childElement);
- }
- }
- });
- }
-
- private final void createChildNode(TreeElement element)
- {
- RegistryElement regElement = (RegistryElement)element;
- Enumeration userDefinedCategories = regElement.getUserDefinedCategories();
- String imagePath;
- if (userDefinedCategories != null && userDefinedCategories.hasMoreElements())
- imagePath = RegistryNode.IMAGE_PATH_WITH_USER_DEFINED_CATEGORIES;
- else
- imagePath = RegistryNode.IMAGE_PATH_STANDARD;
-
- RegistryNode regNode = new RegistryNode(element,nodeManager_,nodeDepth_+1,imagePath);
- addChild(regNode);
- }
-
- protected final void initTools()
- {
- Controller controller = nodeManager_.getController();
- UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
- new OpenRegistryTool(toolManager_,uddiPerspective.getMessage("ALT_OPEN_REGISTRY"));
- }
-
- // Given a node under a particular registry node, obtain the registry node.
- public final RegistryNode getRegistryNode(Node currentNode)
- {
- RegistryNode regNode = null;
- if (currentNode instanceof RegistryNode)
- {
- regNode = (RegistryNode)currentNode;
- }
- else if (currentNode instanceof QueryNode)
- {
- // Query -> Query folder -> Registry
- regNode = (RegistryNode)(currentNode.getParent().getParent());
- }
- else if (currentNode instanceof QueryParentNode || currentNode instanceof PublishedItemsNode)
- {
- // Query folder -> Registry
- regNode = (RegistryNode)(currentNode.getParent());
- }
- else if (currentNode instanceof BusinessNode || currentNode instanceof ServiceNode || currentNode instanceof ServiceInterfaceNode)
- {
- // itemNode -> Published Items folder -> Registry
- // OR:
- // itemNode -> QueryNode -> Query folder -> Registry
- Node parentNode = currentNode.getParent();
- if (parentNode instanceof QueryNode)
- regNode = (RegistryNode)(parentNode.getParent().getParent());
- else
- regNode = (RegistryNode)parentNode.getParent();
- }
- return regNode;
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorFolderNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorFolderNode.java
deleted file mode 100644
index 57c8cd3f4..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorFolderNode.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FolderNode;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectNavigatorNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ToggleNavigatorNodeAction;
-
-public abstract class UDDINavigatorFolderNode extends FolderNode
-{
- public UDDINavigatorFolderNode(TreeElement element,NodeManager nodeManager,int nodeDepth)
- {
- super(element,nodeManager,nodeDepth);
- }
-
- // uddi/actions/ToggleNavigatorNodeAction.jsp?nodeId=...
- public final String getToggleNodeActionHref()
- {
- return ToggleNavigatorNodeAction.getActionLink(nodeId_,isOpen_);
- }
-
- // uddi/actions/SelectNavigatorNodeAction.jsp?nodeId=...
- public final String getLinkActionHref()
- {
- return SelectNavigatorNodeAction.getActionLink(nodeId_,false);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorNode.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorNode.java
deleted file mode 100644
index bde07285c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDINavigatorNode.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectNavigatorNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.ToggleNavigatorNodeAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public abstract class UDDINavigatorNode extends Node
-{
- public UDDINavigatorNode(TreeElement element,NodeManager nodeManager,int nodeDepth,String imagePath)
- {
- super(element,nodeManager,nodeDepth,imagePath);
- }
-
- // uddi/actions/ToggleNavigatorNodeAction.jsp?nodeId=...
- public final String getToggleNodeActionHref()
- {
- return ToggleNavigatorNodeAction.getActionLink(nodeId_,isOpen_);
- }
-
- // uddi/actions/SelectNavigatorNodeAction.jsp?nodeId=...
- public final String getLinkActionHref()
- {
- return SelectNavigatorNodeAction.getActionLink(nodeId_,false);
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIPerspective.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIPerspective.java
deleted file mode 100644
index 67cbdb61b..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UDDIPerspective.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * -------- -------- -----------------------------------------------------------
- * 20060224 122752 cbrealey@ca.ibm.com - Chris Brealey
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Properties;
-import java.util.Vector;
-import javax.servlet.ServletContext;
-import org.eclipse.wst.ws.internal.datamodel.BasicModel;
-import org.eclipse.wst.ws.internal.datamodel.Model;
-import org.eclipse.wst.ws.internal.explorer.favorites.FavoritesRegistryTypeDefault;
-import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.AddRegistryToUDDIPerspectiveAction;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesMainElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIRegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIRegistryFolderElement;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Perspective;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.OpenRegistryAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.RegFindServiceUUIDAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SwitchPerspectiveFromUDDIAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.CategoryModel;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.UDDIMainElement;
-import org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils;
-import org.eclipse.wst.ws.internal.explorer.platform.util.URLUtils;
-import org.eclipse.wst.ws.internal.explorer.platform.util.Validator;
-import org.eclipse.wst.ws.internal.parser.favorites.IFavoritesUDDIRegistry;
-import org.uddi4j.datatype.tmodel.TModel;
-
-public class UDDIPerspective extends Perspective
-{
- private Hashtable knownRegistries_;
- private IFavoritesUDDIRegistry defaultUDDIRegistry_;
- private Model navigatorModel_;
- private NodeManager navigatorManager_;
- private int wsdlType_;
- private Hashtable categoryManagers_;
- String categoryTModelKey_;
-
- // Window sizes
- private String perspectiveContentFramesetCols_;
- private String savedPerspectiveContentFramesetCols_;
- private String actionsContainerFramesetRows_;
- private String savedActionsContainerFramesetRows_;
-
- public UDDIPerspective(Controller controller)
- {
- super("uddi",controller);
- }
-
- public final void initPerspective(ServletContext application)
- {
- String defaultFavorites = controller_.getDefaultFavoritesLocation();
- FavoritesRegistryTypeDefault favRegTypeDefault = new FavoritesRegistryTypeDefault(defaultFavorites);
- IFavoritesUDDIRegistry[] favRegistriesDefault = favRegTypeDefault.getFavoritesUDDIRegistries();
- knownRegistries_ = new Hashtable();
- for (int i=0;i<favRegistriesDefault.length;i++)
- {
- knownRegistries_.put(favRegistriesDefault[i].getInquiryURL(),favRegistriesDefault[i]);
- }
- if (favRegistriesDefault.length > 0)
- defaultUDDIRegistry_ = favRegistriesDefault[0];
-
- navigatorModel_ = new BasicModel("uddiModel");
- UDDIMainElement uddiMainElement = new UDDIMainElement(getMessage("NODE_NAME_UDDI_MAIN"),navigatorModel_);
- navigatorModel_.setRootElement(uddiMainElement);
- navigatorManager_ = new NodeManager(controller_);
- UDDIMainNode uddiMainNode = new UDDIMainNode(uddiMainElement,navigatorManager_);
- navigatorManager_.setRootNode(uddiMainNode);
-
- wsdlType_ = UDDIActionInputs.WSDL_TYPE_SERVICE_INTERFACE;
- categoryManagers_ = new Hashtable();
-
- // Initialize the default category models.
- if (application.getAttribute("commonCategoryModels") == null)
- {
- synchronized (application)
- {
- if (application.getAttribute("commonCategoryModels") == null)
- {
- Hashtable commonCategoryModels = new Hashtable();
-
- CategoryModel naicsModel = new CategoryModel();
- naicsModel.setServletContext(application);
- naicsModel.setDefaultDataFile("/uddi/data/naics-data.txt");
- naicsModel.setDisplayName(getMessage("FORM_OPTION_CATEGORY_NAICS"));
- naicsModel.setTModelKey(TModel.NAICS_TMODEL_KEY);
- commonCategoryModels.put(TModel.NAICS_TMODEL_KEY,naicsModel);
-
- CategoryModel unspscModel = new CategoryModel();
- unspscModel.setServletContext(application);
- unspscModel.setDefaultDataFile("/uddi/data/unspsc-data.txt");
- unspscModel.setDisplayName(getMessage("FORM_OPTION_CATEGORY_UNSPSC_73"));
- unspscModel.setTModelKey(TModel.UNSPSC_73_TMODEL_KEY);
- commonCategoryModels.put(TModel.UNSPSC_73_TMODEL_KEY,unspscModel);
-
- CategoryModel geoModel = new CategoryModel();
- geoModel.setServletContext(application);
- geoModel.setDefaultDataFile("/uddi/data/geo-data.txt");
- geoModel.setDisplayName(getMessage("FORM_OPTION_CATEGORY_GEO"));
- geoModel.setTModelKey(TModel.ISO_CH_TMODEL_KEY);
- commonCategoryModels.put(TModel.ISO_CH_TMODEL_KEY,geoModel);
-
- application.setAttribute("commonCategoryModels",commonCategoryModels);
- }
- }
- }
- categoryTModelKey_ = null;
-
- // Starting frameset sizes.
- if (!DirUtils.isRTL())
- perspectiveContentFramesetCols_ = "30%,*";
- else
- perspectiveContentFramesetCols_ = "*,30%";
- savedPerspectiveContentFramesetCols_ = perspectiveContentFramesetCols_;
- actionsContainerFramesetRows_ = "75%,*";
- savedActionsContainerFramesetRows_ = actionsContainerFramesetRows_;
- }
-
- public final Hashtable getKnownRegistries()
- {
- // We must always query the favorites to see if additional registries were added over time. This property cannot be cached.
- FavoritesMainElement favMainElement = (FavoritesMainElement)(controller_.getFavoritesPerspective().getNodeManager().getRootNode().getTreeElement());
- FavoritesUDDIRegistryFolderElement favRegFolderElement = favMainElement.getFavoritesUDDIRegistryFolderElement();
- Enumeration e = favRegFolderElement.getAllFavorites();
- while (e.hasMoreElements())
- {
- FavoritesUDDIRegistryElement favRegElement = (FavoritesUDDIRegistryElement)e.nextElement();
- String inquiryURL = favRegElement.getInquiryURL();
- if (knownRegistries_.get(inquiryURL) == null)
- knownRegistries_.put(inquiryURL,favRegElement.getIFavoritesUDDIRegistryInterface());
- }
- return knownRegistries_;
- }
-
- public final String getKnownRegistryPublishURL(String inquiryURL)
- {
- IFavoritesUDDIRegistry knownRegistry = (IFavoritesUDDIRegistry)getKnownRegistries().get(inquiryURL);
- if (knownRegistry != null)
- {
- String publishURL = knownRegistry.getPublishURL();
- if (Validator.validateURL(publishURL))
- return publishURL;
- }
- return null;
- }
-
- public final String getKnownRegistryRegistrationURL(String inquiryURL)
- {
- IFavoritesUDDIRegistry knownRegistry = (IFavoritesUDDIRegistry)getKnownRegistries().get(inquiryURL);
- if (knownRegistry != null)
- {
- String registrationURL = knownRegistry.getRegistrationURL();
- if (Validator.validateURL(registrationURL))
- return registrationURL;
- }
- return null;
- }
-
- public final IFavoritesUDDIRegistry getDefaultUDDIRegistry()
- {
- return defaultUDDIRegistry_;
- }
-
- public final void preloadUDDIRegistries(String[] inquiryURLs, String[] publishURLs)
- {
- if (inquiryURLs != null)
- {
- Hashtable knownRegistries = getKnownRegistries();
- StringBuffer directoryBuffer = new StringBuffer();
- for (int i = 0; i < inquiryURLs.length; i++)
- {
- String inquiryURL = URLUtils.decode(inquiryURLs[i]);
- String publishURL = null;
- String regName = null;
- String registrationURL = null;
- // continue to the next registry if inquiryURL does not exist
- if (!Validator.validateURL(inquiryURL))
- continue;
- // populate and run an OpenRegistryAction
- OpenRegistryAction action = new OpenRegistryAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- IFavoritesUDDIRegistry knownRegistry = (IFavoritesUDDIRegistry)knownRegistries.get(inquiryURL);
- boolean checkForUserDefinedCategories = false;
- File directoryFile = null;
- if (knownRegistry != null)
- {
- publishURL = knownRegistry.getPublishURL();
- regName = knownRegistry.getName();
- registrationURL = knownRegistry.getRegistrationURL();
- directoryBuffer.setLength(0);
- FavoritesUDDIRegistryFolderElement.formCategoriesDirectory(directoryBuffer,controller_.getServletEngineStateLocation(),regName);
- directoryFile = new File(directoryBuffer.toString());
- if (directoryFile.exists() && directoryFile.listFiles().length > 0)
- checkForUserDefinedCategories = true;
- }
- if (regName == null)
- regName = inquiryURL;
- if (publishURL == null && publishURLs != null && i < publishURLs.length && publishURLs[i] != null) {
- publishURL = URLUtils.decode(publishURLs[i]);
- }
- // populate the action
- propertyTable.put(UDDIActionInputs.INQUIRY_URL, inquiryURL);
- propertyTable.put(UDDIActionInputs.REGISTRY_NAME, regName);
- if (Validator.validateURL(publishURL))
- propertyTable.put(UDDIActionInputs.PUBLISH_URL, publishURL);
- if (Validator.validateURL(registrationURL))
- propertyTable.put(UDDIActionInputs.REGISTRATION_URL, registrationURL);
-
- // Check if private registry category information is available for this registry.
- directoryBuffer.setLength(0);
- String encodedInquiryURL = URLUtils.encode(inquiryURL);
- directoryBuffer.append(controller_.getServletEngineStateLocation()).append(encodedInquiryURL).append(".properties");
- directoryFile = new File(directoryBuffer.toString());
- if (directoryFile.exists())
- {
- try
- {
- Properties p = new Properties();
- FileInputStream fin = new FileInputStream(directoryFile);
- p.load(fin);
- fin.close();
- directoryFile.delete();
- String dataDirectory = p.getProperty(UDDIActionInputs.CATEGORIES_DIRECTORY);
- if (dataDirectory != null)
- propertyTable.put(UDDIActionInputs.CATEGORIES_DIRECTORY,dataDirectory);
- checkForUserDefinedCategories = true;
- }
- catch (IOException e)
- {
- checkForUserDefinedCategories = false;
- }
- }
-
- if (checkForUserDefinedCategories)
- propertyTable.put(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES,Boolean.TRUE);
- else
- propertyTable.remove(UDDIActionInputs.CHECK_USER_DEFINED_CATEGORIES);
-
- // run the action
- action.run();
-
- RegistryElement regElement = (RegistryElement)(navigatorManager_.getSelectedNode().getTreeElement());
- Enumeration userDefinedCategories = regElement.getUserDefinedCategories();
- if (userDefinedCategories != null && userDefinedCategories.hasMoreElements())
- {
- AddRegistryToUDDIPerspectiveAction action2 = new AddRegistryToUDDIPerspectiveAction(controller_);
- String categoriesDirectory = regElement.getCategoriesDirectory();
- if (categoriesDirectory != null)
- action2.linkCategoryModelsWithSavedData(userDefinedCategories,categoriesDirectory);
- else
- action2.linkCategoryModelsWithSavedData(regElement.getName(),userDefinedCategories);
- }
- }
- if (inquiryURLs.length > 0)
- controller_.setCurrentPerspective(ActionInputs.PERSPECTIVE_UDDI);
- }
- }
-
- // Preconditions:
- // serviceNames and serviceKeys have length >= 1.
- // regNode != null
- private final void preloadServicesForRegistry(RegistryNode regNode,String[] serviceNames,String[] serviceKeys)
- {
- int regNodeId = regNode.getNodeId();
- for (int i=0;i<serviceKeys.length;i++)
- {
- navigatorManager_.setSelectedNodeId(regNodeId);
- RegFindServiceUUIDAction action = new RegFindServiceUUIDAction(controller_);
- Hashtable propertyTable = action.getPropertyTable();
- propertyTable.put(UDDIActionInputs.QUERY_NAME,serviceNames[i]);
- propertyTable.put(UDDIActionInputs.QUERY_INPUT_UUID_SERVICE_KEY,serviceKeys[i]);
- action.run();
- navigatorManager_.makeSelectedNodeVisible();
- }
- }
-
- public final void preloadServices(String[] inquiryURLs,String[] serviceNames,String[] serviceKeys)
- {
- // The algorithm will search for each service key in each inquiry URL.
- if (serviceKeys != null && serviceNames != null && serviceNames.length == serviceKeys.length)
- {
- for (int i=0;i<serviceKeys.length;i++)
- {
- if (inquiryURLs != null)
- {
- // Eliminate duplicate inquiry URLs.
- Hashtable inquiryURLsHash = new Hashtable();
- for (int j=0;j<inquiryURLs.length;j++)
- inquiryURLsHash.put(inquiryURLs[j],Boolean.TRUE);
- // Loop through all the available registries and use them if possible.
- Node uddiMainNode = navigatorManager_.getRootNode();
- Vector registryNodes = uddiMainNode.getChildNodes();
- for (int k=0;k<registryNodes.size();k++)
- {
- RegistryNode regNode = (RegistryNode)registryNodes.elementAt(k);
- RegistryElement regElement = (RegistryElement)regNode.getTreeElement();
- String existingRegistryInquiryURL = regElement.getInquiryURL();
- if (inquiryURLsHash.get(existingRegistryInquiryURL) != null)
- {
- preloadServicesForRegistry(regNode,serviceNames,serviceKeys);
- inquiryURLsHash.remove(existingRegistryInquiryURL);
- }
- }
- Enumeration inquiryURLsEnum = inquiryURLsHash.keys();
- while (inquiryURLsEnum.hasMoreElements())
- {
- String inquiryURL = (String)inquiryURLsEnum.nextElement();
- preloadUDDIRegistries(new String[] {inquiryURL},null);
- RegistryNode regNode = (RegistryNode)navigatorManager_.getSelectedNode();
- preloadServicesForRegistry(regNode,serviceNames,serviceKeys);
- }
- }
- }
- }
- }
-
- public final void setCategoryTModelKey(String categoryTModelKey)
- {
- categoryTModelKey_ = categoryTModelKey;
- }
-
- public final String getCategoryTModelKey()
- {
- return categoryTModelKey_;
- }
-
- private final void initCategoryBrowser(CategoryModel categoryModel,NodeManager nodeManager)
- {
- TreeElement categoryRootElement = (TreeElement)categoryModel.getRootElement();
- RootCategoryNode rootCategoryNode = new RootCategoryNode(categoryRootElement,nodeManager);
- nodeManager.setRootNode(rootCategoryNode);
- rootCategoryNode.createChildren();
- }
-
- public final NodeManager getCategoryManager()
- {
- return (NodeManager)categoryManagers_.get(categoryTModelKey_);
- }
-
- public final NodeManager getCategoryManager(CategoryModel categoryModel)
- {
- String tModelKey = categoryModel.getTModelKey();
- NodeManager categoryManager = (NodeManager)categoryManagers_.get(tModelKey);
- if (categoryManager == null)
- {
- categoryManager = new NodeManager(controller_);
- initCategoryBrowser(categoryModel,categoryManager);
- categoryManagers_.put(tModelKey,categoryManager);
- }
- return categoryManager;
- }
-
- public final NodeManager getNavigatorManager()
- {
- return navigatorManager_;
- }
-
- public final NodeManager getNodeManager()
- {
- return getNavigatorManager();
- }
-
- public final void setWSDLType(int wsdlType)
- {
- wsdlType_ = wsdlType;
- }
-
- public final int getWSDLType()
- {
- return wsdlType_;
- }
-
- public final String getPerspectiveContentPage()
- {
- return "uddi/uddi_perspective_content.jsp";
- }
-
- public final int getPerspectiveId()
- {
- return ActionInputs.PERSPECTIVE_UDDI;
- }
-
- public final String getFramesetsFile()
- {
- return "uddi/scripts/uddiframesets.jsp";
- }
-
- public final String getProcessFramesetsForm()
- {
- return "uddi/forms/ProcessUDDIFramesetsForm.jsp";
- }
-
- public final String getPanesFile()
- {
- return "uddi/scripts/uddipanes.jsp";
- }
-
- public final String getTreeContentVar()
- {
- return "navigatorContent";
- }
-
- public final String getTreeContentPage()
- {
- return "uddi/navigator_content.jsp";
- }
-
- public final String getPropertiesContainerVar()
- {
- return "propertiesContainer";
- }
-
- public final String getPropertiesContainerPage()
- {
- return "uddi/properties_container.jsp";
- }
-
- public final String getStatusContentVar()
- {
- return "statusContent";
- }
-
- public final String getStatusContentPage()
- {
- return "uddi/status_content.jsp";
- }
-
- public final String getSavePerspectiveActionLink()
- {
- //return SaveUDDIPerspectiveAction.getActionLink();
- return "";
- }
-
- public final String getPerspectiveContentFramesetCols()
- {
- return perspectiveContentFramesetCols_;
- }
-
- public final void setPerspectiveContentFramesetCols(String cols)
- {
- perspectiveContentFramesetCols_ = cols;
- }
-
- public final void setSavedPerspectiveContentFramesetCols(String cols)
- {
- savedPerspectiveContentFramesetCols_ = cols;
- }
-
- public final String getSavedPerspectiveContentFramesetCols()
- {
- return savedPerspectiveContentFramesetCols_;
- }
-
- public final String getActionsContainerFramesetRows()
- {
- return actionsContainerFramesetRows_;
- }
-
- public final void setActionsContainerFramesetRows(String rows)
- {
- actionsContainerFramesetRows_ = rows;
- }
-
- public final void setSavedActionsContainerFramesetRows(String rows)
- {
- savedActionsContainerFramesetRows_ = rows;
- }
-
- public final String getSavedActionsContainerFramesetRows()
- {
- return savedActionsContainerFramesetRows_;
- }
-
- public final String getSwitchPerspectiveFormActionLink(int targetPerspectiveId,boolean forHistory)
- {
- return SwitchPerspectiveFromUDDIAction.getFormActionLink(targetPerspectiveId,forHistory);
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UnpublishTool.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UnpublishTool.java
deleted file mode 100644
index 8722762df..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/perspective/UnpublishTool.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.ws.internal.explorer.platform.uddi.perspective;
-
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.FormTool;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.ToolManager;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.actions.SelectPropertiesToolAction;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.UDDIActionInputs;
-import org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.RegistryElement;
-
-public class UnpublishTool extends FormTool
-{
- public UnpublishTool(ToolManager toolManager, String enableImage, String highlightImage, String alt)
- {
- super(toolManager, enableImage, highlightImage, alt);
- }
-
- public String getSelectToolActionHref(boolean forHistory)
- {
- Node node = toolManager_.getNode();
- return SelectPropertiesToolAction.getActionLink(node.getNodeId(),toolId_,node.getViewId(),node.getViewToolId(),forHistory);
- }
-
- public void addAuthenticationProperties(RegistryElement regElement)
- {
- String publishURL = regElement.getPublishURL();
- String userId = regElement.getUserId();
- String password = regElement.getCred();
-
- if (publishURL == null)
- publishURL = "";
- if (userId == null)
- userId = "";
- if (password == null)
- password = "";
-
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PUBLISH_URL,publishURL);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_USERID,userId);
- setProperty(UDDIActionInputs.QUERY_INPUT_ADVANCED_PASSWORD,password);
- }
-
- public String getFormLink()
- {
- return "uddi/forms/UnpublishForm.jsp";
- }
-}
diff --git a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/util/Uddi4jHelper.java b/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/util/Uddi4jHelper.java
deleted file mode 100644
index 8a7b2fe7f..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/src/org/eclipse/wst/ws/internal/explorer/platform/uddi/util/Uddi4jHelper.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- * -------- -------- -----------------------------------------------------------
- * 20061004 148052 gilberta@ca.ibm.com - Gilbert Andrews
- *******************************************************************************/
-package org.eclipse.wst.ws.internal.explorer.platform.uddi.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import javax.wsdl.Binding;
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.Message;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.WSDLException;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.http.HTTPAddress;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import org.eclipse.wst.ws.internal.parser.discovery.WebServicesParserExt;
-import org.uddi4j.UDDIException;
-import org.uddi4j.client.UDDIProxy;
-import org.uddi4j.datatype.OverviewDoc;
-import org.uddi4j.datatype.OverviewURL;
-import org.uddi4j.datatype.binding.AccessPoint;
-import org.uddi4j.datatype.binding.BindingTemplate;
-import org.uddi4j.datatype.binding.BindingTemplates;
-import org.uddi4j.datatype.binding.InstanceDetails;
-import org.uddi4j.datatype.binding.TModelInstanceDetails;
-import org.uddi4j.datatype.binding.TModelInstanceInfo;
-import org.uddi4j.datatype.service.BusinessService;
-import org.uddi4j.datatype.tmodel.TModel;
-import org.uddi4j.response.TModelDetail;
-import org.uddi4j.transport.TransportException;
-import org.uddi4j.util.CategoryBag;
-import org.uddi4j.util.KeyedReference;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class Uddi4jHelper
-{
- public final KeyedReference getWSDLKeyedReference()
- {
- KeyedReference keyRef = new KeyedReference("types", "wsdlSpec");
- keyRef.setTModelKey("UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4");
- return keyRef;
- }
-
- public final TModel newTModel(String wsdlUrl) throws WSDLException
- {
- return newTModel(wsdlUrl, getWSDLDefinition(wsdlUrl));
- }
-
- public final TModel newTModel(String wsdlUrl, Definition def) throws WSDLException
- {
- TModel tModel = new TModel();
- tModel.setTModelKey("");
- tModel.setName(def.getTargetNamespace());
- tModel.setDefaultDescriptionString("");
- OverviewDoc overviewDoc = new OverviewDoc();
- overviewDoc.setOverviewURL(wsdlUrl);
- tModel.setOverviewDoc(overviewDoc);
- CategoryBag catBag = new CategoryBag();
- Vector keyRefVector = new Vector();
- keyRefVector.add(getWSDLKeyedReference());
- catBag.setKeyedReferenceVector(keyRefVector);
- tModel.setCategoryBag(catBag);
- return tModel;
- }
-
- public final BusinessService newBusinessService(String wsdlUrl, Hashtable tModelsTable) throws WSDLException
- {
- return newBusinessService(wsdlUrl, getWSDLDefinition(wsdlUrl), tModelsTable);
- }
-
- public final BusinessService newBusinessService(String wsdlUrl, Definition def, Hashtable tModelsTable) throws WSDLException
- {
- BusinessService bs = new BusinessService();
- bs.setServiceKey("");
- BindingTemplates bindingTemplates = new BindingTemplates();
- Vector bindingTemplateVector = new Vector();
- Service[] services = (Service[])def.getServices().values().toArray(new Service[0]);
- if (services.length > 0)
- {
- Port[] ports = (Port[])services[0].getPorts().values().toArray(new Port[0]);
- for (int i = 0; i < ports.length; i++)
- {
- TModelInstanceDetails tModelDetails = new TModelInstanceDetails();
- Vector tModelInfoVector = new Vector();
- TModel tModel = (TModel)tModelsTable.get(ports[i].getBinding().getPortType().getQName().getNamespaceURI());
- tModelInfoVector.add(createTModelInstanceInfo(wsdlUrl, ports[i], tModel.getTModelKey()));
- tModelDetails.setTModelInstanceInfoVector(tModelInfoVector);
- BindingTemplate bindingTemplate = new BindingTemplate();
- bindingTemplate.setDefaultDescriptionString(createDescription(ports[i]));
- bindingTemplate.setAccessPoint(createAccessPoint(ports[i]));
- bindingTemplate.setTModelInstanceDetails(tModelDetails);
- bindingTemplate.setBindingKey("");
- bindingTemplateVector.add(bindingTemplate);
- }
- }
- bindingTemplates.setBindingTemplateVector(bindingTemplateVector);
- bs.setBindingTemplates(bindingTemplates);
- return bs;
- }
-
- public final BusinessService newBusinessService(String wsdlUrl, Definition def, TModel[] tModels) throws WSDLException
- {
- BusinessService bs = new BusinessService();
- bs.setServiceKey("");
- BindingTemplates bindingTemplates = new BindingTemplates();
- Vector bindingTemplateVector = new Vector();
- Service[] services = (Service[])def.getServices().values().toArray(new Service[0]);
- if (services.length > 0)
- {
- Port[] ports = (Port[])services[0].getPorts().values().toArray(new Port[0]);
- for (int i = 0; i < ports.length; i++)
- {
- for (int j = 0; j < tModels.length; j++)
- {
- TModelInstanceDetails tModelDetails = new TModelInstanceDetails();
- Vector tModelInfoVector = new Vector();
- tModelInfoVector.add(createTModelInstanceInfo(wsdlUrl, ports[i], tModels[j].getTModelKey()));
- tModelDetails.setTModelInstanceInfoVector(tModelInfoVector);
- BindingTemplate bindingTemplate = new BindingTemplate();
- bindingTemplate.setDefaultDescriptionString(createDescription(ports[i]));
- bindingTemplate.setAccessPoint(createAccessPoint(ports[i]));
- bindingTemplate.setTModelInstanceDetails(tModelDetails);
- bindingTemplate.setBindingKey("");
- bindingTemplateVector.add(bindingTemplate);
- }
- }
- }
- bindingTemplates.setBindingTemplateVector(bindingTemplateVector);
- bs.setBindingTemplates(bindingTemplates);
- return bs;
- }
-
- public Definition getWSDLDefinition(String wsdlUrl) throws WSDLException
- {
- try
- {
- WebServicesParserExt parser = new WebServicesParserExt();
- String proxySet = System.getProperty("http.proxySet");
- if (proxySet != null && proxySet.equals("true"))
- {
- parser.setHTTPBasicAuthUsername(System.getProperty("http.proxyUserName"));
- parser.setHTTPBasicAuthPassword(System.getProperty("http.proxyPassword"));
- }
- return parser.getWSDLDefinitionVerbose(wsdlUrl);
- }
- catch (Exception e)
- {
- throw new WSDLException(WSDLException.PARSER_ERROR, e.getMessage(), e);
- }
- }
-
- private final String createDescription(Port port)
- {
- String desc = null;
- Element e = port.getDocumentationElement();
- if (e != null)
- {
- Node node = e.getFirstChild();
- StringBuffer sb = new StringBuffer();
- while (node != null)
- {
- switch (node.getNodeType())
- {
- case Node.TEXT_NODE:
- case Node.CDATA_SECTION_NODE:
- sb.append(((CharacterData)node).getData());
- default:
- node = node.getNextSibling();
- break;
- }
- }
- desc = sb.toString();
- }
- return desc;
- }
-
- private final TModelInstanceInfo createTModelInstanceInfo(String wsdlUrl, Port port, String tModelKey)
- {
- InstanceDetails details = new InstanceDetails();
- OverviewDoc overviewDoc = new OverviewDoc();
- TModelInstanceInfo tModelInfo = new TModelInstanceInfo();
- StringBuffer overviewURLString = new StringBuffer(wsdlUrl);
- String portName = port.getName();
- if (portName != null)
- {
- overviewURLString.append("#");
- overviewURLString.append(portName);
- }
- overviewDoc.setOverviewURL(new OverviewURL(overviewURLString.toString()));
- details.setOverviewDoc(overviewDoc);
- tModelInfo.setInstanceDetails(details);
- if (tModelKey != null)
- tModelInfo.setTModelKey(tModelKey);
- return tModelInfo;
- }
-
- private final AccessPoint createAccessPoint(Port port)
- {
- AccessPoint accessPoint = null;
- List list = port.getExtensibilityElements();
- for (int j = 0; j < list.size(); j++)
- {
- ExtensibilityElement extElement = (ExtensibilityElement)list.get(j);
- if (extElement instanceof SOAPAddress)
- {
- String locationURI = ((SOAPAddress)extElement).getLocationURI();
- accessPoint = new AccessPoint(locationURI, getURLType(locationURI));
- break;
- }
- else if (extElement instanceof HTTPAddress)
- {
- String locationURI = ((HTTPAddress)extElement).getLocationURI();
- accessPoint = new AccessPoint(locationURI, getURLType(locationURI));
- break;
- }
- }
- return accessPoint;
- }
-
- private final String URL_TYPE_OTHER = "other";
- private final String URL_TYPES = "http https mail ftp fax phone other";
-
- private final String getURLType(String url)
- {
- int i = url.indexOf(":");
- String type;
- if (i == -1)
- type = URL_TYPE_OTHER;
- else
- {
- type = url.substring(0, i);
- if (type.equals("") || URL_TYPES.indexOf(type) == -1)
- type = URL_TYPE_OTHER;
- }
- return type;
- }
-
- public boolean isMonolithicWSDL(Definition def)
- {
- return hasMessage(def) && hasPortType(def) && hasBinding(def) && hasService(def);
- }
-
- public boolean isServiceImplement(Definition def)
- {
- return hasImport(def) && hasService(def);
- }
-
- public boolean isServiceInterface(Definition def)
- {
- return hasMessage(def) && hasPortType(def) && hasBinding(def);
- }
-
- public boolean isServiceInterfaceWithBindingsOnly(Definition def)
- {
- return !hasService(def) && hasBinding(def);
- }
-
- private boolean hasMessage(Definition def)
- {
- for(Iterator it = def.getMessages().values().iterator(); it.hasNext();)
- if (!((Message)it.next()).isUndefined())
- return true;
- return false;
- }
-
- private boolean hasPortType(Definition def)
- {
- for(Iterator it = def.getPortTypes().values().iterator(); it.hasNext();)
- if (!((PortType)it.next()).isUndefined())
- return true;
- return false;
- }
-
- private boolean hasBinding(Definition def)
- {
- for(Iterator it = def.getBindings().values().iterator(); it.hasNext();)
- if (!((Binding)it.next()).isUndefined())
- return true;
- return false;
- }
-
- private boolean hasService(Definition def)
- {
- return !def.getServices().isEmpty();
- }
-
- private boolean hasImport(Definition def)
- {
- return !def.getImports().isEmpty();
- }
-
- public String[] getImports(Definition def, String wsdlUrl)
- {
-
-
- Map importsMap = def.getImports();
- Collection values = importsMap.values();
- Iterator it = values.iterator();
-
- Vector importsVec = new Vector();
- for(int i =0;it.hasNext();i++){
- ArrayList aList = (ArrayList)it.next();
- Iterator itImports = aList.iterator();
- while(itImports.hasNext()){
- importsVec.add(itImports.next());
- }
- }
- Import imports[] = new Import[importsVec.size()] ;
- Iterator itVec = importsVec.iterator();
- for(int j = 0;itVec.hasNext();j++){
- imports[j] = (Import)itVec.next();
- }
-
-
-
- String[] importStrings = new String[imports.length];
- String s;
- if (wsdlUrl != null && wsdlUrl.indexOf('/') != -1)
- s = wsdlUrl.substring(0, wsdlUrl.lastIndexOf('/')+1);
- else
- s = "";
- for (int i = 0; i < importStrings.length; i++)
- {
- StringBuffer sb = new StringBuffer();
- String locationURI = imports[i].getLocationURI();
- if (locationURI.indexOf(':') != -1)
- sb.append(locationURI);
- else
- sb.append(s).append(locationURI);
- importStrings[i] = sb.toString();
- }
- return importStrings;
- }
-
- public String getWSDL(BusinessService bs, UDDIProxy proxy)
- {
- Vector bindingTemplateVector = bs.getBindingTemplates().getBindingTemplateVector();
- if (bindingTemplateVector.size() > 0)
- {
- BindingTemplate bt = (BindingTemplate)bindingTemplateVector.get(0);
- TModelInstanceDetails tModelDetails = bt.getTModelInstanceDetails();
- if (tModelDetails != null)
- {
- Vector tModelInfoVector = tModelDetails.getTModelInstanceInfoVector();
- if (tModelInfoVector.size() > 0)
- {
- TModelInstanceInfo tModelInfo = (TModelInstanceInfo)tModelInfoVector.get(0);
- InstanceDetails details = tModelInfo.getInstanceDetails();
- if (details != null)
- {
- OverviewDoc overviewDoc = details.getOverviewDoc();
- if (overviewDoc != null)
- return parse(overviewDoc.getOverviewURLString());
- }
- else if (proxy != null)
- {
- String tModelKey = tModelInfo.getTModelKey();
- if (tModelKey != null)
- {
- try
- {
- TModelDetail t = proxy.get_tModelDetail(tModelKey);
- if (t != null)
- {
- Vector tModelVector = t.getTModelVector();
- if (tModelVector != null && tModelVector.size() > 0)
- return getWSDL((TModel)tModelVector.get(0));
- }
- }
- catch (UDDIException uddie)
- {
- }
- catch (TransportException te)
- {
- }
- }
- }
- }
- }
- }
- return null;
- }
-
- public String getWSDL(TModel tModel)
- {
- OverviewDoc overviewDoc = tModel.getOverviewDoc();
- if (overviewDoc != null)
- return parse(overviewDoc.getOverviewURLString());
- else
- return null;
- }
-
- private String parse(String s)
- {
- if (s != null && s.length() > 0)
- {
- int index = s.indexOf('#');
- if (index != -1)
- return s.substring(0, index);
- }
- return s;
- }
-}

Back to the top