[teiid-commits] teiid SVN: r844 - in trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy: model and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Sun Apr 26 22:01:24 EDT 2009


Author: vhalbert at redhat.com
Date: 2009-04-26 22:01:23 -0400 (Sun, 26 Apr 2009)
New Revision: 844

Modified:
   trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
   trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
Log:
TEIID 323 - on the deployment panel don't show the services/connectors in the tree node below the process.

Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java	2009-04-24 20:16:30 UTC (rev 843)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java	2009-04-27 02:01:23 UTC (rev 844)
@@ -108,24 +108,10 @@
     // CONSTANTS
     ///////////////////////////////////////////////////////////////////////////
 
-    private static final String NO_PSC =
-        DeployPkgUtils.getString("drp.nodeployedpsc"); //$NON-NLS-1$
+//    private static final String NO_PSC =
+//        DeployPkgUtils.getString("drp.nodeployedpsc"); //$NON-NLS-1$
 
-//    private static /*final*/ String[] SVC_HDRS;
-//    private static final int SVC_COL = 0;
-//    private static final int ENABLED_COL = 1;
-
     ///////////////////////////////////////////////////////////////////////////
-    // INITIALIZER
-    ///////////////////////////////////////////////////////////////////////////
-
-//    static {
-//        SVC_HDRS = new String[2];
-//        SVC_HDRS[SVC_COL] = DeployPkgUtils.getString("drp.service.hdr"); //$NON-NLS-1$
-//        SVC_HDRS[ENABLED_COL] = DeployPkgUtils.getString("drp.enabled.hdr"); //$NON-NLS-1$
-//    }
-
-    ///////////////////////////////////////////////////////////////////////////
     // CONTROLS
     ///////////////////////////////////////////////////////////////////////////
 
@@ -602,18 +588,6 @@
             initTable();
             // populate PSC column
             prodRowMap.clear();
-//            Collection pscs = getConfigurationManager().getDeployedPscs(process);
-//            if (pscs != null) {
-//                Iterator pscItr = pscs.iterator();
-//                while (pscItr.hasNext()) {
-//                    ProductServiceConfig psc = (ProductServiceConfig)pscItr.next();
-//                    
-//                     ProductType product = BasicProductType.PRODUCT_TYPE;
-//                //    	 getConfigurationManager().getProduct(psc);
-//                    //tblModel.setValueAt(psc, findProductRow(product), PSC_COL);
-//                    prodRowMap.put(product, psc);
-//                }
-//            }
             tblSvcs.sizeColumnsToFitData();
         }
         catch (Exception theException) {
@@ -654,14 +628,6 @@
         }
     }
 
-//    public void setMMLEnabled(boolean theEnableFlag) {
-//            pnlProps.setReadOnlyForced(!theEnableFlag);
-//            pnlProps.refreshDisplay();
-//        
-//            if (!theEnableFlag) {
-//                tblPscs.editingStopped(new ChangeEvent(this));
-//            }
-//    }
 
     ///////////////////////////////////////////////////////////////////////////
     // INNER CLASSES

Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java	2009-04-24 20:16:30 UTC (rev 843)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java	2009-04-27 02:01:23 UTC (rev 844)
@@ -71,9 +71,6 @@
     public static final String DEPLOYMENTS_HDR =
         DeployPkgUtils.getString("dtm.deploymentshdrnode"); //$NON-NLS-1$
 
-    /** The text of all the PSC definitions header nodes. */
-//    public static final String PSC_DEFS_HDR =
-//        DeployPkgUtils.getString("dtm.pscdefshdrnode"); //$NON-NLS-1$
 
     ///////////////////////////////////////////////////////////////////////////
     // FIELDS
@@ -82,26 +79,9 @@
     //key=object, value=DefaultTreeNode
     private HashMap objNodeMap = new HashMap();
 
