[118087] UDDI custom taxonomies cannot be loaded into the WSExplorer
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-properties/favorites.properties b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-properties/favorites.properties index 78de864..20f6b38 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-properties/favorites.properties +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-properties/favorites.properties
@@ -19,11 +19,13 @@ FAVORITES_UDDI_BUSINESSES_FOLDER_NODE=Favorite UDDI Businesses FAVORITES_UDDI_SERVICE_INTERFACES_FOLDER_NODE=Favorite UDDI Service Interfaces FAVORITES_UDDI_REGISTRIES_FOLDER_NODE=Favorite UDDI Registries +FAVORITES_USER_DEF_UDDI_REGISTRIES_FOLDER_NODE=Favorite User Defined UDDI Registries # Form FORM_LABEL_FAVORITE_WSIL=Favorite WSILs FORM_LABEL_FAVORITE_WSDL=Favorite WSDLs FORM_LABEL_FAVORITE_UDDI_REGISTRY=Favorite UDDI Registries +FORM_LABEL_FAVORITE_USER_DEF_UDDI_REGISTRY=Favorite User Defined UDDI Registries FORM_LABEL_FAVORITE_UDDI_SERVICE=Favorite UDDI Services FORM_LABEL_FAVORITE_UDDI_BUSINESS=Favorite UDDI Business Entities FORM_LABEL_FAVORITE_UDDI_SERVICE_INTERFACE=Favorite UDDI Service Interfaces @@ -33,9 +35,17 @@ FORM_LABEL_IMPORT_TO_WSDL_PERSPECTIVE=Add To WSDL Page FORM_LABEL_URL=URL FORM_LABEL_ITEM_NUMBER=Item # +FORM_LABEL_UDDI_VERSION=UDDI Version FORM_LABEL_NAME=Name +FORM_LABEL_DESC=Description +FORM_LABEL_DEFAULT_LOGIN=Default Login +FORM_LABEL_DEFAULT_PASSWORD=Default Password FORM_LABEL_INQUIRY_URL=Inquiry URL FORM_LABEL_PUBLISH_URL=Publish URL +FORM_LABEL_SECURE_INQUIRY_URL=Secure Inquiry URL +FORM_LABEL_SECURE_PUBLISH_URL=Secure Publish URL +FORM_LABEL_TAXONOMY=Taxonomy +FORM_LABEL_LANGUAGE=Language FORM_LABEL_REGISTRY_NAME=Registry Name FORM_LABEL_BUSINESS_NAME=Business Name FORM_LABEL_BUSINESS_KEY=Business Key @@ -67,6 +77,10 @@ ALT_LIST_FAVORITE_UDDI_REGISTRY=List Favorite UDDI Registries FORM_LABEL_LIST_FAVORITE_UDDI_REGISTRY_DESC=Select a set of favorite UDDI registries and press <strong>Add to UDDI Page</strong> to open them in the UDDI navigator. Press <strong>Remove</strong> to remove the selections. +# ListFavoriteUserDefUDDIRegistryAction +ALT_LIST_FAVORITE_USER_DEF_UDDI_REGISTRY=List Favorite User Defined UDDI Registries +FORM_LABEL_LIST_FAVORITE_USER_DEF_UDDI_REGISTRY_DESC=Select a set of favorite UDDI registries and press <strong>Add to UDDI Page</strong> to open them in the UDDI navigator. + # ListFavoriteUDDIServiceInterfaceAction ALT_LIST_FAVORITE_UDDI_SERVICE_INTERFACE=List Favorite UDDI Service Interfaces FORM_LABEL_LIST_FAVORITE_UDDI_SERVICE_INTERFACE_DESC=Select a set of favorite UDDI service interfaces and press <strong>Add to UDDI Page</strong> to open them in the UDDI navigator. Press <strong>Remove</strong> to remove the selections. @@ -80,6 +94,9 @@ # FavoritesUDDIRegistryDetailsAction ALT_FAVORITES_UDDI_REGISTRY_DETAILS=Favorite UDDI Registry Details +# FavoritesUserDefUDDIRegistryDetailsAction +ALT_FAVORITES_USER_DEF_UDDI_REGISTRY_DETAILS=Favorite User Defined UDDI Registry Details + # FavoritesUDDIBusinessDetailsAction ALT_FAVORITES_UDDI_BUSINESS_DETAILS=Favorite UDDI Business Details @@ -131,6 +148,7 @@ # Form titles FORM_TITLE_UDDI_BUSINESS_DETAILS=UDDI Business Details Form FORM_TITLE_UDDI_REGISTRY_DETAILS=UDDI Registry Details Form +FORM_TITLE_USER_DEF_UDDI_REGISTRY_DETAILS=User Defined UDDI Registry Details Form FORM_TITLE_UDDI_SERVICE_DETAILS=UDDI Service Details Form FORM_TITLE_UDDI_SERVICE_INTERFACE_DETAILS=UDDI Service Interface Details Form FORM_TITLE_WSDL_DETAILS=WSDL Details Form @@ -139,6 +157,7 @@ # View titles VIEW_TITLE_UDDI_BUSINESS_LIST=UDDI Businesses List View VIEW_TITLE_UDDI_REGISTRY_LIST=UDDI Registries List View +VIEW_TITLE_USER_DEF_UDDI_REGISTRY_LIST=User Defined UDDI Registries List View VIEW_TITLE_UDDI_SERVICE_INTERFACE_LIST=UDDI Service Interfaces List View VIEW_TITLE_UDDI_SERVICE_LIST=UDDI Services List View VIEW_TITLE_WSDL_SERVICE_LIST=WSDL Services List View
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddToUDDIPerspectiveAction.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddToUDDIPerspectiveAction.java index 2756e69..e8390ba 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddToUDDIPerspectiveAction.java +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddToUDDIPerspectiveAction.java
@@ -14,6 +14,7 @@ import java.io.File; import java.util.Enumeration; import java.util.Hashtable; +import java.util.Iterator; import java.util.Vector; import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs; import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement; @@ -23,6 +24,7 @@ import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIRegistryFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIServiceFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIServiceInterfaceFolderElement; +import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUserDefUDDIRegistryFolderElement; 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; @@ -34,6 +36,8 @@ import org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.UDDIMainNode; 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.model.v10.taxonomy.Taxonomy; +import org.eclipse.wst.ws.internal.model.v10.uddiregistry.Taxonomies; public abstract class AddToUDDIPerspectiveAction extends MultipleLinkAction { public AddToUDDIPerspectiveAction(Controller controller) { @@ -64,8 +68,13 @@ return "favorites/actions/FavoritesAddToUDDIPerspectiveActionJSP.jsp"; } - protected boolean createRegistryInUDDIPerspective(String inquiryAPI, String publishAPI, String registryName, String registrationURL,boolean useExisting) { - Vector registryNodes = getRegistryNodesByInquiryURL(inquiryAPI); + protected boolean createRegistryInUDDIPerspective(String inquiryAPI, String publishAPI, String registryName, String registrationURL, boolean useExisting) + { + return createRegistryInUDDIPerspective(inquiryAPI, publishAPI, registryName, registrationURL, null, null, null, useExisting); + } + + protected boolean createRegistryInUDDIPerspective(String inquiryAPI, String publishAPI, String registryName, String registrationURL, String defaultLogin, String defaultPassword, Taxonomies taxonomies, boolean useExisting) { + Vector registryNodes = getRegistryNodesByInquiryURL(inquiryAPI); if (registryNodes != null) { if (useExisting) @@ -97,6 +106,12 @@ if (Validator.validateURL(registrationURL)) propertyTable.put(UDDIActionInputs.REGISTRATION_URL,registrationURL); + + if (defaultLogin != null) + propertyTable.put(UDDIActionInputs.UDDI_USERNAME, defaultLogin); + + if (defaultPassword != null) + propertyTable.put(UDDIActionInputs.UDDI_PASSWORD, defaultPassword); // If user-defined category metadata exists, search and make the associations. StringBuffer directoryBuffer = new StringBuffer(); @@ -114,6 +129,25 @@ if (!openRegAction.run()) return false; + if (taxonomies != null) + { + Hashtable taxonomyTable = new Hashtable(); + for (Iterator it = taxonomies.getTaxonomy().iterator(); it.hasNext();) + { + Taxonomy taxonomy = (Taxonomy)it.next(); + 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(name, catModel); + } + RegistryElement regElement = (RegistryElement)(controller_.getUDDIPerspective().getNavigatorManager().getSelectedNode().getTreeElement()); + regElement.setUserDefinedCategories(taxonomyTable); + } + if (categoryFiles != null && categoryFiles.length > 0) { RegistryElement regElement = (RegistryElement)(controller_.getUDDIPerspective().getNavigatorManager().getSelectedNode().getTreeElement()); @@ -203,6 +237,8 @@ // favorites folder element being selected. if (favoritesFolderElement instanceof FavoritesUDDIRegistryFolderElement) return new AddRegistryToUDDIPerspectiveAction(controller); + else if (favoritesFolderElement instanceof FavoritesUserDefUDDIRegistryFolderElement) + return new AddUserDefRegistryToUDDIPerspectiveAction(controller); else if (favoritesFolderElement instanceof FavoritesUDDIBusinessFolderElement) return new AddBusinessToUDDIPerspectiveAction(controller); else if (favoritesFolderElement instanceof FavoritesUDDIServiceFolderElement)
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddUserDefRegistryToUDDIPerspectiveAction.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddUserDefRegistryToUDDIPerspectiveAction.java new file mode 100644 index 0000000..d8380e9 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/actions/AddUserDefRegistryToUDDIPerspectiveAction.java
@@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.actions; + +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.datamodel.FavoritesUserDefUDDIRegistryElement; +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.Node; +import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; +import org.eclipse.wst.ws.internal.model.v10.uddiregistry.Taxonomies; + +public class AddUserDefRegistryToUDDIPerspectiveAction extends AddToUDDIPerspectiveAction +{ + public AddUserDefRegistryToUDDIPerspectiveAction(Controller controller) + { + super(controller); + } + + protected boolean executeSingleLinkAction() + { + int nodeID = Integer.parseInt((String)propertyTable_.get(ActionInputs.NODEID)); + FavoritesPerspective favPerspective = controller_.getFavoritesPerspective(); + NodeManager nodeManager = favPerspective.getNodeManager(); + Node selectedNode = nodeManager.getNode(nodeID); + TreeElement selectedElement = selectedNode.getTreeElement(); + FavoritesUserDefUDDIRegistryElement regElement = (FavoritesUserDefUDDIRegistryElement)selectedElement; + String registryName = regElement.getName(); + String inquiryAPI = regElement.getInquiryURL(); + String publishAPI = regElement.getPublishURL(); + String defaultLogin = regElement.getDefaultLogin(); + String defaultPassword = regElement.getDefaultPassword(); + Taxonomies taxonomies = regElement.getTaxonomies(); + if (!createRegistryInUDDIPerspective(inquiryAPI, publishAPI, registryName, null, defaultLogin, defaultPassword, taxonomies, false)) + return false; + favPerspective.getMessageQueue().addMessage(favPerspective.getMessage("MSG_INFO_ADD_TO_UDDI_PERSPECTIVE_SUCCESSFUL", registryName)); + return true; + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/constants/FavoritesModelConstants.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/constants/FavoritesModelConstants.java index 9b935e8..f67252d 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/constants/FavoritesModelConstants.java +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/constants/FavoritesModelConstants.java
@@ -19,12 +19,14 @@ public final static String REL_UDDI_BUSINESS_FOLDER_NODE = "relUDDIBusinessFolderNode"; public final static String REL_UDDI_SERVICE_INTERFACE_FOLDER_NODE = "relUDDIServiceInterfaceFolderNode"; public final static String REL_UDDI_REGISTRY_FOLDER_NODE = "relUDDIRegistryFolerNode"; + public final static String REL_USER_DEF_UDDI_REGISTRY_FOLDER_NODE = "relUserDefUDDIRegistryFolderNode"; public final static String REL_WSIL_NODE = "relWSILNode"; public final static String REL_WSDL_SERVICE_NODE = "relWSDLServiceNode"; public final static String REL_UDDI_SERVICE_NODE = "relUDDIServiceNode"; public final static String REL_UDDI_BUSINESS_NODE = "relUDDIBusinessNode"; public final static String REL_UDDI_SERVICE_INTERFACE_NODE = "relUDDIServiceInterfaceNode"; public final static String REL_UDDI_REGISTRY_NODE = "relUDDIRegistryNode"; + public final static String REL_USER_DEF_UDDI_REGISTRY_NODE = "relUserDefUDDIRegistryNode"; // Properties public final static String PROP_PLUGIN_METADATA_DIRECTORY = "pluginMetadataDirectory";
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryElement.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryElement.java new file mode 100644 index 0000000..794172b --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryElement.java
@@ -0,0 +1,140 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.datamodel; + +import java.util.List; +import org.eclipse.wst.ws.internal.datamodel.Model; +import org.eclipse.wst.ws.internal.model.v10.uddiregistry.Taxonomies; + +public class FavoritesUserDefUDDIRegistryElement extends FavoritesElement +{ + private List names; + private List descs; + private String version; + private String defaultLogin; + private String defaultPassword; + private String inquiryURL; + private String publishURL; + private String secureInquiryURL; + private String securePublishURL; + private Taxonomies taxonomies; + + public String getDefaultLogin() + { + return defaultLogin; + } + + public void setDefaultLogin(String defaultLogin) + { + this.defaultLogin = defaultLogin; + } + + public String getDefaultPassword() + { + return defaultPassword; + } + + public void setDefaultPassword(String defaultPassword) + { + this.defaultPassword = defaultPassword; + } + + public Taxonomies getTaxonomies() + { + return taxonomies; + } + + public void setTaxonomies(Taxonomies taxonomies) + { + this.taxonomies = taxonomies; + } + + public FavoritesUserDefUDDIRegistryElement(String name, Model model) + { + super(name, model); + } + + public List getDescs() + { + return descs; + } + + public void setDescs(List descs) + { + this.descs = descs; + } + + public String getInquiryURL() + { + return inquiryURL; + } + + public void setInquiryURL(String inquiryURL) + { + this.inquiryURL = inquiryURL; + } + + public List getNames() + { + return names; + } + + public void setNames(List names) + { + this.names = names; + } + + public String getPublishURL() + { + return publishURL; + } + + public void setPublishURL(String publishURL) + { + this.publishURL = publishURL; + } + + public String getSecureInquiryURL() + { + return secureInquiryURL; + } + + public void setSecureInquiryURL(String secureInquiryURL) + { + this.secureInquiryURL = secureInquiryURL; + } + + public String getSecurePublishURL() + { + return securePublishURL; + } + + public void setSecurePublishURL(String securePublishURL) + { + this.securePublishURL = securePublishURL; + } + + public String getVersion() + { + return version; + } + + public void setVersion(String version) + { + this.version = version; + } + + public String toString() + { + return getName(); + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryFolderElement.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryFolderElement.java new file mode 100644 index 0000000..0931bf4 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/datamodel/FavoritesUserDefUDDIRegistryFolderElement.java
@@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.datamodel; + +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import org.eclipse.core.runtime.CoreException; +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.favorites.constants.FavoritesModelConstants; +import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; +import org.eclipse.wst.ws.internal.model.v10.registry.Name; +import org.eclipse.wst.ws.internal.model.v10.registry.Registry; +import org.eclipse.wst.ws.internal.model.v10.uddiregistry.UDDIRegistry; +import org.eclipse.wst.ws.internal.registry.IRegistryManager; +import org.eclipse.wst.ws.internal.registry.RegistryService; + +/** + * The data model element that represents a WSIL document + */ +public class FavoritesUserDefUDDIRegistryFolderElement extends FavoritesFolderElement +{ + public FavoritesUserDefUDDIRegistryFolderElement(String name, Model model, NodeManager nodeManager) + { + super(name, model, nodeManager); + } + + public void init(FavoritesMainElement favMainElement) + { + RegistryService regService = RegistryService.instance(); + IRegistryManager regManager = regService.getDefaultRegistryManager(); + try + { + 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; + List names = uddiReg.getName(); + String displayName = names != null && !names.isEmpty() ? ((Name)names.get(0)).getValue() : ""; + FavoritesUserDefUDDIRegistryElement favUserDefUDDIRegElement = new FavoritesUserDefUDDIRegistryElement(displayName, getModel()); + favUserDefUDDIRegElement.setNames(names); + favUserDefUDDIRegElement.setDescs(uddiReg.getDescription()); + favUserDefUDDIRegElement.setVersion(uddiReg.getVersion()); + favUserDefUDDIRegElement.setDefaultLogin(uddiReg.getDefaultLogin()); + favUserDefUDDIRegElement.setDefaultPassword(uddiReg.getDefaultPassword()); + favUserDefUDDIRegElement.setInquiryURL(uddiReg.getDiscoveryURL()); + favUserDefUDDIRegElement.setPublishURL(uddiReg.getPublicationURL()); + favUserDefUDDIRegElement.setSecureInquiryURL(uddiReg.getSecuredDiscoveryURL()); + favUserDefUDDIRegElement.setSecurePublishURL(uddiReg.getSecuredPublicationURL()); + favUserDefUDDIRegElement.setTaxonomies(uddiReg.getTaxonomies()); + connect(favUserDefUDDIRegElement, FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_NODE, ModelConstants.REL_OWNER); + } + } + } + catch (CoreException ce) + { + // TODO: Better error reporting + ce.printStackTrace(); + } + } + + public boolean addFavorite(Hashtable table) + { + // do nothing + return true; + } + + public boolean favoriteExists(Hashtable table) + { + // do nothing + return true; + } + + public boolean removeFavoriteByNodeID(int nodeID, String pluginMetadataDirectory) + { + // do nothing + return true; + } + + public boolean removeAllFavorites(String pluginMetadataDirectory) + { + // do nothing + return true; + } + + public Enumeration getAllFavorites() + { + return getElements(FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_NODE); + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesMainNode.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesMainNode.java index 924d978..b2bafd9 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesMainNode.java +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesMainNode.java
@@ -19,6 +19,7 @@ import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIRegistryFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIServiceFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUDDIServiceInterfaceFolderElement; +import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesUserDefUDDIRegistryFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesWSDLServiceFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.FavoritesWSILFolderElement; import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller; @@ -36,6 +37,14 @@ favUDDIRegistryFolderNode.setVisibilityOfChildren(false); favUDDIRegistryFolderElement.init((FavoritesMainElement)treeElement); + // Create User defined UDDI Registry Folder Node + FavoritesUserDefUDDIRegistryFolderElement favUserDefUDDIFolderElement = new FavoritesUserDefUDDIRegistryFolderElement(getMessage("FAVORITES_USER_DEF_UDDI_REGISTRIES_FOLDER_NODE"), treeElement.getModel(), nodeManager); + treeElement.connect(favUserDefUDDIFolderElement, FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_FOLDER_NODE, ModelConstants.REL_OWNER); + FavoritesUserDefUDDIRegistryFolderNode favUserDefUDDIFolderNode = new FavoritesUserDefUDDIRegistryFolderNode(favUserDefUDDIFolderElement, nodeManager, nodeDepth_ + 1); + addChild(favUserDefUDDIFolderNode); + favUserDefUDDIFolderNode.setVisibilityOfChildren(false); + favUserDefUDDIFolderElement.init((FavoritesMainElement)treeElement); + // Create UDDI Business Folder Node FavoritesUDDIBusinessFolderElement favUDDIBusinessFolderElement = new FavoritesUDDIBusinessFolderElement(getMessage("FAVORITES_UDDI_BUSINESSES_FOLDER_NODE"), treeElement.getModel(), nodeManager); treeElement.connect(favUDDIBusinessFolderElement, FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE, ModelConstants.REL_OWNER);
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryDetailsTool.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryDetailsTool.java new file mode 100644 index 0000000..d495724 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryDetailsTool.java
@@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.perspective; + +import org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.SelectFavoritesToolAction; +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; + +public class FavoritesUserDefUDDIRegistryDetailsTool extends FormTool +{ + public FavoritesUserDefUDDIRegistryDetailsTool(ToolManager toolManager, String alt) + { + super(toolManager, "images/details_enabled.gif", "images/details_highlighted.gif", alt); + } + + public String getSelectToolActionHref(boolean forHistory) + { + Node selectedNode = toolManager_.getNode(); + return SelectFavoritesToolAction.getActionLink(selectedNode.getNodeId(), toolId_, selectedNode.getViewId(), selectedNode.getViewToolId(), forHistory); + } + + public final String getFormLink() + { + return "favorites/forms/FavoritesUserDefUDDIRegistryDetailsPage.jsp"; + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryFolderNode.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryFolderNode.java new file mode 100644 index 0000000..e352792 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryFolderNode.java
@@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.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.favorites.constants.FavoritesModelConstants; +import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; + +public class FavoritesUserDefUDDIRegistryFolderNode extends FavoritesNavigatorFolderNode +{ + public FavoritesUserDefUDDIRegistryFolderNode(TreeElement treeElement, NodeManager nodeManager, int nodeDepth) + { + super(treeElement, nodeManager, nodeDepth); + treeElement.addListener(new ElementAdapter() + { + public void relAdded(RelAddEvent event) + { + String rel = event.getOutBoundRelName(); + if (rel.equals(FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_NODE)) + { + TreeElement regElement = (TreeElement)event.getParentElement(); + String imagePath = "favorites/images/uddi_registry_node.gif"; + FavoritesUserDefUDDIRegistryNode favUserDefUDDIRegistryNode = new FavoritesUserDefUDDIRegistryNode(regElement, nodeManager_, nodeDepth_ + 1, imagePath); + addChild(favUserDefUDDIRegistryNode); + } + } + + public void relRemoved(RelRemoveEvent event) + { + TreeElement childElement = null; + if (event.getInBoundRelName().equals(FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_NODE)) + { + childElement = (TreeElement)event.getInboundElement(); + } + if (event.getOutBoundRelName().equals(FavoritesModelConstants.REL_USER_DEF_UDDI_REGISTRY_NODE)) + { + childElement = (TreeElement)event.getOutBoundElement(); + } + removeChildNode(childElement); + } + }); + } + + protected void initTools() + { + FavoritesPerspective favPerspective = nodeManager_.getController().getFavoritesPerspective(); + new ListFavoriteUserDefUDDIRegistryTool(toolManager_, favPerspective.getMessage("ALT_LIST_FAVORITE_USER_DEF_UDDI_REGISTRY")); + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryNode.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryNode.java new file mode 100644 index 0000000..1261756 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/FavoritesUserDefUDDIRegistryNode.java
@@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.perspective; + +import org.eclipse.wst.ws.internal.explorer.platform.datamodel.TreeElement; +import org.eclipse.wst.ws.internal.explorer.platform.perspective.NodeManager; + +public class FavoritesUserDefUDDIRegistryNode extends FavoritesNavigatorNode +{ + public FavoritesUserDefUDDIRegistryNode(TreeElement treeElement, NodeManager nodeManager, int nodeDepth, String imagePath) + { + super(treeElement, nodeManager, nodeDepth, imagePath); + } + + protected void initTools() + { + FavoritesPerspective favPerspective = nodeManager_.getController().getFavoritesPerspective(); + new FavoritesUserDefUDDIRegistryDetailsTool(toolManager_, favPerspective.getMessage("ALT_FAVORITES_USER_DEF_UDDI_REGISTRY_DETAILS")); + new AddToUDDIPerspectiveTool(toolManager_, favPerspective.getMessage("ALT_ADD_TO_UDDI_PERSPECTIVE")); + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/ListFavoriteUserDefUDDIRegistryTool.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/ListFavoriteUserDefUDDIRegistryTool.java new file mode 100644 index 0000000..dab8c95 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/favorites/perspective/ListFavoriteUserDefUDDIRegistryTool.java
@@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 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.favorites.perspective; + +import org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.SelectFavoritesToolAction; +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; + +public class ListFavoriteUserDefUDDIRegistryTool extends FormTool +{ + public ListFavoriteUserDefUDDIRegistryTool(ToolManager toolManager, String alt) + { + super(toolManager, "favorites/images/list_registry_enabled.gif", "favorites/images/list_registry_highlighted.gif", alt); + } + + public String getSelectToolActionHref(boolean forHistory) + { + Node selectedNode = toolManager_.getNode(); + return SelectFavoritesToolAction.getActionLink(selectedNode.getNodeId(), toolId_, selectedNode.getViewId(), selectedNode.getViewToolId(), forHistory); + } + + public String getFormLink() + { + return "favorites/views/ListFavoriteUserDefUDDIRegistryView.jsp"; + } +}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java index b943512..aa4d07c 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/uddi/datamodel/CategoryModel.java
@@ -23,6 +23,7 @@ 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; @@ -31,6 +32,8 @@ 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 @@ -166,6 +169,31 @@ 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
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/forms/FavoritesUserDefUDDIRegistryDetailsPage.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/forms/FavoritesUserDefUDDIRegistryDetailsPage.jsp new file mode 100644 index 0000000..1b88ee7 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/forms/FavoritesUserDefUDDIRegistryDetailsPage.jsp
@@ -0,0 +1,313 @@ +<% +/******************************************************************************* + * Copyright (c) 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 + *******************************************************************************/ +%> +<%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.perspective.*, + org.eclipse.wst.ws.internal.explorer.platform.constants.*, + org.eclipse.wst.ws.internal.explorer.platform.datamodel.*, + org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.*, + org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective, + org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.*, + org.eclipse.wst.ws.internal.explorer.platform.util.*, + org.apache.wsil.extension.uddi.*, + java.io.*, + java.util.*, + org.eclipse.wst.ws.internal.model.v10.registry.Name, + org.eclipse.wst.ws.internal.model.v10.registry.Description, + org.eclipse.wst.ws.internal.model.v10.uddiregistry.Taxonomies, + org.eclipse.wst.ws.internal.model.v10.taxonomy.Taxonomy" %> + +<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/> +<% + FavoritesPerspective favPerspective = controller.getFavoritesPerspective(); + NodeManager nodeManager = favPerspective.getNodeManager(); + Node selectedNode = nodeManager.getSelectedNode(); + ToolManager currentToolManager = selectedNode.getCurrentToolManager(); + TreeElement selectedElement = selectedNode.getTreeElement(); +%> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title><%=favPerspective.getMessage("FORM_TITLE_USER_DEF_UDDI_REGISTRY_DETAILS")%></title> + <link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>"> +</head> +<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin"> +<div id="contentborder"> + + <% + String titleImagePath = "images/details_highlighted.gif"; + String title = favPerspective.getMessage("ALT_FAVORITES_USER_DEF_UDDI_REGISTRY_DETAILS"); + %> + <%@ include file = "/forms/formheader.inc" %> + <% + if (selectedElement instanceof FavoritesUserDefUDDIRegistryElement) { + FavoritesUserDefUDDIRegistryElement regElement = (FavoritesUserDefUDDIRegistryElement)selectedElement; + %> + + <% + String version = regElement.getVersion(); + if (version != null) + { + %> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_UDDI_VERSION")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=version%> + </td> + </tr> + </table> + <% + } + %> + + <% + List names = regElement.getNames(); + if (names != null && !names.isEmpty()) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left" width="1" nowrap> + <%=favPerspective.getMessage("FORM_LABEL_LANGUAGE")%> + </th> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_REGISTRY_NAME")%> + </th> + </tr> + <% + for (Iterator it = names.iterator(); it.hasNext();) + { + Name name = (Name)it.next(); + String lang = name.getLang(); + %> + <tr> + <td class="tablecells"><%=lang != null ? lang : "--"%></td> + <td class="tablecells"><%=name.getValue()%></td> + </tr> + <% + } + %> + </table> + <% + } + %> + + <% + List descs = regElement.getDescs(); + if (descs != null && !descs.isEmpty()) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left" width="1" nowrap> + <%=favPerspective.getMessage("FORM_LABEL_LANGUAGE")%> + </th> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_DESC")%> + </th> + </tr> + <% + for (Iterator it = descs.iterator(); it.hasNext();) + { + Description desc = (Description)it.next(); + String lang = desc.getLang(); + %> + <tr> + <td class="tablecells"><%=lang != null ? lang : "--"%></td> + <td class="tablecells"><%=desc.getValue()%></td> + </tr> + <% + } + %> + </table> + <% + } + %> + + <% + String defaultLogin = regElement.getDefaultLogin(); + if (defaultLogin != null) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_DEFAULT_LOGIN")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=defaultLogin%> + </td> + </tr> + </table> + <% + } + %> + + <% + String defaultPassword = regElement.getDefaultPassword(); + if (defaultPassword != null) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_DEFAULT_PASSWORD")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=defaultPassword%> + </td> + </tr> + </table> + <% + } + %> + + <% + String inquiryURL = regElement.getInquiryURL(); + if (inquiryURL != null) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_INQUIRY_URL")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=inquiryURL%> + </td> + </tr> + </table> + <% + } + %> + + <% + String publishURL = regElement.getPublishURL(); + if (Validator.validateURL(publishURL)) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_PUBLISH_URL")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=publishURL%> + </td> + </tr> + </table> + <% + } + + String secureInquiryURL = regElement.getSecureInquiryURL(); + if (Validator.validateURL(secureInquiryURL)) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_SECURE_INQUIRY_URL")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=secureInquiryURL%> + </td> + </tr> + </table> + <% + } + + String securePublishURL = regElement.getSecurePublishURL(); + if (Validator.validateURL(securePublishURL)) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_SECURE_PUBLISH_URL")%> + </th> + </tr> + <tr> + <td class="tablecells"> + <%=securePublishURL%> + </td> + </tr> + </table> + <% + } + %> + + <% + Taxonomies taxonomies = regElement.getTaxonomies(); + if (taxonomies != null) + { + List t = taxonomies.getTaxonomy(); + if (t != null && !t.isEmpty()) + { + %> + <br> + <table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="singleheadercolor" height=20 valign="bottom" align="left"> + <%=favPerspective.getMessage("FORM_LABEL_TAXONOMY")%> + </th> + </tr> + <% + for (Iterator it = t.iterator(); it.hasNext();) + { + Taxonomy taxonomy = (Taxonomy)it.next(); + %> + <tr> + <td class="tablecells"><%=taxonomy.getName()%></td> + </tr> + <% + } + %> + </table> + <% + } + } + %> + +<jsp:useBean id="currentToolManagerHash" class="java.util.Hashtable" scope="request"> +<% + currentToolManagerHash.put(ActionInputs.CURRENT_TOOL_MANAGER,currentToolManager); +%> +</jsp:useBean> +<jsp:include page="/forms/otherActions.jsp" flush="true"/> +<% + } +%> +</div> +</body> +</html>
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/views/ListFavoriteUserDefUDDIRegistryView.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/views/ListFavoriteUserDefUDDIRegistryView.jsp new file mode 100644 index 0000000..8da77a9 --- /dev/null +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/favorites/views/ListFavoriteUserDefUDDIRegistryView.jsp
@@ -0,0 +1,123 @@ +<% +/******************************************************************************* + * Copyright (c) 2001, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +%> +<%@ page contentType="text/html; charset=UTF-8" import="java.util.Enumeration, + java.util.Vector, + org.eclipse.wst.ws.internal.explorer.platform.util.QuickSort, + org.eclipse.wst.ws.internal.explorer.platform.perspective.*, + org.eclipse.wst.ws.internal.explorer.platform.constants.*, + org.eclipse.wst.ws.internal.explorer.platform.datamodel.*, + org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.*, + org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective, + org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.*, + org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.*" %> + +<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/> +<% + String divFavoriteUDDIRegistryTable = "divFavoriteUDDIRegistryTable"; + String xdivFavoriteUDDIRegistryTable = "xdivFavoriteUDDIRegistryTable"; + + FavoritesPerspective favoritesPerspective = controller.getFavoritesPerspective(); + NodeManager nodeManager = favoritesPerspective.getNodeManager(); + Node selectedNode = nodeManager.getSelectedNode(); + TreeElement selectedElement = selectedNode.getTreeElement(); +%> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title><%=favoritesPerspective.getMessage("VIEW_TITLE_USER_DEF_UDDI_REGISTRY_LIST")%></title> + <link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>"> + <jsp:include page="/favorites/scripts/favoritesFormSubmit.jsp" flush="true"/> + <jsp:include page="/favorites/scripts/favoritesTable.jsp" flush="true"/> +</head> +<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin"> +<div id="contentborder"> + <% + String titleImagePath = "favorites/images/list_registry_highlighted.gif"; + String title = favoritesPerspective.getMessage("ALT_LIST_FAVORITE_USER_DEF_UDDI_REGISTRY"); + %> + <%@ include file = "/forms/formheader.inc" %> + <table> + <tr> + <td class="labels"> + <%=favoritesPerspective.getMessage("FORM_LABEL_LIST_FAVORITE_USER_DEF_UDDI_REGISTRY_DESC")%> + </td> + </tr> + </table> + <form action="<%=response.encodeURL(controller.getPathWithContext(RemoveFavoritesAction.getBaseActionLink()))%>" method="post" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>" style="margin-top:10px;"> + <% + if (selectedElement instanceof FavoritesUserDefUDDIRegistryFolderElement) { + %> + <input type="hidden" name="<%=FavoritesActionInputs.MULTIPLE_LINK_ACTION%>" value="1"> + <table width="95%" border=0 cellpadding=6 cellspacing=0> + <tr> + <td height=20 valign="bottom" align="left" nowrap width=11> + <a href="javascript:twist('<%=divFavoriteUDDIRegistryTable%>','<%=xdivFavoriteUDDIRegistryTable%>')"><img name="<%=xdivFavoriteUDDIRegistryTable%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistclosed.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_CLOSED")%>" class="twist"></a> + </td> + <td height=20 valign="bottom" align="left" nowrap class="labels"> + <strong><%=favoritesPerspective.getMessage("FORM_LABEL_FAVORITE_USER_DEF_UDDI_REGISTRY")%></strong> + </td> + </tr> + </table> + + <table width="95%" border=0 cellpadding=0 cellspacing=0> + <tr> + <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" height=2 width="100%"></td> + </tr> + </table> + + <div id="<%=divFavoriteUDDIRegistryTable%>"> + <table width="95%" cellpadding=3 cellspacing=0 class="tableborder"> + <tr> + <th class="checkboxcells" width=10><input type="checkbox" onClick="favHandleCheckAllClick('<%=divFavoriteUDDIRegistryTable%>',this)" title="<%=controller.getMessage("FORM_CONTROL_TITLE_SELECT_ALL_CHECK_BOX")%>"></th> + <th class="headercolor"><%=favoritesPerspective.getMessage("FORM_LABEL_NAME")%></th> + </tr> + <% + Enumeration e = ((FavoritesUserDefUDDIRegistryFolderElement)selectedElement).getAllFavorites(); + Vector sortedVector = new Vector(); + while (e.hasMoreElements()) { + sortedVector.add(e.nextElement()); + } + QuickSort.sort(sortedVector); + e = sortedVector.elements(); + while (e.hasMoreElements()) { + FavoritesUserDefUDDIRegistryElement favUDDIRegistryElement = (FavoritesUserDefUDDIRegistryElement)e.nextElement(); + %> + <tr> + <td class="checkboxcells" width=10><input type="checkbox" name="<%=FavoritesActionInputs.MASS_ACTION_NODE_ID%>" value="<%=selectedNode.getChildNode(favUDDIRegistryElement).getNodeId()%>" onClick="validateCheckBoxInput(this, this.checked)" title="<%=controller.getMessage("FORM_CONTROL_TITLE_SELECT_ROW_CHECK_BOX")%>"></td> + <td class="tablecells" nowrap><a href="<%=response.encodeURL(controller.getPathWithContext(SelectFavoritesNodeAction.getActionLink(selectedNode.getChildNode(favUDDIRegistryElement).getNodeId(), false)))%>" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>"><%=favUDDIRegistryElement.getName()%></a></td> + </tr> + <% + } + %> + </table> + </div> + <script language="javascript"> + twistInit('<%=divFavoriteUDDIRegistryTable%>','<%=xdivFavoriteUDDIRegistryTable%>'); + </script> + + <table border=0 cellpadding=2 cellspacing=0> + <tr> + <td height=40 valign="bottom" nowrap> + <input type="button" value="<%=favoritesPerspective.getMessage("FORM_LABEL_IMPORT_TO_UDDI_PERSPECTIVE")%>" onClick="setFormLocationAndSubmit('<%=divFavoriteUDDIRegistryTable%>', this.form, '<%=response.encodeURL(controller.getPathWithContext(AddToUDDIPerspectiveAction.getBaseActionLink()))%>')" class="button"> + </td> + <td nowrap width="90%"> </td> + </tr> + </table> + + <% + } +%> + </form> +</div> +</body> +</html>
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/forms/ud_categories_table.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/forms/ud_categories_table.jsp index d4fc18e..0c31a7b 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/forms/ud_categories_table.jsp +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/forms/ud_categories_table.jsp
@@ -27,12 +27,14 @@ <td height=40 valign="bottom" align="left" nowrap class="labels"> <strong><%=uddiPerspective.getMessage("FORM_LABEL_USER_DEFINED_CATEGORIES")%></strong> </td> + <!-- <td height=40 valign="bottom" align="left" nowrap class="labels"> <a href="javascript:editSelectedDetailsUserDefinedCategoryRows('<%=tableContainerId%>')"><%=uddiPerspective.getMessage("FORM_LINK_EDIT")%></a> </td> <td height=40 valign="bottom" align="left" nowrap class="labels"> <a href="javascript:cancelSelectedDetailsUserDefinedCategoryRows('<%=tableContainerId%>')"><%=uddiPerspective.getMessage("FORM_LINK_CANCEL")%></a> </td> + --> <td nowrap width="90%"> </td> </tr> </table> @@ -46,11 +48,15 @@ <div id="<%=tableContainerId%>" style="display:'';"> <table width="95%" cellpadding=3 cellspacing=0 class="tableborder"> <tr> + <!-- <th class="checkboxcells" width=10><input type="checkbox" onClick="handleCheckAllClick('<%=tableContainerId%>',this)" title="<%=controller.getMessage("FORM_CONTROL_TITLE_SELECT_ALL_CHECK_BOX")%>"></th> + --> <th class="headercolor" width="15%"><%=uddiPerspective.getMessage("FORM_LABEL_NAME")%></th> + <!-- <th class="headercolor" width="10%"><%=uddiPerspective.getMessage("FORM_LABEL_CHECKED")%></th> <th class="headercolor" width="70%"><%=uddiPerspective.getMessage("FORM_LABEL_FILE")%></th> <th class="headercolor" width="*"><%=controller.getMessage("FORM_LABEL_ACTIONS")%></th> + --> </tr> </table> </div>
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/scripts/detailstables.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/scripts/detailstables.jsp index b0c3ad6..1fde370 100644 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/scripts/detailstables.jsp +++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/uddi/scripts/detailstables.jsp
@@ -859,53 +859,53 @@ var table = getTable(tableContainerId); var tableBody = table.getElementsByTagName("TBODY").item(0); var newRow = document.createElement("tr"); - var column0 = document.createElement("td"); + //var column0 = document.createElement("td"); var column1 = document.createElement("td"); - var column2 = document.createElement("td"); - var column3 = document.createElement("td"); - var column4 = document.createElement("td"); + //var column2 = document.createElement("td"); + //var column3 = document.createElement("td"); + //var column4 = document.createElement("td"); - column0.className = "checkboxcells"; + //column0.className = "checkboxcells"; column1.className = "tablecells"; column1.width = "15%"; - column2.className = "tablecells"; - column2.width = "10%"; - column3.className = "tablecells"; - column3.width = "70%"; - column4.className = "tablecells"; + //column2.className = "tablecells"; + //column2.width = "10%"; + //column3.className = "tablecells"; + //column3.width = "70%"; + //column4.className = "tablecells"; - var rowCheckbox = createRowCheckbox(); - column0.appendChild(rowCheckbox); + //var rowCheckbox = createRowCheckbox(); + //column0.appendChild(rowCheckbox); - column1.appendChild(createHiddenElement("",fileName)); <%// original file name%> - column1.appendChild(createHiddenElement("",hasError)); <%// mode%> - column1.appendChild(createHiddenElement("",tModelKey)); <%// tModelKey%> + //column1.appendChild(createHiddenElement("",fileName)); <%// original file name%> + //column1.appendChild(createHiddenElement("",hasError)); <%// mode%> + //column1.appendChild(createHiddenElement("",tModelKey)); <%// tModelKey%> column1.appendChild(document.createTextNode(categoryName)); - column2.appendChild(document.createTextNode(isChecked)); + //column2.appendChild(document.createTextNode(isChecked)); - if (hasError) - { - column3.appendChild(createHiddenElement("<%=UDDIActionInputs.CATEGORY_TMODEL_KEY%>",tModelKey)); - var fileInput = document.createElement("input"); - fileInput.setAttribute("name","<%=UDDIActionInputs.CATEGORY_FILENAME%>"); - fileInput.setAttribute("type","file"); - fileInput.title = "<%=HTMLUtils.JSMangle(uddiPerspective.getMessage("FORM_CONTROL_TITLE_CATEGORY_FILE"))%>"; - fileInput.className = "tablefilebrowse"; - column3.appendChild(fileInput); - addDetailsUserDefinedCategoryRowCancelLink(tableContainerId,column4,table.rows.length); - } - else - { - column3.appendChild(document.createTextNode(fileName)); - addDetailsUserDefinedCategoryRowEditLink(tableContainerId,column4,table.rows.length); - } + //if (hasError) + //{ + // column3.appendChild(createHiddenElement("<%=UDDIActionInputs.CATEGORY_TMODEL_KEY%>",tModelKey)); + // var fileInput = document.createElement("input"); + // fileInput.setAttribute("name","<%=UDDIActionInputs.CATEGORY_FILENAME%>"); + // fileInput.setAttribute("type","file"); + // fileInput.title = "<%=HTMLUtils.JSMangle(uddiPerspective.getMessage("FORM_CONTROL_TITLE_CATEGORY_FILE"))%>"; + // fileInput.className = "tablefilebrowse"; + // column3.appendChild(fileInput); + // addDetailsUserDefinedCategoryRowCancelLink(tableContainerId,column4,table.rows.length); + //} + //else + //{ + // column3.appendChild(document.createTextNode(fileName)); + // addDetailsUserDefinedCategoryRowEditLink(tableContainerId,column4,table.rows.length); + //} - newRow.appendChild(column0); + //newRow.appendChild(column0); newRow.appendChild(column1); - newRow.appendChild(column2); - newRow.appendChild(column3); - newRow.appendChild(column4); + //newRow.appendChild(column2); + //newRow.appendChild(column3); + //newRow.appendChild(column4); tableBody.appendChild(newRow); }