-    //key=ConfigurationID, value=DefaultTreeNode for Deployments Header
-//    private HashMap configDeployHdrMap = new HashMap();
-
-    //key=ConfigurationID, value=DefaultTreeNode for PSC Definitions Header
- //   private HashMap configPscDefHdrMap = new HashMap();
-
     //key=hostID, value=HashMap (key=ConfigurationID, value=node-HostWrapper as content)
     private HashMap hostConfigMap = new HashMap();
 
-    //key=ComponentTypeID of product, value=HashMap (key=ConfigurationID, value=DefaultTreeNode)
-//    private HashMap prodConfigMap = new HashMap();
-
-    // deployed pscs
-    //key=VMComponentDefnID, value=(key=ProductServiceConfig ID,value=node-PscWrapper)
- //   private HashMap procPscMap = new HashMap();
-
-    // psc defns
-    //key=ProductServiceConfigID, value=(key=ConfigurationID, value=node-PscWrapper)
-    private HashMap pscConfigMap = new HashMap();
-
     /** The root node. This node will not be shown. */
     private DefaultTreeNode root;
 
@@ -135,12 +115,12 @@
         		VMComponentDefn vm = vmit.next();
         		this.addDeployedProcess(vm, h, theConfig, false);
         		
-            	Collection svcs = theConfig.getDeployedServicesForVM(vm);
-            	for (Iterator<DeployedComponent> svcit=svcs.iterator(); svcit.hasNext();) {
-            		DeployedComponent dep = svcit.next();
-            		this.addDeployedService(dep, vm, h, theConfig, false);
-             		
-            	}
+//            	Collection svcs = theConfig.getDeployedServicesForVM(vm);
+//            	for (Iterator<DeployedComponent> svcit=svcs.iterator(); svcit.hasNext();) {
+//            		DeployedComponent dep = svcit.next();
+//            		this.addDeployedService(dep, vm, h, theConfig, false);
+//             		
+//            	}
         		
         	}  
     		
@@ -160,16 +140,6 @@
         // create configuration node
         SortableChildrenNode configNode = createNode(theConfig, root);
 
-        // add deployments header
-//        SortableChildrenNode deployHdrNode = new SortableChildrenNode(DEPLOYMENTS_HDR, theConfig);
-//        configNode.addChild(deployHdrNode);
-//        configDeployHdrMap.put(theConfig.getID(), deployHdrNode);
-
-        // add psc defs header
-//        SortableChildrenNode pscDefsHdrNode = new SortableChildrenNode(PSC_DEFS_HDR, theConfig);
-//        configNode.addChild(pscDefsHdrNode);
-//        configPscDefHdrMap.put(theConfig.getID(), pscDefsHdrNode);
-
         // notify tree model listeners
         if (fireevent) {
 	        ConfigurationTreeModelEvent event =
@@ -208,8 +178,6 @@
     private void addDeloyedHost(Host theHost, Configuration theConfig, boolean fireevent) {
 
         DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//        DefaultTreeNode deployHdrNode =
-//            (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
         DefaultTreeNode hostNode =
             createHostNode(theHost, theConfig, configNode);
         HashMap map = (HashMap)hostConfigMap.get(theHost.getID());
@@ -268,106 +236,6 @@
     }
 
     /**
-     * Adds a deployed PSC node to the model.
-     * 
-     * @param thePsc the user object of the deployed PSC node being created
-     * @param theProcess the user object of the new node's process ancestor node
-     * @param theHost the user object of the new node's host ancestor node
-     * @param theConfig the user object of the new node's configuration ancestor
-     *            node
-     */
-//    public void addDeployedPsc(
-//        ProductServiceConfig thePsc,
-//        VMComponentDefn theProcess,
-//        Host theHost,
-//        Configuration theConfig) {
-//
-//        // event fired by the createPscNode method
-//        createPscNode(thePsc, theProcess, theHost, theConfig);
-//    }
-
-    /**
-     * Adds a deployed service node to the model.
-     * @param theService the user object of the deployed service node being
-     * created
-     * @param thePsc the user object of the new node's deployed PSC ancestor node
-     * @param theProcess the user object of the new node's process ancestor node
-     * @param theConfig the user object of the new node's configuration ancestor
-     * node
-     */
-//    public void addDeployedService(
-//        DeployedComponent theService,
-//        VMComponentDefn theProcess,
-//        Host theHost,
-//        Configuration theConfig) {
-//
-//        DefaultTreeNode pscNode = getPscNode(thePsc, theProcess);
-//        DefaultTreeNode serviceNode = createNode(theService, pscNode);
-//        DefaultTreeNode processNode = serviceNode.getParent();
-//        DefaultTreeNode hostNode = processNode.getParent();
-//        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//
-//        // notify tree model listeners
-//        ConfigurationTreeModelEvent event =
-//            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
-//                                            serviceNode,
-//                                            configNode,
-//                                            new DefaultTreeNode[] {pscNode,
-//                                                                   processNode,
-//                                                                   hostNode,
-//                                                                   configNode});
-//        fireConfigurationChange(event);
-//    }
-
-    /**
-     * Adds a product node to the model.
-     * @param theProduct the user object of the product node being created
-     * @param theConfig the user object of the new node's configuration
-     * ancestor node
-     */
-//    private void addProduct(
-//        ProductType theProduct,
-//        Configuration theConfig) {
-//
-//        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//        DefaultTreeNode pscDefHdrNode =
-//            (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
-//        DefaultTreeNode productNode = createNode(theProduct, pscDefHdrNode);
-//
-//        HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
-//        if (map == null) {
-//            // has no PSCs for any config
-//            map = new HashMap();
-//            prodConfigMap.put(theProduct.getID(), map);
-//        }
-//        map.put(theConfig.getID(), productNode);
-//
-//        // notify tree model listeners
-//        ConfigurationTreeModelEvent event =
-//            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
-//                                            productNode,
-//                                            configNode,
-//                                            new DefaultTreeNode[] {configNode});
-//        fireConfigurationChange(event);
-//    }
-
-    /**
-     * Adds a PSC definition node to the model.
-     * @param thePsc the user object of the PSC definition node being created
-     * @param theProduct the user object of the new node's product ancestor node
-     * @param theConfig the user object of the new node's configuration
-     * ancestor node
-     */
-//    public void addPscDefn(
-//        ProductServiceConfig thePsc,
-//        ProductType theProduct,
-//        Configuration theConfig) {
-//
-//        // event fired by the createPscNode method
-//        createPscNode(thePsc, theProduct, theConfig);
-//    }
-
-    /**
      * Adds a service definition node to the model.
      * @param theService the user object of the deployed service definition node
      * being created
@@ -392,13 +260,11 @@
             Configuration theConfig,
             boolean fireevent) {
 
- //       DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
-        
+         
         DefaultTreeNode processNode = getUserObjectNode(theProcess);
 
         DefaultTreeNode serviceNode = createNode(theService, processNode);
         DefaultTreeNode hostNode = getHostNode(theHost, theConfig);
-//        DefaultTreeNode productNode = serviceNode.getParent();
         DefaultTreeNode configNode = getUserObjectNode(theConfig);
 
         // notify tree model listeners
@@ -436,20 +302,12 @@
                                            theEvent.getHost(),
                                            config);
                     }
-//                    else if (theEvent.isPscDefinitionChange()) {
-//                        addPscDefn(theEvent.getPscDefinition(),
-//                                   theEvent.getProduct(),
-//                                   config);
+//                    else if (theEvent.isDeployedServiceChange()) {
+//                        addDeployedService(theEvent.getDeployedService(),
+//                                       theEvent.getProcess(),
+//                                       theEvent.getHost(),
+//                                       config);
 //                    }
-                    else if (theEvent.isDeployedServiceChange()) {
-                        addDeployedService(theEvent.getDeployedService(),
-                                       theEvent.getProcess(),
-                                       theEvent.getHost(),
-                                       config);
-                    }
-//                    else if (theEvent.isProductChange()) {
-//                        addProduct(theEvent.getProduct(), config);
-//                    }
                 }
                 else if (theEvent.isDeleted()) {
                     if (theEvent.isHostChange()) {
@@ -460,17 +318,12 @@
                                               theEvent.getHost(),
                                               config);
                     }
-//                    else if (theEvent.isPscDefinitionChange()) {
-//                            deletePscDefintion(theEvent.getPscDefinition(),
-//                                               theEvent.getProduct(),
-//                                               config);
-//                        }
-                    else if (theEvent.isDeployedServiceChange()) {
-                            deleteDeployedService(theEvent.getDeployedService(),
-                                              theEvent.getProcess(),
-                                              theEvent.getHost(),
-                                              theEvent.getConfiguration());
-                    }
+//                    else if (theEvent.isDeployedServiceChange()) {
+//                            deleteDeployedService(theEvent.getDeployedService(),
+//                                              theEvent.getProcess(),
+//                                              theEvent.getHost(),
+//                                              theEvent.getConfiguration());
+//                    }
                 }
                 else if (theEvent.isModified()) {
                     if (theEvent.isHostChange()) {
@@ -528,87 +381,8 @@
         return createNode(wrap, theParent);
     }
 
-    /**
-     * Creates a PSC tree node used for PSC definitions.
-     * @param thePsc the user object of the new node
-     * @param theProduct the user object of the new node's parent node
-     * @param theConfig the user object of the new node's configuration node
-     */
-//    private void createPscNode(
-//        ProductServiceConfig thePsc,
-//        ProductType theProduct,
-//        Configuration theConfig) {
-//
-//        PscWrapper wrapper = new PscWrapper(thePsc, theConfig);
-//
-//        HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
-//        DefaultTreeNode productNode =
-//            (DefaultTreeNode)map.get(theConfig.getID());
-//        DefaultTreeNode pscNode = createNode(wrapper, productNode);
-//        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//
-//        map = (HashMap)pscConfigMap.get(thePsc.getID());
-//        if (map == null) {
-//            // new psc
-//            map = new HashMap();
-//            pscConfigMap.put(thePsc.getID(), map);
-//        }
-//        map.put(theConfig.getID(), pscNode);
-//
-//        // notify tree model listeners
-//        ConfigurationTreeModelEvent event =
-//            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
-//                                            pscNode,
-//                                            configNode,
-//                                            new DefaultTreeNode[] {productNode,
-//                                                                   configNode});
-//        fireConfigurationChange(event);
-//    }
 
     /**
-     * Creates a PSC tree node used for deployed PSCs.
-     * @param thePsc the user object of the new node
-     * @param theProcess the user object of the new node's parent node
-     * @param theHost the user object of the new node's host ancestor node
-     * @param theConfig the user object of the new node's configuration ancestor
-     * node
-     */
-//    private void createPscNode(
-//        ProductServiceConfig thePsc,
-//        VMComponentDefn theProcess,
-//        Host theHost,
-//        Configuration theConfig) {
-//
-//        PscWrapper wrapper = new PscWrapper(thePsc, theProcess);
-//        DefaultTreeNode processNode = getUserObjectNode(theProcess);
-//        if (processNode == null) {
-//            return;
-//        }
-//        
-//        DefaultTreeNode pscNode = createNode(wrapper, processNode);
-//        DefaultTreeNode hostNode = pscNode.getParent();
-//        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//
-//        HashMap map = (HashMap)procPscMap.get(theProcess.getID());
-//        if (map == null) {
-//            // process doesn't have any PSCs yet
-//            map = new HashMap();
-//            procPscMap.put(theProcess.getID(), map);
-//        }
-//        map.put(thePsc.getID(), pscNode);
-//
-//        // notify tree model listeners
-//        ConfigurationTreeModelEvent event =
-//            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
-//                                            pscNode,
-//                                            configNode,
-//                                            new DefaultTreeNode[] {processNode,
-//                                                                   hostNode,
-//                                                                   configNode});
-//        fireConfigurationChange(event);
-//    }
-
-    /**
      * Deletes a host node from the model.
      * @param theHost the user object of the host node being deleted
      * @param theConfig the user object of the deleted node's configuration
@@ -664,70 +438,8 @@
         fireConfigurationChange(event);
     }
 
+ 
     /**
-     * Deletes a deployed Deployed Service node from the model.
-     * @param thePsc the user object of the deployed PSC node being created
-     * @param theProcess the user object of the deleted node's process
-     * ancestor node
-     * @param theHost the user object of the deleted node's host ancestor node
-     * @param theConfig the user object of the deleted node's configuration
-     * ancestor node
-     */
-    public void deleteDeployedService(
-        DeployedComponent theService,
-        VMComponentDefn theProcess,
-        Host theHost,
-        Configuration theConfig) {
-
-        DefaultTreeNode serviceNode = getUserObjectNode(theService);
-
-        DefaultTreeNode processNode = serviceNode.getParent();
-        DefaultTreeNode hostNode = processNode.getParent();
-        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-
-
-        // notify tree model listeners
-        ConfigurationTreeModelEvent event =
-            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.DELETED,
-                                            serviceNode,
-                                            configNode,
-                                            new DefaultTreeNode[] {processNode,
-                                                                   hostNode,
-                                                                   configNode});
-        fireConfigurationChange(event);
-    }
-
-    /**
-     * Deletes a PSC definition node from the model.
-     * @param thePsc the user object of the PSC definition node being deleted
-     * @param theProduct the user object of the deleted node's product
-     * ancestor node
-     * @param theConfig the user object of the deleted node's configuration
-     * ancestor node
-     */
-//    public void deletePscDefintion(
-//        ProductServiceConfig thePsc,
-//        ProductType theProduct,
-//        Configuration theConfig) {
-//
-//        DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
-//        DefaultTreeNode productNode = pscNode.getParent();
-//        DefaultTreeNode configNode = getUserObjectNode(theConfig);
-//
-//        // delete from model
-//        removeUserObject(pscNode.getContent());
-//
-//        // notify tree model listeners
-//        ConfigurationTreeModelEvent event =
-//            new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.DELETED,
-//                                            pscNode,
-//                                            configNode,
-//                                            new DefaultTreeNode[] {productNode,
-//                                                                   configNode});
-//        fireConfigurationChange(event);
-//    }
-
-    /**
      * Notifies all registered {@link ConfigurationChangeListener}s that the
      * tree model has changed.
      * @param theEvent the event being sent to the listeners
@@ -743,16 +455,8 @@
         }
     }
 
+ 
     /**
-     * Gets the deployments header node for the given configuration.
-     * @param theConfig the configuration whose header node is being requested
-     * @return the deployments header node
-     */
-//    public DefaultTreeNode getDeploymentsHeaderNode(Configuration theConfig) {
-//        return (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
-//    }
-
-    /**
      * Gets the host node of the given configuration. 
      * May return null if <code>theHost</code> is null.
      * @param theHost the host whose node is being requested
@@ -772,43 +476,6 @@
     }
 
     /**
-     * Gets the PSC definitions header node for the given configuration.
-     * @param theConfig the configuration whose header node is being requested
-     * @return the PSC definitions header node
-     */
-//    public DefaultTreeNode getPscDefinitionsHeaderNode(Configuration theConfig) {
-//        return (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
-//    }
-
-    /**
-     * Gets the requested PSC definition node.
-     * @param thePsc the user object of the PSC definition node
-     * @param theConfig the user object of the PSC definition node's configuration
-     * ancestor node
-     */
-//    public DefaultTreeNode getPscNode(
-//        ProductServiceConfig thePsc,
-//        Configuration theConfig) {
-//
-//        HashMap map = (HashMap)pscConfigMap.get(thePsc.getID());
-//        return (DefaultTreeNode)map.get(theConfig.getID());
-//    }
-
-    /**
-     * Gets the requested deployed PSC node.
-     * @param thePsc the user object of the deployed PSC node
-     * @param theProcess the user object of the deployed PSC node's process
-     * ancestor node
-     */
-//    public DefaultTreeNode getPscNode(
-//        ProductServiceConfig thePsc,
-//        VMComponentDefn theProcess) {
-//
-//        HashMap map = (HashMap)procPscMap.get(theProcess.getID());
-//        return (DefaultTreeNode)map.get(thePsc.getID());
-//    }
-
-    /**
      * Gets the requested user object's node.
      * @param theUserObject the user object whose node is being requested
      * @return the requested user object's node
@@ -826,31 +493,10 @@
      */
     public boolean isHeaderNode(DefaultTreeNode theNode) {
     	return (theNode == root);
-    //    return (isDeploymentsHeaderNode(theNode));
-//        ||                isPscDefinitionsHeaderNode(theNode));
-    }
+     }
 
-    /**
-     * Indicates if the given node is a deployments header node.
-     * @param theNode the node being checked
-     * @return <code>true</code> if the node is a deployments header node;
-     * <code>false</code> otherwise.
-     */
-//    public boolean isDeploymentsHeaderNode(DefaultTreeNode theNode) {
-//        return configDeployHdrMap.containsValue(theNode);
-//    }
 
     /**
-     * Indicates if the given node is a PSC definitions header node.
-     * @param theNode the node being checked
-     * @return <code>true</code> if the node is a PSC definitions header node;
-     * <code>false</code> otherwise.
-     */
-//    public boolean isPscDefinitionsHeaderNode(DefaultTreeNode theNode) {
-//        return configPscDefHdrMap.containsValue(theNode);
-//    }
-
-    /**
      * Modifies a deployed host node in the model.
      * @param theProcess the user object of the node being modified
      * @param theHost the user object of the modified node's host ancestor node
@@ -894,21 +540,6 @@
         }
     }
 
-    /**
-     * Modifies a PSC definitions node in the model.
-     * @param thePsc the user object of the node being modified
-     * @param theProduct the user object of the modified node's product
-     * ancestor node
-     * @param theConfig the user object of the modified node's configuration
-     * ancestor node
-     */
-//    public void modifyPscDefinition(
-//        ProductServiceConfig thePsc,
-//        ProductType theProduct,
-//        Configuration theConfig) {
-//
-//        // not sure if anything needs to be done here
-//    }
 
     /**
      * Modifies a service definitions node in the model.
@@ -953,12 +584,7 @@
     public void refresh() {
         root.removeAllChildren();
         objNodeMap.clear();
- //       configDeployHdrMap.clear();
- //       configPscDefHdrMap.clear();
         hostConfigMap.clear();
- //       prodConfigMap.clear();
- //       procPscMap.clear();
-        pscConfigMap.clear();
         fireModelChangedEvent(this, root);
     }
 
@@ -994,142 +620,6 @@
     // PscWrapper INNER CLASS
     ///////////////////////////////////////////////////////////////////////////
 
-    /**
-     * The <code>PscWrapper</code> class wraps a {@link ProductServiceConfig} so
-     * that PSC definitions and deployed PSCs can be distinguished.
-     */
-//    public class PscWrapper {
-//
-//        ///////////////////////////////////////////////////////////////////////
-//        // FIELDS
-//        ///////////////////////////////////////////////////////////////////////
-//
-//        private ProductServiceConfig psc;
-//        private VMComponentDefn proc;
-//        private Configuration config;
-//
-//        ///////////////////////////////////////////////////////////////////////
-//        // CONSTRUCTORS
-//        ///////////////////////////////////////////////////////////////////////
-//
-//        /**
-//         * Constructs a <code>PscWrapper</code> that wraps a deployed PSC.
-//         * @param thePsc the user object of the deployed PSC
-//         * @param theProcess the user object of the deployed PSC's process
-//         */
-//        public PscWrapper(
-//            ProductServiceConfig thePsc,
-//            VMComponentDefn theProcess) {
-//
-//            psc = thePsc;
-//            proc = theProcess;
-//        }
-//
-//        /**
-//         * Constructs a <code>PscWrapper</code> that wraps a PSC definition.
-//         * @param thePsc the user object of the deployed PSC
-//         * @param theConfig the user object of the deployed PSC's configuration
-//         */
-//        public PscWrapper(
-//            ProductServiceConfig thePsc,
-//            Configuration theConfig) {
-//
-//            psc = thePsc;
-//            config = theConfig;
-//        }
-//
-//        ///////////////////////////////////////////////////////////////////////
-//        // METHODS
-//        ///////////////////////////////////////////////////////////////////////
-//
-//        /**
-//         * Indicates if the given input parameter is equal to this object.
-//         * @param theObject the object being compared
-//         * @return <code>true</code> if equal; <code>false</code> otherwise.
-//         */
-//        public boolean equals(Object theObject) {
-//            if (theObject instanceof PscWrapper) {
-//                PscWrapper otherObj = (PscWrapper)theObject;
-//                if (psc.equals(otherObj.getPsc())) {
-//                    if (isDefinition() == otherObj.isDefinition()) {
-//                        if (isDefinition()) {
-//                            return (config.equals(otherObj.getConfig()));
-//                        }
-//                        return (proc.equals(otherObj.getProcess()));
-//                    }
-//                }
-//                return false;
-//
-//            }
-//            return false;
-//        }
-//
-//        /**
-//         * Gets the associated configuration. Only used if wrapping a PSC
-//         * definition.
-//         * @return the associated configuration of the PSC definition or
-//         * <code>null</code> if wrapping a deployed PSC.
-//         */
-//        public Configuration getConfig() {
-//            return config;
-//        }
-//
-//        /**
-//         * Gets the associated process. Only used if wrapping a deployed PSC.
-//         * @return the associated process of the deployed PSC or
-//         * <code>null</code> if wrapping a PSC definition.
-//         */
-//        public VMComponentDefn getProcess() {
-//            return proc;
-//        }
-//
-//        /**
-//         * Gets the wrapped PSC object.
-//         * @return the wrapped PSC object
-//         */
-//        public ProductServiceConfig getPsc() {
-//            return psc;
-//        }
-//
-//        /**
-//         * Indicates if this object wraps a PSC definition.
-//         * @return <code>true</code> if this object wraps a PSC definition;
-//         * <code>false</code> otherwise.
-//         */
-//        public boolean isDefinition() {
-//            return (config != null);
-//        }
-//
-//        /**
-//         * Indicates if this object wraps a deployed PSC.
-//         * @return <code>true</code> if this object wraps a deployed PSC;
-//         * <code>false</code> otherwise.
-//         */
-//        public boolean isDeployed() {
-//            return (proc != null);
-//        }
-//
-//        /**
-//         * Gets a hash code value.
-//         * @return a hash code value
-//         */
-//        public int hashCode() {
-//            int result = psc.hashCode();
-//            if (isDefinition()) {
-//                return result + config.hashCode();
-//            }
-//            return result + proc.hashCode();
-//        }
-//
-//        /**
-//         * Gets this object's string representation which is it's associated
-//         * {@link ProductServiceConfig}'s <code>toString</code>.
-//         * @return the string representation
-//         */
-//        public String toString() {
-//            return psc.toString();
-//        }
-//    }
 
     ///////////////////////////////////////////////////////////////////////////
     // HostWrapper INNER CLASS




More information about the teiid-commits mailing list