teiid SVN: r749 - in branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config: model and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-10 14:41:33 -0400 (Fri, 10 Apr 2009)
New Revision: 749
Modified:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBinding.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicComponentType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBinding.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
Log:
Teiid 323 - the xa supported flag was moved from the connector type to a property on the connector. Now the binding will indicate if it suports XA versus the type
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -46,6 +46,7 @@
// public static final int SHARED_RESOURCE_COMPONENT_TYPE_CODE = 10;
+
/**
* Returns the <code>Collection</code> of <code>ComponentTypeDefn</code>s
@@ -125,29 +126,13 @@
* Returns true if this component type is monitored
* @return boolean true if monitored
*/
- boolean isMonitored();
+ boolean isMonitored();
/**
- * Returns true if this component type is a member of the connectors product type based on
- * @link com.metamatrix.core.util.MetaMatrixProductVersion#CONNECTOR_PRODUCT_TYPE_NAME
- * @return boolean true if a member of the connectors product type
- */
- boolean isOfConnectorProductType();
-
- /**
* Returns true if this component type is a connector type
* @return boolean true if a connector type
*/
- boolean isOfTypeConnector();
-
- /**
- * Returns true if this component type is a XA connector type.
- * If this is <code>true</code>, then @link #isOfTypeConnector()
- * will also be true. However, @link #isOfTypeConnector() can be true
- * and this can be <code>false</code>.
- * @return boolean true if a connector type
- */
- boolean isOfTypeXAConnector();
+ boolean isOfTypeConnector();
/**
* Returns the principal who created this type
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBinding.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBinding.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBinding.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -35,4 +35,13 @@
String getConnectorClass();
String getDeployedName();
+
+ /**
+ * Returns true if this component type supports XA transactions.
+ * If this is <code>true</code>, then @link #isOfTypeConnector()
+ * will also be true. However, @link #isOfTypeConnector() can be true
+ * and this can be <code>false</code>.
+ * @return boolean true if a connector type
+ */
+ boolean isXASupported();
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -22,7 +22,6 @@
package com.metamatrix.common.config.api;
-import com.metamatrix.core.util.MetaMatrixProductVersion;
/**
@@ -32,9 +31,12 @@
public static final String COMPONENT_TYPE_NAME = "Connector"; //$NON-NLS-1$
public static final ComponentTypeID CONNECTOR_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
- public static final ProductTypeID CONNECTOR_PROD_TYPEID = ProductTypeID.PRODUCT_TYPE_ID;
-
+
+ /*
+ * NOTE: These attributes must match the ConnectorAPI property names in org.teiid.connector.internal.ConnectorPropertyNames
+ */
public interface Attributes {
+ public static final String IS_XA = "IsXA"; //$NON-NLS-1$
public static final String CONNECTOR_CLASS = "ConnectorClass";//$NON-NLS-1$
public static final String MM_JAR_PROTOCOL = "extensionjar"; //$NON-NLS-1$
public static final String CONNECTOR_CLASSPATH = "ConnectorClassPath"; //$NON-NLS-1$
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicComponentType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicComponentType.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicComponentType.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -217,19 +217,7 @@
return false;
}
- /**
- * Returns true if this component type is a member of the connectors product type based on
- * @link com.metamatrix.core.util.MetaMatrixProductVersion#CONNECTOR_PRODUCT_TYPE_NAME
- * @return boolean true if a member of the connectors product type
- */
- public boolean isOfConnectorProductType() {
- return false;
- }
- public boolean isOfTypeXAConnector() {
- return false;
- }
-
/**
* Returns the principal who created this type
* @return String principal name
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBinding.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBinding.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBinding.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -41,6 +41,21 @@
protected BasicConnectorBinding(BasicConnectorBinding component) {
super(component);
}
+
+ /**
+ * Returns true if this component type supports XA transactions.
+ * If this is <code>true</code>, then @link #isOfTypeConnector()
+ * will also be true. However, @link #isOfTypeConnector() can be true
+ * and this can be <code>false</code>.
+ * @return boolean true if a connector type
+ */
+ public boolean isXASupported() {
+ String xa = this.getProperty(ConnectorBindingType.Attributes.IS_XA);
+ if (xa != null && xa.equalsIgnoreCase("true")) {
+ return true;
+ }
+ return false;
+ }
/**
* Return a deep cloned instance of this object. Subclasses must override
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-04-10 15:58:04 UTC (rev 748)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-04-10 18:41:33 UTC (rev 749)
@@ -37,7 +37,7 @@
public static final long serialVersionUID = 1592753260156781311L;
- private static final String XA_CONNECTOR = "XA Connector";//$NON-NLS-1$
+ // private static final String XA_CONNECTOR = "XA Connector";//$NON-NLS-1$
public BasicConnectorBindingType(ComponentTypeID id, ComponentTypeID parentID, ComponentTypeID superID, boolean deployable, boolean deprecated, boolean monitored) {
super(id, parentID, superID, deployable, deprecated, monitored);
@@ -64,16 +64,9 @@
public boolean isOfTypeConnector() {
return true;
}
-
- public boolean isOfTypeXAConnector() {
- if (this.getFullName().endsWith(XA_CONNECTOR)) {
- return true;
- }
+
- return false;
- }
-
public synchronized Object clone() {
BasicComponentType result = null;
result = new BasicConnectorBindingType(this);
15 years, 8 months
teiid SVN: r748 - branches/remove_psc/embedded/src/main/java/com/metamatrix/dqp/embedded/services.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-10 11:58:04 -0400 (Fri, 10 Apr 2009)
New Revision: 748
Modified:
branches/remove_psc/embedded/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java
Log:
Teiid 323 - removed the QueuedService attribute for a service, it's not used
Modified: branches/remove_psc/embedded/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java
===================================================================
--- branches/remove_psc/embedded/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java 2009-04-10 15:55:55 UTC (rev 747)
+++ branches/remove_psc/embedded/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java 2009-04-10 15:58:04 UTC (rev 748)
@@ -67,13 +67,6 @@
return INDEX_CONNECTOR_NAME;
}
- /**
- * @see com.metamatrix.common.config.api.ServiceComponentDefn#isQueuedService()
- * @since 4.3
- */
- public boolean isQueuedService() {
- return false;
- }
/**
* @see com.metamatrix.common.config.api.ServiceComponentDefn#accept(com.metamatrix.common.config.model.ConfigurationVisitor)
15 years, 8 months
teiid SVN: r747 - in branches/remove_psc/common-internal/src: main/java/com/metamatrix/common/config/model and 2 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-10 11:55:55 -0400 (Fri, 10 Apr 2009)
New Revision: 747
Modified:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefn.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicServiceComponentDefn.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java
branches/remove_psc/common-internal/src/test/resources/config-original.xml
branches/remove_psc/common-internal/src/test/resources/config.xml
Log:
Teiid 323 - removed the QueuedService attribute for a service, it's not used
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefn.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefn.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefn.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -31,7 +31,6 @@
// public static final String COMPONENT_TYPE_NAME = "Service";
- boolean isQueuedService();
void accept(ConfigurationVisitor visitor);
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -1230,8 +1230,7 @@
// originalServiceComponentDefn.getComponentTypeID(),
// newName);
- serviceDefn.setIsQueuedService(originalServiceComponentDefn.isQueuedService());
- if (serviceDefn.getComponentTypeID().getName().equals(RuntimeMetadataServiceComponentType.RUNTIME_METADATA_SERVICE_TYPE_NAME)) {
+ if (serviceDefn.getComponentTypeID().getName().equals(RuntimeMetadataServiceComponentType.RUNTIME_METADATA_SERVICE_TYPE_NAME)) {
/**
* This is done because the RuntimeMetadataService is a Service
* that must be treated as a Connector for only the RuntimeMetadata
@@ -2668,8 +2667,6 @@
defn.setRoutingUUID( originalConnector.getRoutingUUID() );
- defn.setIsQueuedService(originalConnector.isQueuedService());
-
createCreationAction(defn.getID(), defn);
this.modifyProperties(defn, originalConnector.getProperties(), ADD);
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicServiceComponentDefn.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicServiceComponentDefn.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicServiceComponentDefn.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -33,7 +33,6 @@
public class BasicServiceComponentDefn extends BasicComponentDefn implements ServiceComponentDefn, Serializable {
- private boolean isQueuedService;
private String routingUUID;
public BasicServiceComponentDefn(ConfigurationID configurationID, ServiceComponentDefnID componentID, ComponentTypeID typeID) {
@@ -43,18 +42,9 @@
protected BasicServiceComponentDefn(BasicServiceComponentDefn component) {
super(component);
- setIsQueuedService(component.isQueuedService());
this.setRoutingUUID(component.getRoutingUUID());
}
- public boolean isQueuedService() {
- return isQueuedService;
- }
-
- public void setIsQueuedService(boolean isQueued) {
- isQueuedService = isQueued;
- }
-
/**
* Returns the String globally unique routing UUID for this
* ServiceComponentDefn if it is a Connector Binding;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -167,7 +167,6 @@
public static final String ELEMENT = "Service"; //$NON-NLS-1$
public static class Attributes extends ComponentObject.Attributes{
- public static final String QUEUED_SERVICE = "QueuedService"; //$NON-NLS-1$
public static final String ROUTING_UUID = "routingUUID"; //$NON-NLS-1$
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -257,7 +257,6 @@
Assertion.isNotNull(defn);
Element serviceComponentDefnElement = createComponentObjectElement(XMLConfig_42_ElementNames.Configuration.DeployedService.ELEMENT, defn);
- serviceComponentDefnElement.setAttribute(XMLConfig_42_ElementNames.Configuration.DeployedService.Attributes.QUEUED_SERVICE, Boolean.valueOf(defn.isQueuedService()).toString());
serviceComponentDefnElement.setAttribute(XMLConfig_42_ElementNames.Configuration.DeployedService.Attributes.ROUTING_UUID, defn.getRoutingUUID());
return serviceComponentDefnElement;
}
@@ -273,7 +272,6 @@
Assertion.isNotNull(defn);
Element serviceComponentDefnElement = createComponentObjectElement(XMLConfig_42_ElementNames.ServiceComponentDefns.ServiceComponentDefn.ELEMENT, defn);
- serviceComponentDefnElement.setAttribute(XMLConfig_42_ElementNames.ServiceComponentDefns.ServiceComponentDefn.Attributes.QUEUED_SERVICE, Boolean.valueOf(defn.isQueuedService()).toString());
serviceComponentDefnElement.setAttribute(XMLConfig_42_ElementNames.ServiceComponentDefns.ServiceComponentDefn.Attributes.ROUTING_UUID, defn.getRoutingUUID());
return serviceComponentDefnElement;
}
@@ -1638,16 +1636,9 @@
Element connectorElement = createComponentObjectElement(XMLConfig_42_ElementNames.ConnectorComponents.ConnectorComponent.ELEMENT, connector);
- connectorElement.setAttribute(XMLConfig_42_ElementNames.ConnectorComponents.ConnectorComponent.Attributes.QUEUED_SERVICE, Boolean.valueOf(connector.isQueuedService()).toString());
- // vah - 09-24-2003
- // when exporting a configuration, export the routing uuid to
- // otherwise do not export it so that upon import
- // the routingUUID to be regenerated.
- // This is done to help ensure there are no duplicate UUIDs
-// if (isExportConfig) {
- connectorElement.setAttribute(XMLConfig_42_ElementNames.ConnectorComponents.ConnectorComponent.Attributes.ROUTING_UUID, connector.getRoutingUUID());
-// }
+ connectorElement.setAttribute(XMLConfig_42_ElementNames.ConnectorComponents.ConnectorComponent.Attributes.ROUTING_UUID, connector.getRoutingUUID());
+
return connectorElement;
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java 2009-04-10 15:55:55 UTC (rev 747)
@@ -158,8 +158,7 @@
public static final String ELEMENT = "ServiceComponentDefn"; //$NON-NLS-1$
public static class Attributes extends ComponentObject.Attributes{
- public static final String QUEUED_SERVICE = "QueuedService"; //$NON-NLS-1$
- public static final String ROUTING_UUID = "routingUUID"; //$NON-NLS-1$
+ public static final String ROUTING_UUID = "routingUUID"; //$NON-NLS-1$
}
}
}
Modified: branches/remove_psc/common-internal/src/test/resources/config-original.xml
===================================================================
--- branches/remove_psc/common-internal/src/test/resources/config-original.xml 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/test/resources/config-original.xml 2009-04-10 15:55:55 UTC (rev 747)
@@ -85,7 +85,7 @@
</Host>
</Configuration>
<Services>
- <Service Name="RuntimeMetadataService" ComponentType="RuntimeMetadataService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="RuntimeMetadataService" ComponentType="RuntimeMetadataService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="ConnectorClass">com.metamatrix.connector.metadata.IndexConnector</Property>
<Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
@@ -97,7 +97,7 @@
<Property Name="Immutable">true</Property>
</Properties>
</Service>
- <Service Name="MembershipService" ComponentType="MembershipService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="MembershipService" ComponentType="MembershipService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="security.membership.admin.username">(admin.username)</Property>
<Property Name="security.membership.admin.password">(admin.password)</Property>
@@ -107,7 +107,7 @@
<Property Name="ServiceClassName">com.metamatrix.platform.security.membership.service.MembershipServiceImpl</Property>
</Properties>
</Service>
- <Service Name="ODBCService" ComponentType="ODBCService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="ODBCService" ComponentType="ODBCService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="metamatrix.service.essentialservice">false</Property>
<Property Name="ServiceClassName">com.metamatrix.odbc.ODBCServiceImpl</Property>
@@ -115,27 +115,27 @@
<Property Name="ServerKey">license/oaserverkey.lic</Property>
</Properties>
</Service>
- <Service Name="ConfigurationService" ComponentType="ConfigurationService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="ConfigurationService" ComponentType="ConfigurationService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="metamatrix.service.essentialservice">true</Property>
<Property Name="ServiceClassName">com.metamatrix.platform.config.service.ConfigurationServiceImpl</Property>
</Properties>
</Service>
- <Service Name="AuthorizationService" ComponentType="AuthorizationService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="AuthorizationService" ComponentType="AuthorizationService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="metamatrix.service.essentialservice">true</Property>
<Property Name="security.authorization.connection.Retries">4</Property>
<Property Name="ServiceClassName">com.metamatrix.platform.security.authorization.service.AuthorizationServiceImpl</Property>
</Properties>
</Service>
- <Service Name="SessionService" ComponentType="SessionService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="SessionService" ComponentType="SessionService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="security.session.terminationHandlers">com.metamatrix.server.util.DataServerSessionTerminationHandler</Property>
<Property Name="metamatrix.service.essentialservice">true</Property>
<Property Name="ServiceClassName">com.metamatrix.platform.security.session.service.SessionServiceImpl</Property>
</Properties>
</Service>
- <Service Name="QueryService" ComponentType="QueryService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="QueryService" ComponentType="QueryService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="metamatrix.service.essentialservice">false</Property>
<Property Name="ProcessPoolMaxThreads">64</Property>
Modified: branches/remove_psc/common-internal/src/test/resources/config.xml
===================================================================
--- branches/remove_psc/common-internal/src/test/resources/config.xml 2009-04-10 15:41:05 UTC (rev 746)
+++ branches/remove_psc/common-internal/src/test/resources/config.xml 2009-04-10 15:55:55 UTC (rev 747)
@@ -36,7 +36,7 @@
<Configuration CreatedBy="ConfigurationStartup" LastChangedBy="ConfigurationStartup" ComponentType="Configuration" Name="Next Startup"><Properties/></Configuration>
<Services>
- <Service Name="QueryService" ComponentType="QueryService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Service Name="QueryService" ComponentType="QueryService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
<Properties>
<Property Name="metamatrix.service.essentialservice">false</Property>
<Property Name="ProcessPoolMaxThreads">64</Property>
15 years, 8 months
teiid SVN: r746 - in branches/remove_psc/common-internal/src: test/resources and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-10 11:41:05 -0400 (Fri, 10 Apr 2009)
New Revision: 746
Modified:
branches/remove_psc/common-internal/src/main/resources/com/metamatrix/common/i18n.properties
branches/remove_psc/common-internal/src/test/resources/config-original.xml
Log:
Teiid 323 - removing the psc nomeclature
Modified: branches/remove_psc/common-internal/src/main/resources/com/metamatrix/common/i18n.properties
===================================================================
--- branches/remove_psc/common-internal/src/main/resources/com/metamatrix/common/i18n.properties 2009-04-10 03:06:06 UTC (rev 745)
+++ branches/remove_psc/common-internal/src/main/resources/com/metamatrix/common/i18n.properties 2009-04-10 15:41:05 UTC (rev 746)
@@ -137,8 +137,8 @@
ERR.003.001.0096 = ConfigurationModelContainer processing error: The container has already been initially populated.
ERR.003.001.0097 = This {0} instance (ID={0}) cannot be cloned.
ERR.003.001.0098 = ConfigurationModelContainer Cloning Error on configuration: {0} message: {1}
-ERR.003.001.0099 = Unable to import input stream for configuration {0}
-ERR.003.001.0100 = Unable to export output stream for configuration {0}
+ERR.003.001.0099 = Unable to read configuration file {0}, verify its formatted properly
+ERR.003.001.0100 = Unable to write configuration {0} output stream, formatting issues
ERR.003.001.0101 = ConfigurationModelContainer processing error: Unable to remove component of type: {0}
Modified: branches/remove_psc/common-internal/src/test/resources/config-original.xml
===================================================================
--- branches/remove_psc/common-internal/src/test/resources/config-original.xml 2009-04-10 03:06:06 UTC (rev 745)
+++ branches/remove_psc/common-internal/src/test/resources/config-original.xml 2009-04-10 15:41:05 UTC (rev 746)
@@ -154,6 +154,17 @@
</Properties>
</Service>
</Services>
+ <ConnectorBindings>
+ <Connector Name="Test Connector" ComponentType="JDBC Connector" LastChangedBy="ImportConfiguration" LastChangedDate="2005-03-09T06:28:34.422-06:00" CreatedBy="ImportConfiguration" CreationDate="2005-03-09T06:28:34.422-06:00" QueuedService="false">
+ <Properties>
+ <Property Name="Password">abc</Property>
+ <Property Name="User">theuser</Property>
+ <Property Name="URL">jdbc:mmx://server:port</Property>
+ <Property Name="Driver">driver.class</Property>
+ </Properties>
+ </Connector>
+ </ConnectorBindings>
+
<ComponentTypes>
<ComponentType Name="Service" ComponentTypeCode="1" Deployable="false" Deprecated="false" Monitorable="false" ParentComponentType="VM" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.943-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.943-06:00">
<PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
15 years, 8 months
teiid SVN: r745 - in branches/remove_psc/common-internal/src: main/java/com/metamatrix/common/config/api and 7 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-09 23:06:06 -0400 (Thu, 09 Apr 2009)
New Revision: 745
Added:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
branches/remove_psc/common-internal/src/test/resources/config-original.xml
Removed:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfig.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigComponentType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfigType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PSCData.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PscID.java
Modified:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/AuthenticationProviderID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefnID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModel.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationVisitor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ProcessData.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemState.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/vdb/runtime/BasicVDBDefn.java
branches/remove_psc/common-internal/src/test/java/com/metamatrix/common/config/xml/TestXMLConfigurationImportExportUtility.java
Log:
Teiid 323 - removing the psc nomeclature
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -41,7 +41,6 @@
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
import com.metamatrix.common.config.model.BasicHost;
-import com.metamatrix.common.config.model.BasicProductType;
import com.metamatrix.common.config.reader.CurrentConfigurationReader;
import com.metamatrix.common.config.reader.PropertiesConfigurationReader;
import com.metamatrix.common.properties.UnmodifiableProperties;
@@ -301,8 +300,9 @@
*/
public Collection getProductTypes() throws ConfigurationException {
Collection c = new ArrayList(1);
- c.add(BasicProductType.PRODUCT_TYPE);
- return c;
+ return c;
+// c.add(BasicProductType.PRODUCT_TYPE);
+// return c;
}
/**
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/AuthenticationProviderID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/AuthenticationProviderID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/AuthenticationProviderID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -36,28 +36,28 @@
super(fullName);
}
- public AuthenticationProviderID(String name, ProductServiceConfigID pscID) {
- super(AuthenticationProviderID.createName(Configuration.NEXT_STARTUP_ID, name, pscID));
- }
+// public AuthenticationProviderID(String name, ProductServiceConfigID pscID) {
+// super(AuthenticationProviderID.createName(Configuration.NEXT_STARTUP_ID, name, pscID));
+// }
/**
* Responsible for creating the structuring id for this VM Component
*/
- private static final String createName(ConfigurationID configID, String name, ProductServiceConfigID pscID) {
- Assertion.isNotNull(configID);
- Assertion.isNotNull(name);
-
-
- StringBuffer sb = new StringBuffer();
- sb.append(pscID.getName());
- sb.append(IDVerifier.DELIMITER_CHARACTER);
- sb.append(name);
-
- return sb.toString();
-
- }
+// private static final String createName(ConfigurationID configID, String name, ProductServiceConfigID pscID) {
+// Assertion.isNotNull(configID);
+// Assertion.isNotNull(name);
+//
+//
+// StringBuffer sb = new StringBuffer();
+// sb.append(pscID.getName());
+// sb.append(IDVerifier.DELIMITER_CHARACTER);
+// sb.append(name);
+//
+// return sb.toString();
+//
+// }
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -36,28 +36,28 @@
super(fullName);
}
- public ConnectorBindingID(String name, ProductServiceConfigID pscID) {
- super(ConnectorBindingID.createName(Configuration.NEXT_STARTUP_ID, name, pscID));
- }
+// public ConnectorBindingID(String name) {
+// super(ConnectorBindingID.createName(Configuration.NEXT_STARTUP_ID, name, pscID));
+// }
/**
* Responsible for creating the structuring id for this VM Component
*/
- private static final String createName(ConfigurationID configID, String name, ProductServiceConfigID pscID) {
- Assertion.isNotNull(configID);
- Assertion.isNotNull(name);
-
-
- StringBuffer sb = new StringBuffer();
- sb.append(pscID.getName());
- sb.append(IDVerifier.DELIMITER_CHARACTER);
- sb.append(name);
-
- return sb.toString();
-
- }
+// private static final String createName(ConfigurationID configID, String name) {
+// Assertion.isNotNull(configID);
+// Assertion.isNotNull(name);
+//
+//
+// StringBuffer sb = new StringBuffer();
+// sb.append(pscID.getName());
+// sb.append(IDVerifier.DELIMITER_CHARACTER);
+// sb.append(name);
+//
+// return sb.toString();
+//
+// }
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfig.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfig.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfig.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.api;
-
-import java.util.Collection;
-
-import com.metamatrix.common.config.model.ConfigurationVisitor;
-
-/**
- * <p>A ProductServiceConfig (or PSC) is a named collection of service
- * definitions. A PSC can be deployed, which in effect deploys it's
- * contained service definitions.<p>
- *
- * <p>The <i>type</i> of a PSC will be an instance of ProductType. The
- * inherited <code>getComponentTypeID</code> method will return a
- * ComponentTypeID object.</p>
- *
- * @see ServiceComponentDefn
- * @see ProductType
- */
-public interface ProductServiceConfig extends ComponentDefn {
-
- public static final ComponentTypeID PSC_COMPONENT_TYPE_ID = new ComponentTypeID(ProductServiceConfigComponentType.COMPONENT_TYPE_NAME);
-
-
- /**
- *@link dependency
- */
-
- /*#ServiceComponentDefnID lnkServiceComponentDefnID;*/
- /**
- * Returns a Collection of ServiceComponentDefnID objects, which
- * represent the service component definitions that are contained
- * by this product service configuration.
- */
- Collection getServiceComponentDefnIDs();
-
- /**
- * Indicates if the service belongs to this PSC.
- * @returns boolean true if the service is contained in this PSC.
- */
- boolean containsService(ServiceComponentDefnID serviceID);
-
-
- /**
- * Indicates if this Service Definition is enabled within the PSC
- * that contains it; "enabled" refers to it being enabled for
- * deployment, if the containing PSC is deployed.
- * @return boolean indicating if this service definition will be deployed
- * if the PSC which contains it is deployed
- */
- boolean isServiceEnabled(ServiceComponentDefnID serviceID);
-
-
- void accept(ConfigurationVisitor visitor);
-
-}
-
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigComponentType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigComponentType.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigComponentType.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.api;
-
- /**
-* The <code>DeployedComponentType</code>
-*/
-
-public interface ProductServiceConfigComponentType extends ComponentType {
-
- public static final String COMPONENT_TYPE_NAME = "ProductServiceConfig"; //$NON-NLS-1$
-
-}
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductServiceConfigID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.api;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-public class ProductServiceConfigID extends ComponentDefnID {
-
-
- /**
- * The name of the built-in, standard PSC of the
- * MetaMatrix Server product
- */
- public static final String STANDARD_METAMATRIX_SERVER_PSC = "MetaMatrixServerFull"; //$NON-NLS-1$
-
- /**
- * The name of the built-in, Query Engine only PSC of the
- * MetaMatrix Server product
- */
- public static final String METAMATRIX_SERVER_QUERY_ENGINE_PSC = "QueryEngine"; //$NON-NLS-1$
-
- /**
- * The name of the built-in, standard PSC of the
- * MetaData Server product
- */
- public static final String STANDARD_METADATA_SERVER_PSC = "MetaBaseServerStandard"; //$NON-NLS-1$
-
- /**
- * The name of the built-in, standard PSC of the
- * Platform product
- */
- public static final String STANDARD_PLATFORM_PSC = "PlatformStandard"; //$NON-NLS-1$
-
- /**
- * The name of the built-in, standard PSC of the
- * Connector product
- */
- public static final String STANDARD_CONNECTOR_PSC = "MMProcessPSC"; //$NON-NLS-1$
-
- /**
- * The Collection of the names of the four build-in, standard
- * PSCs, one for each product type (@see {@link #ALL_PRODUCT_TYPES}).
- */
- public static final Collection ALL_STANDARD_PSC_NAMES;
-
-
- static{
- ALL_STANDARD_PSC_NAMES = new ArrayList(4);
- ALL_STANDARD_PSC_NAMES.add(STANDARD_METAMATRIX_SERVER_PSC);
- ALL_STANDARD_PSC_NAMES.add(METAMATRIX_SERVER_QUERY_ENGINE_PSC);
- ALL_STANDARD_PSC_NAMES.add(STANDARD_METADATA_SERVER_PSC);
- ALL_STANDARD_PSC_NAMES.add(STANDARD_PLATFORM_PSC);
-// ALL_STANDARD_PSC_NAMES.add(STANDARD_CONNECTOR_PSC);
- }
-
-
-
-
- public ProductServiceConfigID(ConfigurationID configID, String name) {
- super(configID, name);
- }
-
- public ProductServiceConfigID(String fullName) {
- super(fullName);
- }
-}
-
-
-
-
-
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.api;
-
-import java.util.Collection;
-
-import com.metamatrix.common.config.model.BasicProductType;
-
-/**
- * <p>A Product, in this context, is simply a named collection of
- * Service types. For example, the MetaMatrix Server product has
- * these service types: Query service, Transaction service, and
- * RuntimeMetadata service.</p>
- *
- * <p>A Product is a ComponentType subclass; it is a ComponentType, but
- * has references to other ComponentTypes (specifically, ComponentTypes
- * representing types of services). Since it is a ComponentType, it
- * can be thought of as representing a type of Product (either Platform,
- * MetaData Server, or MetaMatrix Server).</p>
- *
- * <p><b>Note:</b> Product type names where moved to
- * {@link com.metamatrix.core.util.MetaMatrixProductVersion} in
- * version 5.0 so that other classes that don't have a dependency on
- * com.metamatrix.common can reference them.</p>
- */
-public interface ProductType extends ComponentType {
- public static final String COMPONENT_TYPE_NAME = "Product"; //$NON-NLS-1$
-
- public static final ComponentTypeID PRODUCT_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
- public static final ComponentTypeID PRODUCT_SUPER_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
-
-
- /**
- * Returns a Collection of ComponentTypeID objects, each representing
- * a type of service that this Product is comprised of
- * @return Collection of ComponentTypeID objects
- */
- Collection getComponentTypeIDs();
-
-
- /**
- * Returns true if thie component type is contained in
- * this instance of the product type.
- * @param componentTypeID is the id of the component type to check for.
- * @return boolean is true if the component type is contained in the product type
- */
- boolean contains(ComponentTypeID componentTypeID);
-}
-
Added: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java (rev 0)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.config.api;
+
+import java.util.Collection;
+
+
+/**
+ * <p>A Product, in this context, is simply a named collection of
+ * Service types. For example, the MetaMatrix Server product has
+ * these service types: Query service, Transaction service, and
+ * RuntimeMetadata service.</p>
+ *
+ * <p>A Product is a ComponentType subclass; it is a ComponentType, but
+ * has references to other ComponentTypes (specifically, ComponentTypes
+ * representing types of services). Since it is a ComponentType, it
+ * can be thought of as representing a type of Product (either Platform,
+ * MetaData Server, or MetaMatrix Server).</p>
+ *
+ * <p><b>Note:</b> Product type names where moved to
+ * {@link com.metamatrix.core.util.MetaMatrixProductVersion} in
+ * version 5.0 so that other classes that don't have a dependency on
+ * com.metamatrix.common can reference them.</p>
+ */
+public interface ProductType extends ComponentType {
+ public static final String COMPONENT_TYPE_NAME = "Product"; //$NON-NLS-1$
+
+ public static final ComponentTypeID PRODUCT_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
+ public static final ComponentTypeID PRODUCT_SUPER_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
+
+
+ /**
+ * Returns a Collection of ComponentTypeID objects, each representing
+ * a type of service that this Product is comprised of
+ * @return Collection of ComponentTypeID objects
+ */
+ Collection getComponentTypeIDs();
+
+
+ /**
+ * Returns true if thie component type is contained in
+ * this instance of the product type.
+ * @param componentTypeID is the id of the component type to check for.
+ * @return boolean is true if the component type is contained in the product type
+ */
+ boolean contains(ComponentTypeID componentTypeID);
+}
+
Property changes on: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.api;
-
-
-public class ProductTypeID extends ComponentTypeID {
- public static final ProductTypeID PRODUCT_TYPE_ID = new ProductTypeID(ProductType.COMPONENT_TYPE_NAME);
-
-// /**
-// * This is a Collection of all known type names of
-// * products - it is needed by the JDBC spi impl and is
-// * not really intended for public use. (In other words,
-// * it is a hack!)
-// */
-// public static final Collection ALL_PRODUCT_TYPES;
-//
-//
-//
-// static{
-// ALL_PRODUCT_TYPES = new ArrayList(3);
-// ALL_PRODUCT_TYPES.add(ProductType.PLATFORM_TYPE_NAME);
-// ALL_PRODUCT_TYPES.add(ProductType.METAMATRIX_SERVER_TYPE_NAME);
-// ALL_PRODUCT_TYPES.add(ProductType.METADATA_SERVER_TYPE_NAME);
-// ALL_PRODUCT_TYPES.add(ProductType.CONNECTOR_PRODUCT_TYPE_NAME);
-//
-// }
-//
-
-
-
-
- public ProductTypeID(String fullName) {
- super(fullName);
- }
-}
-
-
-
-
-
Added: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java (rev 0)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.config.api;
+
+
+public class ProductTypeID extends ComponentTypeID {
+ public static final ProductTypeID PRODUCT_TYPE_ID = new ProductTypeID(ProductType.COMPONENT_TYPE_NAME);
+
+// /**
+// * This is a Collection of all known type names of
+// * products - it is needed by the JDBC spi impl and is
+// * not really intended for public use. (In other words,
+// * it is a hack!)
+// */
+// public static final Collection ALL_PRODUCT_TYPES;
+//
+//
+//
+// static{
+// ALL_PRODUCT_TYPES = new ArrayList(3);
+// ALL_PRODUCT_TYPES.add(ProductType.PLATFORM_TYPE_NAME);
+// ALL_PRODUCT_TYPES.add(ProductType.METAMATRIX_SERVER_TYPE_NAME);
+// ALL_PRODUCT_TYPES.add(ProductType.METADATA_SERVER_TYPE_NAME);
+// ALL_PRODUCT_TYPES.add(ProductType.CONNECTOR_PRODUCT_TYPE_NAME);
+//
+// }
+//
+
+
+
+
+ public ProductTypeID(String fullName) {
+ super(fullName);
+ }
+}
+
+
+
+
+
Property changes on: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefnID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefnID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ServiceComponentDefnID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -35,23 +35,20 @@
super(fullName);
}
- public ServiceComponentDefnID(ConfigurationID configID, String name, ProductServiceConfigID pscID) {
- super(ServiceComponentDefnID.createName(configID, name, pscID));
- }
+// public ServiceComponentDefnID(ConfigurationID configID, String name) {
+// super(ServiceComponentDefnID.createName(configID, name));
+// }
/**
* Responsible for creating the structuring id for this VM Component
*/
- private static final String createName(ConfigurationID configID, String name, ProductServiceConfigID pscID) {
+ private static final String createName(ConfigurationID configID, String name) {
Assertion.isNotNull(configID);
- Assertion.isNotNull(pscID);
Assertion.isNotNull(name);
StringBuffer sb = new StringBuffer(configID.getName());
sb.append(IDVerifier.DELIMITER_CHARACTER);
- sb.append(pscID.getName());
- sb.append(IDVerifier.DELIMITER_CHARACTER);
sb.append(name);
return sb.toString();
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -48,9 +48,7 @@
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductTypeID;
+
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -2420,9 +2420,9 @@
* the startup configuration should not be modifiable. But, this method
* is needed by the JDBC service provider.)
*/
- public void setStartupConfiguration(ConfigurationID configurationID) throws ConfigurationException {
- this.createExchangeAction(configurationID, ConfigurationModel.Attribute.STARTUP_CONFIGURATION, configurationID, configurationID);
- }
+// public void setStartupConfiguration(ConfigurationID configurationID) throws ConfigurationException {
+// this.createExchangeAction(configurationID, ConfigurationModel.Attribute.STARTUP_CONFIGURATION, configurationID, configurationID);
+// }
/**
* Sets the system next startup configuration
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -33,7 +33,6 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
import com.metamatrix.common.config.api.VMComponentDefnID;
import com.metamatrix.common.namedobject.BaseID;
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.model;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
-import com.metamatrix.common.config.api.ServiceComponentDefnID;
-
-
-public class BasicProductServiceConfig extends BasicComponentDefn implements ProductServiceConfig, Serializable {
-
- // key - ServiceComponentDefnID
- // value = Boolean indicating if the service enabled
- private HashMap serviceComponentDefnIDs;
-
-
- public BasicProductServiceConfig(ConfigurationID configurationID, ProductServiceConfigID componentID) {
- super(configurationID, componentID, ProductType.PRODUCT_TYPE_ID);
- serviceComponentDefnIDs = new HashMap();
-
- }
-
- protected BasicProductServiceConfig(BasicProductServiceConfig psc) {
- super(psc);
- this.serviceComponentDefnIDs = new HashMap(psc.serviceComponentDefnIDs);
- }
-
- public boolean isServiceEnabled(ServiceComponentDefnID serviceID) {
- if (serviceComponentDefnIDs.containsKey(serviceID)) {
- Boolean b = (Boolean) serviceComponentDefnIDs.get(serviceID);
- return b.booleanValue();
- }
-
- return false;
-
- }
-
- public void setServiceEnabled(ServiceComponentDefnID serviceID, boolean isEnabled) {
- if (serviceComponentDefnIDs.containsKey(serviceID)) {
- serviceComponentDefnIDs.put(serviceID, Boolean.valueOf(isEnabled));
- }
- }
-
- public boolean containsService(ServiceComponentDefnID serviceID) {
- if (serviceComponentDefnIDs.containsKey(serviceID)) {
- return true;
- }
- return false;
- }
-
-
-
- /**
- * Returns a cloned Collection of ServiceComponentDefnID objects, which
- * represent the service component definitions that are contained
- * by this product service configuration.
- */
- public Collection getServiceComponentDefnIDs(){
- return new HashSet(this.serviceComponentDefnIDs.keySet());
- }
-
- /**
- * This method is used to reset the assigned services in a PSC.
- * When the PSC is being updated with a new list, this enables
- * the map to be cleared prior to adding the ones that are
- * suppose to be in the map, saving the processing of having
- * to compare which ones don't belong.
- */
- void resetServices() {
- this.serviceComponentDefnIDs.clear();
- }
-
-
- /**
- * Package-level method used by {@link BasicConfigurationObjectEditor}
- * to alter this instance
- */
- void addServiceComponentDefnID(ServiceComponentDefnID serviceDefnID){
- this.serviceComponentDefnIDs.put(serviceDefnID, Boolean.TRUE);
- }
-
- /**
- * Package-level method used by {@link BasicConfigurationObjectEditor}
- * to alter this instance
- */
- void removeServiceComponentDefnID(ServiceComponentDefnID serviceDefnID){
- this.serviceComponentDefnIDs.remove(serviceDefnID);
- }
-
- /**
- * Return a deep cloned instance of this object. Subclasses must override
- * this method.
- * @return the object that is the clone of this instance.
- */
- public synchronized Object clone() {
- return new BasicProductServiceConfig(this);
- }
-
-
-}
-
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfigType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfigType.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfigType.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.model;
-
-import java.util.Collection;
-
-import com.metamatrix.common.config.api.ComponentTypeID;
-import com.metamatrix.common.config.api.ProductServiceConfigComponentType;
-
-public class BasicProductServiceConfigType extends BasicComponentType implements ProductServiceConfigComponentType {
-
-
- BasicProductServiceConfigType(ComponentTypeID id, ComponentTypeID parentID, ComponentTypeID superID, boolean deployable, boolean deprecated, boolean monitored) {
- super(id, parentID, superID, deployable, deprecated, monitored);
- }
-
- protected BasicProductServiceConfigType(BasicProductServiceConfigType type) {
- super(type);
-
- }
-
- /**
- * Return a deep cloned instance of this object. Subclasses must override
- * this method.
- * @return the object that is the clone of this instance.
- */
- public synchronized Object clone() {
-
- BasicProductServiceConfigType result = null;
- result = new BasicProductServiceConfigType(this);
-
- Collection defns = this.getComponentTypeDefinitions();
- result.setComponentTypeDefinitions(defns);
- return result;
-
-
- }
-}
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.model;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.HashSet;
-
-import com.metamatrix.common.config.api.ComponentTypeID;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
-
-public class BasicProductType extends BasicComponentType implements ProductType, Serializable {
- public static final ProductType PRODUCT_TYPE = new BasicProductType(ProductTypeID.PRODUCT_TYPE_ID, null, ProductType.PRODUCT_SUPER_TYPE_ID, false, false, false);
-
- private HashSet componentTypeIDs;
-
- public BasicProductType(ComponentTypeID id, ComponentTypeID parentID, ComponentTypeID superID, boolean deployable, boolean deprecated, boolean monitored) {
- super(id, parentID, superID,deployable,deprecated,monitored) ;
-
-
- componentTypeIDs = new HashSet();
-
- }
-
- protected BasicProductType(BasicProductType component) {
- super(component);
- this.componentTypeIDs = new HashSet(component.componentTypeIDs);
- }
-
-
- /**
- * Returns a cloned Collection of ComponentTypeID objects, each representing
- * a type of service that this Product is comprised of
- * @return Collection of ComponentTypeID objects
- */
- public Collection getComponentTypeIDs(){
- return new HashSet(this.componentTypeIDs);
- }
-
- public boolean contains(ComponentTypeID componentTypeID) {
- return (componentTypeIDs.contains(componentTypeID));
-
- }
-
-
- /**
- * Package-level method used by {@link BasicConfigurationObjectEditor}
- * to alter this instance
- */
- void addServiceTypeID(ComponentTypeID serviceComponentTypeID){
- this.componentTypeIDs.add(serviceComponentTypeID);
- }
-
- /**
- * Package-level method used by {@link BasicConfigurationObjectEditor}
- * to alter this instance
- */
- void removeServiceTypeID(ComponentTypeID serviceComponentTypeID){
- this.componentTypeIDs.remove(serviceComponentTypeID);
- }
-
-
-
- /**
- * Return a deep cloned instance of this object. Subclasses must override
- * this method.
- * @return the object that is the clone of this instance.
- */
- public synchronized Object clone() {
- BasicProductType result = new BasicProductType(this);
-
- return result;
- }
-
-
-}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -30,6 +30,7 @@
import com.metamatrix.common.config.api.ComponentTypeID;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
+import com.metamatrix.common.config.api.ConfigurationObjectEditor;
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.ConnectorBindingID;
import com.metamatrix.common.config.api.DeployedComponent;
@@ -37,11 +38,7 @@
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
import com.metamatrix.common.config.api.HostType;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigComponentType;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
+
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ResourceDescriptorID;
import com.metamatrix.common.config.api.ServiceComponentDefn;
@@ -60,7 +57,21 @@
* @since 4.2
*/
public class BasicUtil {
+
+ private static ConfigurationObjectEditor editor = new BasicConfigurationObjectEditor();
+
+ /**
+ * Returns a COnfigurationObjectEditor that does not create actions. This editor,
+ * because it doesn't maintain any state, is sharable for reuse.
+ * @return
+ * @since 4.3
+ */
+ public static ConfigurationObjectEditor getEditor() {
+ return editor;
+ }
+
+
/**
* static method that is used to create the specified instance type of BasicComponentDefn.
* @param defnTypeCode identifies the type of class this component defn should represent
@@ -73,12 +84,6 @@
public static final BasicComponentDefn createComponentDefn(int defnTypeCode, ConfigurationID configID, ComponentTypeID typeID, String defnName) {
BasicComponentDefn defn = null;
-// if (defnTypeCode == ComponentDefn.VM_COMPONENT_CODE) {
-// VMComponentDefnID vmID = new VMComponentDefnID(configID, defnName);
-// defn = new BasicVMComponentDefn(configID, vmID, typeID);
-//
-//
-// } else
if (defnTypeCode == ComponentDefn.RESOURCE_DESCRIPTOR_COMPONENT_CODE) {
ResourceDescriptorID descriptorID = new ResourceDescriptorID(configID,defnName);
@@ -114,38 +119,15 @@
if (defnTypeCode == ComponentDefn.VM_COMPONENT_CODE) {
VMComponentDefnID vmID = new VMComponentDefnID(configID, hostID, defnName);
defn = new BasicVMComponentDefn(configID, hostID, vmID, typeID);
- }
+ } else {
+ Assertion.assertTrue(true, "DefnTypeCode:" + defnTypeCode + " is not defined in BasicUtil.createComponentODefn for VM"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
return defn;
}
/**
- * static method that is used to create the specified instance type of BasicComponentDefn.
- * @param defnTypeCode identifies the type of class this component defn should represent
- * @see ComponentDefn for type codes
- * @param configID is the ConfigurationID identifying what configuration this defn belongs
- * @param typeID is the ComponentTypeID identifying this new created BasicComponentType
- * @param defnName is the name of the component defn
- * @return BasicComponentDefn
- */
-// public static final BasicComponentDefn createComponentDefn(int defnTypeCode, ConfigurationID configID, String defnName) {
-//
-// BasicComponentDefn defn = null;
-//
-// if (defnTypeCode == ComponentDefn.PSC_COMPONENT_CODE) {
-// ProductServiceConfigID pscID = new ProductServiceConfigID(configID, defnName);
-// defn = new BasicProductServiceConfig(configID, pscID);
-//
-// } else {
-// Assertion.assertTrue(true, "DefnTypeCode:" + defnTypeCode + " is not defined in BasicUtil.createComponentDefn"); //$NON-NLS-1$ //$NON-NLS-2$
-// }
-//
-// return defn;
-// }
-
-
-
- /**
* static method that is used to create the specified instance type of BasicComponentObject
* for a PSC.
* @param defnTypeCode identifies the type of class this component defn should represent
@@ -161,10 +143,6 @@
if (defnTypeCode == ComponentDefn.SHARED_RESOURCE_COMPONENT_CODE) {
SharedResourceID id = new SharedResourceID(objName);
defn = new BasicSharedResource(id, typeID);
-// } else if (defnTypeCode == ComponentDefn.PRODUCT_COMPONENT_CODE) {
-// ProductTypeID id = new ProductTypeID(objName);
-// defn = new BasicProductType(id, typeID);
-//
} else {
Assertion.assertTrue(true, "DefnTypeCode:" + defnTypeCode + " is not defined in BasicUtil.createComponentObject"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -199,10 +177,6 @@
} else if (name.equalsIgnoreCase(Configuration.COMPONENT_TYPE_NAME)) {
type = new BasicComponentType(typeID, parentID, superID, deployable, false, monitored);
classTypeCode = ComponentType.CONFIGURATION_COMPONENT_TYPE_CODE;
-
-// } else if (name.equalsIgnoreCase(ProductServiceConfigComponentType.COMPONENT_TYPE_NAME)) {
-// type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
-// classTypeCode = ComponentType.PSC_COMPONENT_TYPE_CODE;
} else if (name.equalsIgnoreCase("DeployedComponent")) { //$NON-NLS-1$
// type = new BasicDeployedComponentType(typeID, parentID, superID, deployable, false, monitored);
@@ -210,22 +184,12 @@
classTypeCode = ComponentType.DEPLOYED_COMPONENT_TYPE_CODE;
-
-// } else //if (name.equalsIgnoreCase(ProductType.COMPONENT_TYPE_NAME) ||
-// if ( classTypeCode == ComponentType.PRODUCT_COMPONENT_TYPE_CODE ) {
-// ProductTypeID prodtypeID = new ProductTypeID(name);
-// classTypeCode = ComponentType.PRODUCT_COMPONENT_TYPE_CODE;
-//
-// type = new BasicProductType(prodtypeID, parentID, superID, deployable, false, monitored);
-
} else if (classTypeCode == ComponentType.CONNECTOR_COMPONENT_TYPE_CODE) {
type = new BasicConnectorBindingType(typeID, parentID, superID, deployable, false, monitored);
} else if (classTypeCode == ComponentType.AUTHPROVIDER_COMPONENT_TYPE_CODE) {
type = new BasicAuthenticationProviderType(typeID, parentID, superID, deployable, false, monitored);
} else if (classTypeCode == ComponentType.SERVICE_COMPONENT_TYPE_CODE) {
type = new BasicServiceComponentType(typeID, parentID, superID, deployable, false, monitored);
-// } else if (classTypeCode == ComponentType.PSC_COMPONENT_TYPE_CODE) {
-// type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
// } else if (classTypeCode == ComponentDefn.VM_COMPONENT_TYPE_CODE) {
// type = new BasicVMComponentDefnType(typeID, parentID, superID, deployable, false, monitored);
@@ -244,8 +208,14 @@
} else {
- Assertion.assertTrue(true, "ClassTypeCode:" + classTypeCode + " is not defined in BasicUtil.createComponentType"); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new RuntimeException("ComponentType Exception " + classTypeCode);
+ //Assertion.assertTrue(true, "ClassTypeCode:" + classTypeCode + " is not defined in BasicUtil.createComponentType"); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ if (type == null) {
+ throw new RuntimeException("Null Type");
+ }
+
type.setComponentTypeCode(classTypeCode);
@@ -365,6 +335,25 @@
return -1;
}
+
+
+public static boolean isValdComponentTypeCode(int code) {
+ switch (code) {
+ case ComponentType.AUTHPROVIDER_COMPONENT_TYPE_CODE:
+ case ComponentType.CONFIGURATION_COMPONENT_TYPE_CODE:
+ case ComponentType.CONNECTOR_COMPONENT_TYPE_CODE:
+ case ComponentType.DEPLOYED_COMPONENT_TYPE_CODE:
+ case ComponentType.HOST_COMPONENT_TYPE_CODE:
+ case ComponentType.PRODUCT_COMPONENT_TYPE_CODE:
+ case ComponentType.RESOURCE_COMPONENT_TYPE_CODE:
+ case ComponentType.SERVICE_COMPONENT_TYPE_CODE:
+ case ComponentType.VM_COMPONENT_TYPE_CODE:
+ return true;
+
+ // break;
+ }
+ return false;
+}
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModel.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModel.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModel.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -79,7 +79,7 @@
// System Configurations
public static final AttributeDefinition CURRENT_CONFIGURATION = new AttributeDefinition(6,"Current Configuation"); //$NON-NLS-1$
public static final AttributeDefinition NEXT_STARTUP_CONFIGURATION = new AttributeDefinition(16,"Next Startup Configuation"); //$NON-NLS-1$
- public static final AttributeDefinition STARTUP_CONFIGURATION = new AttributeDefinition(17,"Startup Configuation"); //$NON-NLS-1$
+ // public static final AttributeDefinition STARTUP_CONFIGURATION = new AttributeDefinition(17,"Startup Configuation"); //$NON-NLS-1$
public static final AttributeDefinition UPDATE_PSC = new AttributeDefinition(20,"Update PSC"); //$NON-NLS-1$
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -43,10 +43,6 @@
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ResourceDescriptorID;
import com.metamatrix.common.config.api.ServiceComponentDefn;
@@ -136,7 +132,6 @@
configObjects.addAll(getComponentTypes().values());
- configObjects.addAll(getProductTypes());
configObjects.addAll(getResources());
@@ -363,20 +358,7 @@
return pools;
}
- public ProductType getProductType(String name) {
- if (BasicProductType.PRODUCT_TYPE.getName().equalsIgnoreCase(name)) {
- return BasicProductType.PRODUCT_TYPE;
- }
- return null;
- }
- public Collection<ProductType> getProductTypes() {
- Collection<ProductType> pts = new ArrayList<ProductType>(1);
- pts.add(BasicProductType.PRODUCT_TYPE);
- return pts;
- }
-
-
public SharedResource getResource(String resourceName) {
if (resources.containsKey(resourceName)) {
return (SharedResource) resources.get(resourceName);
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -164,25 +164,25 @@
* needed by the JDBC spi and maybe the import/export tool.
*/
- public static void setEnabled(ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfig psc, boolean enabled) {
- Assertion.isNotNull(serviceComponentDefnID);
- Assertion.isNotNull(psc);
+// public static void setEnabled(ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfig psc, boolean enabled) {
+// Assertion.isNotNull(serviceComponentDefnID);
+// Assertion.isNotNull(psc);
+//
+//
+// if (!psc.containsService(serviceComponentDefnID)) {
+// return;
+// }
+//
+// boolean oldEnabled = psc.isServiceEnabled(serviceComponentDefnID);
+// //if a change is not being made to the enabled value, this whole method
+// //will be essentially bypassed
+// if (enabled != oldEnabled){
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
+// basicPSC.setServiceEnabled(serviceComponentDefnID, enabled);
+//
+// } //end if enabled!= oldEnabled
+// }
-
- if (!psc.containsService(serviceComponentDefnID)) {
- return;
- }
-
- boolean oldEnabled = psc.isServiceEnabled(serviceComponentDefnID);
- //if a change is not being made to the enabled value, this whole method
- //will be essentially bypassed
- if (enabled != oldEnabled){
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- basicPSC.setServiceEnabled(serviceComponentDefnID, enabled);
-
- } //end if enabled!= oldEnabled
- }
-
public static Configuration addHostComponent(Configuration t, Host host) {
if (host == null) {
return t;
@@ -207,17 +207,17 @@
* ProductServiceConfiguration (and removed from any PSC it previously
* belonged to).
*/
- public static ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
- Assertion.isNotNull(psc);
- Assertion.isNotNull(serviceComponentDefnID);
+// public static ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
+// Assertion.isNotNull(psc);
+// Assertion.isNotNull(serviceComponentDefnID);
+//
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
+// basicPSC.addServiceComponentDefnID(serviceComponentDefnID);
+//
+// return basicPSC;
+// }
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- basicPSC.addServiceComponentDefnID(serviceComponentDefnID);
- return basicPSC;
- }
-
-
public static Configuration addComponentDefn( Configuration t, ComponentDefn defn) {
BasicConfiguration target = (BasicConfiguration) verifyTargetClass(t,BasicConfiguration.class);
target.addComponentDefn(defn);
@@ -259,15 +259,15 @@
return target;
}
- public static ProductServiceConfig resetServices(ProductServiceConfig psc) {
- Assertion.isNotNull(psc);
-
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- basicPSC.resetServices();
+// public static ProductServiceConfig resetServices(ProductServiceConfig psc) {
+// Assertion.isNotNull(psc);
+//
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
+// basicPSC.resetServices();
+//
+// return basicPSC;
+// }
- return basicPSC;
- }
-
@@ -330,16 +330,16 @@
BasicConfiguration basicConfig = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
- if (targetID instanceof ProductServiceConfigID) {
-
- if (ProductServiceConfigID.ALL_STANDARD_PSC_NAMES.contains(targetID.getName())){
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0070));
- }
-
- basicConfig.removeComponentObject( targetID);
- } else {
+// if (targetID instanceof ProductServiceConfigID) {
+//
+// if (ProductServiceConfigID.ALL_STANDARD_PSC_NAMES.contains(targetID.getName())){
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0070));
+// }
+//
+// basicConfig.removeComponentObject( targetID);
+// } else {
basicConfig.removeComponentObject( targetID);
- }
+ // }
return basicConfig;
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationVisitor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationVisitor.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationVisitor.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -36,28 +36,5 @@
abstract void visitComponent(ComponentType compType);
-
-// abstract void visitConfiguration(Configuration configuration);
-//
-// abstract void visitConfigurationInfo(ConfigurationInfo info);
-//
-// abstract void visitVMComponentDefn(VMComponentDefn defn);
-//
-// abstract void visitDeployedComponent(DeployedComponent deployedComponent);
-//
-// abstract void visitServiceComponentDefn(ServiceComponentDefn defn);
-//
-// abstract void visitConnectorComponent(ConnectorBinding connector);
-//
-// abstract void visitResourceDescriptor(ResourceDescriptor descriptor);
-//
-//
-// abstract void visitProductServiceConfig(ProductServiceConfig config);
-//
-// abstract void visitHost(Host host);
-//
-// abstract void visitComponentType(ComponentType compType);
-//
-
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ElementNames.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -70,21 +70,21 @@
* This is the class that represents the ProductServiceConfig Element which contains
* all of the XML elements that represent a ProductServiceConfig object.
*/
- public static class ProductServiceConfig {
-
- /**
- * This is the name of the ProductServiceConfig Element.
- */
- public static final String ELEMENT = "PSC"; //$NON-NLS-1$
-
- /**
- * This class defines the Attributes of the Element class that
- * contains it. Note that this class just inherits its attributes
- * from its configuration object superclass.
- */
- public static class Attributes extends ComponentObject.Attributes{
- }
- }
+// public static class ProductServiceConfig {
+//
+// /**
+// * This is the name of the ProductServiceConfig Element.
+// */
+// public static final String ELEMENT = "PSC"; //$NON-NLS-1$
+//
+// /**
+// * This class defines the Attributes of the Element class that
+// * contains it. Note that this class just inherits its attributes
+// * from its configuration object superclass.
+// */
+// public static class Attributes extends ComponentObject.Attributes{
+// }
+// }
/**
@@ -152,7 +152,7 @@
*/
public static class Attributes extends ComponentObject.Attributes{
public static final String HOST_ID = "HostID"; //$NON-NLS-1$
- public static final String PRODUCT_SERVICE_CONFIG_ID = "ProductServiceConfigID"; //$NON-NLS-1$
+ // public static final String PRODUCT_SERVICE_CONFIG_ID = "ProductServiceConfigID"; //$NON-NLS-1$
public static final String SERVICE_COMPONENT_DEFN_ID = "ServiceComponentDefnID"; //$NON-NLS-1$
public static final String VM_COMPONENT_DEFN_ID = "VMComponentDefnID"; //$NON-NLS-1$
}
@@ -388,50 +388,50 @@
* This is the class that represents the ProductServiceConfigs Element which contains
* all of the XML elements that represent a ProductServiceConfigs object.
*/
- public static class ProductServiceConfigs {
-
- /**
- * This is the name of the ProductServiceConfigs Element.
- */
- public static final String ELEMENT = "ProductServiceConfigs"; //$NON-NLS-1$
+// public static class ProductServiceConfigs {
+//
+// /**
+// * This is the name of the ProductServiceConfigs Element.
+// */
+// public static final String ELEMENT = "ProductServiceConfigs"; //$NON-NLS-1$
+//
+//
+// /**
+// * This is the class that represents the ProductServiceConfig Element which contains
+// * all of the XML elements that represent a ProductServiceConfig object.
+// */
+// public static class ProductServiceConfig {
+//
+//
+// /**
+// * This is the name of the ProductServiceConfig Element.
+// */
+// public static final String ELEMENT = "PSC"; //$NON-NLS-1$
+//
+// public static class Attributes extends ComponentObject.Attributes{
+// }
+// /**
+// * This class defines the Attributes of the Element class that
+// * contains it. Note that this class just inherits its attributes
+// * from its configuration object superclass.
+// */
+//
+// public static class Service {
+//
+// /**
+// * This is the name of the ServiceComponentDefn Element.
+// */
+// public static final String ELEMENT = "Service"; //$NON-NLS-1$
+//
+// public static class Attributes extends ComponentObject.Attributes{
+// public static final String IS_ENABLED = "IsEnabled"; //$NON-NLS-1$
+// }
+// }
+//
+// }
+// }
+//
-
- /**
- * This is the class that represents the ProductServiceConfig Element which contains
- * all of the XML elements that represent a ProductServiceConfig object.
- */
- public static class ProductServiceConfig {
-
-
- /**
- * This is the name of the ProductServiceConfig Element.
- */
- public static final String ELEMENT = "PSC"; //$NON-NLS-1$
-
- public static class Attributes extends ComponentObject.Attributes{
- }
- /**
- * This class defines the Attributes of the Element class that
- * contains it. Note that this class just inherits its attributes
- * from its configuration object superclass.
- */
-
- public static class Service {
-
- /**
- * This is the name of the ServiceComponentDefn Element.
- */
- public static final String ELEMENT = "Service"; //$NON-NLS-1$
-
- public static class Attributes extends ComponentObject.Attributes{
- public static final String IS_ENABLED = "IsEnabled"; //$NON-NLS-1$
- }
- }
-
- }
- }
-
-
/**
* This is the class that represents the ProductServiceConfigs Element which contains
* all of the XML elements that represent a ProductServiceConfigs object.
@@ -689,18 +689,18 @@
* This is the class that represents the ProductTypes Element which contains
* all of the XML elements that represent a ProductType object.
*/
- public static class ProductTypes {
- public static final String ELEMENT = "ProductTypes"; //$NON-NLS-1$
-
- /**
- * This is the class that represents the ProductType Element which contains
- * all of the XML elements that represent a ProductType object.
- * Note that it extends teh ComponentType element definition.
- */
- public static class ProductType extends ComponentTypes.ComponentType{
- public static final String ELEMENT = "ProductType"; //$NON-NLS-1$
- }
- }
+// public static class ProductTypes {
+// public static final String ELEMENT = "ProductTypes"; //$NON-NLS-1$
+//
+// /**
+// * This is the class that represents the ProductType Element which contains
+// * all of the XML elements that represent a ProductType object.
+// * Note that it extends teh ComponentType element definition.
+// */
+// public static class ProductType extends ComponentTypes.ComponentType{
+// public static final String ELEMENT = "ProductType"; //$NON-NLS-1$
+// }
+// }
/**
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -52,19 +52,17 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
import com.metamatrix.common.config.api.SharedResource;
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.config.api.VMComponentDefnID;
+import com.metamatrix.common.config.api.exceptions.InvalidConfigurationException;
import com.metamatrix.common.config.model.BasicComponentObject;
import com.metamatrix.common.config.model.BasicComponentType;
import com.metamatrix.common.config.model.BasicConfigurationObjectEditor;
+import com.metamatrix.common.config.model.BasicUtil;
import com.metamatrix.common.config.model.BasicVMComponentDefn;
import com.metamatrix.common.config.util.ConfigurationPropertyNames;
import com.metamatrix.common.config.util.InvalidConfigurationElementException;
@@ -1428,19 +1426,25 @@
String monitorable = element.getAttributeValue(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.MONITORABLE);
String description = element.getAttributeValue(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.DESCRIPTION);
+
+
+ // convert them into their proper data types
+ int typeCode = Integer.parseInt(componentTypeCode);
+
+ if (! BasicUtil.isValdComponentTypeCode(typeCode)) {
+ throw new RuntimeException("File error2, invalid component type code " + componentTypeCode + " for " + name + " super " + superType);
+ }
+
// we will use the passed in name unless it is null...
if (name == null) {
name = element.getAttributeValue(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.NAME);
}
- // convert them into their proper data types
- int typeCode = Integer.parseInt(componentTypeCode);
-
ComponentTypeID parentTypeID = null;
ComponentTypeID superTypeID = null;
if (parentType != null && parentType.length() > 0) {
- parentTypeID = new ProductTypeID(parentType);
+ parentTypeID = new ComponentTypeID(parentType);
}
if (superType !=null && superType.length() > 0) {
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -48,9 +48,6 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-//import com.metamatrix.common.config.api.ProductServiceConfig;
-//import com.metamatrix.common.config.api.ProductServiceConfigID;
-//import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -35,8 +35,6 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -49,8 +49,6 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
-//import com.metamatrix.common.config.api.ProductServiceConfig;
-//import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
@@ -98,26 +96,26 @@
* of lists from the segregateConfigurationObjects method.
*/
static final int CONFIGURATIONS_INDEX = 0;
- static final int PRODUCT_TYPES_INDEX = 1;
+// static final int PRODUCT_TYPES_INDEX = 1;
static final int HOSTS_INDEX = 2;
static final int DEPLOYED_COMPONENTS_INDEX = 3;
static final int SERVICE_COMPONENT_DEFNS_INDEX = 4;
static final int VM_COMPONENT_DEFNS_INDEX = 5;
static final int COMPONENT_TYPES_INDEX = 6;
- static final int PRODUCT_SERVICE_CONFIGS_INDEX = 7;
+ // static final int PRODUCT_SERVICE_CONFIGS_INDEX = 7;
static final int CONNECTION_POOL_CONFIGS_INDEX = 16;
static final int RESOURCES_INDEX = 18;
static final int CONNECTORS_INDEX = 19;
static final int CONFIGURATION_IDS_INDEX = 8;
- static final int PRODUCT_TYPE_IDS_INDEX = 9;
+// static final int PRODUCT_TYPE_IDS_INDEX = 9;
static final int HOST_IDS_INDEX = 10;
static final int DEPLOYED_COMPONENT_IDS_INDEX = 11;
static final int SERVICE_COMPONENT_DEFN_IDS_INDEX = 12;
static final int VM_COMPONENT_DEFN_IDS_INDEX = 13;
static final int COMPONENT_TYPE_IDS_INDEX = 14;
- static final int PRODUCT_SERVICE_CONFIG_IDS_INDEX = 15;
+// static final int PRODUCT_SERVICE_CONFIG_IDS_INDEX = 15;
// private static final int CONNECTION_POOL_CONFIG_IDS_INDEX = 17;
static final int CONNECTORS_IDS_INDEX = 20;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLElementNames.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -105,36 +105,36 @@
* This is the class that represents the ProductServiceConfigs Element which contains
* all of the XML elements that represent a ProductServiceConfigs object.
*/
- public static class ProductServiceConfigs {
+// public static class ProductServiceConfigs {
+//
+// /**
+// * This is the name of the ProductServiceConfigs Element.
+// */
+// public static final String ELEMENT = Configuration.ELEMENT + DELIMITER + "ProductServiceConfigs"; //$NON-NLS-1$
+//
+// /**
+// * This is the class that represents the ProductServiceConfig Element which contains
+// * all of the XML elements that represent a ProductServiceConfig object.
+// */
+// public static class ProductServiceConfig {
+//
+// /**
+// * This is the name of the ProductServiceConfig Element.
+// */
+// public static final String ELEMENT = "ProductServiceConfig"; //$NON-NLS-1$
+//
+// /**
+// * This class defines the Attributes of the Element class that
+// * contains it. Note that this class just inherits its attributes
+// * from its configuration object superclass.
+// */
+// public static class Attributes extends ComponentObject.Attributes{
+// public static final String IS_ENABLED = "IsEnabled"; //$NON-NLS-1$
+//
+// }
+// }
+// }
- /**
- * This is the name of the ProductServiceConfigs Element.
- */
- public static final String ELEMENT = Configuration.ELEMENT + DELIMITER + "ProductServiceConfigs"; //$NON-NLS-1$
-
- /**
- * This is the class that represents the ProductServiceConfig Element which contains
- * all of the XML elements that represent a ProductServiceConfig object.
- */
- public static class ProductServiceConfig {
-
- /**
- * This is the name of the ProductServiceConfig Element.
- */
- public static final String ELEMENT = "ProductServiceConfig"; //$NON-NLS-1$
-
- /**
- * This class defines the Attributes of the Element class that
- * contains it. Note that this class just inherits its attributes
- * from its configuration object superclass.
- */
- public static class Attributes extends ComponentObject.Attributes{
- public static final String IS_ENABLED = "IsEnabled"; //$NON-NLS-1$
-
- }
- }
- }
-
/**
* This is the class that represents the ServiceComponentDefns Element which contains
* all of the XML elements that represent a ServiceComponentDefns object.
@@ -228,7 +228,7 @@
*/
public static class Attributes extends ComponentObject.Attributes{
public static final String HOST_ID = "HostID"; //$NON-NLS-1$
- public static final String PRODUCT_SERVICE_CONFIG_ID = "ProductServiceConfigID"; //$NON-NLS-1$
+// public static final String PRODUCT_SERVICE_CONFIG_ID = "ProductServiceConfigID"; //$NON-NLS-1$
public static final String SERVICE_COMPONENT_DEFN_ID = "ServiceComponentDefnID"; //$NON-NLS-1$
public static final String VM_COMPONENT_DEFN_ID = "VMComponentDefnID"; //$NON-NLS-1$
}
@@ -280,22 +280,22 @@
* This is the class that represents the ProductServiceConfigID Element which contains
* all of the XML elements that represent a ProductServiceConfigID object.
*/
- public static final class ProductServiceConfigID{
+// public static final class ProductServiceConfigID{
+//
+// /**
+// * This is the name of the ProductServiceConfigID Element.
+// */
+// public static final String ELEMENT = "ProductServiceConfigID"; //$NON-NLS-1$
+//
+// /**
+// * This class defines the Attributes of the Element class that
+// * contains it. Note that this class just inherits its attributes
+// * from its configuration object superclass.
+// */
+// public static class Attributes extends ID.Attributes {
+// }
+// }
- /**
- * This is the name of the ProductServiceConfigID Element.
- */
- public static final String ELEMENT = "ProductServiceConfigID"; //$NON-NLS-1$
-
- /**
- * This class defines the Attributes of the Element class that
- * contains it. Note that this class just inherits its attributes
- * from its configuration object superclass.
- */
- public static class Attributes extends ID.Attributes {
- }
- }
-
/**
* This is the class that represents the VMComponentDefnID Element which contains
* all of the XML elements that represent a VMComponentDefnID object.
@@ -729,18 +729,18 @@
* This is the class that represents the ProductTypes Element which contains
* all of the XML elements that represent a ProductType object.
*/
- public static class ProductTypes {
- public static final String ELEMENT = "ProductTypes"; //$NON-NLS-1$
-
- /**
- * This is the class that represents the ProductType Element which contains
- * all of the XML elements that represent a ProductType object.
- * Note that it extends teh ComponentType element definition.
- */
- public static class ProductType extends ComponentTypes.ComponentType{
- public static final String ELEMENT = "ProductType"; //$NON-NLS-1$
- }
- }
+// public static class ProductTypes {
+// public static final String ELEMENT = "ProductTypes"; //$NON-NLS-1$
+//
+// /**
+// * This is the class that represents the ProductType Element which contains
+// * all of the XML elements that represent a ProductType object.
+// * Note that it extends teh ComponentType element definition.
+// */
+// public static class ProductType extends ComponentTypes.ComponentType{
+// public static final String ELEMENT = "ProductType"; //$NON-NLS-1$
+// }
+// }
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -33,7 +33,6 @@
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.log.LogConfiguration;
import com.metamatrix.common.queue.WorkerPoolStats;
-import com.metamatrix.platform.admin.api.runtime.PscID;
import com.metamatrix.platform.admin.api.runtime.SystemState;
import com.metamatrix.platform.service.api.ServiceID;
import com.metamatrix.platform.vm.controller.ProcessStatistics;
@@ -239,11 +238,11 @@
* @throws MetaMatrixComponentException
* if an error occurred in communicating with a component.
*/
- void startPSC(PscID pscID) throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException,
- MultipleException;
-
+// void startPSC(PscID pscID) throws AuthorizationException,
+// InvalidSessionException,
+// MetaMatrixComponentException,
+// MultipleException;
+//
/**
* Stop up all services in psc, waiting for work to complete.
*
@@ -256,10 +255,10 @@
* @throws MetaMatrixComponentException
* if an error occurred in communicating with a component.
*/
- void stopPSC(PscID pscID) throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException,
- MultipleException;
+// void stopPSC(PscID pscID) throws AuthorizationException,
+// InvalidSessionException,
+// MetaMatrixComponentException,
+// MultipleException;
/**
* Stop up all services in psc now.
@@ -273,10 +272,10 @@
* @throws MetaMatrixComponentException
* if an error occurred in communicating with a component.
*/
- void stopPSCNow(PscID pscID) throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException,
- MultipleException;
+// void stopPSCNow(PscID pscID) throws AuthorizationException,
+// InvalidSessionException,
+// MetaMatrixComponentException,
+// MultipleException;
/**
* Synchronize running services with runtime configuration.
@@ -404,11 +403,11 @@
* @throws MetaMatrixComponentException
* @since 4.2.1
*/
- PscID getPscIDByName(String hostName,
- String processName,
- String pscName) throws InvalidSessionException,
- AuthorizationException,
- MetaMatrixComponentException;
+// PscID getPscIDByName(String hostName,
+// String processName,
+// String pscName) throws InvalidSessionException,
+// AuthorizationException,
+// MetaMatrixComponentException;
/**
* Return the ServiceID by Name
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PSCData.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PSCData.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PSCData.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.platform.admin.api.runtime;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-
-
-/**
- * This class is a container for ServiceRegistryBinding objects for
- * all the services running in this VM
- */
-public class PSCData extends ComponentData {
-
- /** Collection of serviceData objects */
- private Collection services;
-
- /** defines vm in configuration */
- private PscID pscID;
-
- /**
- * Create a new instance of VMRegistryBinding.
- *
- * @param pscID Identifies PSC
- * @param services Collection of ServiceData objects
- * @param processName Name of process psc is running on
- */
- public PSCData(ProductServiceConfigID pscConfigID, Collection services, String processName) {
- super(pscConfigID.getName(), false, false);
- this.pscID = new PscID(pscConfigID, processName);
- this.services = services;
-
- // set deployed and registered flags.
- // since a psc is not a deployable or registerable object
- // then set based on services in psc
- boolean deployed = false;
- boolean registered = false;
- Iterator iter = services.iterator();
- while (iter.hasNext()) {
- ServiceData sd = (ServiceData) iter.next();
- if (sd.isDeployed()) {
- deployed = true;
- }
- if (sd.isRegistered()) {
- registered = true;
- }
- if (deployed & registered) {
- break;
- }
- }
- this.deployed = deployed;
- this.registered = registered;
- }
-
- /**
- * Return a list of all ServiceData objects
- *
- * @return List of ServiceData objects
- */
- public Collection getServices() {
-
- return services;
- }
-
- public PscID getPscID() {
- return pscID;
- }
-
- public String getProcessName() {
- return pscID.getProcessName();
- }
-
- /**
- * Returns true if the specified object is semantically equal to this instance.
- * <p>
- * @param obj the object that this instance is to be compared to.
- * @return whether the object is equal to this object.
- */
- public boolean equals(Object obj) {
-
- // Check if instances are identical ...
- if ( this == obj ) {
- return true;
- }
-
- // Check if object can be compared to this one
- if ( obj instanceof PSCData ) {
-
- PSCData that = (PSCData) obj;
- return pscID.equals(that.getPscID());
- }
-
- // Otherwise not comparable ...
- return false;
- }
-}
-
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ProcessData.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ProcessData.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ProcessData.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -23,6 +23,7 @@
package com.metamatrix.platform.admin.api.runtime;
import java.util.Collection;
+import java.util.Iterator;
import com.metamatrix.common.config.api.ComponentDefnID;
import com.metamatrix.core.util.HashCodeUtil;
@@ -33,8 +34,8 @@
*/
public class ProcessData extends ComponentData {
- /** Map of ServiceID to ServiceRegistryBindings */
- private Collection pscs;
+ /** Collection of serviceData objects */
+ private Collection services;
/** defines vm in configuration */
private ComponentDefnID defnID;
@@ -51,20 +52,24 @@
* @param vmController VMController implementation
* @param hostName Name of host VM is running on
*/
- public ProcessData(String hostName, String processName, String port, ComponentDefnID defnID, Collection pscs, boolean deployed, boolean registered) {
+ public ProcessData(String hostName, String processName, String port, ComponentDefnID defnID, Collection services, boolean deployed, boolean registered) {
super(processName, deployed, registered);
this.hostName = hostName;
this.defnID = defnID;
- this.pscs = pscs;
+ this.services = services;
this.port = port;
+
computeHashCode();
}
/**
- * Return a collection of PSCData objects.
+ * Return a list of all ServiceData objects
+ *
+ * @return List of ServiceData objects
*/
- public Collection getPSCs() {
- return pscs;
+ public Collection getServices() {
+
+ return services;
}
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PscID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PscID.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/PscID.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.platform.admin.api.runtime;
-
-import java.io.Serializable;
-
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.core.util.HashCodeUtil;
-
-
-/**
- * This class is a container for ServiceRegistryBinding objects for
- * all the services running in this VM
- */
-public class PscID implements Serializable {
-
- /** defines psc in configuration */
- private ProductServiceConfigID pscConfigID;
-
- /** Name of process that owns this psc */
- private String processName;
-
- private int hashCode;
-
- /**
- * Create a new instance of PscID.
- *
- * @param pscConfigID Identifies PSC
- * @param processName Name of process psc is running on
- */
- public PscID(ProductServiceConfigID pscConfigID, String processName) {
- this.pscConfigID = pscConfigID;
- this.processName = processName;
- computeHashCode();
- }
-
- public ProductServiceConfigID getPscConfigID() {
- return pscConfigID;
- }
-
- public String getProcessName() {
- return this.processName;
- }
-
- private void computeHashCode() {
- hashCode = pscConfigID.hashCode();
- hashCode = HashCodeUtil.hashCode(hashCode, processName.hashCode());
- }
-
- /**
- * Returns true if the specified object is semantically equal to this instance.
- * <p>
- * @param obj the object that this instance is to be compared to.
- * @return whether the object is equal to this object.
- */
- public boolean equals(Object obj) {
-
- // Check if instances are identical ...
- if ( this == obj ) {
- return true;
- }
-
- // Check if object can be compared to this one
- if ( obj instanceof PscID ) {
-
- PscID that = (PscID) obj;
- return ((pscConfigID.equals(that.getPscConfigID())) & (processName.equals(that.getProcessName())));
- }
-
- // Otherwise not comparable ...
- return false;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- result.append("PSC:"); //$NON-NLS-1$
- result.append(pscConfigID.getFullName());
- result.append(processName);
- return result.toString();
- }
-}
-
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemState.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemState.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/SystemState.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -86,11 +86,7 @@
Iterator processes = hData.getProcesses().iterator();
while (processes.hasNext()) {
ProcessData pData = (ProcessData) processes.next();
- Iterator pscs = pData.getPSCs().iterator();
- while (pscs.hasNext()) {
- PSCData pscData = (PSCData) pscs.next();
- services.addAll(pscData.getServices());
- }
+ services.addAll(pData.getServices());
}
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/vdb/runtime/BasicVDBDefn.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/vdb/runtime/BasicVDBDefn.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/vdb/runtime/BasicVDBDefn.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -33,7 +33,7 @@
import com.metamatrix.common.config.api.ComponentType;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.util.ConfigUtil;
+import com.metamatrix.common.config.model.BasicUtil;
import com.metamatrix.common.vdb.api.ModelInfo;
import com.metamatrix.common.vdb.api.VDBDefn;
import com.metamatrix.common.vdb.api.VDBStream;
@@ -160,7 +160,7 @@
}
// rename the binding and add it back
- ConnectorBinding newcb = ConfigUtil.getEditor().createConnectorComponent(cb.getConfigurationID(), cb, newBindingName, cb.getRoutingUUID());
+ ConnectorBinding newcb = BasicUtil.getEditor().createConnectorComponent(cb.getConfigurationID(), cb, newBindingName, cb.getRoutingUUID());
addConnectorBinding(newcb);
}
Modified: branches/remove_psc/common-internal/src/test/java/com/metamatrix/common/config/xml/TestXMLConfigurationImportExportUtility.java
===================================================================
--- branches/remove_psc/common-internal/src/test/java/com/metamatrix/common/config/xml/TestXMLConfigurationImportExportUtility.java 2009-04-09 23:31:26 UTC (rev 744)
+++ branches/remove_psc/common-internal/src/test/java/com/metamatrix/common/config/xml/TestXMLConfigurationImportExportUtility.java 2009-04-10 03:06:06 UTC (rev 745)
@@ -25,18 +25,27 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.Collection;
import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import junit.framework.TestCase;
+import com.metamatrix.common.config.api.Configuration;
+import com.metamatrix.common.config.api.ConfigurationID;
+import com.metamatrix.common.config.api.ConfigurationModelContainer;
+import com.metamatrix.common.config.api.ConfigurationObjectEditor;
import com.metamatrix.common.config.api.ConnectorArchive;
import com.metamatrix.common.config.api.ConnectorBindingType;
import com.metamatrix.common.config.api.ExtensionModule;
+import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.config.model.BasicConfigurationObjectEditor;
import com.metamatrix.common.config.model.BasicConnectorArchive;
import com.metamatrix.common.config.model.BasicExtensionModule;
+import com.metamatrix.common.config.model.ConfigurationModelContainerAdapter;
+import com.metamatrix.common.config.model.ConfigurationModelContainerImpl;
import com.metamatrix.common.util.ByteArrayHelper;
import com.metamatrix.core.util.FileUtils;
import com.metamatrix.core.util.UnitTestUtil;
@@ -329,4 +338,40 @@
// pass
}
}
+
+ public void testImportExportConfig() throws Exception {
+
+ String fileToImport = UnitTestUtil.getTestDataPath()+"/config-original.xml"; //$NON-NLS-1$
+
+ ConfigurationModelContainerAdapter cma = new ConfigurationModelContainerAdapter();
+
+ ConfigurationModelContainer configModel = cma.readConfigurationModel(fileToImport, Configuration.NEXT_STARTUP_ID);
+
+ if (configModel.getHosts().size() != 1) {
+ fail("Didnt find 1 hosts");
+ }
+
+ if (configModel.getConfiguration().getVMComponentDefns().size() != 1) {
+ fail("Didnt find 1 vm");
+ }
+
+ VMComponentDefn vm = (VMComponentDefn) configModel.getConfiguration().getVMComponentDefns().iterator().next();
+
+ Collection depsvcs = configModel.getConfiguration().getDeployedServicesForVM(vm);
+
+ if (depsvcs == null || depsvcs.size() != 6) {
+ fail("Didnt find 6 deployed services for VM " + vm.getName());
+ }
+
+ String fileToExport = UnitTestUtil.getTestScratchPath() + ("/exported_config.xml");
+
+ cma.writeConfigurationModel(fileToExport, configModel, "TestCase");
+
+
+ // try reloading what was written to confirm
+ configModel = cma.readConfigurationModel(fileToExport, Configuration.NEXT_STARTUP_ID);
+
+
+
+ }
}
Added: branches/remove_psc/common-internal/src/test/resources/config-original.xml
===================================================================
--- branches/remove_psc/common-internal/src/test/resources/config-original.xml (rev 0)
+++ branches/remove_psc/common-internal/src/test/resources/config-original.xml 2009-04-10 03:06:06 UTC (rev 745)
@@ -0,0 +1,720 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ConfigurationDocument>
+ <Header>
+ <ApplicationCreatedBy>ConfigurationAdministration</ApplicationCreatedBy>
+ <ApplicationVersionCreatedBy>4.2</ApplicationVersionCreatedBy>
+ <UserCreatedBy>Configuration</UserCreatedBy>
+ <ConfigurationVersion>4.2</ConfigurationVersion>
+ <MetaMatrixSystemVersion>4.2</MetaMatrixSystemVersion>
+ <Time>2004-06-30T12:23:53.919-06:00</Time>
+ </Header>
+ <Configuration Name="Next Startup" ComponentType="Configuration" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.server.metadata.systemURL">extensionjar:System.vdb</Property>
+ <Property Name="metamatrix.server.extensionTypesToCache">JAR File</Property>
+ <Property Name="metamatrix.server.procDebug">false</Property>
+ <Property Name="metamatrix.server.cacheConnectorClassLoaders">true</Property>
+ <Property Name="metamatrix.server.streamingBatchSize">100</Property>
+ <Property Name="metamatrix.server.serviceMonitorInterval">60</Property>
+ <Property Name="metamatrix.session.max.connections">0</Property>
+ <Property Name="metamatrix.session.time.limit">0</Property>
+ <Property Name="metamatrix.session.sessionMonitor.ActivityInterval">5</Property>
+ <Property Name="metamatrix.audit.jdbcTable">AUDITENTRIES</Property>
+ <Property Name="metamatrix.audit.threadTTL">600000</Property>
+ <Property Name="metamatrix.audit.fileFormat">com.metamatrix.platform.security.audit.format.DelimitedAuditMessageFormat</Property>
+ <Property Name="metamatrix.audit.jdbcResourceDelim">;</Property>
+ <Property Name="metamatrix.audit.jdbcDatabase">false</Property>
+ <Property Name="metamatrix.audit.console">false</Property>
+ <Property Name="metamatrix.audit.jdbcMaxContextLength">64</Property>
+ <Property Name="metamatrix.audit.fileAppend">false</Property>
+ <Property Name="metamatrix.audit.enabled">false</Property>
+ <Property Name="metamatrix.audit.consoleFormat">com.metamatrix.platform.security.audit.format.ReadableAuditMessageFormat</Property>
+ <Property Name="metamatrix.audit.jdbcMaxResourceLength">4000</Property>
+ <Property Name="metamatrix.authorization.dataaccess.CheckingEnabled">false</Property>
+ <Property Name="metamatrix.authorization.metabase.CheckingEnabled">false</Property>
+ <Property Name="metamatrix.deployment.platform">standalone</Property>
+ <Property Name="metamatrix.encryption.client">true</Property>
+ <Property Name="metamatrix.encryption.secure.sockets">false</Property>
+ <Property Name="metamatrix.log.consoleFormat">com.metamatrix.common.log.format.ReadableLogMessageFormat</Property>
+ <Property Name="metamatrix.log.console">true</Property>
+ <Property Name="metamatrix.log.jdbcTable">LOGENTRIES</Property>
+ <Property Name="metamatrix.log.jdbcMaxContextLength">64</Property>
+ <Property Name="metamatrix.log.jdbcMaxExceptionLength">4000</Property>
+ <Property Name="metamatrix.log.jdbcMaxLength">2000</Property>
+ <Property Name="metamatrix.log.maxRows">2500</Property>
+ <Property Name="metamatrix.log.size.limit.kbs">1000</Property>
+ <Property Name="metamatrix.log.size.monitor.mins">60</Property>
+ <Property Name="metamatrix.log">4</Property>
+ <Property Name="metamatrix.log.jdbcDatabase.enabled">true</Property>
+ <Property Name="metamatrix.buffer.memoryAvailable">500</Property>
+ <Property Name="metamatrix.buffer.sessionUsePercentage">80</Property>
+ <Property Name="metamatrix.buffer.activeMemoryThreshold">90</Property>
+ <Property Name="metamatrix.buffer.managementInterval">1000</Property>
+ <Property Name="metamatrix.buffer.connectorBatchSize">2000</Property>
+ <Property Name="metamatrix.buffer.processorBatchSize">2000</Property>
+ <Property Name="metamatrix.buffer.maxOpenFiles">10</Property>
+ <Property Name="metamatrix.buffer.maxFileSize">2048</Property>
+ <Property Name="metamatrix.buffer.logStatsInterval">0</Property>
+ <Property Name="metamatrix.transaction.log.storeMMCMD">false</Property>
+ <Property Name="metamatrix.transaction.log.storeSRCCMD">false</Property>
+ <Property Name="vm.starter.maxThreads">5</Property>
+ <Property Name="vm.starter.timetolive">30000</Property>
+ </Properties>
+ <Host Name="localhost" ComponentType="Host" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Process Name="MMProcess" ComponentType="VM" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="vm.starter.cmd.java_opts">-server -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=${metamatrix.host.dir}/data/tmp -ms${vm.starter.minHeapSize}m -mx${vm.starter.maxHeapSize}m</Property>
+ <Property Name="vm.starter.maxHeapSize">1024</Property>
+ <Property Name="vm.starter.minHeapSize">256</Property>
+ <Property Name="vm.socketPort">(vm.port)</Property>
+ <Property Name="vm.maxThreads">64</Property>
+ <Property Name="vm.timetolive">30000</Property>
+ <Property Name="vm.minPort">0</Property>
+ <Property Name="vm.inputBufferSize">102400</Property>
+ <Property Name="vm.outputBufferSize">102400</Property>
+ <Property Name="vm.enabled">true</Property>
+ <Property Name="vm.forced.shutdown.time">30</Property>
+ </Properties>
+ <Service Name="MembershipService" ComponentType="MembershipService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ <Service Name="SessionService" ComponentType="SessionService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ <Service Name="AuthorizationService" ComponentType="AuthorizationService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ <Service Name="ConfigurationService" ComponentType="ConfigurationService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ <Service Name="QueryService" ComponentType="QueryService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ <Service Name="RuntimeMetadataService" ComponentType="RuntimeMetadataService" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup" />
+ </Process>
+ </Host>
+ </Configuration>
+ <Services>
+ <Service Name="RuntimeMetadataService" ComponentType="RuntimeMetadataService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="ConnectorClass">com.metamatrix.connector.metadata.IndexConnector</Property>
+ <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
+ <Property Name="metamatrix.service.essentialservice">true</Property>
+ <Property Name="ConnectorMaxThreads">20</Property>
+ <Property Name="ConnectorThreadTTL">120000</Property>
+ <Property Name="MaxResultRows">0</Property>
+ <Property Name="ExceptionOnMaxRows">true</Property>
+ <Property Name="Immutable">true</Property>
+ </Properties>
+ </Service>
+ <Service Name="MembershipService" ComponentType="MembershipService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="security.membership.admin.username">(admin.username)</Property>
+ <Property Name="security.membership.admin.password">(admin.password)</Property>
+ <Property Name="metamatrix.service.essentialservice">true</Property>
+ <Property Name="security.membership.DomainOrder">
+ </Property>
+ <Property Name="ServiceClassName">com.metamatrix.platform.security.membership.service.MembershipServiceImpl</Property>
+ </Properties>
+ </Service>
+ <Service Name="ODBCService" ComponentType="ODBCService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ServiceClassName">com.metamatrix.odbc.ODBCServiceImpl</Property>
+ <Property Name="Openrdaloc">odbc/MMODBC.ini</Property>
+ <Property Name="ServerKey">license/oaserverkey.lic</Property>
+ </Properties>
+ </Service>
+ <Service Name="ConfigurationService" ComponentType="ConfigurationService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.service.essentialservice">true</Property>
+ <Property Name="ServiceClassName">com.metamatrix.platform.config.service.ConfigurationServiceImpl</Property>
+ </Properties>
+ </Service>
+ <Service Name="AuthorizationService" ComponentType="AuthorizationService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.service.essentialservice">true</Property>
+ <Property Name="security.authorization.connection.Retries">4</Property>
+ <Property Name="ServiceClassName">com.metamatrix.platform.security.authorization.service.AuthorizationServiceImpl</Property>
+ </Properties>
+ </Service>
+ <Service Name="SessionService" ComponentType="SessionService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="security.session.terminationHandlers">com.metamatrix.server.util.DataServerSessionTerminationHandler</Property>
+ <Property Name="metamatrix.service.essentialservice">true</Property>
+ <Property Name="ServiceClassName">com.metamatrix.platform.security.session.service.SessionServiceImpl</Property>
+ </Properties>
+ </Service>
+ <Service Name="QueryService" ComponentType="QueryService" QueuedService="false" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ProcessPoolMaxThreads">64</Property>
+ <Property Name="ProcessPoolThreadTTL">120000</Property>
+ <Property Name="ServiceClassName">com.metamatrix.server.query.service.QueryService</Property>
+ <Property Name="ProcessorTimeslice">2000</Property>
+ <Property Name="MaxCodeTables">50</Property>
+ <Property Name="MaxCodeTableRecords">10000</Property>
+ <Property Name="MinFetchSize">100</Property>
+ <Property Name="MaxFetchSize">20000</Property>
+ <Property Name="ResultSetCacheEnabled">0</Property>
+ <Property Name="ResultSetCacheMaxSize">0</Property>
+ <Property Name="ResultSetCacheMaxAge">0</Property>
+ <Property Name="ResultSetCacheScope">vdb</Property>
+ <Property Name="MaxPlanCacheSize">100</Property>
+ </Properties>
+ </Service>
+ </Services>
+ <ComponentTypes>
+ <ComponentType Name="Service" ComponentTypeCode="1" Deployable="false" Deprecated="false" Monitorable="false" ParentComponentType="VM" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.943-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.943-06:00">
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" Multiplicity="1" IsHidden="true" />
+ </ComponentType>
+ <ComponentType Name="Host" ComponentTypeCode="7" Deployable="true" Deprecated="false" Monitorable="false" ParentComponentType="Configuration" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.950-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.950-06:00">
+ </ComponentType>
+ <ComponentType Name="DeployedComponent" ComponentTypeCode="8" Deployable="false" Deprecated="false" Monitorable="false" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.970-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.970-06:00" />
+ <ComponentType Name="VM" ComponentTypeCode="5" Deployable="true" Deprecated="false" Monitorable="false" ParentComponentType="Host" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.944-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.944-06:00">
+ <PropertyDefinition Name="vm.starter.cmd.java_opts" DisplayName="Java Options" ShortDescription="These are the java options passed in before the main class" DefaultValue="-server -Djava.io.tmpdir=${metamatrix.host.dir}/data/tmp -ms${vm.starter.minHeapSize}m -mx${vm.starter.maxHeapSize}m" />
+ <PropertyDefinition Name="vm.enabled" DisplayName="Start Enabled Flag" ShortDescription="The enabled flag allows for disabling the VM from starting without have to remove it from deployment." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="vm.timetolive" DisplayName="Socket Worker Thread Time-To-Live (ms)" ShortDescription="Time-to-live (in milliseconds) for threads used to do work on client requests." DefaultValue="30000" />
+ <PropertyDefinition Name="vm.starter.maxHeapSize" DisplayName="Maximum Heap Size (MB)" ShortDescription="The maximum heap size, in megabytes, to be used for this VM. If no value is provided for this property, the default property value from the configuration is used; if no value is specified anywhere, no maximum heap size will be set." DefaultValue="1024" IsPreferred="true" />
+ <PropertyDefinition Name="vm.minPort" DisplayName="Min Port Number" ShortDescription="Min port number" DefaultValue="0" />
+ <PropertyDefinition Name="vm.maxThreads" DisplayName="Max Threads" ShortDescription="Maximum socket listener threads." DefaultValue="64" />
+ <PropertyDefinition Name="vm.bind.address" DisplayName="VM Bind Address" ShortDescription="The bind address, when specified determines what address the vm will be bound to." DefaultValue="" IsHidden="true" IsModifiable="false" />
+ <PropertyDefinition Name="vm.starter.minHeapSize" DisplayName="Minimum Heap Size (MB)" ShortDescription="The minimum heap size, in megabytes, to be used for this VM. If no value is provided for this property, the default property value from the configuration is used; if no value is specified anywhere, no minimum heap size will be set." DefaultValue="256" IsPreferred="true" />
+ <PropertyDefinition Name="vm.inputBufferSize" DisplayName="Socket Input BufferSize" ShortDescription="The size of socket buffer used when reading." DefaultValue="0" Multiplicity="1" PropertyType="Integer" IsConstrainedToAllowedValues="false" />
+ <PropertyDefinition Name="vm.socketPort" DisplayName="Socket Port" ShortDescription="The port number for the process when socket communications are being used " DefaultValue="31000" />
+ <PropertyDefinition Name="vm.forced.shutdown.time" DisplayName="VM Forced Shutdown Time (secs)" ShortDescription="The the number of seconds the VM will wait until it will perform a force shutdown." DefaultValue="30" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="vm.outputBufferSize" DisplayName="Socket Output BufferSize" ShortDescription="The size of the socket buffer used when writing." DefaultValue="0" Multiplicity="1" PropertyType="Integer" IsConstrainedToAllowedValues="false" />
+ </ComponentType>
+ <ComponentType Name="AuthorizationService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Service" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.957-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.957-06:00">
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.security.authorization.service.AuthorizationServiceImpl" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="security.authorization.connection.MaximumAge" DisplayName="Maximum connection time (milliseconds)" ShortDescription="" DefaultValue="600000" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="security.authorization.connection.MaximumConcurrentReaders" DisplayName="Maximum allowed concurrent users" ShortDescription="" DefaultValue="1" PropertyType="Integer" />
+ <PropertyDefinition Name="security.authorization.connection.Retries" DisplayName="Authorization proxy maximum retries" ShortDescription="" DefaultValue="4" Multiplicity="1" PropertyType="Integer" />
+ </ComponentType>
+ <ComponentType Name="SessionService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Service" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.955-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.955-06:00">
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="security.session.terminationHandlers" DisplayName="List of TerminationHandler Class Names" ShortDescription="" DefaultValue="com.metamatrix.server.util.DataServerSessionTerminationHandler" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.security.session.service.SessionServiceImpl" Multiplicity="1" IsHidden="true" />
+ </ComponentType>
+ <ComponentType Name="File Membership Domain Provider" ComponentTypeCode="11" Deployable="false" Deprecated="false" Monitorable="false" SuperComponentType="ResourceType" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.947-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.947-06:00">
+ <PropertyDefinition Name="activate" DisplayName="Enabled" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="usersFile" DisplayName="Users File" ShortDescription="Location of the properties file containing user name and password entries." Multiplicity="1" />
+ <PropertyDefinition Name="AuthDomainClass" DisplayName="Membership Domain Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.security.membership.spi.file.FileMembershipDomain" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="groupsFile" DisplayName="Groups File" ShortDescription="Location of the properties file containing group assignments." Multiplicity="1" />
+ <PropertyDefinition Name="checkPassword" DisplayName="Check Password" ShortDescription="Check passwords against the users file." DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="Miscellaneous Resource Type" ComponentTypeCode="4" Deployable="false" Deprecated="false" Monitorable="false" SuperComponentType="ResourceType" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.949-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.949-06:00" />
+ <ComponentType Name="QueryService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="true" SuperComponentType="Service" ParentComponentType="Integration Server" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.956-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.957-06:00">
+ <PropertyDefinition Name="MaxCodeTables" DisplayName="Max Code Tables" ShortDescription="Max Number of Code Tables" DefaultValue="50" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="MaxCodeTableRecords" DisplayName="Max Code Table Records" ShortDescription="Max Number of Records Per Code Table" DefaultValue="10000" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="ResultSetCacheMaxAge" DisplayName="ResultSet Cache Maximum Age (milliseconds)" ShortDescription="" DefaultValue="0" PropertyType="Long" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ProcessPoolMaxThreads" DisplayName="Process Pool Maximum Thread Count" ShortDescription="" DefaultValue="64" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ResultSetCacheScope" DisplayName="ResultSet Cache Scope" ShortDescription="" DefaultValue="vdb">
+ <AllowedValue>vdb</AllowedValue>
+ <AllowedValue>session</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="ResultSetCacheEnabled" DisplayName="ResultSet Cache Enabled" ShortDescription="" DefaultValue="false" PropertyType="Boolean" />
+ <PropertyDefinition Name="MinFetchSize" DisplayName="Minimum Fetch Size (rows)" ShortDescription="" DefaultValue="100" PropertyType="Integer" />
+ <PropertyDefinition Name="MaxFetchSize" DisplayName="Maximum Fetch Size (rows)" ShortDescription="" DefaultValue="20000" PropertyType="Integer" />
+ <PropertyDefinition Name="ProcessPoolThreadTTL" DisplayName="Process Pool Thread Time-To-Live (milliseconds)" ShortDescription="" DefaultValue="120000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="MaxPlanCacheSize" DisplayName="Maximum Plan Cache" ShortDescription="Maximum number of plans in the cache" DefaultValue="100" PropertyType="Integer" />
+ <PropertyDefinition Name="ProcessorTimeslice" DisplayName="Query Processor Timeslice (milliseconds)" ShortDescription="" DefaultValue="2000" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="0" PropertyType="Integer" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.server.query.service.QueryService" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ </ComponentType>
+ <ComponentType Name="MembershipService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Service" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.958-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.958-06:00">
+ <PropertyDefinition Name="security.membership.DomainOrder" DisplayName="Membership Domain Order" ShortDescription="" DefaultValue="JDBCInternalDomain" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="security.membership.admin.username" DisplayName="Admin Account Username" ShortDescription="" DefaultValue="MetaMatrixAdmin" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.security.membership.service.MembershipServiceImpl" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="security.membership.security.enabled" DisplayName="Security Enabled" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsHidden="true" />
+ <PropertyDefinition Name="security.membership.admin.password" DisplayName="Admin Account Password" ShortDescription="" Multiplicity="1" IsHidden="true" IsMasked="true" />
+ </ComponentType>
+ <ComponentType Name="ResourceType" ComponentTypeCode="0" Deployable="false" Deprecated="false" Monitorable="false" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.948-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.948-06:00" />
+ <ComponentType Name="ODBCService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Service" ParentComponentType="Integration Server" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.958-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.958-06:00">
+ <PropertyDefinition Name="IntervalToCheckServiceState" DisplayName="ODBC Service Interval Check (secs)" ShortDescription="This property controls the interval for checking for the ODBC service state (seconds)." DefaultValue="120" Multiplicity="1" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ServerKey" DisplayName="ODBC Server License File" ShortDescription="The location the ODBC Server license should be found" DefaultValue="license/oaserverkey.lic" Multiplicity="1" IsConstrainedToAllowedValues="false" IsModifiable="false" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.odbc.ODBCServiceImpl" Multiplicity="1" IsHidden="true" IsModifiable="false" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="Openrdaloc" DisplayName="MMODBC.ini file location" ShortDescription="The location the MMODBC.ini should be found" DefaultValue="odbc/MMODBC.ini" Multiplicity="1" IsConstrainedToAllowedValues="false" IsModifiable="false" />
+ </ComponentType>
+ <ComponentType Name="RuntimeMetadataService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="true" SuperComponentType="Service" ParentComponentType="Integration Server" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.944-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.944-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="" Multiplicity="1" />
+ <PropertyDefinition Name="ExceptionOnMaxRows" DisplayName="Exception on Exceeding Max Rows" ShortDescription="Indicates if an Exception should be thrown if the specified value for Maximum Result Rows is exceeded; else no exception and no more than the maximum will be returned" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="ResultSetCacheMaxAge" DisplayName="ResultSet Cache Maximum Age (milliseconds)" ShortDescription="" DefaultValue="0" PropertyType="Long" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ResultSetCacheScope" DisplayName="ResultSet Cache Scope" ShortDescription="" DefaultValue="vdb">
+ <AllowedValue>vdb</AllowedValue>
+ <AllowedValue>session</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ResultSetCacheEnabled" DisplayName="ResultSet Cache Enabled" ShortDescription="" DefaultValue="false" PropertyType="Boolean" />
+ <PropertyDefinition Name="ConnectorMaxThreads" DisplayName="Connector Maximum Thread Count" ShortDescription="" DefaultValue="20" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="0" PropertyType="Integer" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.server.connector.service.ConnectorService" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorThreadTTL" DisplayName="Thread Time to live (milliseconds)" ShortDescription="" DefaultValue="120000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="MaxResultRows" DisplayName="Maximum Result Rows" ShortDescription="" DefaultValue="0" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="ConfigurationService" ComponentTypeCode="1" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Service" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.970-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.970-06:00">
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Configuration Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.config.service.ConfigurationServiceImpl" Multiplicity="1" IsHidden="true" />
+ </ComponentType>
+ <ComponentType Name="Connector" ComponentTypeCode="2" Deployable="false" Deprecated="false" Monitorable="true" SuperComponentType="Service" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.916-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.916-06:00">
+ <PropertyDefinition Name="SourceConnectionTestInterval" DisplayName="Data Source Test Connect Interval (seconds)" ShortDescription="How often (in seconds) to create test connections to the underlying datasource to see if it is available." DefaultValue="600" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system)" Multiplicity="0..1" IsExpert="true" />
+ <PropertyDefinition Name="ExceptionOnMaxRows" DisplayName="Exception on Exceeding Max Rows" ShortDescription="Indicates if an Exception should be thrown if the specified value for Maximum Result Rows is exceeded; else no exception and no more than the maximum will be returned" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ServiceMonitoringEnabled" DisplayName="Data Source Monitoring Enabled" ShortDescription="Whether to monitor the underlying data source to see if it is available." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" ISExpert="true" />
+ <PropertyDefinition Name="Immutable" DisplayName="Is Immutable" ShortDescription="True if the source never changes." DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorMaxThreads" DisplayName="Connector Maximum Thread Count" ShortDescription="" DefaultValue="20" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="ServiceClassName" DisplayName="Service Class Name" ShortDescription="" DefaultValue="com.metamatrix.server.connector.service.ConnectorService" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="MaxResultRows" DisplayName="Maximum Result Rows" ShortDescription="" DefaultValue="10000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorThreadTTL" DisplayName="Thread Time to live (milliseconds)" ShortDescription="" DefaultValue="120000" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="ResultSetCacheMaxAge" DisplayName="ResultSet Cache Maximum Age (milliseconds)" ShortDescription="" DefaultValue="0" PropertyType="Long" IsExpert="true" />
+ <PropertyDefinition Name="ResultSetCacheScope" DisplayName="ResultSet Cache Scope" ShortDescription="" DefaultValue="vdb" IsExpert="true">
+ <AllowedValue>vdb</AllowedValue>
+ <AllowedValue>session</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="supportsAndCriteria" DisplayName="supportsAndCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteria" DisplayName="supportsCompareCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaEquals" DisplayName="supportsCompareCriteriaEquals" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaGreaterThan" DisplayName="supportsCompareCriteriaGreaterThan" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaGreaterThanOrEqual" DisplayName="supportsCompareCriteriaGreaterThanOrEqual" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaLessThan" DisplayName="supportsCompareCriteriaLessThan" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaLessThanOrEqual" DisplayName="supportsCompareCriteriaLessThanOrEqual" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCompareCriteriaNotEquals" DisplayName="supportsCompareCriteriaNotEquals" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCriteria" DisplayName="supportsCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsInCriteria" DisplayName="supportsInCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsIsNullCriteria" DisplayName="supportsIsNullCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsJoins" DisplayName="supportsJoins" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsLikeCriteria" DisplayName="supportsLikeCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsNotCriteria" DisplayName="supportsNotCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsOrCriteria" DisplayName="supportsOrCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSelectDistinct" DisplayName="supportsSelectDistinct" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSelectLiterals" DisplayName="supportsSelectLiterals" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAliasedGroup" DisplayName="supportsAliasedGroup" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSelfJoins" DisplayName="supportsSelfJoins" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsOuterJoins" DisplayName="supportsOuterJoins" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsFullOuterJoins" DisplayName="supportsFullOuterJoins" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsBetweenCriteria" DisplayName="supportsBetweenCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsLikeCriteriaEscapeCharacter" DisplayName="supportsLikeCriteriaEscapeCharacter" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsInCriteriaSubquery" DisplayName="supportsInCriteriaSubquery" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsExistsCriteria" DisplayName="supportsExistsCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsQuantifiedCompareCriteria" DisplayName="supportsQuantifiedCompareCriteria" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsQuantifiedCompareCriteriaSome" DisplayName="supportsQuantifiedCompareCriteriaSome" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsQuantifiedCompareCriteriaAll" DisplayName="supportsQuantifiedCompareCriteriaAll" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsOrderBy" DisplayName="supportsOrderBy" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregates" DisplayName="supportsAggregates" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesSum" DisplayName="supportsAggregatesSum" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesAvg" DisplayName="supportsAggregatesAvg" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesMin" DisplayName="supportsAggregatesMin" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesMax" DisplayName="supportsAggregatesMax" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesCount" DisplayName="supportsAggregatesCount" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesCountStar" DisplayName="supportsAggregatesCountStar" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsAggregatesDistinct" DisplayName="supportsAggregatesDistinct" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsScalarSubqueries" DisplayName="supportsScalarSubqueries" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCorrelatedSubqueries" DisplayName="supportsCorrelatedSubqueries" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsCaseExpressions" DisplayName="supportsCaseExpressions" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsSearchedCaseExpressions" DisplayName="supportsSearchedCaseExpressions" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsScalarFunctions" DisplayName="supportsScalarFunctions" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="getSupportedFunctions" DisplayName="getSupportedFunctions" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="string" IsExpert="true" />
+ <PropertyDefinition Name="supportsInlineViews" DisplayName="supportsInlineViews" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsOrderByInInlineViews" DisplayName="supportsOrderByInInlineViews" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsUnionOrderBy" DisplayName="supportsUnionOrderBy" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="supportsUnions" DisplayName="supportsUnions" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="Configuration" ComponentTypeCode="0" Deployable="true" Deprecated="false" Monitorable="false" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.958-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.958-06:00">
+ <PropertyDefinition Name="vm.starter.timetolive" DisplayName="Process TTL (milliseconds)" ShortDescription="Process Time-to-live (TTL) for threads used to start services." DefaultValue="30000" Multiplicity="1" />
+ <PropertyDefinition Name="metamatrix.transaction.log.storeMMCMD" DisplayName="Enable MetaMatrix Command Logging" ShortDescription="Determine whether MetaMatrix command information should be recorded" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.buffer.relative.storageDirectory" DisplayName="Buffer Storage Directory" ShortDescription="The relative path to Host data directory where temporary files are stored." DefaultValue="/buffer" />
+ <PropertyDefinition Name="metamatrix.server.extensionTypesToCache" DisplayName="Types of Extension Modules to Cache" ShortDescription="Types of Extension Module files to cache in memory. Separate by commas. Allowed values: (Configuration Model,Function Definition,JAR File,VDB File)" DefaultValue="JAR File" Multiplicity="1" />
+ <PropertyDefinition Name="metamatrix.buffer.processorBatchSize" DisplayName="Processor Batch Size (rows)" ShortDescription="The size of a batch sent within the query processor." DefaultValue="500" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.audit.fileFormat" DisplayName="File Auditing Destination format class" ShortDescription="Driver class name for the JDBC auditing destination" DefaultValue="com.metamatrix.security.audit.format.DelimitedAuditMessageFormat" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.buffer.maxOpenFiles" DisplayName="Max open storage files" ShortDescription="The maximum number of open file descriptors used by buffer management temp storage." DefaultValue="10" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.log.consoleFormat" DisplayName="Format class for console log messages" ShortDescription="The name of the class that is used to format the log messages sent to the console" DefaultValue="com.metamatrix.common.log.format.ReadableLogMessageFormat" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.audit.contexts" DisplayName="Audit Contexts to Exclude" ShortDescription="The contexts for audit messages that are NOT to be recorded" />
+ <PropertyDefinition Name="metamatrix.log.contexts" DisplayName="Logging Contexts to Exclude" ShortDescription="The contexts for log messages that are NOT to be recorded" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.encryption.internal.encryptAll" DisplayName="Encrypt All Internal Traffic" ShortDescription="Force the encryption of all internal traffic, not just the traffic to secure services." DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" RequiresRestart="true" />
+ <PropertyDefinition Name="metamatrix.audit.jdbcResourceDelim" DisplayName="JDBC Auditing Destination delimiter for resource names" ShortDescription="The delimiter that is used to separate resource names" DefaultValue="," IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.audit.jdbcMaxResourceLength" DisplayName="JDBC Context Destination maximum length for audit text" ShortDescription="The maximum length of the resource name used in audit messages. Required if JDBC audit destination is to be used." DefaultValue="4000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.session.sessionMonitor.ActivityInterval" DisplayName="Session Monitoring Activity (minutes)" ShortDescription="How often sessions will be monitored to check for over-limit sessions and invalidate them." DefaultValue="5" PropertyType="Integer" IsExpert="true" RequiresRestart="all_processes" />
+ <PropertyDefinition Name="metamatrix.audit.jdbcTable" DisplayName="JDBC Auditing Destination table name" ShortDescription="The name of the table that auditing messages are to be written to. Required if JDBC audit destination is to be used" DefaultValue="LogEntries" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.log.size.monitor.mins" DisplayName="Log File Monitoring Interval (minutes)" ShortDescription="The time interval in minutes the log file size is monitored" DefaultValue="1000" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.log.jdbcMaxContextLength" DisplayName="JDBC Logging Destination maximum length for contexts" ShortDescription="The maximum length of all the disregarded log contexts in total" DefaultValue="64" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.log.jdbcTable" DisplayName="JDBC Logging Destination table name" ShortDescription="The table the logging information to be written to" DefaultValue="LOGENTRIES" />
+ <PropertyDefinition Name="metamatrix.transaction.log.storeSRCCMD" DisplayName="Enable Data Source Command Logging" ShortDescription="Determine whether source command information should be recorded" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.audit.maxThreads" DisplayName="Auditing Maximum Thread Count" ShortDescription="The maximum number of auditing threads allowed" DefaultValue="4" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.log.maxRows" DisplayName="JDBC Logging maximum number of rows returned" ShortDescription="The maximum number of rows returned" DefaultValue="2500" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.encryption.secure.sockets" DisplayName="Secure Sockets Enabled" ShortDescription="Determines whether the Secure Sockets are enabled, configuration is done from the SSL Resource" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" RequiresRestart="true" />
+ <PropertyDefinition Name="metamatrix.encryption.internal.authenticationMode" DisplayName="Internal Authentication Mode" ShortDescription="Sets the internal SSL authentication mode if internal SSL is enabled." DefaultValue="2-way" Multiplicity="1" IsExpert="true" RequiresRestart="true">
+ <AllowedValue>anonymous</AllowedValue>
+ <AllowedValue>1-way</AllowedValue>
+ <AllowedValue>2-way</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="metamatrix.audit.console" DisplayName="Standard-Out Audit Destination" ShortDescription="True if the audit messages are to be sent to standard out for a VM" DefaultValue="false" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.buffer.maxFileSize" DisplayName="Max buffer file size (megabytes)" ShortDescription="The maximum size (in megabytes) that a buffer file is allowed to reach before creating spill files." DefaultValue="2048" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.server.commandLoggerClassname" DisplayName="Command Logger service provider classname" ShortDescription="The fully-qualified classname of the CommandLoggerSPI implementation to be used by Tracking Service." IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.log.jdbcDatabase.enabled" DisplayName="JDBC Logging Destination Enabled" ShortDescription="If enabled, then log to the jdbc destination." DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.buffer.managementInterval" DisplayName="Buffer Management Interval (milliseconds)" ShortDescription="The period between checking whether active memory cleanup should occur." DefaultValue="1000" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.encryption.client" DisplayName="Client Side Password Encryption Enabled" ShortDescription="Determines whether the client side jce provider encryption will be performed" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.log" DisplayName="Logging Level" ShortDescription="The level at which logging will occur" DefaultValue="5" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.encryption.internal.secure.sockets" DisplayName="Internal Secure Sockets Enabled" ShortDescription="Enable the use of SSL of RMI and HostController communication." DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" RequiresRestart="true" />
+ <PropertyDefinition Name="metamatrix.audit.fileAppend" DisplayName="File Auditing Destination append" ShortDescription="Determines whether or not the audit destination file will be appended or overwritten" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.audit.file" DisplayName="File Auditing Destination filename" ShortDescription="The name of the file that is the audit message destination. If blank or not provided, audit messages are not sent to a file destination" />
+ <PropertyDefinition Name="metamatrix.buffer.connectorBatchSize" DisplayName="Connector Batch Size (rows)" ShortDescription="The size of a batch sent between connector and query service." DefaultValue="1000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.buffer.logStatsInterval" DisplayName="Buffer Log Stat Interval (milliseconds)" ShortDescription="The period between writing buffer management statistics to the log, used primarily for debugging." DefaultValue="0" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.audit.enabled" DisplayName="Auditing Enabled" ShortDescription="Determines whether auditing will be performed" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.authorization.metabase.CheckingEnabled" DisplayName="MetaBase Authorization Enabled" ShortDescription="Determines whether MetaBase authorization (Entitlements) will be checked" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.authorization.dataaccess.CheckingEnabled" DisplayName="Data Access Authorization Enabled" ShortDescription="Determines whether authorization (Entitlements) will be checked" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.encryption.jce.provider" DisplayName="JCE Encryption Provider" ShortDescription="Indicates the jce encryption provider" DefaultValue="org.bouncycastle.jce.provider.BouncyCastleProvider" Multiplicity="1" IsHidden="true" IsModifiable="false" />
+ <PropertyDefinition Name="metamatrix.audit.jdbcMaxContextLength" DisplayName="JDBC Auditing Destination maximum length for contexts" ShortDescription="The maximum length of the list of disregarded audit contexts. Required if JDBC audit destination is to be used." DefaultValue="64" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.server.cacheConnectorClassLoaders" DisplayName="Cache ClassLoaders for Connectors" ShortDescription="Determine whether to cache ClassLoaders in memory, for connectors that have the same classpath" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.service.essentialservice" DisplayName="Essential Service" ShortDescription="Indicates if the service is essential to operation of the Integration Server" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.extension.CommonClasspath" DisplayName="Common Extension Classpath" ShortDescription="Semicolon-delimited list of URLs to define extension classpath. This path will be used to load UDFs, connectors, membershipdomain etc. Extension module URLs are of the form 'extensionjar:jarfilename.jar'" DefaultValue="" Multiplicity="1" />
+ <PropertyDefinition Name="metamatrix.server.serviceMonitorInterval" DisplayName="Connector Data Source Monitoring Interval (seconds)" ShortDescription="How often to ask connectors whether the underlying data source is available. Note that underlying connector implementation may not ping the actual data source every time it is asked, for performance reasons." DefaultValue="60" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.log.size.limit.kbs" DisplayName="Log File Size Limit (kilobytes)" ShortDescription="Maximum log file size at which it will be swapped." DefaultValue="1000" Multiplicity="1" IsExpert="true" IsHidden="true" />
+ <PropertyDefinition Name="vm.starter.maxThreads" DisplayName="Service Starter Maximum Thread Count" ShortDescription="The maximum number of threads used to start services." DefaultValue="5" Multiplicity="1" />
+ <PropertyDefinition Name="metamatrix.log.jdbcMaxLength" DisplayName="JDBC Logging Destination maximum length for log messages" ShortDescription="The maximum length of the text that is logged" DefaultValue="2000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.deployment.platform" DisplayName="Platform Type" ShortDescription="This property indicates the type of server platform which the Integration Server is running on" DefaultValue="standalone" Multiplicity="1" IsExpert="true" IsHidden="true" IsModifiable="false" />
+ <PropertyDefinition Name="metamatrix.log.captureSystemErr" DisplayName="Capture standard error to the logs" ShortDescription="True if the standard error is to be captured as log messages" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.log.jdbcMaxExceptionLength" DisplayName="JDBC Logging Destination maximum length for exception text" ShortDescription="The maximum length of the text that is logged as an exception" DefaultValue="4000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.session.time.limit" DisplayName="Max Session Time Limit (minutes)" ShortDescription="Max connection time limit as a system property, forcibly terminate any connection that exceeds that limit, default would be no limit." DefaultValue="0" PropertyType="Integer" RequiresRestart="all_processes" />
+ <PropertyDefinition Name="metamatrix.server.procDebug" DisplayName="Enable Processor Data Debugging" ShortDescription="Determine whether to dump all data batches to the server log when using OPTION DEBUG" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="metamatrix.buffer.sessionUsePercentage" DisplayName="Session Memory Usage Limit (%)" ShortDescription="The maximum percentage of buffer memory that a may be used by a session." DefaultValue="80" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.buffer.memoryAvailable" DisplayName="Buffer Memory Available (megabytes)" ShortDescription="Amount of memory, in megabytes, to use as buffer management memory in each process." DefaultValue="500" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.audit.threadTTL" DisplayName="Auditing Thread Time-To-Live (TTL) (milliseconds)" ShortDescription="The maximum time (in milliseconds) that a auditing thread is allowed to live" DefaultValue="300000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.audit.consoleFormat" DisplayName="Standard-Out Audit Destination format class" ShortDescription="The name of the class that is used to format the audit messages sent to the console" DefaultValue="com.metamatrix.security.audit.format.ReadableAuditMessageFormat" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.server.metadata.systemURL" DisplayName="System VDB URL" ShortDescription="The URL identifies the System VDB" DefaultValue="extensionjar:System.vdb" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.session.max.connections" DisplayName="Max Number of Sessions" ShortDescription="Max Number of Sessions allowed to connect to Integration Server (reject any connection requests beyond that limit, default would be no limit)" DefaultValue="0" PropertyType="Integer" RequiresRestart="all_processes" />
+ <PropertyDefinition Name="metamatrix.server.streamingBatchSize" DisplayName="Streaming Batch Size (kilobytes)" ShortDescription="The clob, blob and XML streaming batch size in kilobytes" DefaultValue="100" PropertyType="Integer" />
+ <PropertyDefinition Name="metamatrix.log.captureSystemOut" DisplayName="Capture standard out to the logs" ShortDescription="True if the standard out is to be captured as log messages" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.log.console" DisplayName="Send log messages to standard out" ShortDescription="True if the log messages are to be sent to standard out for a VM" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsHidden="true" />
+ <PropertyDefinition Name="metamatrix.audit.jdbcDatabase" DisplayName="JDBC Auditing Destination Enabled" ShortDescription="If auditing enabled, then record to the jdbc destination." DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="metamatrix.buffer.activeMemoryThreshold" DisplayName="Buffer Active Memory Threshold (%)" ShortDescription="The percentage of buffer management memory that serves as a threshold for active memory management." DefaultValue="90" PropertyType="Integer" />
+ </ComponentType>
+ <ComponentType Name="LDAP Membership Domain Provider" ComponentTypeCode="11" Deployable="false" Deprecated="false" Monitorable="false" SuperComponentType="ResourceType" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.947-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.947-06:00">
+ <PropertyDefinition Name="users.displayName.attribute" DisplayName="Users DisplayName Attribute" ShortDescription="The attribute(s) that uniquely identifies a user." DefaultValue="uid" IsExpert="true" />
+ <PropertyDefinition Name="users.searchFilter" DisplayName="Users SearchFilter" ShortDescription="The search filter(s) to apply to each users root context." DefaultValue="(objectclass=*)" IsExpert="true" />
+ <PropertyDefinition Name="users.rootContext" DisplayName="Users RootContext" ShortDescription="Specifies the context(s) to use when searching for users." Multiplicity="1" />
+ <PropertyDefinition Name="ldapAdmin.dn" DisplayName="Admin DN" ShortDescription="Bind account DN for group lookup." />
+ <PropertyDefinition Name="users.memberOf.attribute" DisplayName="Users Memberof Attribute" ShortDescription="Attribute(s) that appears on each user that identifies group membership." />
+ <PropertyDefinition Name="groups.displayName.attribute" DisplayName="Groups DisplayName Attribute" ShortDescription="The attribute(s) that uniquely identifies a group." IsExpert="true" />
+ <PropertyDefinition Name="users.searchScope" DisplayName="Users SearchScope" ShortDescription="How far down the directory tree to search each users root context." DefaultValue="SUBTREE_SCOPE" IsExpert="true" />
+ <PropertyDefinition Name="groups.rootContext" DisplayName="Groups RootContext" ShortDescription="Specifies the context(s) to use when searching for groups." Multiplicity="1" />
+ <PropertyDefinition Name="activate" DisplayName="Enabled" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="AuthDomainClass" DisplayName="Membership Domain Class Name" ShortDescription="" DefaultValue="com.metamatrix.platform.security.membership.spi.ldap.LDAPMembershipDomain" Multiplicity="1" IsHidden="true" />
+ <PropertyDefinition Name="groups.searchFilter" DisplayName="Groups SearchFilter" ShortDescription="The search filter(s) to apply to each groups root context." DefaultValue="(objectclass=*)" IsExpert="true" />
+ <PropertyDefinition Name="groups.searchScope" DisplayName="Groups SearchScope" ShortDescription="How far down the directory tree to search each groups root context." DefaultValue="SUBTREE_SCOPE" IsExpert="true" />
+ <PropertyDefinition Name="txnTimeoutInMillis" DisplayName="Txn Timeout(ms)" ShortDescription="Time to wait for LDAP operations to complete." IsExpert="true" />
+ <PropertyDefinition Name="groups.groupMember.attribute" DisplayName="Groups GroupMember Attribute" ShortDescription="The attribute(s) that contains the members of the group." />
+ <PropertyDefinition Name="ldapURL" DisplayName="LDAP URL" ShortDescription="Full LDAP URL" Multiplicity="1" />
+ <PropertyDefinition Name="ldapAdmin.password" DisplayName="Admin Password" ShortDescription="Bind account password for group lookup." IsMasked="true" />
+ </ComponentType>
+ <ComponentType Name="Custom Membership Domain Provider" ComponentTypeCode="11" Deployable="false" Deprecated="false" Monitorable="false" SuperComponentType="ResourceType" ParentComponentType="Platform" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.947-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.947-06:00">
+ <PropertyDefinition Name="activate" DisplayName="Enabled" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" />
+ <PropertyDefinition Name="AuthDomainClass" DisplayName="Membership Domain Class Name" ShortDescription="Full class name of the Membership Domain." Multiplicity="1" />
+ <PropertyDefinition Name="propertiesFile" DisplayName="Properties File" ShortDescription="Location of the properties file for this Membership Domain." IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="JDBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.952-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.952-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-jdbc-6.1.0-SNAPSHOT.jar;" Multiplicity="0..1" IsExpert="true"/>
+ <PropertyDefinition Name="UseBindVariables" DisplayName="Use prepared statements and bind variables" ShortDescription="" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="ExtensionCapabilityClass" DisplayName="Extension Capability Class" ShortDescription="" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.JDBCConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="DatabaseTimeZone" DisplayName="Database time zone" ShortDescription="Time zone of the database, if different than Integration Server" IsExpert="true" />
+ <PropertyDefinition Name="TransactionIsolationLevel" DisplayName="Transaction Isolation Level" ShortDescription="Set the data source transaction isolation level" DefaultValue="" IsExpert="true" IsConstrainedToAllowedValues="true">
+ <AllowedValue>TRANSACTION_READ_UNCOMMITTED</AllowedValue>
+ <AllowedValue>TRANSACTION_READ_COMMITTED</AllowedValue>
+ <AllowedValue>TRANSACTION_SERIALIZABLE</AllowedValue>
+ <AllowedValue>TRANSACTION_NONE</AllowedValue>
+ <AllowedValue></AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="Password" DisplayName="Password" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:<protocol>:<url>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.translator.Translator" IsExpert="true" />
+ <PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="1000" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="User" DisplayName="User Name" ShortDescription="" Multiplicity="0" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="TrimStrings" DisplayName="Trim string flag" ShortDescription="Right Trim fixed character types returned as Strings" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ <PropertyDefinition Name="UseCommentsInSourceQuery" DisplayName="Use informational comments in Source Queries" ShortDescription="This will embed /*comment*/ style comment with session/request id in source SQL query for informational purposes" DefaultValue="false" PropertyType="Boolean" IsPreferred="true" IsExpert="true"/>
+ <PropertyDefinition Name="ResultSetCacheEnabled" DisplayName="ResultSet Cache Enabled" ShortDescription="" DefaultValue="false" Multiplicity="0..1" PropertyType="Boolean" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ <PropertyDefinition Name="ResultSetCacheMaxSize" DisplayName="ResultSet Cache Maximum Size (megabytes)" ShortDescription="" DefaultValue="0" Multiplicity="0..1" PropertyType="Integer" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+
+ </ComponentType>
+
+ <ComponentType Name="Apache Derby Embedded Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.941-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.941-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="org.apache.derby.jdbc.EmbeddedDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:derby:<databaseName>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="Apache Derby Network Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.942-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.942-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="org.apache.derby.jdbc.ClientDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:derby:<databaseName>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.derby.DerbySQLTranslator" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="MS Access Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.954-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.954-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="sun.jdbc.odbc.JdbcOdbcDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=<data-source-name>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.access.AccessSQLTranslator" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="MS Excel Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2006-02-08T11:02:36.029-06:00" CreatedBy="ConfigurationStartup" CreationDate="2006-02-08T11:02:36.029-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="sun.jdbc.odbc.JdbcOdbcDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:odbc:Driver={MicroSoft Excel Driver (*.xls)};DBQ=<filePathToExcelFile>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="MySQL 4 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.938-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.938-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mysql://<host>:3306/<databaseName>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.mysql.MySQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="PostgreSQL 8 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.940-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.940-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="org.postgresql.xa.PGXADataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:postgresql://<host>:5432;DatabaseName=/<databaseName>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.postgresql.PostgreSQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="Teiid JDBC 6 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-26T14:34:20.960-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-26T14:34:20.960-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbc.MMDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:metamatrix:<vdbName>@mm://<host>:<port>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="JDBC ODBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.953-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.953-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="sun.jdbc.odbc.JdbcOdbcDriver" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:odbc:<data-source-name>[;UID=<xxx> ;PWD=<xxx>]" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="Datadirect DB2 8 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.928-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.928-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.db2.DB2DataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:db2://<host>:50000;DatabaseName=<databasename>;CollectionID=<collectionid>;PackageName=<packagename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.db2.DB2SQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="Datadirect Oracle 9 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.923-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.923-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.oracle.OracleDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:oracle://<host>:1521;SID=<sid>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.oracle.OracleSQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="Datadirect SQL Server 2003 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.935-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.935-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.sqlserver.SQLServerDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:sqlserver://<host>:1433;DatabaseName=<databasename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sqlserver.SqlServerSQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="Datadirect Sybase 12 Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="JDBC Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.930-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.930-06:00">
+ <PropertyDefinition Name="ConnectionSource" DisplayName="Connection Source Class" ShortDescription="Driver, DataSource, or XADataSource class name" DefaultValue="com.metamatrix.jdbcx.sybase.SybaseDataSource" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="JDBC URL" ShortDescription="" DefaultValue="jdbc:mmx:sybase://<host>:5000;DatabaseName=<databasename>" Multiplicity="1" IsConstrainedToAllowedValues="false" IsPreferred="true" />
+ <PropertyDefinition Name="ExtensionTranslationClass" DisplayName="Extension SQL Translation Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.sybase.SybaseSQLTranslator" IsExpert="true" />
+ <PropertyDefinition Name="IsXA" DisplayName="Is XA" ShortDescription="Is XA" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsConstrainedToAllowedValues="true" IsPreferred="true" />
+ <PropertyDefinition Name="SetCriteriaBatchSize" DisplayName="Max Values in IN Predicate" ShortDescription="Max number of values in an IN Predicate. Must be >= 0." DefaultValue="250" PropertyType="Integer" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ </ComponentType> <ComponentType Name="LDAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.946-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.946-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-ldap-6.1.0-SNAPSHOT.jar;" Multiplicity="0..1" IsExpert="true"/>
+ <PropertyDefinition Name="SearchDefaultBaseDN" DisplayName="Default Search Base DN" ShortDescription="Default Base DN for LDAP Searches" IsExpert="true" />
+ <PropertyDefinition Name="com.metamatrix.data.pool.cleaning_interval" DisplayName="Pool cleaning Interval (seconds)" ShortDescription="Set the interval to cleaning the pool" DefaultValue="300" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="LdapAdminUserDN" DisplayName="Ldap Admin User DN" ShortDescription="User DN for the LDAP admin account." DefaultValue="cn=<>,ou=<>,dc=<>" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.ldap.LDAPConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="LdapMaxCriteria" DisplayName="Ldap Max Criteria" ShortDescription="Maximum number of criteria supported in an LDAP search filter." DefaultValue="1000" Multiplicity="1" />
+ <PropertyDefinition Name="LdapAdminUserPassword" DisplayName="Ldap Admin Password" ShortDescription="Password of the LDAP admin user account." Multiplicity="1" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="SearchDefaultScope" DisplayName="Default Search Scope" ShortDescription="Default Scope for LDAP Searches" DefaultValue="SUBTREE_SCOPE" Multiplicity="1">
+ <AllowedValue>OBJECT_SCOPE</AllowedValue>
+ <AllowedValue>ONELEVEL_SCOPE</AllowedValue>
+ <AllowedValue>SUBTREE_SCOPE</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="RestrictToObjectClass" DisplayName="Restrict Searches To Named Object Class" ShortDescription="Restrict Searches to objectClass named in the Name field for a table" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="com.metamatrix.data.pool.max_connections" DisplayName="Pool Maximum Connections" ShortDescription="Set the maximum number of connections for the connection pool" DefaultValue="100" Multiplicity="1" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="LdapTxnTimeoutInMillis" DisplayName="Ldap Transaction Timeout (ms)" ShortDescription="Timeout value for LDAP searches. Defaults to TCP timeout value." />
+ <PropertyDefinition Name="com.metamatrix.data.pool.wait_for_source_time" DisplayName="Pool Connection Waiting Time (milliseconds)" ShortDescription="Set the time to wait if the connection is not available" DefaultValue="60000" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="LdapUrl" DisplayName="Ldap URL" ShortDescription="Ldap URL of the server, including port number." DefaultValue="ldap://<ldapServer>:<389>" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="com.metamatrix.data.pool.live_and_unused_time" DisplayName="Pool Connection Idle Time (seconds)" ShortDescription="Set the idle time of the connection before it should be closed if pool shrinking is enabled" DefaultValue="300" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="com.metamatrix.data.pool.enable_shrinking" DisplayName="Pool Shrinking Enabled" ShortDescription="Set whether to enable the pool shrinking" DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ </ComponentType> <ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-loopback-6.1.0-SNAPSHOT.jar;" Multiplicity="0..1" IsExpert="true"/>
+ <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackCapabilities" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ </ComponentType> <ComponentType Name="Salesforce Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.916-06:00" CreationDate="2008-10-31T10:26:19.916-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-salesforce-6.1.0-SNAPSHOT.jar;extension:commons-codec-1.2.jar;extension:commons-discovery-0.2.jar;extension:commons-httpclient-3.0.1.jar;extension:xmlsec-1.3.0.jar;extension:axis-1.3.jar;extension:axis-jaxrpc-1.3.jar;extension:axis-saaj-1.2.jar;extension:axis-schema-1.3.jar;extension:commons-discovery-0.2.jar;extension:commons-logging-1.1.jar;extension:jms-1.1.jar;extension:servlet-api-2.5.jar;extension:jaxen-1.1.1.jar;extension:jdom-1.0.jar;extension:log4j-1.2.8.jar;extension:opensaml-1.1b.jar;extension:salesforce-api-6.1.0-SNAPSHOT.jar;extension:wsdl4j-1.5.1.jar;extension:wss4j-1.5.0.jar;extension:xalan-2.7.0.jar;extension:xml-apis-1.0.b2.jar" Multiplicity="0..1" IsExpert="true"/>
+ <PropertyDefinition Name="username" DisplayName="User Name" ShortDescription="Name value for Salesforce authentication" DefaultValue="" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.ConnectorState" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.Connector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="InLimit" DisplayName="IN Criteria Limit" ShortDescription="The maximum number of values that can be supplied in an IN criteria" DefaultValue="-1" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="password" DisplayName="Password" ShortDescription="Password value for Salesforce authentication" DefaultValue="" Multiplicity="1" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="URL" DisplayName="Salesforce URL" ShortDescription="URL for connecting to Salesforce" DefaultValue="" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorCapabilities" DisplayName="Connector Capabilities Class" ShortDescription="The class to use to provide the Connector Capabilities" DefaultValue="com.metamatrix.connector.salesforce.SalesforceCapabilities" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ </ComponentType> <ComponentType Name="Text File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-text-6.1.0-SNAPSHOT.jar;" Multiplicity="0..1" IsExpert="true"/>
+ <PropertyDefinition Name="PartialStartupAllowed" DisplayName="Partial Startup Allowed" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="DescriptorFile" DisplayName="Text File Descriptor" ShortDescription="" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.text.TextConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="EnforceColumnCount" DisplayName="Enforce Column Count" ShortDescription="This forces the number of columns in text file to match what was modeled" DefaultValue="false" PropertyType="Boolean" IsConstrainedToAllowedValues="false" />
+ <PropertyDefinition Name="DateResultFormatsDelimiter" DisplayName="Date Result Formats Delimiter" ShortDescription="" IsExpert="true" />
+ <PropertyDefinition Name="DateResultFormats" DisplayName="Date Result Formats" ShortDescription="" IsExpert="true" />
+ </ComponentType> <ComponentType Name="XML Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:connector-xml-6.1.0-SNAPSHOT.jar;extension:commons-codec-1.2.jar;extension:commons-discovery-0.2.jar;extension:commons-httpclient-3.0.1.jar;extension:xmlsec-1.3.0.jar;extension:axis-1.3.jar;extension:axis-jaxrpc-1.3.jar;extension:axis-saaj-1.2.jar;extension:axis-schema-1.3.jar;extension:commons-discovery-0.2.jar;extension:commons-logging-1.1.jar;extension:jms-1.1.jar;extension:servlet-api-2.5.jar;extension:jaxen-1.1.1.jar;extension:jdom-1.0.jar;extension:log4j-1.2.8.jar;extension:opensaml-1.1b.jar;extension:wsdl4j-1.5.1.jar;extension:wss4j-1.5.0.jar;extension:xalan-2.7.0.jar;extension:xml-apis-1.0.b2.jar" Multiplicity="0..1" IsExpert="true"/>
+ </ComponentType>
+
+ <ComponentType Name="XML File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
+ <PropertyDefinition Name="CharacterEncodingScheme" DisplayName="File Encoding Used" ShortDescription="A character-encoding scheme is a mapping between a coded character set and a set of octet (eight-bit byte) sequences. Some samples are UTF-8,ISO-8859-1,UTF-16)" DefaultValue="ISO-8859-1" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xmlsource.XMLSourceConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="ConnectionType" DisplayName="Type Of XML Connection" ShortDescription="Connection type used to get the XML data" DefaultValue="com.metamatrix.connector.xmlsource.file.FileConnection" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="DirectoryLocation" DisplayName="XML File(s) Directory Location" ShortDescription="" DefaultValue="" Multiplicity="1" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="XML SOAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
+ <PropertyDefinition Name="AuthPassword" DisplayName="Authentication User Password" ShortDescription="Password value for authentication" DefaultValue="" IsExpert="true" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="SAMLPropertyFile" DisplayName="SAML Property File (only required when SAML profile used)" ShortDescription="SAML Security property file (saml.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="wsdl" DisplayName="WSDL File (URL)" ShortDescription="URL to Web Service Definition File" DefaultValue="" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="AuthUserName" DisplayName="Authentication User Name" ShortDescription="Name value for authentication" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="WSSecurityType" DisplayName="WS-Security Type(UsernameToken, SAML..)" ShortDescription="Type of WS-Security to be used; Combinations of multiple security types can be used with a space in-between. Allowed types are: (UsernameToken, UsernameToken-Digest, SAMLTokenUnsigned, SAMLTokenSigned, Signature, Timestamp, Encrypt)" DefaultValue="" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xmlsource.XMLSourceConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="EncryptUserName" DisplayName="Encrypt UserName (only if Encrypt profile used)" ShortDescription="The username to be used in the encryption; if blank uses auth username" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="EndPoint" DisplayName="Alternate End Point" ShortDescription="An alternate service endpoint other than one specified in WSDL, to execute the service" DefaultValue="" IsPreferred="true" />
+ <PropertyDefinition Name="SecurityType" DisplayName="WebService Security Used(None, HTTPBasic, WS-Security)" ShortDescription="Type of Authentication to used with the web service; If WS-Secuirty is being used, then WS-Secuirty type must be defined" DefaultValue="None" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="CryptoPropertyFile" DisplayName="User Crypto Property File (If SAML or Signature profile used)" ShortDescription="The file defines properties of cryptography;defines the certificates;(crypto.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectionType" DisplayName="Type Of XML Connection" ShortDescription="Connection type used to get the XML data" DefaultValue="com.metamatrix.connector.xmlsource.soap.SoapConnection" Multiplicity="1" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="EncryptPropertyFile" DisplayName="Encrypt crypto property file (only if Encrypt profile used)" ShortDescription="The file defines properties of cryptography for encryption of the message;(crypto.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="TrustType" DisplayName="Trust Type:(DirectReference or IssuerSerial)" ShortDescription="Only required for Signature and Signed SAML; The issuer-serial method presumes that all trusted users of the service are known to the service and have pre-registered their certificate chains before using the service. The direct-reference method presumes that the service operator trusts all users with certificates issued by a trusted CA." DefaultValue="DirectReference" IsExpert="true" IsPreferred="true" />
+ </ComponentType>
+ <ComponentType Name="XML-Relational File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.918-06:00" CreationDate="2008-10-31T10:26:19.918-06:00">
+ <PropertyDefinition Name="TextExtractionThreshold" DisplayName="Text Extraction Threshold (in kb)" ShortDescription="extract text sections larger than this size to a file where more efficient access as a CLOB can be effected." DefaultValue="128" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="FilePath" DisplayName="File Path" ShortDescription="" Multiplicity="1" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="FileCacheLocation" DisplayName="Location of the File Cache" ShortDescription="" DefaultValue="" />
+ <PropertyDefinition Name="CacheTimeout" DisplayName="Cache Timeout (in seconds)" ShortDescription="" DefaultValue="60" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="SaxFilterProviderClass" DisplayName="XML Filter Provider" ShortDescription="The class the provides extended XML Filters" DefaultValue="com.metamatrix.connector.xml.base.NoExtendedFilters" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.base.XMLConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="MaxFileCacheSize" DisplayName="Max Size of file cache (in kb)" ShortDescription="" DefaultValue="-1" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.file.FileConnectorState" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="LogRequestResponseDocs" DisplayName="Log XML Request and Response Documents" ShortDescription="Write the request and response documents to the log at Info level" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="InputStreamFilterClass" DisplayName="Input Stream Filter Class" ShortDescription="The class to use to preprocess raw XML input stream" DefaultValue="com.metamatrix.connector.xml.base.PluggableInputStreamFilterImpl" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="MaxMemoryCacheSize" DisplayName="Max Size of in-memory cache (in kb)" ShortDescription="" DefaultValue="16384" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="FileName" DisplayName="File Name" ShortDescription="" DefaultValue="" />
+ <PropertyDefinition Name="QueryPreprocessorClass" DisplayName="Query Preprocessor Class" ShortDescription="The class to use to preprocess the IQuery" DefaultValue="com.metamatrix.connector.xml.base.NoQueryPreprocessing" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorCapabilities" DisplayName="Connector Capabilities Class" ShortDescription="The class to use to provide the Connector Capabilities" DefaultValue="com.metamatrix.connector.xml.base.XMLCapabilities" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="XML-Relational HTTP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.920-06:00" CreationDate="2008-10-31T10:26:19.921-06:00">
+ <PropertyDefinition Name="TextExtractionThreshold" DisplayName="Text Extraction Threshold (in kb)" ShortDescription="Extract text sections larger than this size to a file where more efficient access as a CLOB can be effected." DefaultValue="128" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="FileCacheLocation" DisplayName="Location of the File Cache" ShortDescription="" DefaultValue="" />
+ <PropertyDefinition Name="CacheTimeout" DisplayName="Cache Timeout (in seconds)" ShortDescription="" DefaultValue="60" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="SaxFilterProviderClass" DisplayName="XML Filter Provider" ShortDescription="The class the provides extended XML Filters" DefaultValue="com.metamatrix.connector.xml.base.NoExtendedFilters" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="XMLParmName" DisplayName="XML Parameter Name" ShortDescription="" />
+ <PropertyDefinition Name="RequestTimeout" DisplayName="Request Timeout (in Milliseconds)" ShortDescription="" DefaultValue="10000" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="MaxFileCacheSize" DisplayName="Max Size of file cache (in kb)" ShortDescription="" DefaultValue="-1" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="Authenticate" DisplayName="Authentication Required" ShortDescription="" DefaultValue="false" Multiplicity="1" PropertyType="Boolean" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.http.HTTPConnectorState" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="HttpBasicAuthPassword" DisplayName="HTTP Basic Authentication Password" ShortDescription="Password value for HTTP basic authentication" DefaultValue="" IsExpert="true" IsMasked="true" />
+ <PropertyDefinition Name="AccessMethod" DisplayName="Access Method" ShortDescription="" DefaultValue="get" Multiplicity="1">
+ <AllowedValue>get</AllowedValue>
+ <AllowedValue>post</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="ProxyUri" DisplayName="Proxy Server URI" ShortDescription="The URI of the proxy server" DefaultValue="" />
+ <PropertyDefinition Name="ExceptionOnIntraQueryCacheExpiration" DisplayName="Exception On Intra-Query Cache Expiration" ShortDescription="Throw an exception when a document expires from the cache between executing different parts of a single query (instead of requesting the document again)" DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorCapabilities" DisplayName="Connector Capabilities Class" ShortDescription="The class to use to provide the Connector Capabilities" DefaultValue="com.metamatrix.connector.xml.base.XMLCapabilities" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="HttpBasicAuthUserName" DisplayName="HTTP Basic Authentication Name" ShortDescription="Name value for HTTP basic authentication" DefaultValue="" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.base.XMLConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="Uri" DisplayName="Server URI" ShortDescription="The URI of the HTTP source" Multiplicity="1" />
+ <PropertyDefinition Name="UseHttpBasic" DisplayName="Use HTTP Basic authentication" ShortDescription="Use basic HTTP Authentication" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="LogRequestResponseDocs" DisplayName="Log XML Request and Response Documents" ShortDescription="Write the request and response documents to the log at Info level" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="TrustDeserializerClass" DisplayName="Trust Deserializer Class" ShortDescription="The class to use to process trusted payloads and execution payloads" DefaultValue="com.metamatrix.connector.xml.http.DefaultTrustDeserializer" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ParameterMethod" DisplayName="Parameter Method" ShortDescription="" DefaultValue="None" Multiplicity="1">
+ <AllowedValue>None</AllowedValue>
+ <AllowedValue>Name/Value</AllowedValue>
+ <AllowedValue>XMLRequest</AllowedValue>
+ <AllowedValue>XMLInQueryString</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="MaxMemoryCacheSize" DisplayName="Max Size of in-memory cache (in kb)" ShortDescription="" DefaultValue="16384" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="InputStreamFilterClass" DisplayName="Input Stream Filter Class" ShortDescription="The class to use to preprocess raw XML input stream" DefaultValue="com.metamatrix.connector.xml.base.PluggableInputStreamFilterImpl" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="HostnameVerifier" DisplayName="Hostname Verifier" ShortDescription="Class implementing javax.net.ssl.HostnameVerifier. Used to implement a hostname mismatch workaround." IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="QueryPreprocessorClass" DisplayName="Query Preprocessor Class" ShortDescription="The class to use to preprocess the IQuery" DefaultValue="com.metamatrix.connector.xml.base.NoQueryPreprocessing" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ </ComponentType>
+ <ComponentType Name="XML-Relational SOAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.919-06:00" CreationDate="2008-10-31T10:26:19.919-06:00">
+ <PropertyDefinition Name="TextExtractionThreshold" DisplayName="Text Extraction Threshold (in kb)" ShortDescription="Extract text sections larger than this size to a file where more efficient access as a CLOB can be effected." DefaultValue="128" PropertyType="Integer" IsExpert="true" />
+ <PropertyDefinition Name="AuthPassword" DisplayName="Authentication User Password" ShortDescription="Password value for authentication" DefaultValue="" IsExpert="true" IsMasked="true" IsPreferred="true" />
+ <PropertyDefinition Name="FileCacheLocation" DisplayName="Location of the File Cache" ShortDescription="" DefaultValue="" />
+ <PropertyDefinition Name="SaxFilterProviderClass" DisplayName="XML Filter Provider" ShortDescription="The class the provides extended XML Filters" DefaultValue="com.metamatrix.connector.xml.base.NoExtendedFilters" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="AuthUserName" DisplayName="Authentication User Name" ShortDescription="Name value for authentication" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="CacheTimeout" DisplayName="Cache Timeout (in seconds)" ShortDescription="" DefaultValue="60" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="WSSecurityType" DisplayName="WS-Security Type(UsernameToken, SAML..)" ShortDescription="Type of WS-Security to be used; Combinations of multiple security types can be used with a space in-between. Allowed types are: (UsernameToken, UsernameToken-Digest, SAMLTokenUnsigned, SAMLTokenSigned, Signature, Timestamp, Encrypt)" DefaultValue="" IsPreferred="true" />
+ <PropertyDefinition Name="XMLParmName" DisplayName="XML Parameter Name" ShortDescription="" DefaultValue="" IsHidden="true" IsModifiable="false" />
+ <PropertyDefinition Name="EncryptUserName" DisplayName="Encrypt UserName (only if Encrypt profile used)" ShortDescription="The username to be used in the encryption; if blank uses auth username" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="ExceptionOnSOAPFault" DisplayName="Exception on SOAP Fault" ShortDescription="Throw connector exception when SOAP fault is returned from source." DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="MaxFileCacheSize" DisplayName="Max Size of file cache (in kb)" ShortDescription="" DefaultValue="-1" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="RequestTimeout" DisplayName="Request Timeout (in Milliseconds)" ShortDescription="" DefaultValue="10000" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="CryptoPropertyFile" DisplayName="User Crypto Property File (If SAML or Signature profile used)" ShortDescription="The file defines properties of cryptography;defines the certificates;(crypto.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.soap.SOAPConnectorState" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="SOAPAction" DisplayName="SOAP-Action" ShortDescription="Value for SOAP-Action header" DefaultValue="" IsExpert="true" />
+ <PropertyDefinition Name="AccessMethod" DisplayName="Access Method (Get, Post)" ShortDescription="" DefaultValue="post" Multiplicity="1" IsHidden="true" IsModifiable="false">
+ <AllowedValue>get</AllowedValue>
+ <AllowedValue>post</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="ProxyUri" DisplayName="Proxy Server URI" ShortDescription="The URI of the proxy server" DefaultValue="" />
+ <PropertyDefinition Name="EncryptPropertyFile" DisplayName="Encrypt crypto property file (only if Encrypt profile used)" ShortDescription="The file defines properties of cryptography for encryption of the message;(crypto.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="ExceptionOnIntraQueryCacheExpiration" DisplayName="Exception On Intra-Query Cache Expiration" ShortDescription="Throw an exception when a document expires from the cache between executing different parts of a single query (instead of requesting the document again)" DefaultValue="true" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="ConnectorCapabilities" DisplayName="Connector Capabilities Class" ShortDescription="The class to use to provide the Connector Capabilities" DefaultValue="com.metamatrix.connector.xml.base.XMLCapabilities" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="SAMLPropertyFile" DisplayName="SAML Property File (only required when SAML profile used)" ShortDescription="SAML Security property file (saml.properties)" DefaultValue="" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="EncodingStyle" DisplayName="Encoding Style (RPC - Encoded, RPC - Literal, Document - Literal, Document - Encoded)" ShortDescription="Encoding Style" DefaultValue="Document - Literal" Multiplicity="1">
+ <AllowedValue>RPC - Encoded</AllowedValue>
+ <AllowedValue>RPC - Literal</AllowedValue>
+ <AllowedValue>Document - Literal</AllowedValue>
+ <AllowedValue>Document - Encoded</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.xml.base.XMLConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="Uri" DisplayName="Server URI" ShortDescription="The URI of the HTTP source" Multiplicity="1" />
+ <PropertyDefinition Name="SecurityType" DisplayName="WebService Security Used(None, HTTPBasic, WS-Security)" ShortDescription="Type of Authentication to used with the web service; If WS-Secuirty is being used, then WS-Secuirty type must be defined" DefaultValue="None" Multiplicity="1" IsPreferred="true" />
+ <PropertyDefinition Name="LogRequestResponseDocs" DisplayName="Log XML Request and Response Documents" ShortDescription="Write the request and response documents to the log at Info level" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
+ <PropertyDefinition Name="TrustDeserializerClass" DisplayName="Trust Deserializer Class" ShortDescription="The class to use to process trusted payloads and execution payloads" DefaultValue="com.metamatrix.connector.xml.soap.DefaultSoapTrustDeserializer" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="ParameterMethod" DisplayName="Parameter Method (None, Name/Value, XMLRequest, XMLInQueryString)" ShortDescription="" DefaultValue="XMLRequest" Multiplicity="1" IsHidden="true" IsModifiable="false">
+ <AllowedValue>None</AllowedValue>
+ <AllowedValue>Name/Value</AllowedValue>
+ <AllowedValue>XMLRequest</AllowedValue>
+ <AllowedValue>XMLInQueryString</AllowedValue>
+ </PropertyDefinition>
+ <PropertyDefinition Name="InputStreamFilterClass" DisplayName="Input Stream Filter Class" ShortDescription="The class to use to preprocess raw XML input stream" DefaultValue="com.metamatrix.connector.xml.base.PluggableInputStreamFilterImpl" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="MaxMemoryCacheSize" DisplayName="Max Size of in-memory cache (in kb)" ShortDescription="" DefaultValue="16384" Multiplicity="1" PropertyType="Integer" />
+ <PropertyDefinition Name="HostnameVerifier" DisplayName="Hostname Verifier" ShortDescription="a class implmenting javax.net.ssl.HostnameVerifier. Used to implement a hostname mismatch workaround." IsConstrainedToAllowedValues="false" IsExpert="true" />
+ <PropertyDefinition Name="TrustType" DisplayName="Trust Type:(DirectReference or IssuerSerial)" ShortDescription="Only required for Signature and Signed SAML; The issuer-serial method presumes that all trusted users of the service are known to the service and have pre-registered their certificate chains before using the service. The direct-reference method presumes that the service operator trusts all users with certificates issued by a trusted CA." DefaultValue="DirectReference" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="QueryPreprocessorClass" DisplayName="Query Preprocessor Class" ShortDescription="The class to use to preprocess the IQuery" DefaultValue="com.metamatrix.connector.xml.base.NoQueryPreprocessing" IsConstrainedToAllowedValues="false" IsExpert="true" />
+ </ComponentType>
+
+ </ComponentTypes>
+ <SharedResources>
+ <Resource Name="JGroups" ComponentType="Miscellaneous Resource Type" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="udp.multicast_supported">true</Property>
+ <Property Name="udp.mcast_messagebus_port">(multicast.port)</Property>
+ <Property Name="udp.mcast_jndi_port">5556</Property>
+ <Property Name="udp.mcast_addr">(multicast.address)</Property>
+ <Property Name="ping.gossip_host">(gossip_host)</Property>
+ <Property Name="ping.gossip_port">5555</Property>
+ <Property Name="metamatrix.cluster.name">(cluster.name)</Property>
+ <Property Name="jgroups.other.channel.settings">MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):UNICAST(timeout=5000):pbcast.STABLE(desired_avg_gossip=20000):FRAG(frag_size=4096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true):pbcast.STATE_TRANSFER
+ </Property>
+ </Properties>
+ </Resource>
+ <Resource Name="SSL" ComponentType="Miscellaneous Resource Type" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="com.metamatrix.ssl.keystoretype">JKS</Property>
+ <Property Name="com.metamatrix.ssl.protocol">SSLv3</Property>
+ <Property Name="com.metamatrix.ssl.keymanagementalgorithm">SunX509</Property>
+ </Properties>
+ </Resource>
+ <Resource Name="XATransactionManager" ComponentType="Miscellaneous Resource Type" LastChangedBy="ConfigurationStartup" CreatedBy="ConfigurationStartup">
+ <Properties>
+ <Property Name="metamatrix.xatxnmgr.log_base_dir">txnlog</Property>
+ <Property Name="metamatrix.xatxnmgr.max_timeout">120000</Property>
+ <Property Name="metamatrix.xatxnmgr.max_log_filesize_in_mb">10</Property>
+ <Property Name="metamatrix.xatxnmgr.max_rolled_log_files">100</Property>
+ <Property Name="metamatrix.xatxnmgr.separate_log">true</Property>
+ <Property Name="metamatrix.xatxnmgr.txnstatus_port">0</Property>
+ </Properties>
+ </Resource>
+ </SharedResources>
+</ConfigurationDocument>
\ No newline at end of file
Property changes on: branches/remove_psc/common-internal/src/test/resources/config-original.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
teiid SVN: r744 - branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-09 19:31:26 -0400 (Thu, 09 Apr 2009)
New Revision: 744
Removed:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java
Log:
Teiid 323 - class no longer used
Deleted: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java 2009-04-09 23:08:13 UTC (rev 743)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java 2009-04-09 23:31:26 UTC (rev 744)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.config.util;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.metamatrix.common.config.api.ComponentTypeDefn;
-import com.metamatrix.common.config.api.ComponentTypeID;
-import com.metamatrix.common.config.api.ConfigurationModelContainer;
-import com.metamatrix.common.config.api.ConfigurationObjectEditor;
-import com.metamatrix.common.config.api.DeployedComponent;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductTypeID;
-import com.metamatrix.common.config.model.BasicConfigurationObjectEditor;
-import com.metamatrix.core.util.MetaMatrixProductVersion;
-import com.metamatrix.core.util.StringUtil;
-
-/**
- */
-public class ConfigUtil implements StringUtil.Constants {
-
- // this editor does not create actions for any editing operations and therefore,
- // can be shared.
- private static ConfigurationObjectEditor editor = new BasicConfigurationObjectEditor();
-
-
- /**
- * Returns a COnfigurationObjectEditor that does not create actions. This editor,
- * because it doesn't maintain any state, is sharable for reuse.
- * @return
- * @since 4.3
- */
- public static ConfigurationObjectEditor getEditor() {
- return editor;
- }
-
-public static final Properties buildDefaultPropertyValues(ComponentTypeID componentTypeID, ConfigurationModelContainer model ) {
- Properties result = new Properties();
-
- Collection defns = model.getAllComponentTypeDefinitions(componentTypeID);
-
- for (Iterator it=defns.iterator(); it.hasNext();) {
- ComponentTypeDefn ctd = (ComponentTypeDefn) it.next();
-
- Object value = ctd.getPropertyDefinition().getDefaultValue();
- if (value != null) {
- if (value instanceof String) {
- String v = (String) value;
- if (v.trim().length() > 0) {
- result.put(ctd.getPropertyDefinition().getName(), v );
- }
- } else {
- result.put(ctd.getPropertyDefinition().getName(), value.toString() );
-
- }
- }
- }
-
- return result;
-
-}
-
-
-//public static ProductServiceConfig getFirstDeployedConnectorProductTypePSC(ConfigurationModelContainer cmc) throws Exception {
-//
-// ProductTypeID prodType = ProductTypeID.PRODUCT_TYPE_ID;
-// Iterator it = cmc.getConfiguration().getDeployedComponents().iterator();
-// while(it.hasNext()) {
-// final DeployedComponent dc = (DeployedComponent) it.next();
-// if (dc.isDeployedConnector()) {
-// ProductServiceConfigID pscID = dc.getProductServiceConfigID();
-//
-// ProductServiceConfig psc = cmc.getConfiguration().getPSC(pscID);
-// if (psc.getComponentTypeID().equals(prodType)) {
-// return psc;
-// }
-// }
-//
-// }
-// return null;
-//}
-
-
-}
15 years, 8 months
teiid SVN: r743 - in trunk: embedded/src/main/java/com/metamatrix/dqp/embedded/configuration and 3 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-04-09 19:08:13 -0400 (Thu, 09 Apr 2009)
New Revision: 743
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleWriter.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
Log:
TEIID-479: Made Embedded load using the delegating class loader, and "lib" configurable, and option to chain the extension directories.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/EmbeddedDriver.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -27,6 +27,7 @@
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.net.URL;
+import java.net.URLClassLoader;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
@@ -362,22 +363,25 @@
// a non-delegating class loader will be created from where all third party dependent jars can be loaded
ArrayList<URL> runtimeClasspath = new ArrayList<URL>();
+ String libLocation = info.getProperty("dqp.lib", "./lib/"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!libLocation.endsWith("/")) { //$NON-NLS-1$
+ libLocation = libLocation + "/"; //$NON-NLS-1$
+ }
// find jars in the "lib" directory; patches is reverse alpaha and not case sensitive so small letters then capitals
if (!EmbeddedDriver.getDefaultConnectionURL().equals(dqpURL.toString())) {
- runtimeClasspath.addAll(libClassPath(dqpURL, "lib/patches/", MMURLConnection.REVERSEALPHA)); //$NON-NLS-1$
- runtimeClasspath.addAll(libClassPath(dqpURL, "lib/", MMURLConnection.DATE)); //$NON-NLS-1$
+ runtimeClasspath.addAll(libClassPath(dqpURL, libLocation+"patches/", MMURLConnection.REVERSEALPHA)); //$NON-NLS-1$
+ runtimeClasspath.addAll(libClassPath(dqpURL, libLocation, MMURLConnection.DATE));
}
URL[] dqpClassPath = runtimeClasspath.toArray(new URL[runtimeClasspath.size()]);
- this.classLoader = new NonDelegatingClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
+ this.classLoader = new URLClassLoader(dqpClassPath, Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
String logMsg = BaseDataSource.getResourceMessage("EmbeddedDriver.use_classpath"); //$NON-NLS-1$
DriverManager.println(logMsg);
for (int i = 0; i < dqpClassPath.length; i++) {
DriverManager.println(dqpClassPath[i].toString());
}
-
// Now using this class loader create the connection factory to the dqp.
ClassLoader current = null;
try {
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -46,19 +46,25 @@
* @since 4.3
*/
public class ExtensionModuleReader {
- private static final String MM_JAR_PROTOCOL = "extensionjar"; //$NON-NLS-1$
+ public static final String MM_JAR_PROTOCOL = "extensionjar"; //$NON-NLS-1$
/**
* Load the extension module from the file system
* @return
* @since 4.3
*/
- public static ExtensionModule loadExtensionModule(String extModuleName, URL extModuleURL) throws MetaMatrixComponentException{
+ public static ExtensionModule loadExtensionModule(String extModuleName, URL[] contexts) throws MetaMatrixComponentException{
byte[] contents = null;
InputStream in = null;
try {
- in = extModuleURL.openStream();
- contents = ByteArrayHelper.toByteArray(in);
+ URL extModuleURL = resolveExtensionModule(MM_JAR_PROTOCOL+":"+extModuleName, contexts); //$NON-NLS-1$
+ if (extModuleURL != null) {
+ in = extModuleURL.openStream();
+ contents = ByteArrayHelper.toByteArray(in);
+ }
+ else {
+ throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_does_not_exist", extModuleName)); //$NON-NLS-1$
+ }
} catch (FileNotFoundException e) {
throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_does_not_exist", extModuleName)); //$NON-NLS-1$
} catch (IOException e) {
@@ -77,39 +83,44 @@
* @return list of Extension Modules {@link com.metamatrix.common.config.api.ExtensionModule}
* @since 4.3
*/
- public static List loadExtensionModules(URL extensionPathURL) throws MetaMatrixComponentException{
+ public static List<ExtensionModule> loadExtensionModules(URL[] contexts) throws MetaMatrixComponentException{
ObjectInputStream in = null;
- List extModuleList = new ArrayList();
- String extensionPath = extensionPathURL.toString()+"?action=list&filter=.jar"; //$NON-NLS-1$
+ List<ExtensionModule> extModuleList = new ArrayList<ExtensionModule>();
+
+ for (URL extensionPathURL: contexts) {
+ String extensionPath = extensionPathURL.toString()+"?action=list&filter=.jar"; //$NON-NLS-1$
- try {
- extensionPathURL = URLHelper.buildURL(extensionPath);
- in = new ObjectInputStream(extensionPathURL.openStream());
- String[] jarFiles = (String[])in.readObject();
- for (int i = 0; i < jarFiles.length; i++) {
- String jarName = jarFiles[i];
- jarName = jarName.substring(jarName.lastIndexOf('/')+1);
- byte[] contents = null;
- try {
- URL jarFileURL = URLHelper.buildURL(jarFiles[i]);
- InputStream jarStream = jarFileURL.openStream();
- contents = ByteArrayHelper.toByteArray(jarStream);
- jarStream.close();
- } catch (IOException e) {
- throw new MetaMatrixComponentException(e, DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_failed_to_read", new Object[] {jarFiles[i]})); //$NON-NLS-1$
- }
- extModuleList.add(new BasicExtensionModule(jarName, ExtensionModule.JAR_FILE_TYPE, "Jar File", contents)); //$NON-NLS-1$
- }
- } catch (FileNotFoundException e) {
- // if the file not found then it means no extensions directory and no extension
- // modules, just return a empty list.
- } catch (Exception e) {
- throw new MetaMatrixComponentException(e);
- }finally {
- if (in != null) {
- try{in.close();}catch(IOException e) {}
- }
+ try {
+ extensionPathURL = URLHelper.buildURL(extensionPath);
+ in = new ObjectInputStream(extensionPathURL.openStream());
+ String[] jarFiles = (String[])in.readObject();
+ for (int i = 0; i < jarFiles.length; i++) {
+ String jarName = jarFiles[i];
+ jarName = jarName.substring(jarName.lastIndexOf('/')+1);
+ byte[] contents = null;
+ try {
+ URL jarFileURL = URLHelper.buildURL(jarFiles[i]);
+ InputStream jarStream = jarFileURL.openStream();
+ contents = ByteArrayHelper.toByteArray(jarStream);
+ jarStream.close();
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(e, DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_failed_to_read", new Object[] {jarFiles[i]})); //$NON-NLS-1$
+ }
+ extModuleList.add(new BasicExtensionModule(jarName, ExtensionModule.JAR_FILE_TYPE, "Jar File", contents)); //$NON-NLS-1$
+ }
+ } catch (FileNotFoundException e) {
+ // if the file not found then it means no extensions directory and no extension
+ // modules, just return a empty list.
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(e);
+ } catch(ClassNotFoundException e){
+ throw new MetaMatrixComponentException(e);
+ } finally {
+ if (in != null) {
+ try{in.close();}catch(IOException e) {}
+ }
+ }
}
return extModuleList;
}
@@ -124,31 +135,45 @@
* @throws MalformedURLException
* @since 4.3
*/
- public static URL[] resolveExtensionClasspath(String extClassPath, URL context)
+ public static List<URL> resolveExtensionClasspath(String extClassPath, URL[] contexts)
throws IOException {
- List urls = new ArrayList();
+ List<URL> urls = new ArrayList<URL>();
StringTokenizer st = new StringTokenizer(extClassPath, ";"); //$NON-NLS-1$
while (st.hasMoreTokens()) {
- URL entry = null;
- String temp = st.nextToken();
- int idx = temp.indexOf(MM_JAR_PROTOCOL);
- if (idx != -1) {
- entry = URLHelper.buildURL(context, temp.substring(idx + MM_JAR_PROTOCOL.length() + 1));
- InputStream in = null;
- try {
- in = entry.openStream();
- in.close();
- } catch (IOException e) {
- // do nothing as this is just a test to see if the resource is available
- // Defect 22736 - Change message from warning to detail so this doesn't look as scary.
- LogManager.logDetail(LogConstants.CTX_DQP, DQPEmbeddedPlugin.Util.getString("DataService.ext_module_not_found", entry)); //$NON-NLS-1$
- }
- } else {
- entry = new URL(temp);
+ String extModule = st.nextToken();
+ URL entry = resolveExtensionModule(extModule, contexts);
+ if (entry != null) {
+ urls.add(entry);
}
- urls.add(entry);
}
- return (URL[])urls.toArray(new URL[urls.size()]);
- }
+ return urls;
+ }
+
+ public static URL resolveExtensionModule(String extModule, URL[] contexts) throws IOException {
+ int idx = extModule.indexOf(MM_JAR_PROTOCOL);
+ if (idx != -1) {
+ for (URL context : contexts) {
+ URL entry = URLHelper.buildURL(context, extModule.substring(idx + MM_JAR_PROTOCOL.length() + 1));
+ if (urlExists(entry)) {
+ return entry;
+ }
+ }
+
+ } else {
+ return new URL(extModule);
+ }
+ return null;
+ }
+
+ private static boolean urlExists(URL url) {
+ InputStream in = null;
+ try {
+ in = url.openStream();
+ in.close();
+ return true;
+ } catch (IOException e) {
+ }
+ return false;
+ }
}
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleWriter.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleWriter.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleWriter.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -41,11 +41,12 @@
*/
public class ExtensionModuleWriter {
- public static void write(ExtensionModule extModule, URL extModuleURL) throws MetaMatrixComponentException {
+ public static void write(ExtensionModule extModule, URL[] contexts) throws MetaMatrixComponentException {
OutputStream out = null;
try {
- String extFile = extModuleURL.toString()+"?action=write"; //$NON-NLS-1$
- extModuleURL = URLHelper.buildURL(extFile);
+ String extFile = extModule.getFullName()+"?action=write"; //$NON-NLS-1$
+ // NOTE: only write to the very first context.
+ URL extModuleURL = URLHelper.buildURL(contexts[0], extFile);
URLConnection conn = extModuleURL.openConnection();
out = conn.getOutputStream();
@@ -65,27 +66,38 @@
* @param extModule
* @since 4.3
*/
- public static void deleteModule(URL extModuleURL) throws MetaMatrixComponentException{
- String extensionPath = extModuleURL.toString()+"?action=delete"; //$NON-NLS-1$
+ public static void deleteModule(String extModuleName, URL[] contexts) throws MetaMatrixComponentException{
+ URL extModuleURL = null;
+ try {
+ extModuleURL = ExtensionModuleReader.resolveExtensionModule(ExtensionModuleReader.MM_JAR_PROTOCOL+":"+extModuleName, contexts); //$NON-NLS-1$
+ if (extModuleURL == null) {
+ throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_does_not_exist", extModuleName)); //$NON-NLS-1$
+ }
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleReader.ext_module_does_not_exist", extModuleName)); //$NON-NLS-1$
+ }
+
+ String extFile = extModuleURL.toString()+"?action=delete"; //$NON-NLS-1$
+
InputStream in = null;
try {
- extModuleURL = URLHelper.buildURL(extensionPath);
+ extModuleURL = URLHelper.buildURL(extFile);
in = extModuleURL.openStream();
if (in != null) {
// now delete file from the extensions directory..
throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleWriter.ext_module_delete_failed", new Object[] {extModuleURL})); //$NON-NLS-1$
}
- DQPEmbeddedPlugin.logInfo("ExtensionModuleWriter.ext_module_delete", new Object[] {extModuleURL.getPath(), extModuleURL}); //$NON-NLS-1$
+ DQPEmbeddedPlugin.logInfo("ExtensionModuleWriter.ext_module_delete", new Object[] {extModuleName, extModuleURL}); //$NON-NLS-1$
}catch(FileNotFoundException e) {
// this is what we should expect if open the stream.
- DQPEmbeddedPlugin.logInfo("ExtensionModuleWriter.ext_module_delete", new Object[] {extModuleURL.getPath(), extModuleURL}); //$NON-NLS-1$
+ DQPEmbeddedPlugin.logInfo("ExtensionModuleWriter.ext_module_delete", new Object[] {extModuleName, extModuleURL}); //$NON-NLS-1$
}catch(IOException e) {
throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("ExtensionModuleWriter.ext_module_delete_failed", new Object[] {extModuleURL})); //$NON-NLS-1$
} finally {
if (in != null) {
try {in.close();}catch(IOException e) {}
}
- }
+ }
}
}
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -207,43 +207,47 @@
* @since 4.3
*/
public URL getUDFFile() {
- String udfFile = userPreferences.getProperty(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS);
- if (valid(udfFile)) {
- return getFullyQualifiedPath(udfFile);
- }
try {
- return getFullyQualifiedPath(getDefaultExtensionPath(), USER_DEFINED_FUNCTION_MODEL);
- } catch (MetaMatrixComponentException e) {
- return null;
- }
+ String udfFile = userPreferences.getProperty(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS);
+ if (valid(udfFile)) {
+ return ExtensionModuleReader.resolveExtensionModule(udfFile, getExtensionPath());
+ }
+ return ExtensionModuleReader.resolveExtensionModule(ExtensionModuleReader.MM_JAR_PROTOCOL+":"+USER_DEFINED_FUNCTION_MODEL, getExtensionPath()); //$NON-NLS-1$
+ } catch (IOException e) {
+ return null;
+ }
}
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getCommonExtensionClasspath()
*/
- public URL[] getCommonExtensionClasspath() {
+ public List<URL> getCommonExtensionClasspath() {
String classpath= userPreferences.getProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH);
if (valid(classpath)) {
try {
- URL context = getExtensionPath();
- return ExtensionModuleReader.resolveExtensionClasspath(classpath, context);
+ return ExtensionModuleReader.resolveExtensionClasspath(classpath, getExtensionPath());
} catch (IOException e) {
DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
}
}
+ /*
else {
try {
StringBuffer sb = new StringBuffer();
- List extModules = getExtensionModules();
+ List<ExtensionModule> extModules = getExtensionModules();
boolean valid = false;
- for (Iterator i = extModules.iterator(); i.hasNext();) {
- ExtensionModule module = (ExtensionModule)i.next();
+ for (ExtensionModule module:extModules) {
sb.append("extensionjar:").append(module.getFullName()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
valid = true;
}
if (valid) {
- URL context = getExtensionPath();
- return ExtensionModuleReader.resolveExtensionClasspath(sb.toString(), context);
+ classpath = sb.toString();
+ ArrayList<URL> allExtensionModules = new ArrayList<URL>();
+ URL[] contexts = getExtensionPath();
+ for (URL context:contexts) {
+ allExtensionModules.addAll(ExtensionModuleReader.resolveExtensionClasspath(classpath, context));
+ }
+ return allExtensionModules;
}
} catch (MetaMatrixComponentException e) {
// ok to return null
@@ -251,6 +255,7 @@
DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
}
}
+ */
return null;
}
@@ -323,7 +328,7 @@
return fileToSave;
}
- URL getVDBSaveLocation() throws MetaMatrixComponentException {
+ URL getVDBSaveLocation() {
URL[] urls = getVDBLocations();
for (int i = 0; i < urls.length; i++) {
String vdblocation = urls[i].toString().toLowerCase();
@@ -634,7 +639,7 @@
*/
public ConnectorBinding getConnectorBinding(String deployedBindingName)
throws MetaMatrixComponentException {
- return (ConnectorBinding)loadedConnectorBindings.get(deployedBindingName);
+ return loadedConnectorBindings.get(deployedBindingName);
}
/**
@@ -803,10 +808,15 @@
* @see com.metamatrix.dqp.service.ConfigurationService#getExtensionPath()
* @since 4.3
*/
- public URL getExtensionPath() {
- String path = userPreferences.getProperty(DQPEmbeddedProperties.DQP_EXTENSIONS);
+ public URL[] getExtensionPath() {
+ String path = userPreferences.getProperty(DQPEmbeddedProperties.DQP_EXTENSIONS, "./extensions/"); //$NON-NLS-1$
if (valid(path)) {
- return getFullyQualifiedPath(path);
+ ArrayList<URL> urlPaths = new ArrayList<URL>();
+ StringTokenizer st = new StringTokenizer(path, ";"); //$NON-NLS-1$
+ while(st.hasMoreElements()) {
+ urlPaths.add(getFullyQualifiedPath(st.nextToken()));
+ }
+ return urlPaths.toArray(new URL[urlPaths.size()]);
}
return null;
}
@@ -815,46 +825,32 @@
* @see com.metamatrix.dqp.service.ConfigurationService#useExtensionClasspath()
*/
public boolean useExtensionClasspath() {
- return (getExtensionPath() != null);
+ String path = userPreferences.getProperty(DQPEmbeddedProperties.DQP_EXTENSIONS);
+ return valid(path);
}
- /**
- * @return - returns a non null default path if the extension path is not defined
- * @throws MetaMatrixComponentException
- */
- URL getDefaultExtensionPath() throws MetaMatrixComponentException{
- URL extPath = getExtensionPath();
- if (extPath != null) {
- return extPath;
- }
- return getFullyQualifiedPath("./extensions/"); //$NON-NLS-1$
- }
-
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getExtensionModule(java.lang.String)
* @since 4.3
*/
public ExtensionModule getExtensionModule(String extModuleName) throws MetaMatrixComponentException {
- URL extModulePath = getFullyQualifiedPath(getDefaultExtensionPath(), extModuleName);
- return ExtensionModuleReader.loadExtensionModule(extModuleName, extModulePath);
+ return ExtensionModuleReader.loadExtensionModule(extModuleName, getExtensionPath());
}
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getExtensionModules()
* @since 4.3
*/
- public List getExtensionModules() throws MetaMatrixComponentException {
- URL extPath = getDefaultExtensionPath();
- return ExtensionModuleReader.loadExtensionModules(extPath);
+ public List<ExtensionModule> getExtensionModules() throws MetaMatrixComponentException {
+ return ExtensionModuleReader.loadExtensionModules(getExtensionPath());
}
/**
* @see com.metamatrix.dqp.service.ConfigurationService#saveExtensionModule(com.metamatrix.common.config.api.ExtensionModule)
* @since 4.3
*/
- public void saveExtensionModule(ExtensionModule extModule) throws MetaMatrixComponentException {
- URL extModuleURL = getFullyQualifiedPath(getDefaultExtensionPath(), extModule.getFullName());
- ExtensionModuleWriter.write(extModule, extModuleURL);
+ public void saveExtensionModule(ExtensionModule extModule) throws MetaMatrixComponentException {
+ ExtensionModuleWriter.write(extModule, getExtensionPath());
}
/**
@@ -862,8 +858,7 @@
* @since 4.3
*/
public void deleteExtensionModule(String extModuleName) throws MetaMatrixComponentException {
- URL extModuleURL = getFullyQualifiedPath(getDefaultExtensionPath(), extModuleName);
- ExtensionModuleWriter.deleteModule(extModuleURL);
+ ExtensionModuleWriter.deleteModule(extModuleName, getExtensionPath());
}
/**
@@ -930,9 +925,9 @@
public void loadUDF() throws MetaMatrixComponentException {
URL udfFile = getUDFFile();
if(udfFile != null && exists(udfFile)) {
- URL[] urls = getCommonExtensionClasspath();
+ List<URL> urls = getCommonExtensionClasspath();
try {
- this.udfSource = new UDFSource(udfFile, urls);
+ this.udfSource = new UDFSource(udfFile, urls.toArray(new URL[urls.size()]));
FunctionLibraryManager.registerSource(this.udfSource);
DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.udf_load", new Object[] {udfFile, urls}); //$NON-NLS-1$
} catch (IOException e) {
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -452,7 +452,7 @@
}
private void removeConnectorBinding(String connectorBindingName)
- throws MetaMatrixComponentException, ApplicationLifecycleException{
+ throws MetaMatrixComponentException {
// do house cleanup of the objects.
ConnectorID id = selectConnector(connectorBindingName);
connectorMgrs.remove(id);
@@ -565,17 +565,17 @@
}
DQPEmbeddedPlugin.logInfo("DataService.useClassloader", new Object[] {classPath}); //$NON-NLS-1$
- URL context = getConfigurationService().getExtensionPath();
- URL[] userPath = ExtensionModuleReader.resolveExtensionClasspath(classPath, context);
+ List<URL> userPath = ExtensionModuleReader.resolveExtensionClasspath(classPath, getConfigurationService().getExtensionPath());
// since we are using the extensions, get the common extension path
- URL[] commonExtensionPath = getConfigurationService().getCommonExtensionClasspath();
- ArrayList<URL> urlPath = new ArrayList<URL>();
+ List<URL> commonExtensionPath = getConfigurationService().getCommonExtensionClasspath();
- urlPath.addAll(Arrays.asList(userPath));
+ ArrayList<URL> urlPath = new ArrayList<URL>();
+ urlPath.addAll(userPath);
+
if (commonExtensionPath != null) {
- urlPath.addAll(Arrays.asList(commonExtensionPath));
+ urlPath.addAll(commonExtensionPath);
}
ClassLoader classLoader = new URLFilteringClassLoader(urlPath.toArray(new URL[urlPath.size()]), Thread.currentThread().getContextClassLoader(), new MetaMatrixURLStreamHandlerFactory());
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -22,6 +22,8 @@
package com.metamatrix.dqp.embedded.services;
+import java.io.File;
+import java.io.FileWriter;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
@@ -39,8 +41,10 @@
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.ConnectorBindingID;
+import com.metamatrix.common.config.api.ExtensionModule;
import com.metamatrix.common.config.model.BasicConnectorBinding;
import com.metamatrix.common.config.model.BasicConnectorBindingType;
+import com.metamatrix.common.config.model.BasicExtensionModule;
import com.metamatrix.common.util.crypto.CryptoUtil;
import com.metamatrix.common.util.crypto.NullCryptor;
import com.metamatrix.common.vdb.api.VDBArchive;
@@ -128,7 +132,7 @@
Properties p = EmbeddedTestUtil.getProperties();
p.remove(DQPEmbeddedProperties.DQP_EXTENSIONS);
service.userPreferences = p;
- assertTrue(service.getDefaultExtensionPath().toString().endsWith("dqp/extensions/")); //$NON-NLS-1$
+ assertTrue(service.getExtensionPath()[0].toString().endsWith("dqp/extensions/")); //$NON-NLS-1$
}
public void testGetDirectoryToStoreVDBS() throws Exception {
@@ -320,11 +324,39 @@
assertNotNull(service.getSystemVdb());
}
- public void testGetUDFFileName() throws Exception{
+ public void testUDF() throws Exception{
Properties p = EmbeddedTestUtil.getProperties();
- p.setProperty(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS, "./lib/foo.txt"); //$NON-NLS-1$
+ p.setProperty(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS, "extensionjar:foo.xmi"); //$NON-NLS-1$
+ p.setProperty("dqp.extensions", "./foo/;./bar/"); //$NON-NLS-1$ //$NON-NLS-2$
service.userPreferences = p;
- assertTrue(service.getUDFFile().toString().endsWith(UnitTestUtil.getTestScratchPath()+"/dqp/lib/foo.txt")); //$NON-NLS-1$
+
+ assertNull(service.getUDFFile());
+
+ File f = new File("target/scratch/dqp/bar"); //$NON-NLS-1$
+ f.mkdirs();
+ File xmiFile = new File("target/scratch/dqp/bar/foo.xmi"); //$NON-NLS-1$
+ FileWriter fw = new FileWriter(xmiFile);
+ fw.write("testing extension modules"); //$NON-NLS-1$
+ fw.flush();
+ fw.close();
+
+
+ assertTrue(service.getUDFFile().toString().endsWith(UnitTestUtil.getTestScratchPath()+"/dqp/bar/foo.xmi")); //$NON-NLS-1$
+
+ p.setProperty(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS, xmiFile.toURL().toString());
+ assertEquals(xmiFile.toURL().toString(), service.getUDFFile().toString());
+
+ xmiFile.delete();
+
+ // now look for the default
+ p.remove(DQPEmbeddedProperties.USER_DEFINED_FUNCTIONS);
+ assertNull(service.getUDFFile());
+
+ service.saveExtensionModule(new BasicExtensionModule(ConfigurationService.USER_DEFINED_FUNCTION_MODEL, "adding extension module", "xmi", "testing extension modules".getBytes())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ assertTrue(service.getUDFFile().toString().endsWith("/dqp/foo/"+ConfigurationService.USER_DEFINED_FUNCTION_MODEL)); //$NON-NLS-1$
+
+ f.delete();
}
public void testGetVDBs() throws Exception{
@@ -461,4 +493,65 @@
assertEquals(23, service.loadedConnectorTypes.size());
}
+ public void testUseMultipleExtensionPath() throws Exception {
+ Properties p = EmbeddedTestUtil.getProperties();
+ p.setProperty("dqp.extensions", "/foo/;../x/bar/"); //$NON-NLS-1$ //$NON-NLS-2$
+ service.userPreferences = p;
+ assertEquals("mmfile:/foo/", service.getExtensionPath()[0].toExternalForm()); //$NON-NLS-1$
+ assertEquals("mmfile:target/scratch/x/bar/", service.getExtensionPath()[1].toExternalForm()); //$NON-NLS-1$
+ }
+
+ public void testGetExtensionModule() throws Exception {
+ Properties p = EmbeddedTestUtil.getProperties();
+
+ File f = new File("target/scratch/dqp/bar"); //$NON-NLS-1$
+ f.mkdirs();
+ FileWriter fw = new FileWriter("target/scratch/dqp/bar/extfile.jar"); //$NON-NLS-1$
+ fw.write("testing extension modules"); //$NON-NLS-1$
+ fw.flush();
+ fw.close();
+
+ p.setProperty("dqp.extensions", "./foo/;./bar/"); //$NON-NLS-1$ //$NON-NLS-2$
+ service.userPreferences = p;
+
+ // get all the modules in the system.
+ List<ExtensionModule> modules = service.getExtensionModules();
+ assertEquals("extfile.jar", modules.get(0).getID().getFullName()); //$NON-NLS-1$
+ assertEquals("testing extension modules", new String(modules.get(0).getFileContents())); //$NON-NLS-1$
+
+ // get individual module
+ ExtensionModule m = service.getExtensionModule("extfile.jar"); //$NON-NLS-1$
+ assertEquals("testing extension modules", new String(m.getFileContents())); //$NON-NLS-1$
+
+ // test adding of the extension module
+ service.saveExtensionModule(new BasicExtensionModule("added-ext.jar", "adding extension module", "jar", "testing extension modules".getBytes())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ modules = service.getExtensionModules();
+ assertEquals(2, modules.size());
+
+ m = service.getExtensionModule("added-ext.jar"); //$NON-NLS-1$
+ assertEquals("testing extension modules", new String(m.getFileContents())); //$NON-NLS-1$
+
+ modules = service.getExtensionModules();
+ assertEquals(2, modules.size());
+
+ // test common class path; also makes sure that the conect in position (1) has the newly added module
+ service.userPreferences.setProperty("dqp.extension.CommonClasspath", "extensionjar:added-ext.jar;extensionjar:extfile.jar"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("mmfile:target/scratch/dqp/foo/added-ext.jar", service.getCommonExtensionClasspath().get(0).toString()); //$NON-NLS-1$
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", service.getCommonExtensionClasspath().get(1).toString()); //$NON-NLS-1$
+
+ // test delete
+ service.deleteExtensionModule("added-ext.jar"); //$NON-NLS-1$
+ modules = service.getExtensionModules();
+ assertEquals(1, modules.size());
+
+ // test for non-existent module
+ try {
+ m = service.getExtensionModule("added-ext.jar"); //$NON-NLS-1$
+ fail("must have failed to find"); //$NON-NLS-1$
+ } catch (MetaMatrixComponentException e) {
+ }
+
+ f.delete();
+ }
+
}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-04-09 21:30:19 UTC (rev 742)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-04-09 23:08:13 UTC (rev 743)
@@ -102,7 +102,7 @@
* files are loaded usually as the extension modules.
* @return URL[] - Classpath for the UDF jar files
*/
- public URL[] getCommonExtensionClasspath();
+ public List<URL> getCommonExtensionClasspath();
/**
* URL to Log file name
@@ -262,7 +262,7 @@
* @return String URL - url to extension path; null if extensions are not used
* @since 4.3
*/
- public URL getExtensionPath();
+ public URL[] getExtensionPath();
/**
* Get the list of extension modules available in the store
@@ -270,7 +270,7 @@
* @throws MetaMatrixComponentException
* @since 4.3
*/
- public List getExtensionModules() throws MetaMatrixComponentException;
+ public List<ExtensionModule> getExtensionModules() throws MetaMatrixComponentException;
/**
* Get the extension module by the given identifier
15 years, 8 months
teiid SVN: r742 - in branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config: api and 3 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-09 17:30:19 -0400 (Thu, 09 Apr 2009)
New Revision: 742
Modified:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/Configuration.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationModelContainer.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationObjectEditor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponent.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponentID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLHelper.java
Log:
Teiid 323 - removing the psc nomeclature
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -26,6 +26,7 @@
import java.io.InputStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Properties;
@@ -40,6 +41,7 @@
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
import com.metamatrix.common.config.model.BasicHost;
+import com.metamatrix.common.config.model.BasicProductType;
import com.metamatrix.common.config.reader.CurrentConfigurationReader;
import com.metamatrix.common.config.reader.PropertiesConfigurationReader;
import com.metamatrix.common.properties.UnmodifiableProperties;
@@ -298,7 +300,9 @@
* @see #ProductType
*/
public Collection getProductTypes() throws ConfigurationException {
- return getReader().getConfigurationModel().getProductTypes();
+ Collection c = new ArrayList(1);
+ c.add(BasicProductType.PRODUCT_TYPE);
+ return c;
}
/**
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -35,7 +35,6 @@
public static final int PRODUCT_COMPONENT_CODE = ComponentType.PRODUCT_COMPONENT_TYPE_CODE;
public static final int VM_COMPONENT_CODE = ComponentType.VM_COMPONENT_TYPE_CODE;
public static final int RESOURCE_DESCRIPTOR_COMPONENT_CODE = 9;
- public static final int PSC_COMPONENT_CODE = ComponentType.PSC_COMPONENT_TYPE_CODE;
public static final int HOST_COMPONENT_CODE = ComponentType.HOST_COMPONENT_TYPE_CODE;
public static final int SHARED_RESOURCE_COMPONENT_CODE = 10;
public static final int DEPLOYED_COMPONENT_CODE = ComponentType.DEPLOYED_COMPONENT_TYPE_CODE;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -38,7 +38,7 @@
public static final int RESOURCE_COMPONENT_TYPE_CODE = 4;
public static final int VM_COMPONENT_TYPE_CODE = 5;
- public static final int PSC_COMPONENT_TYPE_CODE = 6;
+// public static final int PSC_COMPONENT_TYPE_CODE = 6;
public static final int HOST_COMPONENT_TYPE_CODE = 7;
public static final int DEPLOYED_COMPONENT_TYPE_CODE = 8;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/Configuration.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/Configuration.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/Configuration.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -173,14 +173,14 @@
* @param pscID is the ProductServiceConfig for which the component belongs
* @return Collection of deployed components that belong to the ProductServiceConfig
*/
- Collection getDeployedComponents(ComponentDefnID componentDefnID, ProductServiceConfigID pscID);
+// Collection getDeployedComponents(ComponentDefnID componentDefnID, ProductServiceConfigID pscID);
/**
* Returns true if the PSC is deployed to any host.
* @returns boolean true if the PSC is deployed
*/
- boolean isPSCDeployed(ProductServiceConfigID pscID);
+ // boolean isPSCDeployed(ProductServiceConfigID pscID);
/**
@@ -252,7 +252,6 @@
* be returned for the <i>deployed</i> vm that they are deployed to,
* <i>not</i> the vm component definition which may itself be deployed
* many times.
- * @deprecated As of v2.0, replaced by {@link #getDeployedServicesForVM(DeployedComponent)}
*/
Collection getDeployedServicesForVM(VMComponentDefnID vmComponentID) ;
@@ -277,7 +276,7 @@
* @return Collection of DeployedComponent objects representing deployed
* services
*/
- Collection getDeployedServices(VMComponentDefn vm, ProductServiceConfig psc) ;
+ // Collection getDeployedServices(VMComponentDefn vm, ProductServiceConfig psc) ;
/**
* Returns a Collection of ProductServiceConfig objects which have
@@ -291,7 +290,7 @@
* VMComponentDefn
* @return Collection of ProductServiceConfig objects
*/
- Collection getPSCsForVM(VMComponentDefn vm) ;
+// Collection getPSCsForVM(VMComponentDefn vm) ;
/**
@@ -299,7 +298,7 @@
* @param pscID is the id for specific ProductServiceConfig
* @return ProductServiceConfig to be returned
*/
- ProductServiceConfig getPSC(ComponentDefnID pscID) ;
+// ProductServiceConfig getPSC(ComponentDefnID pscID) ;
/**
@@ -313,7 +312,7 @@
* @return Collection of type {@link ProductServiceConfigID PSCID} that contain the
* ServiceComponentDefnID, or empty collection if none is found
*/
- Collection getPSCsForServiceDefn(ServiceComponentDefnID serviceDefnID) ;
+ // Collection getPSCsForServiceDefn(ServiceComponentDefnID serviceDefnID) ;
/**
* Returns a <code>Collection</code> of component objects that are dependent on the
@@ -391,7 +390,7 @@
* all the ProductServiceConfig defined.
* @return Collection of type <code>ProductServiceConfig</code>
*/
- Collection getPSCs();
+// Collection getPSCs();
/**
* Returns a <code>ServiceComponentDefn</code>
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationModelContainer.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationModelContainer.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationModelContainer.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -135,21 +135,19 @@
* @return
* @since 4.2
*/
- Collection getProductTypes();
+ // Collection getProductTypes();
/**
* Return a <code>ProductType</code> based on the specified name.
* @return
* @since 4.2
*/
- ProductType getProductType(String fullname);
+ // ProductType getProductType(String fullname);
SharedResource getResource(String resourceName);
Collection getResources();
-
- ConfigurationModelContainer copyAs(ConfigurationID configID) throws ConfigurationException;
Object clone();
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationObjectEditor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationObjectEditor.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConfigurationObjectEditor.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -126,7 +126,7 @@
* property values will also be copied. The copies will all retain their original
* short names; their full names will reflect the new configuration name.</p>
*/
- Configuration createConfiguration(Configuration original, String newName);
+ // Configuration createConfiguration(Configuration original, String newName);
/**
* Create a new ComponentType instance with the specified name.
@@ -159,7 +159,7 @@
* @param monitored is a boolean insdicating if the type is to be monitored
* @return ComponentType
*/
- ProductType createProductType(String name, boolean deployable, boolean monitored);
+// ProductType createProductType(String name, boolean deployable, boolean monitored);
/**
* Create a new ProductType instance with the specified name.
@@ -170,7 +170,7 @@
* @param monitored is a boolean insdicating if the type is to be monitored
* @return ComponentType
*/
- ProductType createProductType(String name, Collection serviceComponentTypes, boolean deployable, boolean monitored);
+// ProductType createProductType(String name, Collection serviceComponentTypes, boolean deployable, boolean monitored);
/**
* Create a new ComponentTypeDefn and update the ComponentType with the new defintion.
@@ -310,7 +310,7 @@
* will belong to
* @return new ServiceComponentDefn
*/
- ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID);
+// ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID);
/**
* Create a new ResourceDescriptor Component Definition instance with a specified configuration
@@ -401,15 +401,13 @@
* @param hostId the host the vm is deployed in.
* @param vmId the VM that the service is deployed in.
* @param serviceComponentDefnID is the service component definition to be deployed
- * @param pscID the ID of the ProductServiceConfig of the
- * ServiceComponentDefn which is to be deployed.
* @param serviceComponentTypeID is type of the service to be deployed
* @return the DeployedComponent instance with the specified ID.
* @throws IllegalArgumentException if either of the IDs null
*
* @see createDeployedServiceComponent(String, Configuration, HostID, VMComponentDefn)
*/
- DeployedComponent createDeployedServiceComponent(String instanceName, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfigID pscID, ComponentTypeID serviceComponentTypeID);
+ DeployedComponent createDeployedServiceComponent(String instanceName, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceComponentDefnID, ComponentTypeID serviceComponentTypeID);
/**
* Create a new DeployedComponent instance respresenting a deployed Service.
@@ -424,7 +422,7 @@
* @return the DeployedComponent instance with the specified ID.
* @throws IllegalArgumentException if either of the IDs null
*/
- DeployedComponent createDeployedServiceComponent(String instanceName, Configuration configuration, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefn serviceComponentDefn, ProductServiceConfigID pscID);
+// DeployedComponent createDeployedServiceComponent(String instanceName, Configuration configuration, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefn serviceComponentDefn, ProductServiceConfigID pscID);
/**
* Copy-creation method, creates a new PSC from the given PSC, with the
@@ -439,7 +437,7 @@
* @param newName new String name for the new PSC
* @return newly-created ProductServiceConfig object
*/
- ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductServiceConfig originalPSC, String newName);
+// ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductServiceConfig originalPSC, String newName);
/**
* Copy-creation method, creates a new PSC from the given PSC, with the
@@ -463,14 +461,14 @@
* ID objects. Use {@link #addServiceComponentDefn} or
* {@link #removeServiceComponentDefn} in conjuncture with this method.
*/
- ProductServiceConfig createProductServiceConfig(ConfigurationID configurationID, ProductTypeID productTypeID, String componentName);
+ // ProductServiceConfig createProductServiceConfig(ConfigurationID configurationID, ProductTypeID productTypeID, String componentName);
/**
* Allows the creation of an empty ProductServiceConfig entirely from
* ID objects. Use {@link #addServiceComponentDefn} or
* {@link #removeServiceComponentDefn} in conjuncture with this method.
*/
- ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductTypeID productTypeID, String componentName);
+// ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductTypeID productTypeID, String componentName);
/**
* Deploys the ServiceComponentDefns indicated by the ProductServiceConfig,
@@ -485,26 +483,24 @@
* @return Collection of DeployedComponent objects, each representing
* one of the deployed ServiceComponentDefns
*/
- Collection deployProductServiceConfig(Configuration configuration, ProductServiceConfig psc, HostID hostId, VMComponentDefnID vmId);
+ // Collection deployProductServiceConfig(Configuration configuration, ProductServiceConfig psc, HostID hostId, VMComponentDefnID vmId);
/**
- * Deploys a ServiceComponentDefn anywhere that it's PSC is already
- * deployed. This method is harmless to call if the
- * ServiceComponentDefn is already deployed anywhere. It is
- * also harmless to call if the PSC has not been deployed at
- * all (meaning no other services of the PSC have been deployed.) The
- * ServiceComponentDefn must belong to the PSC, but this method
- * does not check for that. A Collection of any newly-created
+ * Deploys a ServiceComponentDefn to the specified VM.
+ * This method is harmless to call if the
+ * ServiceComponentDefn is already deployed. It is
+ * also harmless to call if the VM has not been started at
+ * all. A Collection of any newly-created
* DeployedComponent objects is returned.
* @param configuration must be the Configuration containing both
- * the ServiceComponentDefn and PSC ID parameters (but this is not
+ * the ServiceComponentDefn and VM ID parameters (but this is not
* checked for in this method)
* @param serviceComponentDefn to be deployed
- * @param pscID PSC ID that may already be deployed somewhere in the
+ * @param vmID VMComponentDefn ID that may already be deployed somewhere in the
* Configuration parameter
- * @return Collection of newly-created DeployedComponent objects
+ * @return DeployedComponent of newly-created DeployedComponent object
*/
- Collection deployServiceDefn(Configuration configuration, ServiceComponentDefn serviceComponentDefn, ProductServiceConfigID pscID);
+ DeployedComponent deployServiceDefn(Configuration configuration, ServiceComponentDefn serviceComponentDefn, VMComponentDefnID vmID);
// ----------------------------------------------------------------------------------
// M O D I F I C A T I O N M E T H O D S
@@ -571,17 +567,6 @@
* will have it's <code>enabled</code> field updated.
* @param enabled whether this service definition should be enabled for
* deployment or not.
- * @param deleteDeployedComps With this parameter the client can control
- * whether any deployed service components of the ServiceComponentDefn
- * parameter are deleted automatically. If <code>false</code> is passed
- * in, and one or more deployed services <i>do</i> exist for the
- * ServiceComponentDefn parameter, a ConfigurationException will be thrown.
- * If <code>true</code> is passed in, any deployed service components
- * in the indicated configuration will be automatically deleted.
- * @return the Collection of affected
- * {@link DeployedComponent DeployedComponents}; either the newly-created
- * DeployedComponents, or the newly-deleted DeployedComponents. If
- * none were affected, a non-null empty Collection will be returned.
* @throws ConfigurationException if <code>false</code> was passed in for
* the deleteDeployedComps parameter, and any
* {@link DeployedComponent DeployedComponents} exist for the
@@ -591,15 +576,15 @@
*/
- Collection setEnabled(Configuration configuration, ServiceComponentDefn serviceComponentDefn, ProductServiceConfig psc, boolean enabled, boolean deleteDeployedComps)
+ DeployedComponent setEnabled(Configuration configuration, ServiceComponentDefn serviceComponentDefn, VMComponentDefn vm, boolean enabled)
throws ConfigurationException;
/**
- * It simply modifies the ProductServiceConfig by setting the specified service
- * enabled value and creates the necessary change object.
+ * It simply updates the DeployedComponent by setting the specified service
+ * enabled value.
*/
- ProductServiceConfig setEnabled(ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfig psc, boolean enabled);
+ DeployedComponent setEnabled(ServiceComponentDefnID serviceComponentDefnID, DeployedComponent deployComponent, boolean enabled);
/**
@@ -611,8 +596,8 @@
* @return updated ProductServiceConfig
* @throws ConfigurationException
*/
- ProductServiceConfig updateProductServiceConfig(Configuration config, ProductServiceConfig psc, Collection newServiceIDList)
- throws ConfigurationException;
+// ProductServiceConfig updateProductServiceConfig(Configuration config, ProductServiceConfig psc, Collection newServiceIDList)
+ // throws ConfigurationException;
/**
@@ -627,7 +612,7 @@
* ProductServiceConfiguration (and removed from any PSC it previously
* belonged to).
*/
- ProductServiceConfig addServiceComponentDefn(Configuration configuration, ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID);
+// ProductServiceConfig addServiceComponentDefn(Configuration configuration, ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID);
/**
* Adds an existing ServiceComponentDefn to indicated PSC.
@@ -638,7 +623,7 @@
* ProductServiceConfiguration (and removed from any PSC it previously
* belonged to).
*/
- ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID);
+ // ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID);
/**
* Deletes the ServiceComponentDefn from the indicated PSC, and from the
@@ -657,7 +642,7 @@
* @param serviceComponentType ComponentType to be added to the
* ProductType
*/
- ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType);
+ // ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType);
/**
* Removes the service type represented by the indicated ComponentType from
@@ -666,7 +651,7 @@
* @param serviceComponentType ComponentType to be taken from the
* ProductType
*/
- ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType);
+ // ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType);
/**
* Returns a modifiable properties object for the specified ComponentObject.
@@ -683,7 +668,7 @@
* @param name The new name.
* @return The PSC with its name changed.
*/
- ProductServiceConfig renamePSC(ProductServiceConfig psc, String name) throws ConfigurationException;
+// ProductServiceConfig renamePSC(ProductServiceConfig psc, String name) throws ConfigurationException;
/**
* Change the name of a previously defined VM.
@@ -964,7 +949,7 @@
* will belong to
* @return new ConnectorBinding
*/
- ConnectorBinding createConnectorComponent(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) ;
+ // ConnectorBinding createConnectorComponent(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) ;
void addAuthenticationProvider(Configuration configuration, AuthenticationProvider provider);
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -32,7 +32,7 @@
public static final String COMPONENT_TYPE_NAME = "Connector"; //$NON-NLS-1$
public static final ComponentTypeID CONNECTOR_TYPE_ID = new ComponentTypeID(COMPONENT_TYPE_NAME);
- public static final ProductTypeID CONNECTOR_PROD_TYPEID = new ProductTypeID(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME);
+ public static final ProductTypeID CONNECTOR_PROD_TYPEID = ProductTypeID.PRODUCT_TYPE_ID;
public interface Attributes {
public static final String CONNECTOR_CLASS = "ConnectorClass";//$NON-NLS-1$
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponent.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponent.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponent.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -62,6 +62,12 @@
* when the deployed component is a VM.
*/
public static final Long SERVICE_UID_FOR_DEPLOYED_VM = new Long(0);
+
+ /**
+ * Indicates if the deployed component is enabled for starting.
+ * @return true if the deployed component is enabled for starting
+ */
+ boolean isEnabled();
/**
* <p>
@@ -96,15 +102,6 @@
public ServiceComponentDefnID getServiceComponentDefnID();
/**
- * Returns the <code>ProductServiceConfigID</code> of the service that is
- * deployed (if it is a service).
- * Null will be returned if this <code>DeployedComponent</code>
- * is a deployed VM.
- * @return the component id, null when this is a deployed VM
- */
- public ProductServiceConfigID getProductServiceConfigID();
-
- /**
* Returns the <code>ComponentID</code> for the VM that this component
* is deployed on, or if this object represents the deployed VM itself.
* @return the vm id
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponentID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponentID.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/DeployedComponentID.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -31,7 +31,6 @@
private final HostID hostID;
private final VMComponentDefnID vmID;
private final ServiceComponentDefnID serviceID;
- private final ProductServiceConfigID pscID;
/**
* Instantiate a VM Deployed Component ID
@@ -42,20 +41,18 @@
this.hostID = hostId;
this.vmID = vmId;
this.serviceID = null;
- this.pscID = null;
}
/**
* Instantiate a Service or Connector Binding deployed service, that incorporates the
* PSC name into it
*/
- public DeployedComponentID(String name, ConfigurationID configId, HostID hostId, VMComponentDefnID vmId, ProductServiceConfigID pscID, ServiceComponentDefnID serviceId) {
- super(DeployedComponentID.createDeployedName(name, configId, hostId, vmId, pscID, serviceId));
+ public DeployedComponentID(String name, ConfigurationID configId, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceId) {
+ super(DeployedComponentID.createDeployedName(name, configId, hostId, vmId, serviceId));
this.configID = configId;
this.hostID = hostId;
this.vmID = vmId;
this.serviceID = serviceId;
- this.pscID = pscID;
}
/**
@@ -83,9 +80,8 @@
/**
* Responsible for creating the structuring Service id for this deployed component
*/
- private static final String createDeployedName(String name, ConfigurationID configID, HostID hostID, VMComponentDefnID vmComponentID, ProductServiceConfigID pscID, ServiceComponentDefnID serviceComponentID) {
+ private static final String createDeployedName(String name, ConfigurationID configID, HostID hostID, VMComponentDefnID vmComponentID, ServiceComponentDefnID serviceComponentID) {
Assertion.isNotNull(configID);
- Assertion.isNotNull(pscID);
Assertion.isNotNull(hostID);
Assertion.isNotNull(vmComponentID);
Assertion.isNotNull(serviceComponentID);
@@ -96,8 +92,6 @@
sb.append(hostID.getName());
sb.append(IDVerifier.DELIMITER_CHARACTER);
sb.append(vmComponentID.getName());
- sb.append(IDVerifier.DELIMITER_CHARACTER);
- sb.append(pscID.getName());
sb.append(IDVerifier.DELIMITER_CHARACTER);
sb.append(serviceComponentID.getName());
@@ -123,8 +117,5 @@
public ServiceComponentDefnID getServiceID() {
return serviceID;
}
- public ProductServiceConfigID getPscID() {
- return pscID;
- }
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductType.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -24,6 +24,8 @@
import java.util.Collection;
+import com.metamatrix.common.config.model.BasicProductType;
+
/**
* <p>A Product, in this context, is simply a named collection of
* Service types. For example, the MetaMatrix Server product has
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/api/ProductTypeID.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -24,6 +24,7 @@
public class ProductTypeID extends ComponentTypeID {
+ public static final ProductTypeID PRODUCT_TYPE_ID = new ProductTypeID(ProductType.COMPONENT_TYPE_NAME);
// /**
// * This is a Collection of all known type names of
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfiguration.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -87,7 +87,6 @@
/**
* Key = ComponentID Value=Component
*/
- private Map pscs = new HashMap();
private Map svcComponents = new HashMap();
private Map connectors = new HashMap();
private Map authProviders = new HashMap();
@@ -142,12 +141,7 @@
*/
public Map getComponentDefns() {
int s = 1;
-
-
- if (pscs != null) {
- s += pscs.size();
- }
-
+
if (svcComponents != null) {
s += svcComponents.size();
}
@@ -174,7 +168,6 @@
Map comps = new HashMap(s);
- comps.putAll(pscs);
comps.putAll(pools);
comps.putAll(svcComponents);
comps.putAll(vms);
@@ -194,12 +187,7 @@
return true;
}
return false;
- case ComponentType.PSC_COMPONENT_TYPE_CODE:
- if (getPSC(componentID) != null) {
- return true;
- }
- return false;
-
+
case ComponentType.SERVICE_COMPONENT_TYPE_CODE:
if (getServiceComponentDefn(componentID) != null) {
return true;
@@ -245,9 +233,7 @@
switch(BasicUtil.getComponentType(componentID)){
case ComponentType.VM_COMPONENT_TYPE_CODE:
return getVMDefn(componentID);
- case ComponentType.PSC_COMPONENT_TYPE_CODE:
- return getPSC(componentID);
- case ComponentType.SERVICE_COMPONENT_TYPE_CODE:
+ case ComponentType.SERVICE_COMPONENT_TYPE_CODE:
return getServiceComponentDefn(componentID);
case ComponentType.RESOURCE_COMPONENT_TYPE_CODE:
return getConnectionPool(componentID);
@@ -307,14 +293,6 @@
}
- public ProductServiceConfig getPSC(ComponentDefnID componentID) {
-
- if (pscs.containsKey(componentID)) {
- return ((ProductServiceConfig) pscs.get(componentID));
- }
- return null;
- }
-
public ResourceDescriptor getConnectionPool(ComponentDefnID componentID) {
if (pools.containsKey(componentID)) {
@@ -432,13 +410,7 @@
return ids;
}
- allDefnsIDs = pscs.values().iterator();
- ids = getIDs(allDefnsIDs, componentTypeID);
-
- if (ids.size() > 0) {
- return ids;
- }
-
+
allDefnsIDs = pools.values().iterator();
ids = getIDs(allDefnsIDs, componentTypeID);
@@ -480,27 +452,6 @@
}
- /**
- * Returns Collection of ProductServiceConfigID objects for the
- * specified Product type
- * @param productTypeID of product type
- * @return Collection of ProductServiceConfigID objects of this type,
- * contained in this Configuration
- * @deprecated As of GG, please use {@link #getComponentDefnIDs(ComponentTypeID)}
- */
- public Collection getProductServiceConfigIDs(ProductTypeID productTypeID){
- ArrayList ids = new ArrayList();
- Iterator allDefns = pscs.values().iterator();
- ProductServiceConfig aDefn = null;
- while (allDefns.hasNext()){
- aDefn = (ProductServiceConfig)allDefns.next();
- if (aDefn.getComponentTypeID().equals(productTypeID)){
- ids.add(aDefn.getID());
- }
- }
- return ids;
- }
-
public Properties getDependentPropsForComponent(BaseID componentObjectID) {
if (componentObjectID == null) {
return new Properties();
@@ -607,55 +558,8 @@
return comps;
}
+
- public boolean isPSCDeployed(ProductServiceConfigID pscID) {
-
- ProductServiceConfig psc = getPSC(pscID);
- if (psc == null) {
- return false;
- }
-
- for (Iterator it=psc.getServiceComponentDefnIDs().iterator(); it.hasNext();) {
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) it.next();
-
- // check to make sure the service is deployed to the sepecific PSC
- Collection dcs = getDeployedComponents(svcID);
- for (Iterator itdcs = dcs.iterator(); itdcs.hasNext(); ) {
- DeployedComponent dc = (DeployedComponent) itdcs.next();
-
- if (dc.getProductServiceConfigID().equals(pscID)) {
- return true;
- }
- }
-
- }
-
- return false;
-
-
- }
- public Collection getDeployedComponents(ComponentDefnID componentDefnID, ProductServiceConfigID pscID) {
-
- Collection comps = new ArrayList(deployedComponents.size());
-
- // verify the component is a componentDefn in this configuration
- if (doesExist(componentDefnID)) {
-
- DeployedComponent dc;
- for (Iterator it=getDeployedComponents().iterator(); it.hasNext(); ){
- dc = (DeployedComponent) it.next();
- if (dc.getDeployedComponentDefnID().equals(componentDefnID) &&
- dc.getProductServiceConfigID().equals(pscID) ) {
- comps.add(dc);
- }
- }
- }
-
- return comps;
-
- }
-
-
public VMComponentDefn getVMForHost(VMComponentDefnID vmID, HostID hostID) {
Collection dcs = getVMsForHost(hostID);
@@ -835,8 +739,7 @@
* be returned for the <i>deployed</i> vm that they are deployed to,
* <i>not</i> the vm component definition which may itself be deployed
* many times.
- * @deprecated As of v2.0, replaced by {@link #getDeployedServicesForVM(DeployedComponent)}
- */
+ */
public Collection getDeployedServicesForVM(VMComponentDefnID vmComponentID) {
if (vmComponentID == null) {
return Collections.EMPTY_LIST;
@@ -883,34 +786,34 @@
* services
* @throws InvalidArgumentException if either parameter is null
*/
- public Collection getDeployedServices(VMComponentDefn vm, ProductServiceConfig psc) {
- if (vm == null || psc == null) {
- return Collections.EMPTY_LIST;
- }
- VMComponentDefnID vmComponentID = (VMComponentDefnID) vm.getID();
- HostID hostID = vm.getHostID();
- ProductServiceConfigID pscID = (ProductServiceConfigID)psc.getID();
-
- Collection dcs = getDeployedComponents();
+// public Collection getDeployedServices(VMComponentDefn vm, ProductServiceConfig psc) {
+// if (vm == null || psc == null) {
+// return Collections.EMPTY_LIST;
+// }
+// VMComponentDefnID vmComponentID = (VMComponentDefnID) vm.getID();
+// HostID hostID = vm.getHostID();
+// ProductServiceConfigID pscID = (ProductServiceConfigID)psc.getID();
+//
+// Collection dcs = getDeployedComponents();
+//
+// Collection comps = new ArrayList(dcs.size());
+// DeployedComponent dc;
+//// ComponentDefn comp;
+// for (Iterator it = dcs.iterator(); it.hasNext(); ) {
+// dc = (DeployedComponent) it.next();
+// // if component is a ServiceComponent and the VM id matches
+//// comp = dc.getDeployedComponentDefn(this);
+//// if (comp instanceof ServiceComponentDefn &&
+// if (dc.getVMComponentDefnID().equals(vmComponentID) &&
+// dc.getHostID().equals(hostID) && dc.getProductServiceConfigID() != null &&
+// dc.getProductServiceConfigID().equals(pscID)) {
+// comps.add(dc);
+// }
+// }
+// return comps;
+// }
- Collection comps = new ArrayList(dcs.size());
- DeployedComponent dc;
-// ComponentDefn comp;
- for (Iterator it = dcs.iterator(); it.hasNext(); ) {
- dc = (DeployedComponent) it.next();
- // if component is a ServiceComponent and the VM id matches
-// comp = dc.getDeployedComponentDefn(this);
-// if (comp instanceof ServiceComponentDefn &&
- if (dc.getVMComponentDefnID().equals(vmComponentID) &&
- dc.getHostID().equals(hostID) && dc.getProductServiceConfigID() != null &&
- dc.getProductServiceConfigID().equals(pscID)) {
- comps.add(dc);
- }
- }
- return comps;
- }
-
/**
* Returns a Collection of ProductServiceConfig objects which have
* ServiceComponentDefns which are deployed to the indicated VM.
@@ -924,34 +827,34 @@
* @return Collection of ProductServiceConfig objects
* @throws InvalidArgumentException if the parameter is null
*/
- public Collection getPSCsForVM(VMComponentDefn vm){
- Iterator deployedServices = this.getDeployedServicesForVM(vm).iterator();
- HashSet result = new HashSet();
- DeployedComponent dc = null;
- while (deployedServices.hasNext()){
- dc = (DeployedComponent)deployedServices.next();
- result.add(this.getPSC((dc.getProductServiceConfigID())));
- }
- return result;
- }
+// public Collection getPSCsForVM(VMComponentDefn vm){
+// Iterator deployedServices = this.getDeployedServicesForVM(vm).iterator();
+// HashSet result = new HashSet();
+// DeployedComponent dc = null;
+// while (deployedServices.hasNext()){
+// dc = (DeployedComponent)deployedServices.next();
+// result.add(this.getPSC((dc.getProductServiceConfigID())));
+// }
+// return result;
+// }
- public Collection getPSCsForServiceDefn(ServiceComponentDefnID serviceDefnID) {
- Collection result = new ArrayList(pscs.size());
- if (serviceDefnID == null) {
- return Collections.EMPTY_LIST;
- }
- Object obj;
- ProductServiceConfig psc = null;
- for (Iterator iter = pscs.values().iterator(); iter.hasNext(); ){
- obj = iter.next();
- psc = (ProductServiceConfig)obj;
- if (psc.getServiceComponentDefnIDs().contains(serviceDefnID)){
- result.add(psc);
- }
- }
- return result;
-
- }
+// public Collection getPSCsForServiceDefn(ServiceComponentDefnID serviceDefnID) {
+// Collection result = new ArrayList(pscs.size());
+// if (serviceDefnID == null) {
+// return Collections.EMPTY_LIST;
+// }
+// Object obj;
+// ProductServiceConfig psc = null;
+// for (Iterator iter = pscs.values().iterator(); iter.hasNext(); ){
+// obj = iter.next();
+// psc = (ProductServiceConfig)obj;
+// if (psc.getServiceComponentDefnIDs().contains(serviceDefnID)){
+// result.add(psc);
+// }
+// }
+// return result;
+//
+// }
public Collection getComponentObjectDependencies(BaseID componentObjectID) {
@@ -977,18 +880,18 @@
* of the BasicServiceComponentDefn cannot check to see if it is
* dependent upon its PSC.
*/
- if (componentObjectID instanceof ProductServiceConfigID) {
- ProductServiceConfigID pscID = (ProductServiceConfigID)componentObjectID;
- ProductServiceConfig psc = (ProductServiceConfig)this.pscs.get(pscID);
- Collection serviceComponentDefns = psc.getServiceComponentDefnIDs();
- Iterator iterator = serviceComponentDefns.iterator();
- while (iterator.hasNext()) {
- ComponentDefnID id = (ComponentDefnID) iterator.next();
- deps.add(getComponentDefn(id));
-
-// deps.add(this.getComponentDefns().get(iterator.next()));
- }
- }else {
+// if (componentObjectID instanceof ProductServiceConfigID) {
+// ProductServiceConfigID pscID = (ProductServiceConfigID)componentObjectID;
+// ProductServiceConfig psc = (ProductServiceConfig)this.pscs.get(pscID);
+// Collection serviceComponentDefns = psc.getServiceComponentDefnIDs();
+// Iterator iterator = serviceComponentDefns.iterator();
+// while (iterator.hasNext()) {
+// ComponentDefnID id = (ComponentDefnID) iterator.next();
+// deps.add(getComponentDefn(id));
+//
+//// deps.add(this.getComponentDefns().get(iterator.next()));
+// }
+// }else {
Map cd = this.getComponentDefns();
for (Iterator it=cd.values().iterator(); it.hasNext(); ) {
@@ -997,7 +900,7 @@
deps.add(co);
}
}
- }
+ // }
@@ -1030,34 +933,7 @@
}
-
- /**
- * Returns a <code>Collection</code> of type <code>ProductServiceConfig</code> that represent
- * all the ProductServiceConfig defined.
- * @return Collection of type <code>ProductServiceConfig</code>
- * @throws ConfigurationException if an error occurred within or during communication with the Configuration Service.
- * @see #ProductServiceConfig
- */
- public Collection getPSCs() {
- if (pscs == null) {
- return Collections.EMPTY_LIST;
- }
-
- Collection rd = new ArrayList(pscs.size());
-
- Iterator compDefns = pscs.values().iterator();
- ComponentDefn aDefn = null;
-
- while (compDefns.hasNext()){
- aDefn = (ComponentDefn)compDefns.next();
- rd.add(aDefn);
- }
-
- return rd;
-
- }
-
-
+
/**
* Returns a <code>Collection</code> of type <code>ServiceComponentDefn</code> that represent
* all the ServiceComponentDefn defined.
@@ -1251,9 +1127,6 @@
case ComponentType.CONNECTOR_COMPONENT_TYPE_CODE:
addConnectorBinding(component);
return;
- case ComponentType.PSC_COMPONENT_TYPE_CODE:
- pscs.put(component.getID(), component);
- return;
case ComponentType.RESOURCE_COMPONENT_TYPE_CODE:
pools.put(component.getID(), component);
return;
@@ -1320,18 +1193,13 @@
removeDeployedVM( vm);
// vms.remove(defnID);
break;
- case ComponentType.PSC_COMPONENT_TYPE_CODE:
- removeDeployedServicesFromPSC((ProductServiceConfigID) componentID);
- pscs.remove(defnID);
- break;
+
case ComponentType.CONNECTOR_COMPONENT_TYPE_CODE:
- removeServiceFromPSCs((ConnectorBindingID)defnID);
- removeConnectorBinding(defnID);
+ removeConnectorBinding(defnID);
break;
case ComponentType.SERVICE_COMPONENT_TYPE_CODE:
- removeServiceFromPSCs((ServiceComponentDefnID)defnID);
- svcComponents.remove(defnID);
+ svcComponents.remove(defnID);
break;
case ComponentType.RESOURCE_COMPONENT_TYPE_CODE:
pools.remove(defnID);
@@ -1367,50 +1235,50 @@
}
- private void removeServiceFromPSCs(ServiceComponentDefnID defnID) {
- if (defnID==null) {
- return;
- }
- Collection pscs = null;
- pscs = getPSCsForServiceDefn(defnID);
-
-
- for (Iterator it=pscs.iterator(); it.hasNext(); ) {
- ProductServiceConfig psc =(ProductServiceConfig) it.next();
- if (psc.containsService(defnID)) {
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) psc;
- basicPSC.removeServiceComponentDefnID(defnID);
- }
- }
-
-
- }
+// private void removeServiceFromPSCs(ServiceComponentDefnID defnID) {
+// if (defnID==null) {
+// return;
+// }
+// Collection pscs = null;
+// pscs = getPSCsForServiceDefn(defnID);
+//
+//
+// for (Iterator it=pscs.iterator(); it.hasNext(); ) {
+// ProductServiceConfig psc =(ProductServiceConfig) it.next();
+// if (psc.containsService(defnID)) {
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) psc;
+// basicPSC.removeServiceComponentDefnID(defnID);
+// }
+// }
+//
+//
+// }
- private void removeDeployedServicesFromPSC(ProductServiceConfigID pscID) {
-
- ProductServiceConfig psc = getPSC(pscID);
- if (psc == null) {
- return;
- }
- Iterator serviceDefnIDs = psc.getServiceComponentDefnIDs().iterator();
-
- ServiceComponentDefnID serviceID = null;
- //delete each service definition of this PSC, one by one
- while (serviceDefnIDs.hasNext()){
- serviceID = (ServiceComponentDefnID)serviceDefnIDs.next();
-
- Collection dcs = getDeployedComponents(serviceID, (ProductServiceConfigID) psc.getID());
-
- if (dcs != null) {
- Iterator dcIter = dcs.iterator();
- while (dcIter.hasNext()) {
- DeployedComponent comp = (DeployedComponent)dcIter.next();
- removeComponentObject((ComponentObjectID)comp.getID());
- }
- }
- }
-
- }
+// private void removeDeployedServicesFromVM(ProductServiceConfigID pscID) {
+//
+// ProductServiceConfig psc = getPSC(pscID);
+// if (psc == null) {
+// return;
+// }
+// Iterator serviceDefnIDs = psc.getServiceComponentDefnIDs().iterator();
+//
+// ServiceComponentDefnID serviceID = null;
+// //delete each service definition of this PSC, one by one
+// while (serviceDefnIDs.hasNext()){
+// serviceID = (ServiceComponentDefnID)serviceDefnIDs.next();
+//
+// Collection dcs = getDeployedComponents(serviceID, (ProductServiceConfigID) psc.getID());
+//
+// if (dcs != null) {
+// Iterator dcIter = dcs.iterator();
+// while (dcIter.hasNext()) {
+// DeployedComponent comp = (DeployedComponent)dcIter.next();
+// removeComponentObject((ComponentObjectID)comp.getID());
+// }
+// }
+// }
+//
+// }
/**
* used whend removing the complete host
@@ -1462,24 +1330,8 @@
removeDeployedServicesForVM(vm);
-
-// Collection dcs = getDeployedComponents();
-//
-// DeployedComponent dc;
-//
-// for (Iterator it = dcs.iterator(); it.hasNext(); ) {
-// dc = (DeployedComponent) it.next();
-//
-// // only get the deployed VM and let the remove method
-// // handle the actual removing logic
-// if (!dc.isDeployedService()) {
-// if (dc.getVMComponentDefnID().equals(vmID)) {
-// removeDeployedServicesForVM(vm);
-// }
-// }
-// }
-
- vms.remove(vm.getID());
+
+ vms.remove(vm.getID());
@@ -1503,16 +1355,7 @@
}
}
- // now remove the deployed VM
-
-// deployedComponents.remove(vmDeployedComp.getID());
-
- // remove the VM defn
- // *** the assumption is that there is a one-for-one match between
- // the deployed VM and VM Defn. If one gets deleted, so should the other
-
-
}
@@ -1539,8 +1382,7 @@
public void setComponentDefns(Map components) {
- this.pscs = new HashMap();
- this.svcComponents = new HashMap();
+ this.svcComponents = new HashMap();
this.vms = new HashMap();
this.pools = new HashMap();
this.connectors = new HashMap();
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConfigurationObjectEditor.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -68,7 +68,8 @@
return factory;
}
- /**
+
+ /**
* Create an instance of this editor, and specify whether actions are to be created
* during modifications. If actions are created, then each action is sent directly
* to the destination at the time the action is created.
@@ -566,114 +567,110 @@
* property values will also be copied. The copies will all retain their original
* short names; their full names will reflect the new configuration name.</p>
*/
- public Configuration createConfiguration(Configuration original, String newName){
- if (original == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0079));
- }
- if (newName == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0081));
- }
- if (original.getName().equals(newName) ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0084, newName));
- }
-
- BasicConfiguration config = ( BasicConfiguration) createConfiguration(newName);
-
- //copy the configuration properties
- this.modifyProperties(config, original.getProperties(), ADD);
-
- if (original.getHosts() != null) {
- for (Iterator hIt=original.getHosts().iterator(); hIt.hasNext(); ) {
- Host h = (Host) hIt.next();
- this.createHost(config, h, h.getName());
- }
- }
-
- Iterator svcDefns = original.getServiceComponentDefns().iterator();
- while (svcDefns.hasNext()) {
- ServiceComponentDefn sDefn = (ServiceComponentDefn) svcDefns.next();
- this.createServiceComponentDefn(config, sDefn, sDefn.getName());
- }
-
- Iterator vmsDefns = original.getVMComponentDefns().iterator();
- while (vmsDefns.hasNext()) {
- VMComponentDefn vDefn = (VMComponentDefn) vmsDefns.next();
- this.createVMComponentDefn(config, vDefn, vDefn.getName());
- }
-
- Iterator bindings = original.getConnectorBindings().iterator();
- while (bindings.hasNext()) {
- ConnectorBinding cc = (ConnectorBinding) bindings.next();
-
- this.createConnectorComponent(config, cc, cc.getName());
-
- }
-
- Iterator authProviders = original.getAuthenticationProviders().iterator();
- while (authProviders.hasNext()) {
- AuthenticationProvider provider = (AuthenticationProvider) authProviders.next();
-
- this.createAuthenticationProviderComponent(config, provider, provider.getName());
-
- }
-
- Iterator pscs = original.getPSCs().iterator();
- while (pscs.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig) pscs.next();
- this.createProductServiceConfig(config, psc, psc.getName());
- }
-
-
- //copy all internal deployed components
- ConfigurationID configID = (ConfigurationID)config.getID();
- VMComponentDefnID vmID = null;
- ProductServiceConfigID pscID = null;
- DeployedComponent originalDeployed = null;
- ServiceComponentDefn service = null;
-// VMComponentDefn vm = null;
- for (Iterator iter=original.getDeployedComponents().iterator(); iter.hasNext(); ){
- originalDeployed = (DeployedComponent)iter.next();
- if (originalDeployed.isDeployedConnector()) {
- ConnectorBindingID serviceID = new ConnectorBindingID(configID, originalDeployed.getServiceComponentDefnID().getName());
- pscID = new ProductServiceConfigID(configID, originalDeployed.getProductServiceConfigID().getName());
- vmID = new VMComponentDefnID(configID, originalDeployed.getHostID(), originalDeployed.getVMComponentDefnID().getName());
- service = config.getConnectorBinding(serviceID);
-
-
- if (service==null) {
- throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0086,
- new Object[] { serviceID, originalDeployed.getName()}));
- }
- this.createDeployedServiceComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vmID, service, pscID);
-
-
- } else if (originalDeployed.isDeployedService()){
-
- ServiceComponentDefnID serviceID = new ServiceComponentDefnID(configID, originalDeployed.getServiceComponentDefnID().getName());
- pscID = new ProductServiceConfigID(configID, originalDeployed.getProductServiceConfigID().getName());
- vmID = new VMComponentDefnID(configID, originalDeployed.getHostID(), originalDeployed.getVMComponentDefnID().getName());
- service = config.getServiceComponentDefn(serviceID);
-
- if (service==null) {
- throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0085,
- new Object[] { serviceID, originalDeployed.getName()}));
- }
- this.createDeployedServiceComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vmID, service, pscID);
- }
-// else {
+// public Configuration createConfiguration(Configuration original, String newName){
+// if (original == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0079));
+// }
+// if (newName == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0081));
+// }
+// if (original.getName().equals(newName) ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0084, newName));
+// }
+//
+// BasicConfiguration config = ( BasicConfiguration) createConfiguration(newName);
+//
+//
+//
+// //copy the configuration properties
+// this.modifyProperties(config, original.getProperties(), ADD);
+//
+// if (original.getHosts() != null) {
+// for (Iterator hIt=original.getHosts().iterator(); hIt.hasNext(); ) {
+// Host h = (Host) hIt.next();
+// this.createHost(config, h, h.getName());
+// }
+// }
+//
+// Iterator svcDefns = original.getServiceComponentDefns().iterator();
+// while (svcDefns.hasNext()) {
+// ServiceComponentDefn sDefn = (ServiceComponentDefn) svcDefns.next();
+// this.createServiceComponentDefn(config, sDefn, sDefn.getName());
+// }
+//
+// Iterator vmsDefns = original.getVMComponentDefns().iterator();
+// while (vmsDefns.hasNext()) {
+// VMComponentDefn vDefn = (VMComponentDefn) vmsDefns.next();
+// this.createVMComponentDefn(config, vDefn, vDefn.getName());
+// }
+//
+// Iterator bindings = original.getConnectorBindings().iterator();
+// while (bindings.hasNext()) {
+// ConnectorBinding cc = (ConnectorBinding) bindings.next();
+//
+// this.createConnectorComponent(config, cc, cc.getName());
+//
+// }
+//
+// Iterator authProviders = original.getAuthenticationProviders().iterator();
+// while (authProviders.hasNext()) {
+// AuthenticationProvider provider = (AuthenticationProvider) authProviders.next();
+//
+// this.createAuthenticationProviderComponent(config, provider, provider.getName());
+//
+// }
+//
+//
+// //copy all internal deployed components
+// ConfigurationID configID = (ConfigurationID)config.getID();
+// VMComponentDefnID vmID = null;
+// ProductServiceConfigID pscID = null;
+// DeployedComponent originalDeployed = null;
+// ServiceComponentDefn service = null;
+//// VMComponentDefn vm = null;
+// for (Iterator iter=original.getDeployedComponents().iterator(); iter.hasNext(); ){
+// originalDeployed = (DeployedComponent)iter.next();
+// if (originalDeployed.isDeployedConnector()) {
+// ConnectorBindingID serviceID = new ConnectorBindingID(configID, originalDeployed.getServiceComponentDefnID().getName());
+// pscID = new ProductServiceConfigID(configID, originalDeployed.getProductServiceConfigID().getName());
+// vmID = new VMComponentDefnID(configID, originalDeployed.getHostID(), originalDeployed.getVMComponentDefnID().getName());
+// service = config.getConnectorBinding(serviceID);
+//
//
-// this.createVMComponentDefn(config, originalDeployed.getHostID(), originalDeployed.getComponentTypeID(), originalDeployed.getName());
-//
+// if (service==null) {
+// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0086,
+// new Object[] { serviceID, originalDeployed.getName()}));
+// }
+// this.createDeployedServiceComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vmID, service, pscID);
+//
+//
+// } else if (originalDeployed.isDeployedService()){
+//
+// ServiceComponentDefnID serviceID = new ServiceComponentDefnID(configID, originalDeployed.getServiceComponentDefnID().getName());
+// pscID = new ProductServiceConfigID(configID, originalDeployed.getProductServiceConfigID().getName());
// vmID = new VMComponentDefnID(configID, originalDeployed.getHostID(), originalDeployed.getVMComponentDefnID().getName());
-// vm = config.getVMComponentDefn(vmID);
-// this.createDeployedVMComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vm);
-// }
- }
+// service = config.getServiceComponentDefn(serviceID);
+//
+// if (service==null) {
+// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0085,
+// new Object[] { serviceID, originalDeployed.getName()}));
+// }
+// this.createDeployedServiceComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vmID, service, pscID);
+// }
+//// else {
+////
+//// this.createVMComponentDefn(config, originalDeployed.getHostID(), originalDeployed.getComponentTypeID(), originalDeployed.getName());
+////
+//// vmID = new VMComponentDefnID(configID, originalDeployed.getHostID(), originalDeployed.getVMComponentDefnID().getName());
+//// vm = config.getVMComponentDefn(vmID);
+//// this.createDeployedVMComponent(originalDeployed.getName(), config, originalDeployed.getHostID(), vm);
+//// }
+// }
+//
+// Configuration newConfig = (Configuration) config.clone();
+// return newConfig;
+// }
- Configuration newConfig = (Configuration) config.clone();
- return newConfig;
- }
-
public ComponentType createComponentType(int classTypeCode, String name, ComponentTypeID parentID, ComponentTypeID superID, boolean deployable, boolean monitored) {
if (name == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, ComponentType.class.getName()));
@@ -721,26 +718,26 @@
* @param monitored is a boolean insdicating if the type is to be monitored
* @return ComponentType
*/
- public ProductType createProductType(String name, Collection serviceComponentTypes, boolean deployable, boolean monitored) {
-// BasicProductTypeType productType = (BasicProductTypeType)this.createComponentType(ComponentObject.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductTypeType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
+// public ProductType createProductType(String name, Collection serviceComponentTypes, boolean deployable, boolean monitored) {
+//// BasicProductTypeType productType = (BasicProductTypeType)this.createComponentType(ComponentObject.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductTypeType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
+//
+// BasicProductType productType = (BasicProductType) createProductType(name, deployable, monitored);
+// //(BasicProductType) BasicUtil.createComponentObject(ComponentObject.PRODUCT_COMPONENT_TYPE_CODE, ProductType.PRODUCT_TYPE_ID, name);
+//
+// //this code sets up the legal service types for the product type
+//// ComponentTypeID productTypeID = productType.getComponentTypeID();
+// ComponentType serviceComponentType = null;
+// Iterator iter = serviceComponentTypes.iterator();
+// while (iter.hasNext()){
+//
+// serviceComponentType = (ComponentType)iter.next();
+//// this.setParentComponentTypeID(serviceComponentType, productTypeID);
+// //add the service ComponentTypeID to the BasicProductType
+// productType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
+// }
+// return productType;
+// }
- BasicProductType productType = (BasicProductType) createProductType(name, deployable, monitored);
- //(BasicProductType) BasicUtil.createComponentObject(ComponentObject.PRODUCT_COMPONENT_TYPE_CODE, ProductType.PRODUCT_TYPE_ID, name);
-
- //this code sets up the legal service types for the product type
-// ComponentTypeID productTypeID = productType.getComponentTypeID();
- ComponentType serviceComponentType = null;
- Iterator iter = serviceComponentTypes.iterator();
- while (iter.hasNext()){
-
- serviceComponentType = (ComponentType)iter.next();
-// this.setParentComponentTypeID(serviceComponentType, productTypeID);
- //add the service ComponentTypeID to the BasicProductType
- productType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
- }
- return productType;
- }
-
/**
* Create a new ProductType instance with the specified name. Use
* {@link createProductType(String, Collection, boolean, boolean)} to
@@ -750,15 +747,15 @@
* @param monitored is a boolean insdicating if the type is to be monitored
* @return ComponentType
*/
- public ProductType createProductType(String name, boolean deployable, boolean monitored) {
-// ProductType productType = (ProductType)this.createComponentType(ComponentType.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductTypeType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
+// public ProductType createProductType(String name, boolean deployable, boolean monitored) {
+//// ProductType productType = (ProductType)this.createComponentType(ComponentType.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductTypeType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
+//
+// BasicProductType productType = (BasicProductType) BasicUtil.createComponentType(ComponentType.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
+//// createComponentObject(ComponentDefn.PRODUCT_COMPONENT_CODE, ProductType.PRODUCT_TYPE_ID, name);
+//
+// return productType;
+// }
- BasicProductType productType = (BasicProductType) BasicUtil.createComponentType(ComponentType.PRODUCT_COMPONENT_TYPE_CODE, name, null, ProductType.PRODUCT_SUPER_TYPE_ID, deployable, monitored);
-// createComponentObject(ComponentDefn.PRODUCT_COMPONENT_CODE, ProductType.PRODUCT_TYPE_ID, name);
-
- return productType;
- }
-
/**
* This method is not provided in the interface, it is only used by the
* spi implementation for ease of creating the correct type of component defn.
@@ -873,7 +870,7 @@
return bv;
}
- public DeployedComponent createDeployedServiceComponent(String name, Configuration configuration, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefn serviceComponentDefn, ProductServiceConfigID pscID) {
+ public DeployedComponent createDeployedServiceComponent(String name, Configuration configuration, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefn serviceComponentDefn) {
if ( name == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, DeployedComponent.class.getName()));
}
@@ -889,9 +886,6 @@
if (serviceComponentDefn == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ServiceComponentDefn.class.getName()));
}
- if (pscID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
- }
ConfigurationID configID = (ConfigurationID) configuration.getID();
@@ -903,8 +897,7 @@
configID,
hostId,
vmId,
- (ServiceComponentDefnID) serviceComponentDefn.getID(),
- pscID,
+ (ServiceComponentDefnID) serviceComponentDefn.getID(),
serviceComponentDefn.getComponentTypeID());
@@ -922,7 +915,7 @@
/*
* @see createDeployedServiceComponent(String, Configuration, HostID, VMComponentDefn)
*/
- public DeployedComponent createDeployedServiceComponent(String name, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfigID pscID, ComponentTypeID serviceComponentTypeID) {
+ public DeployedComponent createDeployedServiceComponent(String name, ConfigurationID configurationID, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceComponentDefnID, ComponentTypeID serviceComponentTypeID) {
if ( name == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, DeployedComponent.class.getName()));
}
@@ -941,9 +934,6 @@
if (serviceComponentTypeID == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ComponentTypeID.class.getName()));
}
- if (pscID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
- }
// DeployedComponentID id = new DeployedComponentID(name, configurationID, hostId, vmId, pscID, serviceComponentDefnID);
@@ -955,7 +945,6 @@
hostId,
vmId,
serviceComponentDefnID,
- pscID,
serviceComponentTypeID);
// BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
@@ -1120,38 +1109,38 @@
* will belong to
* @return new ServiceComponentDefn
*/
- public ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) {
- if ( configuration == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
- }
- if ( pscID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
- }
- ProductServiceConfig psc = (ProductServiceConfig)configuration.getComponentDefn(pscID);
+// public ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) {
+// if ( configuration == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
+// }
+// if ( pscID == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
+// }
+// ProductServiceConfig psc = (ProductServiceConfig)configuration.getComponentDefn(pscID);
+//
+// Assertion.isNotNull(psc, "PSC " + pscID + " does not exist"); //$NON-NLS-1$ //$NON-NLS-2$
+// ConfigurationID configurationID = (ConfigurationID)configuration.getID();
+//
+// BasicServiceComponentDefn newServiceDefn = (BasicServiceComponentDefn) BasicUtil.createComponentDefn(ComponentDefn.SERVICE_COMPONENT_CODE, configurationID, typeID, componentName);
+//
+//// BasicComponentDefn.getInstance(ComponentDefn.SERVICE_COMPONENT_DEFN_CODE,
+//// configurationID,
+//// typeID,
+//// componentName);
+// // add the service to the psc so that this relationship is found in the deployServiceDefn method
+// addServiceComponentDefn(psc, (ServiceComponentDefnID) newServiceDefn.getID());
+//
+// ServiceComponentDefn newDefn = (ServiceComponentDefn) newServiceDefn.clone();
+//
+// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
+// bc.addComponentDefn(newDefn);
+//
+// //automatically deploy the service anywhere that the PSC is already deployed
+// this.deployServiceDefn(bc,newDefn,pscID);
+//
+// return newDefn;
+// }
- Assertion.isNotNull(psc, "PSC " + pscID + " does not exist"); //$NON-NLS-1$ //$NON-NLS-2$
- ConfigurationID configurationID = (ConfigurationID)configuration.getID();
-
- BasicServiceComponentDefn newServiceDefn = (BasicServiceComponentDefn) BasicUtil.createComponentDefn(ComponentDefn.SERVICE_COMPONENT_CODE, configurationID, typeID, componentName);
-
-// BasicComponentDefn.getInstance(ComponentDefn.SERVICE_COMPONENT_DEFN_CODE,
-// configurationID,
-// typeID,
-// componentName);
- // add the service to the psc so that this relationship is found in the deployServiceDefn method
- addServiceComponentDefn(psc, (ServiceComponentDefnID) newServiceDefn.getID());
-
- ServiceComponentDefn newDefn = (ServiceComponentDefn) newServiceDefn.clone();
-
- BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
- bc.addComponentDefn(newDefn);
-
- //automatically deploy the service anywhere that the PSC is already deployed
- this.deployServiceDefn(bc,newDefn,pscID);
-
- return newDefn;
- }
-
public ServiceComponentDefn createServiceComponentDefn(Configuration configuration, ComponentTypeID typeID, String componentName) {
if ( configuration == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
@@ -1465,76 +1454,76 @@
* @param newName new String name for the new PSC
* @return newly-created ProductServiceConfig object
*/
- public ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductServiceConfig originalPSC, String newName){
- if ( configuration == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
- }
+// public ProductServiceConfig createProductServiceConfig(Configuration configuration, ProductServiceConfig originalPSC, String newName){
+// if ( configuration == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
+// }
+//
+// if (originalPSC == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+//
+// if (newName == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, ProductServiceConfig.class.getName()));
+// }
+//
+// ProductServiceConfig psc = createProductServiceConfig(configuration, (ProductTypeID) originalPSC.getComponentTypeID(),newName);
+//
+// this.modifyProperties(psc, originalPSC.getProperties(), ADD);
+//
+// Iterator iter = originalPSC.getServiceComponentDefnIDs().iterator();
+// ServiceComponentDefnID originalServiceDefnID = null;
+// while (iter.hasNext()){
+// originalServiceDefnID = (ServiceComponentDefnID)iter.next();
+// this.addServiceComponentDefn(psc, originalServiceDefnID);
+//
+// }
+//
+// ProductServiceConfig newPSC = (ProductServiceConfig) psc.clone();
+// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
+// bc.addComponentDefn(newPSC);
+// return newPSC;
+// }
- if (originalPSC == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
-
- if (newName == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, ProductServiceConfig.class.getName()));
- }
-
- ProductServiceConfig psc = createProductServiceConfig(configuration, (ProductTypeID) originalPSC.getComponentTypeID(),newName);
-
- this.modifyProperties(psc, originalPSC.getProperties(), ADD);
-
- Iterator iter = originalPSC.getServiceComponentDefnIDs().iterator();
- ServiceComponentDefnID originalServiceDefnID = null;
- while (iter.hasNext()){
- originalServiceDefnID = (ServiceComponentDefnID)iter.next();
- this.addServiceComponentDefn(psc, originalServiceDefnID);
-
- }
-
- ProductServiceConfig newPSC = (ProductServiceConfig) psc.clone();
- BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
- bc.addComponentDefn(newPSC);
- return newPSC;
- }
-
/**
* Allows the creation of an empty ProductServiceConfig entirely from
* ID objects.
*/
- public ProductServiceConfig createProductServiceConfig(ConfigurationID configurationID, ProductTypeID productTypeID, String componentName){
- if ( configurationID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ConfigurationID.class.getName()));
- }
+// public ProductServiceConfig createProductServiceConfig(ConfigurationID configurationID, ProductTypeID productTypeID, String componentName){
+// if ( configurationID == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ConfigurationID.class.getName()));
+// }
+//
+// if (productTypeID == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ComponentTypeID.class.getName()));
+// }
+//
+// if (componentName == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, ProductServiceConfig.class.getName()));
+// }
+//
+//
+//
+// BasicProductServiceConfig psc = (BasicProductServiceConfig) BasicUtil.createComponentDefn(ComponentDefn.PSC_COMPONENT_CODE, configurationID, productTypeID, componentName);
+//// BasicComponentDefn.getInstance(ComponentDefn.PRODUCT_SERVICE_DEFN_CODE,
+//// configurationID,
+//// productTypeID,
+//// componentName);
+//
+// createCreationAction(psc.getID(), psc);
+//
+// ProductServiceConfig newPSC = (ProductServiceConfig) psc.clone();
+// return newPSC;
+// }
- if (productTypeID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ComponentTypeID.class.getName()));
- }
- if (componentName == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0087, ProductServiceConfig.class.getName()));
- }
-
+// public ProductServiceConfig createProductServiceConfig(Configuration config, ProductTypeID productTypeID, String name) {
+// ProductServiceConfig psc = createProductServiceConfig((ConfigurationID)config.getID(), productTypeID, name);
+// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(config,BasicConfiguration.class);
+// bc.addComponentDefn(psc);
+// return psc;
+// }
-
- BasicProductServiceConfig psc = (BasicProductServiceConfig) BasicUtil.createComponentDefn(ComponentDefn.PSC_COMPONENT_CODE, configurationID, productTypeID, componentName);
-// BasicComponentDefn.getInstance(ComponentDefn.PRODUCT_SERVICE_DEFN_CODE,
-// configurationID,
-// productTypeID,
-// componentName);
-
- createCreationAction(psc.getID(), psc);
-
- ProductServiceConfig newPSC = (ProductServiceConfig) psc.clone();
- return newPSC;
- }
-
-
- public ProductServiceConfig createProductServiceConfig(Configuration config, ProductTypeID productTypeID, String name) {
- ProductServiceConfig psc = createProductServiceConfig((ConfigurationID)config.getID(), productTypeID, name);
- BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(config,BasicConfiguration.class);
- bc.addComponentDefn(psc);
- return psc;
- }
-
/**
* Deploys the ServiceComponentDefns indicated by the ProductServiceConfig,
* contained by the Configuration, onto the specified Host and VM.
@@ -1548,68 +1537,68 @@
* @return Collection of DeployedComponent objects, each representing
* one of the deployed ServiceComponentDefns
*/
- public Collection deployProductServiceConfig(Configuration configuration, ProductServiceConfig psc, HostID hostId, VMComponentDefnID vmId){
- if ( configuration == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
- }
- if ( hostId == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, HostID.class.getName()));
- }
- if ( vmId == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, VMComponentDefnID.class.getName()));
- }
- if (psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
-// ConfigurationID configID = (ConfigurationID) configuration.getID();
- ProductServiceConfigID pscID = ( ProductServiceConfigID) psc.getID();
-
- Collection serviceComponentDefnIDs = psc.getServiceComponentDefnIDs();
- HashSet result = new HashSet(serviceComponentDefnIDs.size());
- Iterator iter = serviceComponentDefnIDs.iterator();
- ServiceComponentDefn serviceDefn = null;
- ServiceComponentDefnID serviceDefnID = null;
- while (iter.hasNext()){
-
- serviceDefnID = (ServiceComponentDefnID)iter.next();
- serviceDefn = (ServiceComponentDefn)configuration.getComponentDefn(serviceDefnID);
-
- //only deploy the service defn if it is enabled
- if (psc.isServiceEnabled(serviceDefnID)) {
- DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), (ConfigurationID) configuration.getID(), hostId, vmId, pscID, serviceDefnID);
-
- if (configuration.getDeployedComponent(id) != null) {
- continue;
- }
-
- DeployedComponent dc = this.createDeployedServiceComponent(serviceDefnID.getName(), configuration, hostId, vmId, serviceDefn, pscID);
- result.add(dc);
-// DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), configID, hostId, vmId, pscID, serviceDefnID);
-// BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
-// configID,
-// hostId,
-// vmId,
-// serviceDefnID,
-// pscID,
-// serviceDefn.getComponentTypeID());
-
-// createCreationAction(id, deployComponent );
-
-// try {
-// DeployedComponent newDefn = (DeployedComponent) deployComponent.clone();
+// public Collection deployProductServiceConfig(Configuration configuration, ProductServiceConfig psc, HostID hostId, VMComponentDefnID vmId){
+// if ( configuration == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
+// }
+// if ( hostId == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, HostID.class.getName()));
+// }
+// if ( vmId == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, VMComponentDefnID.class.getName()));
+// }
+// if (psc == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+//// ConfigurationID configID = (ConfigurationID) configuration.getID();
+// ProductServiceConfigID pscID = ( ProductServiceConfigID) psc.getID();
//
-// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
-// bc.addDeployedComponent(newDefn);
+// Collection serviceComponentDefnIDs = psc.getServiceComponentDefnIDs();
+// HashSet result = new HashSet(serviceComponentDefnIDs.size());
+// Iterator iter = serviceComponentDefnIDs.iterator();
+// ServiceComponentDefn serviceDefn = null;
+// ServiceComponentDefnID serviceDefnID = null;
+// while (iter.hasNext()){
//
-// result.add( newDefn);
-// } catch (CloneNotSupportedException e) {
-// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0078,
-// new Object[] {DeployedComponent.class.getName(), e.getMessage()}));
+// serviceDefnID = (ServiceComponentDefnID)iter.next();
+// serviceDefn = (ServiceComponentDefn)configuration.getComponentDefn(serviceDefnID);
+//
+// //only deploy the service defn if it is enabled
+// if (psc.isServiceEnabled(serviceDefnID)) {
+// DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), (ConfigurationID) configuration.getID(), hostId, vmId, pscID, serviceDefnID);
+//
+// if (configuration.getDeployedComponent(id) != null) {
+// continue;
// }
- }
- }
- return result;
- }
+//
+// DeployedComponent dc = this.createDeployedServiceComponent(serviceDefnID.getName(), configuration, hostId, vmId, serviceDefn, pscID);
+// result.add(dc);
+//// DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), configID, hostId, vmId, pscID, serviceDefnID);
+//// BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
+//// configID,
+//// hostId,
+//// vmId,
+//// serviceDefnID,
+//// pscID,
+//// serviceDefn.getComponentTypeID());
+//
+//// createCreationAction(id, deployComponent );
+//
+//// try {
+//// DeployedComponent newDefn = (DeployedComponent) deployComponent.clone();
+////
+//// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
+//// bc.addDeployedComponent(newDefn);
+////
+//// result.add( newDefn);
+//// } catch (CloneNotSupportedException e) {
+//// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0078,
+//// new Object[] {DeployedComponent.class.getName(), e.getMessage()}));
+//// }
+// }
+// }
+// return result;
+// }
/**
* This method will update a PSC by adding the new service list of ID's and removing
@@ -1620,69 +1609,69 @@
* @return updated ProductServiceConfig
* @throws ConfigurationException
*/
- public ProductServiceConfig updateProductServiceConfig(Configuration config, ProductServiceConfig psc, Collection newServiceIDList) throws ConfigurationException {
- if ( config == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
- }
- if (psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
-
- if (newServiceIDList == null) {
- return psc;
- }
-
- // keep the old-current services for later processing
- HashSet set = new HashSet();
- set.addAll(psc.getServiceComponentDefnIDs());
-
- ProductServiceConfig c = (ProductServiceConfig) psc.clone();
-
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(c,BasicProductServiceConfig.class);
- basicPSC.resetServices();
- // 1st - deploy the service to the PSC
- ProductServiceConfigID pscID = (ProductServiceConfigID) psc.getID();
-
-
- // all the services have been removed from this psc
- // def# 12847 not removing the last service from a psc
- if (newServiceIDList.isEmpty()) {
- basicPSC.resetServices();
- } else {
-
- for (Iterator it = newServiceIDList.iterator(); it.hasNext(); ) {
- // if the service isnt associated with the psc, then add it
- // and also deploy it
- ServiceComponentDefnID sid = (ServiceComponentDefnID)it.next();
- ServiceComponentDefn sd = (ServiceComponentDefn) config.getComponentDefn(sid);
+// public ProductServiceConfig updateProductServiceConfig(Configuration config, ProductServiceConfig psc, Collection newServiceIDList) throws ConfigurationException {
+// if ( config == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
+// }
+// if (psc == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+//
+// if (newServiceIDList == null) {
+// return psc;
+// }
+//
+// // keep the old-current services for later processing
+// HashSet set = new HashSet();
+// set.addAll(psc.getServiceComponentDefnIDs());
+//
+// ProductServiceConfig c = (ProductServiceConfig) psc.clone();
+//
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(c,BasicProductServiceConfig.class);
+// basicPSC.resetServices();
+// // 1st - deploy the service to the PSC
+// ProductServiceConfigID pscID = (ProductServiceConfigID) psc.getID();
+//
+//
+// // all the services have been removed from this psc
+// // def# 12847 not removing the last service from a psc
+// if (newServiceIDList.isEmpty()) {
+// basicPSC.resetServices();
+// } else {
+//
+// for (Iterator it = newServiceIDList.iterator(); it.hasNext(); ) {
+// // if the service isnt associated with the psc, then add it
+// // and also deploy it
+// ServiceComponentDefnID sid = (ServiceComponentDefnID)it.next();
+// ServiceComponentDefn sd = (ServiceComponentDefn) config.getComponentDefn(sid);
+//
+// if (psc.containsService(sid)) {
+// // remove it from the set so that whats left are those
+// // that have to be removed from the psc
+// set.remove(sid);
+//
+// } else {
+// deployServiceDefn(config, sd, pscID);
+// }
+//
+// basicPSC.addServiceComponentDefnID(sid);
+//
+// }
+// }
+//
+// // 2nd - remove any services no longer selected
+// for (Iterator it = set.iterator(); it.hasNext(); ) {
+// ServiceComponentDefnID sid = (ServiceComponentDefnID) it.next();
+// ServiceComponentDefn sdefn = (ServiceComponentDefn) config.getComponentDefn(sid);
+// // set the service enabled flag to false so that it will be undeployed
+// this.setEnabled(config, sdefn, psc, false, true);
+// }
+// createExchangeAction(pscID,ConfigurationModel.Attribute.UPDATE_PSC, newServiceIDList, Boolean.TRUE);
+//
+// return basicPSC;
+//
+// }
- if (psc.containsService(sid)) {
- // remove it from the set so that whats left are those
- // that have to be removed from the psc
- set.remove(sid);
-
- } else {
- deployServiceDefn(config, sd, pscID);
- }
-
- basicPSC.addServiceComponentDefnID(sid);
-
- }
- }
-
- // 2nd - remove any services no longer selected
- for (Iterator it = set.iterator(); it.hasNext(); ) {
- ServiceComponentDefnID sid = (ServiceComponentDefnID) it.next();
- ServiceComponentDefn sdefn = (ServiceComponentDefn) config.getComponentDefn(sid);
- // set the service enabled flag to false so that it will be undeployed
- this.setEnabled(config, sdefn, psc, false, true);
- }
- createExchangeAction(pscID,ConfigurationModel.Attribute.UPDATE_PSC, newServiceIDList, Boolean.TRUE);
-
- return basicPSC;
-
- }
-
/**
* This will update / replace the existing component type with the specified
* component type.
@@ -1730,39 +1719,38 @@
}
- public ProductServiceConfig setEnabled(ServiceComponentDefnID serviceComponentDefnID, ProductServiceConfig psc, boolean enabled) {
+ public DeployedComponent setEnabled(ServiceComponentDefnID serviceComponentDefnID, DeployedComponent deployedcomponent, boolean enabled) {
if ( serviceComponentDefnID == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ServiceComponentDefnID.class.getName()));
}
- if ( psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+ if ( deployedcomponent == null ) {
+ throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, DeployedComponent.class.getName()));
}
- if (!psc.containsService(serviceComponentDefnID)) {
- return psc;
-// throw new ConfigurationException("Service " + svcID + " is not currently part of PSC " + psc.getName() + ", therefore the service cannot be enabled for this PSC");
+ if (!deployedcomponent.getDeployedComponentDefnID().equals(serviceComponentDefnID)) {
+ return deployedcomponent;
}
- boolean oldEnabled = psc.isServiceEnabled(serviceComponentDefnID);
+ boolean oldEnabled = deployedcomponent.isEnabled();
//if a change is not being made to the enabled value, this whole method
//will be essentially bypassed
if (enabled != oldEnabled){
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- basicPSC.setServiceEnabled(serviceComponentDefnID, enabled);
+ BasicDeployedComponent basicDC = (BasicDeployedComponent) verifyTargetClass(deployedcomponent,BasicDeployedComponent.class);
+ basicDC.setIsEnabled(enabled);
- createExchangeAction(basicPSC.getID(),ConfigurationModel.Attribute.IS_ENABLED, serviceComponentDefnID, Boolean.valueOf(enabled));
+ createExchangeAction(basicDC.getID(),ConfigurationModel.Attribute.IS_ENABLED, serviceComponentDefnID, Boolean.valueOf(enabled));
- return basicPSC;
+ return basicDC;
} //end if enabled!= oldEnabled
- return psc;
+ return deployedcomponent;
}
- public Collection setEnabled(Configuration configuration, ServiceComponentDefn serviceComponentDefn, ProductServiceConfig psc, boolean enabled, boolean deleteDeployedComps)
+ public DeployedComponent setEnabled(Configuration configuration, ServiceComponentDefn serviceComponentDefn, VMComponentDefn vm, boolean enabled)
throws ConfigurationException {
if ( configuration == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
@@ -1770,73 +1758,65 @@
if ( serviceComponentDefn == null ) {
throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ServiceComponentDefn.class.getName()));
}
- if ( psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+ if ( vm == null ) {
+ throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, VMComponentDefn.class.getName()));
}
- Collection result = null;
+ ServiceComponentDefnID svcID = (ServiceComponentDefnID) serviceComponentDefn.getID();
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) serviceComponentDefn.getID();
+ DeployedComponent dc = configuration.getDeployedServiceForVM(svcID, vm);
+ return this.setEnabled(svcID, dc, enabled);
- if (!psc.containsService(svcID)) {
- throw new ConfigurationException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0091,
- new Object[] { svcID, psc.getName()} ));
- }
- boolean oldEnabled = psc.isServiceEnabled(svcID);
-
-
-
//if a change is not being made to the enabled value, this whole method
//will be essentially bypassed
- if (enabled != oldEnabled){
- psc = this.setEnabled(svcID, psc, enabled);
+// if (enabled != dc.isEnabled()){
+// dc = this.setEnabled(svcID, dc, enabled);
+//
+// BasicConfiguration targetConfig = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
+//
+//
+// // if disabling and there are deployed components, then undeploy the components
+// if (!enabled && deleteDeployedComps) {
+//
+// if (!deps.isEmpty()) {
+// DeployedComponent deployedService;
+// DeployedComponentID deployedServiceID;
+// result = new ArrayList(deps.size());
+// for (Iterator it=deps.iterator(); it.hasNext(); ) {
+// deployedService = (DeployedComponent) it.next();
+// deployedServiceID = (DeployedComponentID) deployedService.getID();
+//
+// this.createDestroyAction(deployedServiceID, deployedService);
+// targetConfig.removeComponentObject(deployedServiceID );
+//
+// DeployedComponent ds = targetConfig.getDeployedComponent(deployedServiceID);
+// if (ds != null) {
+// throw new ConfigurationException("Deployed Component " + deployedServiceID + " was not removed"); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+// DeployedComponent newService = (DeployedComponent) deployedService.clone();
+// result.add(newService);
+// }
+// }
+// } else if (enabled){
+// //we must automagically create DeployedComponents for the newly-
+// //enabled service defn, wherever its PSC has already been deployed
+// ProductServiceConfigID pscID = (ProductServiceConfigID) psc.getID();
+// result = this.deployServiceDefn(targetConfig,serviceComponentDefn,pscID);
+//
+// }
+//
+// //this will overwrite the service if it already is in the Configuration
+// targetConfig.addComponentDefn(psc);
+//
+// } //end if enabled!= oldEnabled
+// if (result == null){
+// result = Collections.EMPTY_LIST;
+//
+// }
+// return result;
- BasicConfiguration targetConfig = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
- Collection deps = targetConfig.getDeployedComponents(svcID, (ProductServiceConfigID) psc.getID());
-
- // if disabling and there are deployed components, then undeploy the components
- if (!enabled && deleteDeployedComps) {
-
- if (!deps.isEmpty()) {
- DeployedComponent deployedService;
- DeployedComponentID deployedServiceID;
- result = new ArrayList(deps.size());
- for (Iterator it=deps.iterator(); it.hasNext(); ) {
- deployedService = (DeployedComponent) it.next();
- deployedServiceID = (DeployedComponentID) deployedService.getID();
-
- this.createDestroyAction(deployedServiceID, deployedService);
- targetConfig.removeComponentObject(deployedServiceID );
-
- DeployedComponent ds = targetConfig.getDeployedComponent(deployedServiceID);
- if (ds != null) {
- throw new ConfigurationException("Deployed Component " + deployedServiceID + " was not removed"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- DeployedComponent newService = (DeployedComponent) deployedService.clone();
- result.add(newService);
- }
- }
- } else if (enabled){
- //we must automagically create DeployedComponents for the newly-
- //enabled service defn, wherever its PSC has already been deployed
- ProductServiceConfigID pscID = (ProductServiceConfigID) psc.getID();
- result = this.deployServiceDefn(targetConfig,serviceComponentDefn,pscID);
-
- }
-
- //this will overwrite the service if it already is in the Configuration
- targetConfig.addComponentDefn(psc);
-
- } //end if enabled!= oldEnabled
- if (result == null){
- result = Collections.EMPTY_LIST;
-
- }
- return result;
-
-
}
@@ -1864,9 +1844,9 @@
* ProductServiceConfiguration (and removed from any PSC it previously
* belonged to).
*/
- public ProductServiceConfig addServiceComponentDefn(Configuration configuration, ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
- return this.addServiceComponentDefn(psc, serviceComponentDefnID);
- }
+// public ProductServiceConfig addServiceComponentDefn(Configuration configuration, ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
+// return this.addServiceComponentDefn(psc, serviceComponentDefnID);
+// }
/**
* Adds an existing ServiceComponentDefn to indicated PSC.
@@ -1878,26 +1858,26 @@
* ProductServiceConfiguration (and removed from any PSC it previously
* belonged to).
*/
- public ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
- if ( psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
- if ( serviceComponentDefnID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ServiceComponentDefnID.class.getName()));
- }
+// public ProductServiceConfig addServiceComponentDefn(ProductServiceConfig psc, ServiceComponentDefnID serviceComponentDefnID){
+// if ( psc == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+// if ( serviceComponentDefnID == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ServiceComponentDefnID.class.getName()));
+// }
+//
+// BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
+// basicPSC.addServiceComponentDefnID(serviceComponentDefnID);
+//
+// //todo get old PSC of this service defn
+// //ProductServiceConfigID oldValue = serviceComponentDefn.getParentComponentTypeID();
+// createExchangeAction(serviceComponentDefnID,ConfigurationModel.Attribute.PSC_NAME, null, basicPSC.getID());
+//
+//
+// ProductServiceConfig newDefn = (ProductServiceConfig) basicPSC.clone();
+// return newDefn;
+// }
- BasicProductServiceConfig basicPSC = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- basicPSC.addServiceComponentDefnID(serviceComponentDefnID);
-
- //todo get old PSC of this service defn
- //ProductServiceConfigID oldValue = serviceComponentDefn.getParentComponentTypeID();
- createExchangeAction(serviceComponentDefnID,ConfigurationModel.Attribute.PSC_NAME, null, basicPSC.getID());
-
-
- ProductServiceConfig newDefn = (ProductServiceConfig) basicPSC.clone();
- return newDefn;
- }
-
/**
* Adds the service type represented by the indicated ComponentType to
* the list of legal service types of the indicated ProductType.
@@ -1905,17 +1885,17 @@
* @param serviceComponentType ComponentType to be added to the
* ProductType
*/
- public ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType){
- BasicProductType basicProdType = (BasicProductType)productType;
+// public ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType){
+// BasicProductType basicProdType = (BasicProductType)productType;
+//
+// ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
+// this.setParentComponentTypeID(serviceComponentType, productTypeID);
+// //add the service ComponentTypeID to the BasicProductType
+// basicProdType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
+//
+// return basicProdType;
+// }
- ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
- this.setParentComponentTypeID(serviceComponentType, productTypeID);
- //add the service ComponentTypeID to the BasicProductType
- basicProdType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
-
- return basicProdType;
- }
-
/**
* Removes the service type represented by the indicated ComponentType from
* the list of legal service types of the indicated ProductType.
@@ -1923,17 +1903,17 @@
* @param serviceComponentType ComponentType to be taken from the
* ProductType
*/
- public ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType){
- BasicProductType basicProdType = (BasicProductType)productType;
+// public ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType){
+// BasicProductType basicProdType = (BasicProductType)productType;
+//
+// ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
+// this.setParentComponentTypeID(serviceComponentType, productTypeID);
+// //add the service ComponentTypeID to the BasicProductType
+// basicProdType.removeServiceTypeID((ComponentTypeID)serviceComponentType.getID());
+//
+// return basicProdType;
+// }
- ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
- this.setParentComponentTypeID(serviceComponentType, productTypeID);
- //add the service ComponentTypeID to the BasicProductType
- basicProdType.removeServiceTypeID((ComponentTypeID)serviceComponentType.getID());
-
- return basicProdType;
- }
-
/**
* Sets the LogConfiguration in effect for the Configuration
*/
@@ -2351,24 +2331,24 @@
* @param name The new name.
* @return The PSC with its name changed.
*/
- public ProductServiceConfig renamePSC(ProductServiceConfig psc, String name) throws ConfigurationException {
- if ( psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
- BasicProductServiceConfig target = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
- ConfigurationID configID = target.getConfigurationID();
+// public ProductServiceConfig renamePSC(ProductServiceConfig psc, String name) throws ConfigurationException {
+// if ( psc == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+// BasicProductServiceConfig target = (BasicProductServiceConfig) verifyTargetClass(psc,BasicProductServiceConfig.class);
+// ConfigurationID configID = target.getConfigurationID();
+//
+//// ProductServiceConfigID newID = new ProductServiceConfigID(configID, name);
+//// ComponentTypeID typeID = target.getComponentTypeID();
+// target = (BasicProductServiceConfig) BasicUtil.createComponentDefn(ComponentDefn.PSC_COMPONENT_CODE, configID, psc.getComponentTypeID(), name) ;
+//
+// createExchangeAction( target.getID(), ConfigurationModel.Attribute.NAME,
+// target.getName(), name );
+//
+//// new BasicProductServiceConfig(configID, newID, psc.getProductTypeID());
+// return target;
+// }
-// ProductServiceConfigID newID = new ProductServiceConfigID(configID, name);
-// ComponentTypeID typeID = target.getComponentTypeID();
- target = (BasicProductServiceConfig) BasicUtil.createComponentDefn(ComponentDefn.PSC_COMPONENT_CODE, configID, psc.getComponentTypeID(), name) ;
-
- createExchangeAction( target.getID(), ConfigurationModel.Attribute.NAME,
- target.getName(), name );
-
-// new BasicProductServiceConfig(configID, newID, psc.getProductTypeID());
- return target;
- }
-
/**
* Change the name of a previously defined VM in the Next Startup config.
* @param vm The VM whose name to change.
@@ -2397,13 +2377,10 @@
public boolean isDeployed(ServiceComponentDefnID defnID, Configuration config) {
- Iterator iterator = config.getDeployedComponents().iterator();
- while (iterator.hasNext()) {
- DeployedComponent comp = (DeployedComponent)iterator.next();
- ServiceComponentDefnID depDefnID = comp.getServiceComponentDefnID();
- if (defnID.equals(depDefnID)) {
- return true;
- }
+ Collection dcs = config.getDeployedComponents(defnID);
+ if (dcs != null && dcs.size() > 0) {
+ return true;
+
}
return false;
}
@@ -2616,34 +2593,34 @@
return newDefn;
}
- public ConnectorBinding createConnectorComponent(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) {
- if ( configuration == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
- }
- if ( pscID == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
- }
- ProductServiceConfig psc = (ProductServiceConfig)configuration.getComponentDefn(pscID);
- if (psc == null ) {
- throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
- }
+// public ConnectorBinding createConnectorComponent(Configuration configuration, ComponentTypeID typeID, String componentName, ProductServiceConfigID pscID) {
+// if ( configuration == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, Configuration.class.getName()));
+// }
+// if ( pscID == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfigID.class.getName()));
+// }
+// ProductServiceConfig psc = (ProductServiceConfig)configuration.getComponentDefn(pscID);
+// if (psc == null ) {
+// throw new IllegalArgumentException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0089, ProductServiceConfig.class.getName()));
+// }
+//
+// BasicConnectorBinding newServiceDefn = (BasicConnectorBinding)
+// createConnectorComponent((ConfigurationID) configuration.getID(), typeID, componentName, null);
+//
+// // add the service to the psc so that this relationship is found in the deployServiceDefn method
+// addServiceComponentDefn(psc, (ServiceComponentDefnID) newServiceDefn.getID());
+//
+// BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
+// bc.addComponentDefn(newServiceDefn);
+//
+// //automatically deploy the service anywhere that the PSC is already deployed
+// this.deployServiceDefn(bc,newServiceDefn,pscID);
+//
+// return newServiceDefn;
+// }
- BasicConnectorBinding newServiceDefn = (BasicConnectorBinding)
- createConnectorComponent((ConfigurationID) configuration.getID(), typeID, componentName, null);
- // add the service to the psc so that this relationship is found in the deployServiceDefn method
- addServiceComponentDefn(psc, (ServiceComponentDefnID) newServiceDefn.getID());
-
- BasicConfiguration bc = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
- bc.addComponentDefn(newServiceDefn);
-
- //automatically deploy the service anywhere that the PSC is already deployed
- this.deployServiceDefn(bc,newServiceDefn,pscID);
-
- return newServiceDefn;
- }
-
-
public ConnectorBinding createConnectorComponent(ConfigurationID configurationID, ConnectorBinding original, String newName, String routingUUID) {
if (original == null ) {
@@ -2794,96 +2771,91 @@
// ----------------------------------------------------------------------------------
/**
- * Deploys a ServiceComponentDefn anywhere that it's PSC is already
- * deployed. This method is harmless to call if the
- * ServiceComponentDefn is already deployed anywhere. It is
- * also harmless to call if the PSC has not been deployed at
- * all (meaning no other services of the PSC have been deployed.)
- * If the ServiceComponentDefn does not belong to the PSC, it
- * will be added. A Collection of any newly-created
- * DeployedComponent objects is returned.
+ * Deploys a ServiceComponentDefn to the specified VM
+ * This method is harmless to call if the
+ * ServiceComponentDefn is already deployed anywhere.
* @param configuration must be the Configuration containing both
* the ServiceComponentDefn and PSC ID parameters (but this is not
* checked for in this method)
* @param serviceComponentDefn to be deployed
- * @param pscID PSC ID that may already be deployed somewhere in the
- * Configuration parameter
- * @return Collection of newly-created DeployedComponent objects
+ * @param VMID VM ID indicates the process to deploy the service to
+ * @return DeployedComponent of newly-created DeployedComponent object
*/
- public Collection deployServiceDefn(Configuration configuration, ServiceComponentDefn serviceComponentDefn, ProductServiceConfigID pscID) {
- Collection result = null;
-
- BasicServiceComponentDefn basicService = (BasicServiceComponentDefn) verifyTargetClass(serviceComponentDefn,BasicServiceComponentDefn.class);
+ public DeployedComponent deployServiceDefn(Configuration configuration, ServiceComponentDefn serviceComponentDefn, VMComponentDefnID vmID) {
+ BasicServiceComponentDefn basicService = (BasicServiceComponentDefn) verifyTargetClass(serviceComponentDefn,BasicServiceComponentDefn.class);
BasicConfiguration targetConfig = (BasicConfiguration) verifyTargetClass(configuration,BasicConfiguration.class);
//we must automagically create DeployedComponents for the newly-
//enabled service defn, wherever its PSC has already been deployed
DeployedComponent aDeployedComponent = null;
- ProductServiceConfigID aPscID = null;
- HostID hostID = null;
- VMComponentDefnID vmID = null;
- ConfigurationID configID = (ConfigurationID)targetConfig.getID();
+ HostID hostID = null;
+ ConfigurationID configID = (ConfigurationID)targetConfig.getID();
ServiceComponentDefnID serviceDefnID = (ServiceComponentDefnID)basicService.getID();
- //ProductServiceConfigID pscID = targetConfig.getPSCForServiceDefn(serviceDefnID);
+
+ VMComponentDefn vm = targetConfig.getVMComponentDefn(vmID);
+ DeployedComponent deployComponent = targetConfig.getDeployedServiceForVM( serviceDefnID, vm);
+
+ // if its not deployed, deploy it
+ if (deployComponent == null) {
+ DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), configID, hostID, vmID, serviceDefnID);
+ deployComponent = this.createDeployedServiceComponent(serviceDefnID.getName(), configuration, hostID, vmID, basicService);
- ProductServiceConfig psc = targetConfig.getPSC(pscID);
+ }
- HashSet deployedIDs = new HashSet();
- for ( Iterator iter = targetConfig.getDeployedComponents().iterator(); iter.hasNext(); ){
- aDeployedComponent = (DeployedComponent)iter.next();
- aPscID = aDeployedComponent.getProductServiceConfigID();
- if (aPscID != null && aPscID.equals(pscID)){
- hostID = aDeployedComponent.getHostID();
- vmID = aDeployedComponent.getVMComponentDefnID();
-
-
- DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), configID, hostID, vmID, pscID, serviceDefnID);
- if (!deployedIDs.contains(id)){
- deployedIDs.add(id);
-
- DeployedComponent deployComponent = this.createDeployedServiceComponent(serviceDefnID.getName(), configuration, hostID, vmID, basicService, aPscID);
-// BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
-// configID,
-// hostID,
-// vmID,
-// serviceDefnID,
-// pscID,
-// basicService.getComponentTypeID());
+// HashSet deployedIDs = new HashSet();
+// for ( Iterator iter = targetConfig.getDeployedServiceForVM(serviceDefnID, vm).iterator(); iter.hasNext(); ){
+// aDeployedComponent = (DeployedComponent)iter.next();
+// VMComponentDefnID aVMID = aDeployedComponent.getVMComponentDefnID();
+// if (aVMID != null && aVMID.equals(vmID)){
+// hostID = aDeployedComponent.getHostID();
+// // vmID = aDeployedComponent.getVMComponentDefnID();
//
-// createCreationAction(id, deployComponent );
-
-// try {
-// DeployedComponent newService = (DeployedComponent) deployComponent.clone();
-// targetConfig.addDeployedComponent(newService);
- if (result == null){
- result = new ArrayList();
- }
- result.add(deployComponent);
-
-
- if (psc.getServiceComponentDefnIDs() == null) {
- addServiceComponentDefn(psc, serviceDefnID);
-
- } else {
- if (!psc.getServiceComponentDefnIDs().contains(serviceDefnID)) {
- addServiceComponentDefn(psc, serviceDefnID);
- }
- }
-
-// } catch (CloneNotSupportedException e) {
-// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0078,
-// new Object[] {DeployedComponent.class.getName(), e.getMessage()}));
-// }
- }
- }
- }
+//
+// DeployedComponentID id = new DeployedComponentID(serviceDefnID.getName(), configID, hostID, vmID, serviceDefnID);
+// if (!deployedIDs.contains(id)){
+// deployedIDs.add(id);
+//
+// DeployedComponent deployComponent = this.createDeployedServiceComponent(serviceDefnID.getName(), configuration, hostID, vmID, basicService, aPscID);
+//// BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
+//// configID,
+//// hostID,
+//// vmID,
+//// serviceDefnID,
+//// pscID,
+//// basicService.getComponentTypeID());
+////
+//// createCreationAction(id, deployComponent );
+//
+//// try {
+//// DeployedComponent newService = (DeployedComponent) deployComponent.clone();
+//// targetConfig.addDeployedComponent(newService);
+// if (result == null){
+// result = new ArrayList();
+// }
+// result.add(deployComponent);
+//
+//
+// if (psc.getServiceComponentDefnIDs() == null) {
+// addServiceComponentDefn(psc, serviceDefnID);
+//
+// } else {
+// if (!psc.getServiceComponentDefnIDs().contains(serviceDefnID)) {
+// addServiceComponentDefn(psc, serviceDefnID);
+// }
+// }
+//
+//// } catch (CloneNotSupportedException e) {
+//// throw new RuntimeException(CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0078,
+//// new Object[] {DeployedComponent.class.getName(), e.getMessage()}));
+//// }
+// }
+// }
+// }
//this will overwrite the service if it already is in the Configuration
targetConfig.addComponentDefn(basicService);
- if (result == null){
- result = Collections.EMPTY_LIST;
- }
- return result;
+
+ return deployComponent;
}
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -54,12 +54,12 @@
super(copy);
}
- public boolean isOfConnectorProductType() {
- if (getParentComponentTypeID().getFullName().equalsIgnoreCase(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
- return true;
- }
- return false;
- }
+// public boolean isOfConnectorProductType() {
+// if (getParentComponentTypeID().getFullName().equalsIgnoreCase(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
+// return true;
+// }
+// return false;
+// }
public boolean isOfTypeConnector() {
return true;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicDeployedComponent.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -73,9 +73,9 @@
* @clientCardinality 1
*/
private VMComponentDefnID vmComponentID;
+
+ private boolean isEnabled;
- private ProductServiceConfigID pscID;
-
/**
* Constructor takes a <code>ComponentID, HostID, </code> and <code> Collection </code> of system components to declare a component as being deployed.
* @param deployedID is the DeployedComponentID
@@ -85,11 +85,11 @@
* @param serviceComponentID is the ServiceComponentID (null if this is a deployed VM)
*/
public BasicDeployedComponent(DeployedComponentID deployedId, ConfigurationID configId, HostID hostId, VMComponentDefnID vmId, ComponentTypeID deployedTypeID) {
- this(deployedId, configId, hostId, vmId, null, null, deployedTypeID);
+ this(deployedId, configId, hostId, vmId, null, deployedTypeID);
}
- public BasicDeployedComponent(DeployedComponentID deployedId, ConfigurationID configId, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceId, ProductServiceConfigID pscID, ComponentTypeID deployedTypeID) {
+ public BasicDeployedComponent(DeployedComponentID deployedId, ConfigurationID configId, HostID hostId, VMComponentDefnID vmId, ServiceComponentDefnID serviceId, ComponentTypeID deployedTypeID) {
super(deployedId, deployedTypeID);
this.configurationID = configId;
this.hostID = hostId;
@@ -97,9 +97,6 @@
if (serviceId != null) {
this.componentID = serviceId;
}
- if (pscID != null){
- this.pscID = pscID;
- }
}
@@ -110,10 +107,17 @@
this.vmComponentID = deployedComponent.getVMComponentDefnID();
if (deployedComponent.getServiceComponentDefnID() != null) {
this.componentID = deployedComponent.getServiceComponentDefnID();
- this.pscID = deployedComponent.getProductServiceConfigID();
}
}
+ public boolean isEnabled() {
+ return this.isEnabled;
+ }
+
+ public void setIsEnabled(boolean enable) {
+ this.isEnabled = enable;
+ }
+
/**
* Indicates whether this object represents a deployed
* service component definition (returns true) or
@@ -149,16 +153,6 @@
}
- /**
- * Returns the <code>ProductServiceConfigID</code> of the ServiceComponentDefn that is
- * deployed. Null will be returned if this <code>DeployedComponent</code>
- * is a deployed VM.
- * @return the component id, null when this is a deployed VM
- */
- public ProductServiceConfigID getProductServiceConfigID(){
- return pscID;
- }
-
public ServiceComponentDefnID getServiceComponentDefnID() {
return componentID;
}
@@ -200,14 +194,8 @@
}
return componentID.equals(componentObjectId);
- } else if (componentObjectId instanceof ProductServiceConfigID) {
- if (pscID == null) {
- return false;
- }
+ }
- return pscID.equals(componentObjectId);
- }
-
return false;
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductServiceConfig.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -30,6 +30,7 @@
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.ProductServiceConfig;
import com.metamatrix.common.config.api.ProductServiceConfigID;
+import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ProductTypeID;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
@@ -41,8 +42,8 @@
private HashMap serviceComponentDefnIDs;
- public BasicProductServiceConfig(ConfigurationID configurationID, ProductServiceConfigID componentID, ProductTypeID productTypeID) {
- super(configurationID, componentID, productTypeID);
+ public BasicProductServiceConfig(ConfigurationID configurationID, ProductServiceConfigID componentID) {
+ super(configurationID, componentID, ProductType.PRODUCT_TYPE_ID);
serviceComponentDefnIDs = new HashMap();
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicProductType.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -28,8 +28,10 @@
import com.metamatrix.common.config.api.ComponentTypeID;
import com.metamatrix.common.config.api.ProductType;
+import com.metamatrix.common.config.api.ProductTypeID;
public class BasicProductType extends BasicComponentType implements ProductType, Serializable {
+ public static final ProductType PRODUCT_TYPE = new BasicProductType(ProductTypeID.PRODUCT_TYPE_ID, null, ProductType.PRODUCT_SUPER_TYPE_ID, false, false, false);
private HashSet componentTypeIDs;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/BasicUtil.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -128,20 +128,20 @@
* @param defnName is the name of the component defn
* @return BasicComponentDefn
*/
- public static final BasicComponentDefn createComponentDefn(int defnTypeCode, ConfigurationID configID, ProductTypeID typeID, String defnName) {
-
- BasicComponentDefn defn = null;
-
- if (defnTypeCode == ComponentDefn.PSC_COMPONENT_CODE) {
- ProductServiceConfigID pscID = new ProductServiceConfigID(configID, defnName);
- defn = new BasicProductServiceConfig(configID, pscID, typeID);
-
- } else {
- Assertion.assertTrue(true, "DefnTypeCode:" + defnTypeCode + " is not defined in BasicUtil.createComponentDefn"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return defn;
- }
+// public static final BasicComponentDefn createComponentDefn(int defnTypeCode, ConfigurationID configID, String defnName) {
+//
+// BasicComponentDefn defn = null;
+//
+// if (defnTypeCode == ComponentDefn.PSC_COMPONENT_CODE) {
+// ProductServiceConfigID pscID = new ProductServiceConfigID(configID, defnName);
+// defn = new BasicProductServiceConfig(configID, pscID);
+//
+// } else {
+// Assertion.assertTrue(true, "DefnTypeCode:" + defnTypeCode + " is not defined in BasicUtil.createComponentDefn"); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// return defn;
+// }
@@ -171,7 +171,8 @@
return defn;
}
-
+
+
/**
* static method that is used to create the specified instance type of BasicComponentType.
@@ -199,9 +200,9 @@
type = new BasicComponentType(typeID, parentID, superID, deployable, false, monitored);
classTypeCode = ComponentType.CONFIGURATION_COMPONENT_TYPE_CODE;
- } else if (name.equalsIgnoreCase(ProductServiceConfigComponentType.COMPONENT_TYPE_NAME)) {
- type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
- classTypeCode = ComponentType.PSC_COMPONENT_TYPE_CODE;
+// } else if (name.equalsIgnoreCase(ProductServiceConfigComponentType.COMPONENT_TYPE_NAME)) {
+// type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
+// classTypeCode = ComponentType.PSC_COMPONENT_TYPE_CODE;
} else if (name.equalsIgnoreCase("DeployedComponent")) { //$NON-NLS-1$
// type = new BasicDeployedComponentType(typeID, parentID, superID, deployable, false, monitored);
@@ -210,22 +211,21 @@
classTypeCode = ComponentType.DEPLOYED_COMPONENT_TYPE_CODE;
+// } else //if (name.equalsIgnoreCase(ProductType.COMPONENT_TYPE_NAME) ||
+// if ( classTypeCode == ComponentType.PRODUCT_COMPONENT_TYPE_CODE ) {
+// ProductTypeID prodtypeID = new ProductTypeID(name);
+// classTypeCode = ComponentType.PRODUCT_COMPONENT_TYPE_CODE;
+//
+// type = new BasicProductType(prodtypeID, parentID, superID, deployable, false, monitored);
- } else //if (name.equalsIgnoreCase(ProductType.COMPONENT_TYPE_NAME) ||
- if ( classTypeCode == ComponentType.PRODUCT_COMPONENT_TYPE_CODE ) {
- ProductTypeID prodtypeID = new ProductTypeID(name);
- classTypeCode = ComponentType.PRODUCT_COMPONENT_TYPE_CODE;
-
- type = new BasicProductType(prodtypeID, parentID, superID, deployable, false, monitored);
-
} else if (classTypeCode == ComponentType.CONNECTOR_COMPONENT_TYPE_CODE) {
type = new BasicConnectorBindingType(typeID, parentID, superID, deployable, false, monitored);
} else if (classTypeCode == ComponentType.AUTHPROVIDER_COMPONENT_TYPE_CODE) {
type = new BasicAuthenticationProviderType(typeID, parentID, superID, deployable, false, monitored);
} else if (classTypeCode == ComponentType.SERVICE_COMPONENT_TYPE_CODE) {
type = new BasicServiceComponentType(typeID, parentID, superID, deployable, false, monitored);
- } else if (classTypeCode == ComponentType.PSC_COMPONENT_TYPE_CODE) {
- type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
+// } else if (classTypeCode == ComponentType.PSC_COMPONENT_TYPE_CODE) {
+// type = new BasicProductServiceConfigType(typeID, parentID, superID, deployable, false, monitored);
// } else if (classTypeCode == ComponentDefn.VM_COMPONENT_TYPE_CODE) {
// type = new BasicVMComponentDefnType(typeID, parentID, superID, deployable, false, monitored);
@@ -252,16 +252,15 @@
return type;
}
- public static BasicDeployedComponent createDeployedComponent(String name, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, ServiceComponentDefnID svcID, ProductServiceConfigID pscID, ComponentTypeID typeID) {
+ public static BasicDeployedComponent createDeployedComponent(String name, ConfigurationID configID, HostID hostID, VMComponentDefnID vmID, ServiceComponentDefnID svcID, ComponentTypeID typeID) {
- DeployedComponentID id = new DeployedComponentID(name, configID, hostID, vmID, pscID, svcID);
+ DeployedComponentID id = new DeployedComponentID(name, configID, hostID, vmID, svcID);
BasicDeployedComponent deployComponent = new BasicDeployedComponent(id,
configID,
hostID,
vmID,
- svcID,
- pscID,
+ svcID,
typeID);
return deployComponent;
}
@@ -284,8 +283,6 @@
public static int getComponentType(BaseObject defn) {
if (defn instanceof Host) {
return ComponentType.HOST_COMPONENT_TYPE_CODE;
- } else if (defn instanceof ProductServiceConfig) {
- return ComponentType.PSC_COMPONENT_TYPE_CODE;
}else if(defn instanceof VMComponentDefn) {
return ComponentType.VM_COMPONENT_TYPE_CODE;
}else if(defn instanceof ConnectorBinding) {
@@ -311,9 +308,7 @@
static int getComponentType(BaseID defnID) {
if (defnID instanceof HostID) {
return ComponentType.HOST_COMPONENT_TYPE_CODE;
- } else if (defnID instanceof ProductServiceConfigID) {
- return ComponentType.PSC_COMPONENT_TYPE_CODE;
- }else if(defnID instanceof VMComponentDefnID) {
+ }else if(defnID instanceof VMComponentDefnID) {
return ComponentType.VM_COMPONENT_TYPE_CODE;
}else if(defnID instanceof ResourceDescriptorID) {
return ComponentType.RESOURCE_COMPONENT_TYPE_CODE;
@@ -346,8 +341,6 @@
public static int getComponentDefnType(BaseObject defn) {
if (defn instanceof Host) {
return ComponentDefn.HOST_COMPONENT_CODE;
- } else if (defn instanceof ProductServiceConfig) {
- return ComponentDefn.PSC_COMPONENT_CODE;
}else if(defn instanceof VMComponentDefn) {
return ComponentDefn.VM_COMPONENT_CODE;
}else if(defn instanceof ConnectorBinding) {
@@ -364,8 +357,7 @@
return ComponentDefn.DEPLOYED_COMPONENT_CODE;
} else if (defn instanceof SharedResource) {
return ComponentDefn.SHARED_RESOURCE_COMPONENT_CODE;
- } else if (defn instanceof ProductType) {
- return ComponentDefn.PRODUCT_COMPONENT_CODE;
+
} else {
Assertion.assertTrue(false, "Process Error: component defn object of type " + defn.getClass().getName() + " not accounted for."); //$NON-NLS-1$ //$NON-NLS-2$
@@ -373,39 +365,6 @@
return -1;
}
-
-public static int getComponentDefnType(BaseID id) {
- if (id instanceof HostID) {
- return ComponentDefn.HOST_COMPONENT_CODE;
- } else if (id instanceof ProductServiceConfigID) {
- return ComponentDefn.PSC_COMPONENT_CODE;
- }else if(id instanceof VMComponentDefnID) {
- return ComponentDefn.VM_COMPONENT_CODE;
- }else if(id instanceof ConnectorBindingID) {
- return ComponentDefn.CONNECTOR_COMPONENT_CODE;
- }else if(id instanceof ResourceDescriptorID) {
- return ComponentDefn.RESOURCE_DESCRIPTOR_COMPONENT_CODE;
- }else if(id instanceof ServiceComponentDefnID) {
- return ComponentDefn.SERVICE_COMPONENT_CODE;
- }else if(id instanceof AuthenticationProviderID) {
- return ComponentDefn.AUTHPROVIDER_COMPONENT_CODE;
- }else if (id instanceof ConfigurationID) {
- return ComponentDefn.CONFIGURATION_COMPONENT_CODE;
- } else if (id instanceof DeployedComponentID) {
- return ComponentDefn.DEPLOYED_COMPONENT_CODE;
- } else if (id instanceof SharedResourceID) {
- return ComponentDefn.SHARED_RESOURCE_COMPONENT_CODE;
- } else if (id instanceof ProductTypeID) {
- return ComponentDefn.PRODUCT_COMPONENT_CODE;
-
- } else {
- Assertion.assertTrue(false, "Process Error: component defn object of type " + id.getClass().getName() + " not accounted for."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return -1;
-}
-
-
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationModelContainerImpl.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -67,16 +67,16 @@
private Map compTypes = Collections.synchronizedMap(new HashMap(45));
- private Map prodTypes = Collections.synchronizedMap(new HashMap(10));
-
-
private Map resources = Collections.synchronizedMap(new HashMap(25));
public ConfigurationModelContainerImpl() {
}
-
- public ConfigurationModelContainerImpl(ArrayList configObjects) throws ConfigurationException {
+
+
+
+
+ public ConfigurationModelContainerImpl(ArrayList configObjects) throws ConfigurationException {
this.setConfigurationObjects(configObjects);
}
@@ -128,8 +128,6 @@
configObjects.addAll(getConfiguration().getDeployedComponents());
- configObjects.addAll(getConfiguration().getPSCs());
-
// Add the objects that are not configuration based, meaning they
// are not added,updated,delete within the context of a configuration
configObjects.addAll(getHosts());
@@ -366,15 +364,15 @@
}
public ProductType getProductType(String name) {
- if (prodTypes.containsKey(name)) {
- return (ProductType) prodTypes.get(name);
- }
+ if (BasicProductType.PRODUCT_TYPE.getName().equalsIgnoreCase(name)) {
+ return BasicProductType.PRODUCT_TYPE;
+ }
return null;
}
- public Collection getProductTypes() {
- Collection pts = new ArrayList(this.prodTypes.size());
- pts.addAll(this.prodTypes.values());
+ public Collection<ProductType> getProductTypes() {
+ Collection<ProductType> pts = new ArrayList<ProductType>(1);
+ pts.add(BasicProductType.PRODUCT_TYPE);
return pts;
}
@@ -392,22 +390,22 @@
return result;
}
- public ConfigurationModelContainer copyAs(ConfigurationID configID) throws ConfigurationException {
- BasicConfigurationObjectEditor ceditor = new BasicConfigurationObjectEditor(false);
+// public ConfigurationModelContainer copyAs(ConfigurationID configID) throws ConfigurationException {
+// BasicConfigurationObjectEditor ceditor = new BasicConfigurationObjectEditor(false);
+//
+//
+// Configuration newConfig = ceditor.createConfiguration(configuration, configID.getFullName());
+// ConfigurationModelContainerImpl newConfigModel = new ConfigurationModelContainerImpl(newConfig);
+//
+// newConfigModel.setComponentTypes(this.compTypes);
+//// newConfigModel.setProductTypes(this.prodTypes.values());
+//
+// newConfigModel.setResources(this.resources);
+//
+// return newConfigModel;
+// }
- Configuration newConfig = ceditor.createConfiguration(configuration, configID.getFullName());
- ConfigurationModelContainerImpl newConfigModel = new ConfigurationModelContainerImpl(newConfig);
-
- newConfigModel.setComponentTypes(this.compTypes);
- newConfigModel.setProductTypes(this.prodTypes.values());
-
- newConfigModel.setResources(this.resources);
-
- return newConfigModel;
- }
-
-
public void setComponentTypes(Map newCompTypes) {
this.compTypes = Collections.synchronizedMap(new HashMap(newCompTypes.size()));
@@ -417,16 +415,16 @@
}
}
- public void setProductTypes(Collection newProdTypes) {
- this.prodTypes = Collections.synchronizedMap(new HashMap(newProdTypes.size()));
+// public void setProductTypes(Collection newProdTypes) {
+// this.prodTypes = Collections.synchronizedMap(new HashMap(newProdTypes.size()));
+//
+// Iterator it = newProdTypes.iterator();
+// while (it.hasNext()) {
+// addProductType((ProductType)it.next());
+// }
+// }
- Iterator it = newProdTypes.iterator();
- while (it.hasNext()) {
- addProductType((ProductType)it.next());
- }
- }
-
public void setResources(Map theResources) {
this.resources = Collections.synchronizedMap(new HashMap(theResources.size()));
this.resources.putAll(theResources);
@@ -457,9 +455,9 @@
}
- public void addProductType(ProductType type) {
- prodTypes.put(type.getFullName(), type);
- }
+// public void addProductType(ProductType type) {
+// prodTypes.put(type.getFullName(), type);
+// }
@@ -510,16 +508,16 @@
ConfigurationObjectEditorHelper.addConfigurationHostComponent(configuration, host);
- } else if (obj instanceof ProductServiceConfig) {
- ProductServiceConfig psc = (ProductServiceConfig) obj;
+// } else if (obj instanceof ProductServiceConfig) {
+// ProductServiceConfig psc = (ProductServiceConfig) obj;
+//
+//
+// if (configuration == null) {
+// throw new ConfigurationException(ErrorMessageKeys.CONFIG_0001, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_0001));
+// }
+//
+// ConfigurationObjectEditorHelper.addConfigurationComponentDefn(configuration, psc);
-
- if (configuration == null) {
- throw new ConfigurationException(ErrorMessageKeys.CONFIG_0001, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_0001));
- }
-
- ConfigurationObjectEditorHelper.addConfigurationComponentDefn(configuration, psc);
-
} else if (obj instanceof SharedResource) {
SharedResource rd = (SharedResource) obj;
@@ -551,8 +549,8 @@
throw new ConfigurationException(ErrorMessageKeys.CONFIG_0002, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_0002));
}
- } else if (obj instanceof ProductType) {
- addProductType((ProductType) obj);
+// } else if (obj instanceof ProductType) {
+// addProductType((ProductType) obj);
} else if (obj instanceof ComponentType) {
@@ -626,8 +624,8 @@
} else if (objID instanceof HostID) {
remove((HostID) objID);
- } else if (objID instanceof ProductServiceConfigID) {
- remove((ProductServiceConfigID) objID);
+// } else if (objID instanceof ProductServiceConfigID) {
+// remove((ProductServiceConfigID) objID);
} else if (objID instanceof SharedResourceID) {
removeSharedResource((SharedResourceID) objID);
@@ -635,8 +633,6 @@
} else if (objID instanceof ResourceDescriptorID) {
remove((ResourceDescriptorID) objID);
- } else if (objID instanceof ProductTypeID) {
- removeProductType((ProductTypeID) objID);
} else if (objID instanceof ComponentTypeID) {
removeComponentType((ComponentTypeID) objID);
@@ -654,18 +650,14 @@
compTypes.remove(typeID.getFullName());
}
- Collection c = getProductTypes();
- for (final Iterator i = c.iterator(); i.hasNext();) {
- final BasicProductType type = (BasicProductType)i.next();
- type.removeServiceTypeID(typeID);
- } // for
+// Collection c = getProductTypes();
+// for (final Iterator i = c.iterator(); i.hasNext();) {
+// final BasicProductType type = (BasicProductType)i.next();
+// type.removeServiceTypeID(typeID);
+// } // for
}
- private void removeProductType(ProductTypeID typeID) {
- if (prodTypes.containsKey(typeID.getFullName())) {
- prodTypes.remove(typeID.getFullName());
- }
- }
+
private void removeSharedResource(SharedResourceID rdID) {
if (resources.containsKey(rdID.getFullName())) {
@@ -719,15 +711,15 @@
ConfigurationObjectEditorHelper.delete(hostID, configuration);
}
- private void remove(ProductServiceConfigID pscID) throws ConfigurationException {
+// private void remove(ProductServiceConfigID pscID) throws ConfigurationException {
+//
+// if (configuration == null) {
+// throw new ConfigurationException(ErrorMessageKeys.CONFIG_0001, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_0001));
+// }
+//
+// ConfigurationObjectEditorHelper.delete(pscID, configuration);
+// }
- if (configuration == null) {
- throw new ConfigurationException(ErrorMessageKeys.CONFIG_0001, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_0001));
- }
-
- ConfigurationObjectEditorHelper.delete(pscID, configuration);
- }
-
private void remove(ResourceDescriptorID rdID) throws ConfigurationException {
if (configuration == null) {
@@ -744,7 +736,7 @@
ConfigurationModelContainerImpl newConfig = new ConfigurationModelContainerImpl(config);
newConfig.setComponentTypes(this.compTypes);
- newConfig.setProductTypes(this.prodTypes.values());
+// newConfig.setProductTypes(this.prodTypes.values());
newConfig.setResources(this.resources);
return newConfig;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/model/ConfigurationObjectEditorHelper.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -351,17 +351,17 @@
* @param serviceComponentType ComponentType to be added to the
* ProductType
*/
- public static ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType){
- BasicProductType basicProdType = (BasicProductType)productType;
+// public static ProductType addServiceComponentType(ProductType productType, ComponentType serviceComponentType){
+// BasicProductType basicProdType = (BasicProductType)productType;
+//
+// ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
+// setParentComponentTypeID(serviceComponentType, productTypeID);
+// //add the service ComponentTypeID to the BasicProductType
+// basicProdType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
+//
+// return basicProdType;
+// }
- ComponentTypeID productTypeID = (ComponentTypeID)basicProdType.getID();
- setParentComponentTypeID(serviceComponentType, productTypeID);
- //add the service ComponentTypeID to the BasicProductType
- basicProdType.addServiceTypeID((ComponentTypeID)serviceComponentType.getID());
-
- return basicProdType;
- }
-
protected static ComponentType setParentComponentTypeID(ComponentType t, ComponentTypeID parentID) {
BasicComponentType target = (BasicComponentType) verifyTargetClass(t,BasicComponentType.class);
@@ -386,16 +386,16 @@
* @param serviceComponentType ComponentType to be taken from the
* ProductType
*/
- public static ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType){
- BasicProductType basicProdType = (BasicProductType)productType;
+// public static ProductType removeServiceComponentType(ProductType productType, ComponentType serviceComponentType){
+// BasicProductType basicProdType = (BasicProductType)productType;
+//
+// //add the service ComponentTypeID to the BasicProductType
+// basicProdType.removeServiceTypeID((ComponentTypeID)serviceComponentType.getID());
+//
+// return basicProdType;
+// }
- //add the service ComponentTypeID to the BasicProductType
- basicProdType.removeServiceTypeID((ComponentTypeID)serviceComponentType.getID());
- return basicProdType;
- }
-
-
// public static void renameHostAndDeployedComponents(ConfigurationModelContainer cmc, String oldHostName, String newHostName, String newPortNumber) throws ConfigurationException {
//
// /**
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/util/ConfigUtil.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -84,24 +84,24 @@
}
-public static ProductServiceConfig getFirstDeployedConnectorProductTypePSC(ConfigurationModelContainer cmc) throws Exception {
+//public static ProductServiceConfig getFirstDeployedConnectorProductTypePSC(ConfigurationModelContainer cmc) throws Exception {
+//
+// ProductTypeID prodType = ProductTypeID.PRODUCT_TYPE_ID;
+// Iterator it = cmc.getConfiguration().getDeployedComponents().iterator();
+// while(it.hasNext()) {
+// final DeployedComponent dc = (DeployedComponent) it.next();
+// if (dc.isDeployedConnector()) {
+// ProductServiceConfigID pscID = dc.getProductServiceConfigID();
+//
+// ProductServiceConfig psc = cmc.getConfiguration().getPSC(pscID);
+// if (psc.getComponentTypeID().equals(prodType)) {
+// return psc;
+// }
+// }
+//
+// }
+// return null;
+//}
- ProductTypeID prodType = new ProductTypeID(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME);
- Iterator it = cmc.getConfiguration().getDeployedComponents().iterator();
- while(it.hasNext()) {
- final DeployedComponent dc = (DeployedComponent) it.next();
- if (dc.isDeployedConnector()) {
- ProductServiceConfigID pscID = dc.getProductServiceConfigID();
-
- ProductServiceConfig psc = cmc.getConfiguration().getPSC(pscID);
- if (psc.getComponentTypeID().equals(prodType)) {
- return psc;
- }
- }
-
- }
- return null;
-}
-
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_HelperImpl.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -65,6 +65,7 @@
import com.metamatrix.common.config.model.BasicComponentObject;
import com.metamatrix.common.config.model.BasicComponentType;
import com.metamatrix.common.config.model.BasicConfigurationObjectEditor;
+import com.metamatrix.common.config.model.BasicVMComponentDefn;
import com.metamatrix.common.config.util.ConfigurationPropertyNames;
import com.metamatrix.common.config.util.InvalidConfigurationElementException;
import com.metamatrix.common.log.LogConfiguration;
@@ -94,19 +95,20 @@
*/
public class XMLConfig_42_HelperImpl implements XMLHelper, ConfigurationPropertyNames {
- /**
+
+
+ /**
* @see com.metamatrix.common.config.xml.XMLHelper#createDeployedComponent(org.jdom.Element, com.metamatrix.common.config.api.ConfigurationID, com.metamatrix.common.config.api.HostID, com.metamatrix.common.config.api.VMComponentDefnID, com.metamatrix.common.config.api.ProductServiceConfigID, java.util.Map, com.metamatrix.common.config.api.ConfigurationObjectEditor)
* @since 4.1
*/
- public DeployedComponent createDeployedComponent(Element element,
- ConfigurationID configID,
- HostID hostID,
- VMComponentDefnID vmID,
- ProductServiceConfigID pscID,
- Map componentTypeMap,
- ConfigurationObjectEditor editor) throws InvalidConfigurationElementException {
- return null;
- }
+// public DeployedComponent createDeployedComponent(Element element,
+// ConfigurationID configID,
+// HostID hostID,
+// VMComponentDefnID vmID,
+// Map componentTypeMap,
+// ConfigurationObjectEditor editor) throws InvalidConfigurationElementException {
+// return null;
+// }
/**
* This method is used to create a Configuration JDOM Element from a
* Configuration object.
@@ -306,19 +308,19 @@
// return serviceComponentDefnElement;
// }
- public Element createDeployedProductServiceConfigElement(ProductServiceConfig config) {
- Assertion.isNotNull(config);
-
- Element productServiceConfigElement = createComponentObjectElement(XMLConfig_42_ElementNames.Configuration.ProductServiceConfig.ELEMENT, config);
-
- return productServiceConfigElement;
- }
+// public Element createDeployedProductServiceConfigElement(ProductServiceConfig config) {
+// Assertion.isNotNull(config);
+//
+// Element productServiceConfigElement = createComponentObjectElement(XMLConfig_42_ElementNames.Configuration.ProductServiceConfig.ELEMENT, config);
+//
+// return productServiceConfigElement;
+// }
+//
+// public Element createProductServiceConfigsElement() {
+// return new Element(XMLConfig_42_ElementNames.ProductServiceConfigs.ELEMENT);
+//
+// }
- public Element createProductServiceConfigsElement() {
- return new Element(XMLConfig_42_ElementNames.ProductServiceConfigs.ELEMENT);
-
- }
-
@@ -329,25 +331,25 @@
* @param config the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductServiceConfigElement(ProductServiceConfig config) {
- Assertion.isNotNull(config);
+// public Element createProductServiceConfigElement(ProductServiceConfig config) {
+// Assertion.isNotNull(config);
+//
+// Element productServiceConfigElement = createComponentObjectElement(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT, config);
+//
+// Iterator iterator = config.getServiceComponentDefnIDs().iterator();
+// while (iterator.hasNext()) {
+// ServiceComponentDefnID id = (ServiceComponentDefnID)iterator.next();
+// boolean isEnabled = config.isServiceEnabled(id);
+//
+// Element idElement = createIDElement(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.ELEMENT, id.getName());
+//
+// idElement.setAttribute(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED, (Boolean.valueOf(isEnabled)).toString());
+//
+// productServiceConfigElement.addContent(idElement);
+// }
+// return productServiceConfigElement;
+// }
- Element productServiceConfigElement = createComponentObjectElement(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT, config);
-
- Iterator iterator = config.getServiceComponentDefnIDs().iterator();
- while (iterator.hasNext()) {
- ServiceComponentDefnID id = (ServiceComponentDefnID)iterator.next();
- boolean isEnabled = config.isServiceEnabled(id);
-
- Element idElement = createIDElement(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.ELEMENT, id.getName());
-
- idElement.setAttribute(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED, (Boolean.valueOf(isEnabled)).toString());
-
- productServiceConfigElement.addContent(idElement);
- }
- return productServiceConfigElement;
- }
-
/**
* This method is used to create a ComponentType JDOM Element from a
* ComponentType object.
@@ -545,41 +547,41 @@
* @param type the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductTypeElement(ProductType type) {
- Assertion.isNotNull(type);
+// public Element createProductTypeElement(ProductType type) {
+// Assertion.isNotNull(type);
+//
+// Element productTypeElement = new Element(XMLConfig_42_ElementNames.ProductTypes.ProductType.ELEMENT);
+//
+// Iterator iterator = type.getComponentTypeIDs().iterator();
+// while (iterator.hasNext()) {
+// ComponentTypeID id = (ComponentTypeID)iterator.next();
+// Element componentTypeIDElement = createIDElement(XMLConfig_42_ElementNames.ComponentTypeID.ELEMENT, id.getName());
+// productTypeElement.addContent(componentTypeIDElement);
+// }
+//
+//
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.NAME, type.getName());
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.COMPONENT_TYPE_CODE, new Integer(type.getComponentTypeCode()).toString());
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.DEPLOYABLE, (Boolean.valueOf(type.isDeployable())).toString());
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.DEPRECATED, (Boolean.valueOf(type.isDeprecated())).toString());
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.MONITORABLE, (Boolean.valueOf(type.isMonitored())).toString());
+//
+// // we only add these if they are not null
+// BaseID superID = type.getSuperComponentTypeID();
+// String superIDString;
+// if (superID != null) {
+// superIDString = superID.getName();
+// productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.SUPER_COMPONENT_TYPE, superIDString);
+//
+// }
+//
+// addChangeHistoryElement(type, productTypeElement);
+//
+//
+// return productTypeElement;
+//
+// }
- Element productTypeElement = new Element(XMLConfig_42_ElementNames.ProductTypes.ProductType.ELEMENT);
-
- Iterator iterator = type.getComponentTypeIDs().iterator();
- while (iterator.hasNext()) {
- ComponentTypeID id = (ComponentTypeID)iterator.next();
- Element componentTypeIDElement = createIDElement(XMLConfig_42_ElementNames.ComponentTypeID.ELEMENT, id.getName());
- productTypeElement.addContent(componentTypeIDElement);
- }
-
-
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.NAME, type.getName());
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.COMPONENT_TYPE_CODE, new Integer(type.getComponentTypeCode()).toString());
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.DEPLOYABLE, (Boolean.valueOf(type.isDeployable())).toString());
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.DEPRECATED, (Boolean.valueOf(type.isDeprecated())).toString());
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.MONITORABLE, (Boolean.valueOf(type.isMonitored())).toString());
-
- // we only add these if they are not null
- BaseID superID = type.getSuperComponentTypeID();
- String superIDString;
- if (superID != null) {
- superIDString = superID.getName();
- productTypeElement.setAttribute(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.Attributes.SUPER_COMPONENT_TYPE, superIDString);
-
- }
-
- addChangeHistoryElement(type, productTypeElement);
-
-
- return productTypeElement;
-
- }
-
/**
* This method is used to create a Host JDOM Element from a
* Host object.
@@ -1093,9 +1095,9 @@
return new Element(XMLConfig_42_ElementNames.ComponentTypes.ELEMENT);
}
- public Element createProductTypesElement() {
- return new Element(XMLConfig_42_ElementNames.ProductTypes.ELEMENT);
- }
+// public Element createProductTypesElement() {
+// return new Element(XMLConfig_42_ElementNames.ProductTypes.ELEMENT);
+// }
public Element createConnectorBindingsElement() {
return new Element(XMLConfig_42_ElementNames.ConnectorComponents.ELEMENT);
@@ -1494,52 +1496,52 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLConfig_42_ElementNames class.
*/
- public ProductType createProductType(Element element, ConfigurationObjectEditor editor, Map componentTypeMap, String name)throws InvalidConfigurationElementException{
- Assertion.isNotNull(element);
- Assertion.isNotNull(editor);
-
- if (!element.getName().equals(XMLConfig_42_ElementNames.ProductTypes.ProductType.ELEMENT)) {
- throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0036, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0036, element.getName()), element);
- }
-
- // retreive the attributes of this ComponentType from the JDOM element
- String deployable = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.DEPLOYABLE);
-// String monitorable = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.MONITORABLE);
-
- // we will use the passed in name unless it is null...
- if (name == null) {
- name = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.NAME);
- }
-
- boolean isDeployable = (Boolean.valueOf(deployable)).booleanValue();
- // boolean isMonitorable = (Boolean.valueOf(monitorable)).booleanValue();
-
- List componentTypeIDs = element.getChildren(XMLConfig_42_ElementNames.ComponentTypeID.ELEMENT);
- List componentTypes = new ArrayList();
- Iterator iter = componentTypeIDs.iterator();
- while (iter.hasNext()) {
- Element componentTypeIDElement = (Element)iter.next();
- String componentTypeIDName = componentTypeIDElement.getAttributeValue(XMLConfig_42_ElementNames.ComponentTypeID.Attributes.NAME);
- ComponentTypeID componentTypeID = new ComponentTypeID(componentTypeIDName);
- ComponentType componentType = (ComponentType)componentTypeMap.get(componentTypeID);
- if (componentType == null) {
- throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0037, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0037, new Object[] {componentTypeID, name}), element);
- }
- componentTypes.add(componentType);
- }
-
- // create the ComponentTypeObject
- ProductType type = editor.createProductType(name, componentTypes, isDeployable, false);
-
- return type;
-// // get the ComponentTypeDefn sub-Elements of this ComponentType
-// // and create them also.
-// Collection componentTypeDefnElements = element.getChildren(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.ComponentTypeDefn.ELEMENT);
+// public ProductType createProductType(Element element, ConfigurationObjectEditor editor, Map componentTypeMap, String name)throws InvalidConfigurationElementException{
+// Assertion.isNotNull(element);
+// Assertion.isNotNull(editor);
//
-// type = (ProductType) setDateHistory(type, element, editor);
+// if (!element.getName().equals(XMLConfig_42_ElementNames.ProductTypes.ProductType.ELEMENT)) {
+// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0036, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0036, element.getName()), element);
+// }
//
-// return (ProductType)addComponentTypeDefns(componentTypeDefnElements, type, editor);
- }
+// // retreive the attributes of this ComponentType from the JDOM element
+// String deployable = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.DEPLOYABLE);
+//// String monitorable = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.MONITORABLE);
+//
+// // we will use the passed in name unless it is null...
+// if (name == null) {
+// name = element.getAttributeValue(XMLConfig_42_ElementNames.ProductTypes.ProductType.Attributes.NAME);
+// }
+//
+// boolean isDeployable = (Boolean.valueOf(deployable)).booleanValue();
+// // boolean isMonitorable = (Boolean.valueOf(monitorable)).booleanValue();
+//
+// List componentTypeIDs = element.getChildren(XMLConfig_42_ElementNames.ComponentTypeID.ELEMENT);
+// List componentTypes = new ArrayList();
+// Iterator iter = componentTypeIDs.iterator();
+// while (iter.hasNext()) {
+// Element componentTypeIDElement = (Element)iter.next();
+// String componentTypeIDName = componentTypeIDElement.getAttributeValue(XMLConfig_42_ElementNames.ComponentTypeID.Attributes.NAME);
+// ComponentTypeID componentTypeID = new ComponentTypeID(componentTypeIDName);
+// ComponentType componentType = (ComponentType)componentTypeMap.get(componentTypeID);
+// if (componentType == null) {
+// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0037, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0037, new Object[] {componentTypeID, name}), element);
+// }
+// componentTypes.add(componentType);
+// }
+//
+// // create the ComponentTypeObject
+// ProductType type = editor.createProductType(name, componentTypes, isDeployable, false);
+//
+// return type;
+//// // get the ComponentTypeDefn sub-Elements of this ComponentType
+//// // and create them also.
+//// Collection componentTypeDefnElements = element.getChildren(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.ComponentTypeDefn.ELEMENT);
+////
+//// type = (ProductType) setDateHistory(type, element, editor);
+////
+//// return (ProductType)addComponentTypeDefns(componentTypeDefnElements, type, editor);
+// }
/**
* This method will create a Configuration configuration object from an XML element
@@ -1571,17 +1573,10 @@
Configuration config = editor.createConfiguration(name);
-// Element propertiesElement = element.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
-
config = (Configuration) setDateHistory(config, element, editor);
-// if (propertiesElement != null) {
- // now we add the system properties to the configuration object
- config = (Configuration)addProperties(element, config, editor);
+ config = (Configuration)addProperties(element, config, editor);
-// return config;
-// }
-
return config;
}
@@ -1834,98 +1829,97 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLConfig_42_ElementNames class.
*/
- public ProductServiceConfig createProductServiceConfig(Element element, ConfigurationID configID, ConfigurationObjectEditor editor, String name)throws InvalidConfigurationElementException {
- Assertion.isNotNull(element);
- Assertion.isNotNull(editor);
- Assertion.isNotNull(configID);
+// public ProductServiceConfig createProductServiceConfig(Element element, ConfigurationID configID, ConfigurationObjectEditor editor, String name)throws InvalidConfigurationElementException {
+// Assertion.isNotNull(element);
+// Assertion.isNotNull(editor);
+// Assertion.isNotNull(configID);
+//
+// if (!element.getName().equals(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT)) {
+// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0043, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0043,element.getName()), element);
+// }
+//
+// if (name==null) {
+// name = element.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Attributes.NAME);
+// }
+//
+// String componentType = element.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Attributes.COMPONENT_TYPE);
+// checkElementValue(componentType, name, ErrorMessageKeys.CONFIG_ERR_0059);
+//
+//
+// // ConfigurationID configID = (ConfigurationID)config.getID();
+// ProductTypeID id = new ProductTypeID(componentType);
+//
+//
+// // ConfigurationID configID = (ConfigurationID)config.getID();
+//
+// // this new editor is used only as a way to create a product service config
+// // the passed in editor is then used to add the PSC to the configuration
+// // as passed in.
+// // we dont want to add the actions again to the passed in editor.
+// ProductServiceConfig productServiceConfig = editor.createProductServiceConfig(configID, id, name);
+//
+// Collection serviceComponentDefnIDs = element.getChildren(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.ELEMENT);
+//
+// if (id.getFullName().equals(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
+// Iterator iterator = serviceComponentDefnIDs.iterator();
+// while (iterator.hasNext()) {
+// Element serviceComponentDefnIDElement = (Element)iterator.next();
+// String serviceComponentDefnName = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ID.Attributes.NAME);
+//
+// String enabled = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED);
+//
+// if (enabled == null) {
+// enabled = Boolean.TRUE.toString();
+// }
+//
+// ConnectorBindingID serviceComponentDefnID = new ConnectorBindingID(configID, serviceComponentDefnName);
+// productServiceConfig = editor.addServiceComponentDefn(productServiceConfig, serviceComponentDefnID);
+// editor.setEnabled(serviceComponentDefnID, productServiceConfig, Boolean.valueOf(enabled).booleanValue());
+//
+// }
+//
+//
+// } else {
+//
+// Iterator iterator = serviceComponentDefnIDs.iterator();
+// while (iterator.hasNext()) {
+// Element serviceComponentDefnIDElement = (Element)iterator.next();
+// String serviceComponentDefnName = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ID.Attributes.NAME);
+//
+// String enabled = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED);
+//
+// if (enabled == null) {
+// enabled = Boolean.TRUE.toString();
+// }
+//
+// ServiceComponentDefnID serviceComponentDefnID = new ServiceComponentDefnID(configID, serviceComponentDefnName);
+// productServiceConfig = editor.addServiceComponentDefn(productServiceConfig, serviceComponentDefnID);
+//
+// editor.setEnabled(serviceComponentDefnID, productServiceConfig, Boolean.valueOf(enabled).booleanValue());
+//
+// }
+//
+// }
+//
+// productServiceConfig = (ProductServiceConfig) setDateHistory(productServiceConfig, element, editor);
+//
+// // add the properties to this ComponentObject...
+// Element propertiesElement = element.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
+// if (propertiesElement != null) {
+// // now we add the system properties to the configuration object
+// productServiceConfig = (ProductServiceConfig)addProperties(propertiesElement, productServiceConfig, editor);
+// return productServiceConfig;
+// }
+//
+// return productServiceConfig;
+// }
- if (!element.getName().equals(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT)) {
- throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0043, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0043,element.getName()), element);
- }
- if (name==null) {
- name = element.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Attributes.NAME);
- }
- String componentType = element.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Attributes.COMPONENT_TYPE);
- checkElementValue(componentType, name, ErrorMessageKeys.CONFIG_ERR_0059);
-
-
- // ConfigurationID configID = (ConfigurationID)config.getID();
- ProductTypeID id = new ProductTypeID(componentType);
-
-
- // ConfigurationID configID = (ConfigurationID)config.getID();
-
- // this new editor is used only as a way to create a product service config
- // the passed in editor is then used to add the PSC to the configuration
- // as passed in.
- // we dont want to add the actions again to the passed in editor.
- ProductServiceConfig productServiceConfig = editor.createProductServiceConfig(configID, id, name);
-
- Collection serviceComponentDefnIDs = element.getChildren(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.ELEMENT);
-
- if (id.getFullName().equals(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
- Iterator iterator = serviceComponentDefnIDs.iterator();
- while (iterator.hasNext()) {
- Element serviceComponentDefnIDElement = (Element)iterator.next();
- String serviceComponentDefnName = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ID.Attributes.NAME);
-
- String enabled = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED);
-
- if (enabled == null) {
- enabled = Boolean.TRUE.toString();
- }
-
- ConnectorBindingID serviceComponentDefnID = new ConnectorBindingID(configID, serviceComponentDefnName);
- productServiceConfig = editor.addServiceComponentDefn(productServiceConfig, serviceComponentDefnID);
- editor.setEnabled(serviceComponentDefnID, productServiceConfig, Boolean.valueOf(enabled).booleanValue());
-
- }
-
-
- } else {
-
- Iterator iterator = serviceComponentDefnIDs.iterator();
- while (iterator.hasNext()) {
- Element serviceComponentDefnIDElement = (Element)iterator.next();
- String serviceComponentDefnName = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ID.Attributes.NAME);
-
- String enabled = serviceComponentDefnIDElement.getAttributeValue(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.Service.Attributes.IS_ENABLED);
-
- if (enabled == null) {
- enabled = Boolean.TRUE.toString();
- }
-
- ServiceComponentDefnID serviceComponentDefnID = new ServiceComponentDefnID(configID, serviceComponentDefnName);
- productServiceConfig = editor.addServiceComponentDefn(productServiceConfig, serviceComponentDefnID);
-
- editor.setEnabled(serviceComponentDefnID, productServiceConfig, Boolean.valueOf(enabled).booleanValue());
-
- }
-
- }
-
- productServiceConfig = (ProductServiceConfig) setDateHistory(productServiceConfig, element, editor);
-
- // add the properties to this ComponentObject...
- Element propertiesElement = element.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
- if (propertiesElement != null) {
- // now we add the system properties to the configuration object
- productServiceConfig = (ProductServiceConfig)addProperties(propertiesElement, productServiceConfig, editor);
- return productServiceConfig;
- }
-
- return productServiceConfig;
- }
-
-
-
public DeployedComponent createDeployedServiceComponent(Element element,
ConfigurationID configID,
HostID hostID,
VMComponentDefnID vmID,
- ProductServiceConfigID pscID,
Map componentTypeMap,
ConfigurationObjectEditor editor)
throws InvalidConfigurationElementException{
@@ -1977,7 +1971,7 @@
}
- component = editor.createDeployedServiceComponent(name, configID, hostID,vmID, svcid, pscID, (ComponentTypeID) type.getID());
+ component = editor.createDeployedServiceComponent(name, configID, hostID,vmID, svcid, (ComponentTypeID) type.getID());
component = (DeployedComponent) setDateHistory(component, element, editor);
@@ -1987,56 +1981,56 @@
}
- public DeployedComponent createDeployedVMComponentDefnx(Element element,
- ConfigurationID configID,
- HostID hostID,
- // VMComponentDefnID vmID,
- // ProductServiceConfigID pscID,
- ComponentTypeID typeID,
- ConfigurationObjectEditor editor)
- throws InvalidConfigurationElementException{
- Assertion.isNotNull(element);
- Assertion.isNotNull(editor);
- Assertion.isNotNull(configID);
- Assertion.isNotNull(hostID);
- // Assertion.isNotNull(vmID);
-
- DeployedComponent component=null;
-
- if (!element.getName().equals(XMLConfig_42_ElementNames.Configuration.Process.ELEMENT)) {
- throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0044, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0044,element.getName()), element);
- }
-
- String name = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.Process.Attributes.NAME);
-// checkElementValue(name, "NAME", ErrorMessageKeys.CONFIG_ERR_0048);
-
- String componentTypeIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.Process.Attributes.COMPONENT_TYPE);
-
- checkElementValue(componentTypeIDString, name, ErrorMessageKeys.CONFIG_ERR_0049);
-
-
-// ComponentType type = null;
-// Iterator it = componentTypeMap.keySet().iterator();
-// while (it.hasNext() ) {
-// ComponentTypeID id = (ComponentTypeID) it.next();
-// if (id.getFullName().equals(componentTypeIDString)) {
-// type = (ComponentType) componentTypeMap.get(id);
-// break;
-// }
+// public DeployedComponent createDeployedVMComponentDefnx(Element element,
+// ConfigurationID configID,
+// HostID hostID,
+// // VMComponentDefnID vmID,
+// // ProductServiceConfigID pscID,
+// ComponentTypeID typeID,
+// ConfigurationObjectEditor editor)
+// throws InvalidConfigurationElementException{
+// Assertion.isNotNull(element);
+// Assertion.isNotNull(editor);
+// Assertion.isNotNull(configID);
+// Assertion.isNotNull(hostID);
+// // Assertion.isNotNull(vmID);
+//
+// DeployedComponent component=null;
+//
+// if (!element.getName().equals(XMLConfig_42_ElementNames.Configuration.Process.ELEMENT)) {
+// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0044, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0044,element.getName()), element);
// }
+//
+// String name = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.Process.Attributes.NAME);
+//// checkElementValue(name, "NAME", ErrorMessageKeys.CONFIG_ERR_0048);
+//
+// String componentTypeIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.Process.Attributes.COMPONENT_TYPE);
+//
+// checkElementValue(componentTypeIDString, name, ErrorMessageKeys.CONFIG_ERR_0049);
+//
+//
+//// ComponentType type = null;
+//// Iterator it = componentTypeMap.keySet().iterator();
+//// while (it.hasNext() ) {
+//// ComponentTypeID id = (ComponentTypeID) it.next();
+//// if (id.getFullName().equals(componentTypeIDString)) {
+//// type = (ComponentType) componentTypeMap.get(id);
+//// break;
+//// }
+//// }
+//
+//// if (type == null) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0050, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0050, new Object[] {componentTypeIDString, name} ), element);
+//// }
+//
+// // VMComponentDefnID vmID = new VMComponentDefnID(configID, hostID, name);
+/////// component = editor.createDeployedVMComponent(name, configID, hostID, vmID, typeID);
+// // createDeployedServiceComponent(name, configID, hostID,vmID, svcid, pscID, (ComponentTypeID) type.getID());
+//
+//
+// return component;
+// }
-// if (type == null) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0050, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0050, new Object[] {componentTypeIDString, name} ), element);
-// }
-
- // VMComponentDefnID vmID = new VMComponentDefnID(configID, hostID, name);
-///// component = editor.createDeployedVMComponent(name, configID, hostID, vmID, typeID);
- // createDeployedServiceComponent(name, configID, hostID,vmID, svcid, pscID, (ComponentTypeID) type.getID());
-
-
- return component;
- }
-
/**
@@ -2064,109 +2058,109 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLConfig_42_ElementNames class.
*/
- public DeployedComponent createDeployedComponent(Element element,
- Configuration config, ConfigurationObjectEditor editor,
- Map serviceComponentDefnMap, Map vmComponentDefnMap, Map componentTypeMap, String name)
- throws InvalidConfigurationElementException{
- throw new UnsupportedOperationException("Method createDeployedComponent is unsupported in 4.2"); //$NON-NLS-1$
-
-//
-// Assertion.isNotNull(element);
-// Assertion.isNotNull(editor);
-// Assertion.isNotNull(config);
+// public DeployedComponent createDeployedComponent(Element element,
+// Configuration config, ConfigurationObjectEditor editor,
+// Map serviceComponentDefnMap, Map vmComponentDefnMap, Map componentTypeMap, String name)
+// throws InvalidConfigurationElementException{
+// throw new UnsupportedOperationException("Method createDeployedComponent is unsupported in 4.2"); //$NON-NLS-1$
//
-// DeployedComponent component;
-//
-// if (!element.getName().equals(XMLConfig_42_ElementNames.Configuration.DeployedComponent.ELEMENT)) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0044, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0044,element.getName()), element);
-// }
-//
-// if (name == null) {
-// name = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.NAME);
-// }
-//
-// String productServiceConfigIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.PRODUCT_SERVICE_CONFIG_ID);
-// String vmComponentDefnIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.VM_COMPONENT_DEFN_ID);
-// String serviceComponentDefnIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.SERVICE_COMPONENT_DEFN_ID);
-// String HostIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.HOST_ID);
-//
-// checkElementValue(vmComponentDefnIDString, name, ErrorMessageKeys.CONFIG_ERR_0045);
-// checkElementValue(HostIDString, name, ErrorMessageKeys.CONFIG_ERR_0046);
-//
-// ConfigurationID configID = (ConfigurationID)config.getID();
-//
-// HostID hostID = new HostID(HostIDString);
-// VMComponentDefnID vmComponentDefnID = new VMComponentDefnID(configID, vmComponentDefnIDString);
-//
-// // this will check to see if this is actually a DeployedVMServiceComponent
-// // these special deployed components dont have values for these ID's
-// String componentTypeIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.COMPONENT_TYPE);
-//
-// if (serviceComponentDefnIDString == null && productServiceConfigIDString == null) {
-// VMComponentDefn defn = (VMComponentDefn)vmComponentDefnMap.get(vmComponentDefnID);
-// if (defn==null) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0047, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0047, new Object[] {name, vmComponentDefnID} ), element);
-//
-// }
-// component = editor.createDeployedVMComponent(name, config, hostID, defn);
-//
-// // else this element represents a normal ServiceComponentDefn object
-// }else {
-// checkElementValue(productServiceConfigIDString, name, ErrorMessageKeys.CONFIG_ERR_0048);
-// checkElementValue(serviceComponentDefnIDString, name, ErrorMessageKeys.CONFIG_ERR_0049);
-//
-// ComponentType type = null;
-// Iterator it = componentTypeMap.keySet().iterator();
-// while (it.hasNext() ) {
-// ComponentTypeID id = (ComponentTypeID) it.next();
-// if (id.getFullName().equals(componentTypeIDString)) {
-// type = (ComponentType) componentTypeMap.get(id);
-// break;
-// }
-// }
-//
-// if (type == null) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0050, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0050, new Object[] {componentTypeIDString, serviceComponentDefnIDString} ), element);
-// }
-// ProductServiceConfigID productServiceConfigID = null;
-// if (type instanceof ConnectorBindingType) {
-//
-// productServiceConfigID = new ProductServiceConfigID(configID, productServiceConfigIDString);
-//
-// ConnectorBindingID bindingID = new ConnectorBindingID(configID, serviceComponentDefnIDString);
-// ConnectorBinding bdefn = (ConnectorBinding)serviceComponentDefnMap.get(bindingID);
-//
-// if (bdefn==null) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0051, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0051, new Object[] {name, serviceComponentDefnIDString} ), element);
-// }
-// component = editor.createDeployedServiceComponent(name, config, hostID, vmComponentDefnID, bdefn, productServiceConfigID);
-//
-// } else {
-//
-// productServiceConfigID = new ProductServiceConfigID(configID, productServiceConfigIDString);
-//
-// ServiceComponentDefnID serviceComponentDefnID = new ServiceComponentDefnID(configID, serviceComponentDefnIDString);
-// ServiceComponentDefn defn = (ServiceComponentDefn)serviceComponentDefnMap.get(serviceComponentDefnID);
-//
-// if (defn==null) {
-// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0052, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0052, new Object[] {name, serviceComponentDefnIDString} ), element);
-// }
-// component = editor.createDeployedServiceComponent(name, config, hostID, vmComponentDefnID, defn, productServiceConfigID);
-//
-// }
-//
-// }
-//
-// component = (DeployedComponent) setDateHistory(component, element, editor);
-//
-// Element propertiesElement = element.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
-// if (propertiesElement != null) {
-// // now we add the system properties to the configuration object
-// return (DeployedComponent)addProperties(propertiesElement, component, editor);
-// }
-//
-// return component;
- }
+////
+//// Assertion.isNotNull(element);
+//// Assertion.isNotNull(editor);
+//// Assertion.isNotNull(config);
+////
+//// DeployedComponent component;
+////
+//// if (!element.getName().equals(XMLConfig_42_ElementNames.Configuration.DeployedComponent.ELEMENT)) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0044, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0044,element.getName()), element);
+//// }
+////
+//// if (name == null) {
+//// name = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.NAME);
+//// }
+////
+//// String productServiceConfigIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.PRODUCT_SERVICE_CONFIG_ID);
+//// String vmComponentDefnIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.VM_COMPONENT_DEFN_ID);
+//// String serviceComponentDefnIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.SERVICE_COMPONENT_DEFN_ID);
+//// String HostIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.HOST_ID);
+////
+//// checkElementValue(vmComponentDefnIDString, name, ErrorMessageKeys.CONFIG_ERR_0045);
+//// checkElementValue(HostIDString, name, ErrorMessageKeys.CONFIG_ERR_0046);
+////
+//// ConfigurationID configID = (ConfigurationID)config.getID();
+////
+//// HostID hostID = new HostID(HostIDString);
+//// VMComponentDefnID vmComponentDefnID = new VMComponentDefnID(configID, vmComponentDefnIDString);
+////
+//// // this will check to see if this is actually a DeployedVMServiceComponent
+//// // these special deployed components dont have values for these ID's
+//// String componentTypeIDString = element.getAttributeValue(XMLConfig_42_ElementNames.Configuration.DeployedComponent.Attributes.COMPONENT_TYPE);
+////
+//// if (serviceComponentDefnIDString == null && productServiceConfigIDString == null) {
+//// VMComponentDefn defn = (VMComponentDefn)vmComponentDefnMap.get(vmComponentDefnID);
+//// if (defn==null) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0047, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0047, new Object[] {name, vmComponentDefnID} ), element);
+////
+//// }
+//// component = editor.createDeployedVMComponent(name, config, hostID, defn);
+////
+//// // else this element represents a normal ServiceComponentDefn object
+//// }else {
+//// checkElementValue(productServiceConfigIDString, name, ErrorMessageKeys.CONFIG_ERR_0048);
+//// checkElementValue(serviceComponentDefnIDString, name, ErrorMessageKeys.CONFIG_ERR_0049);
+////
+//// ComponentType type = null;
+//// Iterator it = componentTypeMap.keySet().iterator();
+//// while (it.hasNext() ) {
+//// ComponentTypeID id = (ComponentTypeID) it.next();
+//// if (id.getFullName().equals(componentTypeIDString)) {
+//// type = (ComponentType) componentTypeMap.get(id);
+//// break;
+//// }
+//// }
+////
+//// if (type == null) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0050, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0050, new Object[] {componentTypeIDString, serviceComponentDefnIDString} ), element);
+//// }
+//// ProductServiceConfigID productServiceConfigID = null;
+//// if (type instanceof ConnectorBindingType) {
+////
+//// productServiceConfigID = new ProductServiceConfigID(configID, productServiceConfigIDString);
+////
+//// ConnectorBindingID bindingID = new ConnectorBindingID(configID, serviceComponentDefnIDString);
+//// ConnectorBinding bdefn = (ConnectorBinding)serviceComponentDefnMap.get(bindingID);
+////
+//// if (bdefn==null) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0051, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0051, new Object[] {name, serviceComponentDefnIDString} ), element);
+//// }
+//// component = editor.createDeployedServiceComponent(name, config, hostID, vmComponentDefnID, bdefn, productServiceConfigID);
+////
+//// } else {
+////
+//// productServiceConfigID = new ProductServiceConfigID(configID, productServiceConfigIDString);
+////
+//// ServiceComponentDefnID serviceComponentDefnID = new ServiceComponentDefnID(configID, serviceComponentDefnIDString);
+//// ServiceComponentDefn defn = (ServiceComponentDefn)serviceComponentDefnMap.get(serviceComponentDefnID);
+////
+//// if (defn==null) {
+//// throw new InvalidConfigurationElementException(ErrorMessageKeys.CONFIG_ERR_0052, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0052, new Object[] {name, serviceComponentDefnIDString} ), element);
+//// }
+//// component = editor.createDeployedServiceComponent(name, config, hostID, vmComponentDefnID, defn, productServiceConfigID);
+////
+//// }
+////
+//// }
+////
+//// component = (DeployedComponent) setDateHistory(component, element, editor);
+////
+//// Element propertiesElement = element.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
+//// if (propertiesElement != null) {
+//// // now we add the system properties to the configuration object
+//// return (DeployedComponent)addProperties(propertiesElement, component, editor);
+//// }
+////
+//// return component;
+// }
/**
* This method will create a VMComponentDefn configuration object from an XML element
@@ -2183,7 +2177,7 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLConfig_42_ElementNames class.
*/
- public VMComponentDefn createVMComponentDefn(Element element, ConfigurationID configID, HostID hostID, ConfigurationObjectEditor editor, String name) throws InvalidConfigurationElementException{
+ public BasicVMComponentDefn createVMComponentDefn(Element element, ConfigurationID configID, HostID hostID, ConfigurationObjectEditor editor, String name) throws InvalidConfigurationElementException{
Assertion.isNotNull(element);
Assertion.isNotNull(editor);
Assertion.isNotNull(configID);
@@ -2213,7 +2207,7 @@
defn = (VMComponentDefn)addProperties(element, defn, editor);
// }
- return defn;
+ return (BasicVMComponentDefn) defn;
}
/**
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_ImportExportUtility.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -48,9 +48,9 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
+//import com.metamatrix.common.config.api.ProductServiceConfig;
+//import com.metamatrix.common.config.api.ProductServiceConfigID;
+//import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
@@ -197,53 +197,68 @@
hostElement.addContent(vmElement);
Map pscSvcMap = new HashMap(10);
- Iterator depIt = cmc.getConfiguration().getDeployedServicesForVM(vm).iterator();
- Collection svcs = null;
+ Collection depsvcs = cmc.getConfiguration().getDeployedServicesForVM(vm);
+ Iterator svcIt = depsvcs.iterator();
+ while(svcIt.hasNext()) {
+ DeployedComponent dc = (DeployedComponent) svcIt.next();
+// ComponentDefn defn = null;
+// if (dc.isDeployedService()) {
+// defn = cmc.getConfiguration().getServiceComponentDefn(dc.getServiceComponentDefnID());
+// } else {
+// defn = cmc.getConfiguration().getConnectorBinding(dc.getServiceComponentDefnID());
+//
+// }
+// if (defn == null) {
+// throw new ConfigObjectsNotResolvableException( "DeployedComponent " + dc.getID() + " could not find service " + dc.getServiceComponentDefnID(), dc); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+ final Element svcElement = visitor.visitComponent(dc);
+ vmElement.addContent(svcElement);
+ }
// group the deployed services by pc for adding to the vm element
- while(depIt.hasNext()) {
-
- DeployedComponent dc = (DeployedComponent) depIt.next();
- if (!pscSvcMap.containsKey(dc.getProductServiceConfigID())) {
- svcs = new ArrayList();
- pscSvcMap.put(dc.getProductServiceConfigID(),svcs);
- } else {
- svcs = (Collection) pscSvcMap.get(dc.getProductServiceConfigID());
- }
-
- svcs.add(dc);
- }
+// while(depIt.hasNext()) {
+//
+// DeployedComponent dc = (DeployedComponent) depIt.next();
+// if (!pscSvcMap.containsKey(dc.getProductServiceConfigID())) {
+// svcs = new ArrayList();
+// pscSvcMap.put(dc.getProductServiceConfigID(),svcs);
+// } else {
+// svcs = (Collection) pscSvcMap.get(dc.getProductServiceConfigID());
+// }
+//
+// svcs.add(dc);
+// }
- Iterator pscIt = pscSvcMap.keySet().iterator();
- while(pscIt.hasNext()) {
- ProductServiceConfigID pscID = (ProductServiceConfigID) pscIt.next();
- ProductServiceConfig psc = cmc.getConfiguration().getPSC(pscID);
-
- final Element pscElement = getXMLHelper().createDeployedProductServiceConfigElement(psc);
- vmElement.addContent(pscElement);
-
- Collection depsvcs = (Collection) pscSvcMap.get(pscID);
-
- Iterator svcIt = depsvcs.iterator();
- while(svcIt.hasNext()) {
- DeployedComponent dc = (DeployedComponent) svcIt.next();
-// ComponentDefn defn = null;
-// if (dc.isDeployedService()) {
-// defn = cmc.getConfiguration().getServiceComponentDefn(dc.getServiceComponentDefnID());
-// } else {
-// defn = cmc.getConfiguration().getConnectorBinding(dc.getServiceComponentDefnID());
-//
-// }
-// if (defn == null) {
-// throw new ConfigObjectsNotResolvableException( "DeployedComponent " + dc.getID() + " could not find service " + dc.getServiceComponentDefnID(), dc); //$NON-NLS-1$ //$NON-NLS-2$
-// }
- final Element svcElement = visitor.visitComponent(dc);
- pscElement.addContent(svcElement);
-
-
- } // end of svcs
-
- } // end of pscs
+// Iterator pscIt = pscSvcMap.keySet().iterator();
+// while(pscIt.hasNext()) {
+// ProductServiceConfigID pscID = (ProductServiceConfigID) pscIt.next();
+// ProductServiceConfig psc = cmc.getConfiguration().getPSC(pscID);
+//
+// final Element pscElement = getXMLHelper().createDeployedProductServiceConfigElement(psc);
+// vmElement.addContent(pscElement);
+//
+// Collection depsvcs = (Collection) pscSvcMap.get(pscID);
+//
+// Iterator svcIt = depsvcs.iterator();
+// while(svcIt.hasNext()) {
+// DeployedComponent dc = (DeployedComponent) svcIt.next();
+//// ComponentDefn defn = null;
+//// if (dc.isDeployedService()) {
+//// defn = cmc.getConfiguration().getServiceComponentDefn(dc.getServiceComponentDefnID());
+//// } else {
+//// defn = cmc.getConfiguration().getConnectorBinding(dc.getServiceComponentDefnID());
+////
+//// }
+//// if (defn == null) {
+//// throw new ConfigObjectsNotResolvableException( "DeployedComponent " + dc.getID() + " could not find service " + dc.getServiceComponentDefnID(), dc); //$NON-NLS-1$ //$NON-NLS-2$
+//// }
+// final Element svcElement = visitor.visitComponent(dc);
+// pscElement.addContent(svcElement);
+//
+//
+// } // end of svcs
+//
+// } // end of pscs
// Iterator svcIt=cmc.getConfiguration().getDeployedServicesForVM(vmDC.getVMComponentDefnID()).iterator();
// while(svcIt.hasNext()) {
@@ -269,36 +284,36 @@
// iterate through the psc objects, if there are any,
// and create elements for them.
- Element pscsElement = xmlHelper.createProductServiceConfigsElement();
- root.addContent(pscsElement);
-
- Collection pscs = cmc.getConfiguration().getPSCs();
- if (pscs != null && pscs.size() > 0) {
- Iterator iterator = pscs.iterator();
- while (iterator.hasNext()) {
- ProductServiceConfig type = (ProductServiceConfig)iterator.next();
-// LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ProductType named: " + type + " in list of configuration objects to export.");
- Element productTypeElement = visitor.visitComponent(type);
- pscsElement.addContent(productTypeElement);
- }
- }
+// Element pscsElement = xmlHelper.createProductServiceConfigsElement();
+// root.addContent(pscsElement);
+//
+// Collection pscs = cmc.getConfiguration().getPSCs();
+// if (pscs != null && pscs.size() > 0) {
+// Iterator iterator = pscs.iterator();
+// while (iterator.hasNext()) {
+// ProductServiceConfig type = (ProductServiceConfig)iterator.next();
+//// LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ProductType named: " + type + " in list of configuration objects to export.");
+// Element productTypeElement = visitor.visitComponent(type);
+// pscsElement.addContent(productTypeElement);
+// }
+// }
// iterate through the product type objects, if there are any,
// and create elements for them.
- Element productTypesElement = xmlHelper.createProductTypesElement();
- root.addContent(productTypesElement);
-
- Collection productTypes = cmc.getProductTypes();
- if (productTypes != null && productTypes.size() > 0) {
- Iterator iterator = productTypes.iterator();
- while (iterator.hasNext()) {
- ProductType type = (ProductType)iterator.next();
-// LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ProductType named: " + type + " in list of configuration objects to export.");
- Element productTypeElement = visitor.visitComponent(type);
- productTypesElement.addContent(productTypeElement);
- }
- }
+// Element productTypesElement = xmlHelper.createProductTypesElement();
+// root.addContent(productTypesElement);
+//
+// Collection productTypes = cmc.getProductTypes();
+// if (productTypes != null && productTypes.size() > 0) {
+// Iterator iterator = productTypes.iterator();
+// while (iterator.hasNext()) {
+// ProductType type = (ProductType)iterator.next();
+//// LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ProductType named: " + type + " in list of configuration objects to export.");
+// Element productTypeElement = visitor.visitComponent(type);
+// productTypesElement.addContent(productTypeElement);
+// }
+// }
Element resourcePoolsElement = xmlHelper.createResourcePoolsElement();
root.addContent(resourcePoolsElement);
@@ -455,15 +470,8 @@
throw new ConfigObjectsNotResolvableException(ErrorMessageKeys.CONFIG_ERR_0004, CommonPlugin.Util.getString(ErrorMessageKeys.CONFIG_ERR_0004));
}
- // add the system properties to the Configuration object
-// Element systemPropertiesElement =
-// configurationElement.getChild(XMLConfig_42_ElementNames.Properties.ELEMENT);
-// if (systemPropertiesElement!=null) {
-// Collection propertyElements =
-// systemPropertiesElement.getChildren(XMLConfig_42_ElementNames.Properties.Property.ELEMENT);
-// }
+
-
// NOTE the ordering of the following iterations is very important
// as the actions to create the configuration objects are being created
// within the ConfigurationObjectEditor. If these are created out of
@@ -491,53 +499,8 @@
}
}
- // Element componentTypesElement = root.getChild(XMLConfig_42_ElementNames.ComponentTypes.ELEMENT);
-//
-// if (componentTypesElement != null) {
-// List componentTypes = componentTypesElement.getChildren(XMLConfig_42_ElementNames.ComponentTypes.ComponentType.ELEMENT);
-//
-//
-// if (componentTypes != null && componentTypes.size() > 0) {
-//
-// // we must do this to make sure that the componentTypes are created in
-// // the correct order.
-// xmlHelper.orderComponentTypeElementList(componentTypes);
-// Iterator iterator = componentTypes.iterator();
-// while (iterator.hasNext()) {
-// Element componentTypeElement = (Element)iterator.next();
-// ComponentType type =
-// xmlHelper.createComponentType(componentTypeElement, editor, null, true);
-// // LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ComponentType named: " + type + " in XML file ComponentTypes element.");
-// configurationObjects.add(type);
-// componentTypeMap.put(type.getID(), type);
-// }
-// }
-// }
- Element productTypesElement = root.getChild(XMLConfig_42_ElementNames.ProductTypes.ELEMENT);
-
- if (productTypesElement != null) {
-
- List productTypes = productTypesElement.getChildren(XMLConfig_42_ElementNames.ProductTypes.ProductType.ELEMENT);
- if (productTypes != null && productTypes.size() > 0) {
- // Make a copy of the lists that we intend to change so that we don't affect JDOM's list (which changes the underlying structure)
- productTypes = new ArrayList(productTypes);
- // we must do this to make sure that the productTypes are created in
- // the correct order.
- xmlHelper.orderComponentTypeElementList(productTypes);
- Iterator iterator = productTypes.iterator();
- while (iterator.hasNext()) {
- Element productTypeElement = (Element)iterator.next();
- ProductType type = xmlHelper.createProductType(productTypeElement, editor, componentTypeMap, null);
- // LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ProductType named: " + type + " in XML file ProductTypes element.");
- configurationObjects.add(type);
- }
- }
- }
-
-
-
Element resourcesElement = root.getChild(XMLConfig_42_ElementNames.Resources.ELEMENT);
List resources = null;
@@ -555,23 +518,23 @@
configurationObjects.add(resource);
}
- Map pscMap = new HashMap(1);
- Element productServiceConfigsElement =
- root.getChild(XMLConfig_42_ElementNames.ProductServiceConfigs.ELEMENT);
- if (productServiceConfigsElement!=null) {
- Collection productServiceConfigElements =
- productServiceConfigsElement.getChildren(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT);
- pscMap = new HashMap(productServiceConfigElements.size());
- iterator = productServiceConfigElements.iterator();
- while (iterator.hasNext()) {
- Element productServiceConfigElement = (Element)iterator.next();
- ProductServiceConfig productServiceConfig =
- xmlHelper.createProductServiceConfig(productServiceConfigElement, configID, editor, null);
- configurationObjects.add(productServiceConfig);
- pscMap.put(productServiceConfig.getName(), productServiceConfig);
-
- }
- }
+// Map pscMap = new HashMap(1);
+// Element productServiceConfigsElement =
+// root.getChild(XMLConfig_42_ElementNames.ProductServiceConfigs.ELEMENT);
+// if (productServiceConfigsElement!=null) {
+// Collection productServiceConfigElements =
+// productServiceConfigsElement.getChildren(XMLConfig_42_ElementNames.ProductServiceConfigs.ProductServiceConfig.ELEMENT);
+// pscMap = new HashMap(productServiceConfigElements.size());
+// iterator = productServiceConfigElements.iterator();
+// while (iterator.hasNext()) {
+// Element productServiceConfigElement = (Element)iterator.next();
+// ProductServiceConfig productServiceConfig =
+// xmlHelper.createProductServiceConfig(productServiceConfigElement, configID, editor, null);
+// configurationObjects.add(productServiceConfig);
+// pscMap.put(productServiceConfig.getName(), productServiceConfig);
+//
+// }
+// }
// else {
//
@@ -637,38 +600,15 @@
Element serviceComponentDefnElement = (Element)iterator.next();
ComponentDefn defn =
xmlHelper.createServiceComponentDefn(serviceComponentDefnElement, config, editor, null);
-// LogManager.logTrace(LogCommonConstants.CTX_CONFIG, "Found ServiceComponentDefn named: " + defn + " in XML file ServiceComponentDefns element.");
- // don't include the ResourceDescriptors
-// if (defn instanceof ServiceComponentDefn) {
- serviceComponentDefnMap.put(defn.getID(), defn);
- // }
- configurationObjects.add(defn);
+ serviceComponentDefnMap.put(defn.getID(), defn);
+ configurationObjects.add(defn);
}
}
-
-
-
-
-// if (resources.isEmpty()) {
-// Assertion.assertTrue(false, "No Resources to import"); //$NON-NLS-1$
-// }
-// if (hosts.isEmpty()) {
-// Assertion.assertTrue(false, "No Hosts to import"); //$NON-NLS-1$
-// }
-// if (componentTypes.isEmpty()) {
-// Assertion.assertTrue(false, "No ComponentTypes to import"); //$NON-NLS-1$
-// }
-
// add the bindings to the map that is used by deployment
configurationObjects.addAll(bindings);
-
-
-
-
-
-
+
// retreive the host elements from the document.
List hostElements = configurationElement.getChildren(XMLConfig_42_ElementNames.Configuration.Host.ELEMENT);
Iterator hostiterator = hostElements.iterator();
@@ -693,41 +633,20 @@
VMComponentDefnID vmID = (VMComponentDefnID) vm.getID();
configurationObjects.add(vm);
-// configurationObjects.add(vmdc);
-
- List pscElements = vmElement.getChildren(XMLConfig_42_ElementNames.Configuration.ProductServiceConfig.ELEMENT);
- Iterator pscIt = pscElements.iterator();
- while (pscIt.hasNext()) {
- Element pscElement = (Element)pscIt.next();
- // create this only for use to create the deployed service
- String pscName = pscElement.getAttributeValue(XMLConfig_42_ElementNames.Configuration.ProductServiceConfig.Attributes.NAME);
-
- ProductServiceConfig psc = (ProductServiceConfig) pscMap.get(pscName);
- // ProductServiceConfigID pscID = new ProductServiceConfigID(pscName);
-
-
- // ProductServiceConfig psc = xmlHelper.createProductServiceConfig(pscElement, configID, editor, null);
-
- List svcElements = pscElement.getChildren(XMLConfig_42_ElementNames.Configuration.DeployedService.ELEMENT);
+ List svcElements = vmElement.getChildren(XMLConfig_42_ElementNames.Configuration.DeployedService.ELEMENT);
+
Iterator svcIt = svcElements.iterator();
while (svcIt.hasNext()) {
Element svcElement = (Element)svcIt.next();
// create this only for use to create the deployed service
- DeployedComponent dc = xmlHelper.createDeployedServiceComponent(svcElement, configID, hostID, vmID, (ProductServiceConfigID)psc.getID(), componentTypeMap, editor);
+ DeployedComponent dc = xmlHelper.createDeployedServiceComponent(svcElement, configID, hostID, vmID, componentTypeMap, editor);
configurationObjects.add(dc);
- }
-
- }
-
-
- }
-
-
-
-
- }
+ } // end services
+ } // end vm
+
+ } // end host
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_42_Visitor.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -90,47 +90,10 @@
return editor;
}
-// object visitDeployedElement(Element element,
-// int componentDefnType,
-// ConfigurationID configID,
-// HostID hostID,
-// VMComponentDefnID vmID,
-// ProductServiceConfigID pscID,
-// ) throws Exception {)
-//
-// // @see ComponentDefn for the various types
-// Object visitElement(Element element, int componentDefnType, ConfigurationID configID) throws Exception {
-// Object result = null;
-//
-// switch(componentDefnType){
-// case ComponentDefn.VM_COMPONENT_CODE:
-// return helper.createVMComponentDefn(element, configID, editor, null);
-// case ComponentDefn.PSC_COMPONENT_CODE:
-// return helper.createProductServiceConfig(element, configID, getEditor(), null);
-// case ComponentDefn.CONNECTOR_COMPONENT_CODE:
-// return helper.createConnectorBinding(element, getEditor(), null, true);
-// case ComponentDefn.SERVICE_COMPONENT_CODE:
-// return helper.createServiceComponentDefn(element, configID, getEditor(), null);
-// case ComponentDefn.RESOURCE_DESCRIPTOR_COMPONENT_CODE:
-// return helper.createResourcePool(element, configID, getEditor());
-// case ComponentDefn.HOST_COMPONENT_CODE:
-// return helper.createHost(element,configID, editor, null);
-// case ComponentDefn.CONFIGURATION_COMPONENT_CODE:
-// return helper.createConfiguration(element, getEditor(), null);
-// case ComponentDefn.DEPLOYED_COMPONENT_CODE:
-// return helper.createDeployedComponent(element, null, result, null, null, null, null)
-//
-// }
-//
-//
-// return result;
-//
-// }
-
Element visitComponent(ComponentType component) {
- if (component instanceof ProductType) {
- return helper.createProductTypeElement((ProductType) component);
- }
+// if (component instanceof ProductType) {
+// return helper.createProductTypeElement((ProductType) component);
+// }
return helper.createComponentTypeElement(component);
}
@@ -142,8 +105,8 @@
switch(BasicUtil.getComponentDefnType(component)){
case ComponentDefn.VM_COMPONENT_CODE:
return helper.createVMComponentDefnElement((VMComponentDefn) component);
- case ComponentDefn.PSC_COMPONENT_CODE:
- return helper.createProductServiceConfigElement((ProductServiceConfig) component);
+// case ComponentDefn.PSC_COMPONENT_CODE:
+// return helper.createProductServiceConfigElement((ProductServiceConfig) component);
case ComponentDefn.CONNECTOR_COMPONENT_CODE:
return helper.createServiceComponentDefnElement((ServiceComponentDefn) component);
@@ -164,8 +127,8 @@
return helper.createDeployedComponentElement((DeployedComponent) component);
case ComponentDefn.SHARED_RESOURCE_COMPONENT_CODE:
return helper.createSharedResourceElement((SharedResource) component);
- case ComponentDefn.PRODUCT_COMPONENT_CODE:
- return helper.createProductTypeElement((ProductType) component);
+// case ComponentDefn.PRODUCT_COMPONENT_CODE:
+// return helper.createProductTypeElement((ProductType) component);
}
return null;
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLConfig_Base_ImportExportUtility.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -49,7 +49,7 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
-import com.metamatrix.common.config.api.ProductServiceConfig;
+//import com.metamatrix.common.config.api.ProductServiceConfig;
//import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
@@ -1136,7 +1136,7 @@
List serviceComponentDefns = lists[SERVICE_COMPONENT_DEFNS_INDEX];
List vmComponentDefns = lists[VM_COMPONENT_DEFNS_INDEX];
List componentTypes = lists[COMPONENT_TYPES_INDEX];
- List productServiceConfigs = lists[PRODUCT_SERVICE_CONFIGS_INDEX];
+ // List productServiceConfigs = lists[PRODUCT_SERVICE_CONFIGS_INDEX];
List connectionPools = lists[CONNECTION_POOL_CONFIGS_INDEX];
@@ -1150,7 +1150,7 @@
List serviceComponentDefnIDs = lists[SERVICE_COMPONENT_DEFN_IDS_INDEX];
List vmComponentDefnIDs = lists[VM_COMPONENT_DEFN_IDS_INDEX];
List componentTypeIDs = lists[COMPONENT_TYPE_IDS_INDEX];
- List productServiceConfigIDs = lists[PRODUCT_SERVICE_CONFIG_IDS_INDEX];
+ // List productServiceConfigIDs = lists[PRODUCT_SERVICE_CONFIG_IDS_INDEX];
List connectorBindingsIDs = lists[CONNECTORS_IDS_INDEX];
@@ -1161,7 +1161,7 @@
// to return true if the ID is null instead of throwing a bogus exception
serviceComponentDefnIDs.add(null);
connectorBindingsIDs.add(null);
- productServiceConfigIDs.add(null);
+ // productServiceConfigIDs.add(null);
// productTypeIDs.add(null);
componentTypeIDs.add(null);
@@ -1187,9 +1187,9 @@
throwObjectsNotResolvable(deployedComponent, deployedComponent.getHostID(), "host"); //$NON-NLS-1$
}
- if (!productServiceConfigIDs.contains(deployedComponent.getProductServiceConfigID())) {
- throwObjectsNotResolvable(deployedComponent, deployedComponent.getProductServiceConfigID(), "psc"); //$NON-NLS-1$
- }
+// if (!productServiceConfigIDs.contains(deployedComponent.getProductServiceConfigID())) {
+// throwObjectsNotResolvable(deployedComponent, deployedComponent.getProductServiceConfigID(), "psc"); //$NON-NLS-1$
+// }
checkComponentTypeID(deployedComponent, componentTypeIDs);
}
@@ -1228,39 +1228,41 @@
VMComponentDefn defn = (VMComponentDefn)iterator.next();
checkComponentTypeID(defn, componentTypeIDs);
checkConfigurationID(defn, configurationIDs);
- }
-
-
- iterator = productServiceConfigs.iterator();
- while (iterator.hasNext()) {
- ProductServiceConfig config = (ProductServiceConfig)iterator.next();
- // psc's component types are based on products, not actual component types
-// checkPSCProductTypeID(config);
-
-// checkComponentTypeID(config, componentTypeIDs, productTypeIDs);
- checkConfigurationID(config, configurationIDs);
- Iterator iter = config.getServiceComponentDefnIDs().iterator();
- while (iter.hasNext()) {
- Object obj = iter.next();
- // ComponentDefnID id = (ComponentDefnID) obj;
-// System.out.println("PSC ID: " + id.getFullName() + " class " + id.getClass().getName());
-
- if (serviceComponentDefnIDs.contains(obj) ||
- connectorBindingsIDs.contains(obj) ) {
- } else {
- throwObjectsNotResolvable(obj, config, "service component"); //$NON-NLS-1$
- }
- }
+
}
- iterator = componentTypes.iterator();
- while (iterator.hasNext()) {
- ComponentType type = (ComponentType)iterator.next();
- // checkForComponentTypeID(type.getSuperComponentTypeID(), componentTypeIDs);
- // checkForProductTypeID(type, type.getParentComponentTypeID(), productTypeIDs, componentTypeIDs);
- }
+// iterator = productServiceConfigs.iterator();
+// while (iterator.hasNext()) {
+// ProductServiceConfig config = (ProductServiceConfig)iterator.next();
+//
+// // psc's component types are based on products, not actual component types
+//// checkPSCProductTypeID(config);
+//
+//// checkComponentTypeID(config, componentTypeIDs, productTypeIDs);
+// checkConfigurationID(config, configurationIDs);
+// Iterator iter = config.getServiceComponentDefnIDs().iterator();
+// while (iter.hasNext()) {
+// Object obj = iter.next();
+// // ComponentDefnID id = (ComponentDefnID) obj;
+//// System.out.println("PSC ID: " + id.getFullName() + " class " + id.getClass().getName());
+//
+// if (serviceComponentDefnIDs.contains(obj) ||
+// connectorBindingsIDs.contains(obj) ) {
+// } else {
+// throwObjectsNotResolvable(obj, config, "service component"); //$NON-NLS-1$
+// }
+// }
+// }
+//
+// iterator = componentTypes.iterator();
+// while (iterator.hasNext()) {
+// ComponentType type = (ComponentType)iterator.next();
+// // checkForComponentTypeID(type.getSuperComponentTypeID(), componentTypeIDs);
+// // checkForProductTypeID(type, type.getParentComponentTypeID(), productTypeIDs, componentTypeIDs);
+// }
+
// iterator = productTypes.iterator();
// while (iterator.hasNext()) {
// ProductType type = (ProductType)iterator.next();
@@ -1404,9 +1406,9 @@
ArrayList deployedComponents = new ArrayList();
ArrayList serviceComponentDefns = new ArrayList();
ArrayList vmComponentDefns = new ArrayList();
- ArrayList productServiceConfigs = new ArrayList();
+ // ArrayList productServiceConfigs = new ArrayList();
ArrayList configurations = new ArrayList();
- ArrayList productTypes = new ArrayList();
+// ArrayList productTypes = new ArrayList();
ArrayList connPools = new ArrayList();
ArrayList resources = new ArrayList();
ArrayList bindings = new ArrayList();
@@ -1417,9 +1419,9 @@
ArrayList deployedComponentIDs = new ArrayList();
ArrayList serviceComponentDefnIDs = new ArrayList();
ArrayList vmComponentDefnIDs = new ArrayList();
- ArrayList productServiceConfigIDs = new ArrayList();
+ // ArrayList productServiceConfigIDs = new ArrayList();
ArrayList configurationIDs = new ArrayList();
- ArrayList productTypeIDs = new ArrayList();
+ // ArrayList productTypeIDs = new ArrayList();
ArrayList bindingIDs = new ArrayList();
@@ -1456,10 +1458,11 @@
bindingIDs.add(((BaseObject)obj).getID());
}else if(obj instanceof ComponentDefn) {
- if (obj instanceof ProductServiceConfig) {
- productServiceConfigs.add(obj);
- productServiceConfigIDs.add(((BaseObject)obj).getID());
- }else if(obj instanceof ServiceComponentDefn) {
+// if (obj instanceof ProductServiceConfig) {
+// productServiceConfigs.add(obj);
+// productServiceConfigIDs.add(((BaseObject)obj).getID());
+// }else
+ if(obj instanceof ServiceComponentDefn) {
serviceComponentDefns.add(obj);
serviceComponentDefnIDs.add(((BaseObject)obj).getID());
}else if(obj instanceof VMComponentDefn) {
@@ -1479,22 +1482,22 @@
lists[CONFIGURATIONS_INDEX] = configurations;
- lists[PRODUCT_TYPES_INDEX] = productTypes;
+// lists[PRODUCT_TYPES_INDEX] = productTypes;
lists[HOSTS_INDEX] = hosts;
lists[DEPLOYED_COMPONENTS_INDEX] = deployedComponents;
lists[SERVICE_COMPONENT_DEFNS_INDEX] = serviceComponentDefns;
lists[VM_COMPONENT_DEFNS_INDEX] = vmComponentDefns;
lists[COMPONENT_TYPES_INDEX] = componentTypes;
- lists[PRODUCT_SERVICE_CONFIGS_INDEX] = productServiceConfigs;
+// lists[PRODUCT_SERVICE_CONFIGS_INDEX] = productServiceConfigs;
lists[CONFIGURATION_IDS_INDEX] = configurationIDs;
- lists[PRODUCT_TYPE_IDS_INDEX] = productTypeIDs;
+// lists[PRODUCT_TYPE_IDS_INDEX] = productTypeIDs;
lists[HOST_IDS_INDEX] = hostIDs;
lists[DEPLOYED_COMPONENT_IDS_INDEX] = deployedComponentIDs;
lists[SERVICE_COMPONENT_DEFN_IDS_INDEX] = serviceComponentDefnIDs;
lists[VM_COMPONENT_DEFN_IDS_INDEX] = vmComponentDefnIDs;
lists[COMPONENT_TYPE_IDS_INDEX] = componentTypeIDs;
- lists[PRODUCT_SERVICE_CONFIG_IDS_INDEX] = productServiceConfigIDs;
+// lists[PRODUCT_SERVICE_CONFIG_IDS_INDEX] = productServiceConfigIDs;
lists[CONNECTION_POOL_CONFIGS_INDEX] = connPools;
@@ -1515,26 +1518,4 @@
protected abstract XMLHelper getXMLHelper();
-// protected abstract Properties createHeaderProperties(Properties props) ;
-
-// {
-// Properties defaultProperties = new Properties();
-//// defaultProperties.setProperty(ConfigurationPropertyNames.DOCUMENT_TYPE_VERSION, XML_DOCUMENT_TYPE_VERSION);
-// defaultProperties.setProperty(ConfigurationPropertyNames.USER_CREATED_BY, DEFAULT_USER_CREATED_BY);
-// // the properties passed in by the user override those put in by this
-// // method.
-// if (props!=null) {
-// defaultProperties.putAll(props);
-// }
-//
-// defaultProperties.setProperty(ConfigurationPropertyNames.METAMATRIX_SYSTEM_VERSION, MetaMatrixProductNames.VERSION_NUMBER);
-// defaultProperties.setProperty(ConfigurationPropertyNames.TIME, DateUtil.getCurrentDateAsString());
-// defaultProperties.setProperty(ConfigurationPropertyNames., DEFAULT_USER_CREATED_BY);
-//
-//
-// return defaultProperties;
-// }
-
-
-
}
Modified: branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLHelper.java
===================================================================
--- branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLHelper.java 2009-04-09 20:56:48 UTC (rev 741)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/xml/XMLHelper.java 2009-04-09 21:30:19 UTC (rev 742)
@@ -41,9 +41,6 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.config.api.Host;
import com.metamatrix.common.config.api.HostID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductServiceConfigID;
-import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ResourceDescriptor;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
@@ -139,7 +136,7 @@
* @param config the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductServiceConfigElement(ProductServiceConfig config);
+ // public Element createProductServiceConfigElement(ProductServiceConfig config);
/**
* This method is used to create a ComponentType JDOM Element from a
@@ -175,7 +172,7 @@
* @param type the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductTypesElement() ;
+ // public Element createProductTypesElement() ;
/**
* This method is used to create a ProductServiceConfig JDOM Element from a
@@ -184,7 +181,7 @@
* @param type the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductServiceConfigsElement() ;
+ // public Element createProductServiceConfigsElement() ;
/**
@@ -194,7 +191,7 @@
* @param type the Object to be converted to a JDOM XML Element
* @return a JDOM XML Element
*/
- public Element createProductTypeElement(ProductType type);
+ // public Element createProductTypeElement(ProductType type);
/**
* This method is used to create a Host JDOM Element from a
@@ -408,7 +405,7 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLElementNames class.
*/
- public ProductType createProductType(Element element, ConfigurationObjectEditor editor,Map ComponentTypeMap, String name)throws InvalidConfigurationElementException;
+ // public ProductType createProductType(Element element, ConfigurationObjectEditor editor,Map ComponentTypeMap, String name)throws InvalidConfigurationElementException;
/**
@@ -579,20 +576,19 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLElementNames class.
*/
- public DeployedComponent createDeployedComponent(Element element, Configuration config, ConfigurationObjectEditor editor, Map serviceComponentDefnMap, Map vmComponentDefnMap, Map componentTypeMap, String name)throws InvalidConfigurationElementException;
+// public DeployedComponent createDeployedComponent(Element element, Configuration config, ConfigurationObjectEditor editor, Map serviceComponentDefnMap, Map vmComponentDefnMap, Map componentTypeMap, String name)throws InvalidConfigurationElementException;
- public DeployedComponent createDeployedComponent(Element element,
- ConfigurationID configID,
- HostID hostID,
- VMComponentDefnID vmID,
- ProductServiceConfigID pscID,
- Map componentTypeMap,
- ConfigurationObjectEditor editor)
- throws InvalidConfigurationElementException;
+// public DeployedComponent createDeployedComponent(Element element,
+// ConfigurationID configID,
+// HostID hostID,
+// VMComponentDefnID vmID,
+// Map componentTypeMap,
+// ConfigurationObjectEditor editor)
+// throws InvalidConfigurationElementException;
- public Element createDeployedProductServiceConfigElement(ProductServiceConfig config);
+ // public Element createDeployedProductServiceConfigElement(ProductServiceConfig config);
/**
* This method will create a VMComponentDefn configuration object from an XML element
@@ -643,7 +639,7 @@
* or its XML structure do not conform to the XML structure specfied in
* the XMLElementNames class.
*/
- public ProductServiceConfig createProductServiceConfig(Element element, ConfigurationID configID, ConfigurationObjectEditor editor, String name)throws InvalidConfigurationElementException;
+// public ProductServiceConfig createProductServiceConfig(Element element, ConfigurationID configID, ConfigurationObjectEditor editor, String name)throws InvalidConfigurationElementException;
/**
* This method will create a ComponentObject configuration object from an XML element
15 years, 8 months
teiid SVN: r741 - in trunk: common-core/src/main/java/com/metamatrix/common/util/crypto/cipher and 8 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-04-09 16:56:48 -0400 (Thu, 09 Apr 2009)
New Revision: 741
Added:
trunk/common-core/src/main/resources/teiid.keystore
trunk/common-internal/src/test/resources/keymanage/other.keystore
trunk/common-internal/src/test/resources/keymanage/teiid.keystore
Removed:
trunk/common-core/src/main/resources/cluster.key
trunk/common-internal/src/test/resources/keymanage/cluster.key
trunk/common-internal/src/test/resources/keymanage/other.key
Modified:
trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java
trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/BasicCryptor.java
trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/SymmetricCryptor.java
trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
trunk/common-internal/src/test/java/com/metamatrix/common/util/crypto/keymanage/TestFilePasswordConverter.java
trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
Log:
TEIID-260 securing jgroups traffic by default.
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -28,6 +28,8 @@
import java.util.Enumeration;
import java.util.Properties;
+import com.metamatrix.common.util.PropertiesUtils;
+import com.metamatrix.common.util.crypto.cipher.BasicCryptor;
import com.metamatrix.common.util.crypto.cipher.SymmetricCryptor;
import com.metamatrix.core.CorePlugin;
import com.metamatrix.core.ErrorMessageKeys;
@@ -41,17 +43,17 @@
/**
* This property indicates the encryption provider, if set to none encryption is disabled.
*/
- public static final String JCE_PROVIDER = "metamatrix.encryption.jce.provider"; //$NON-NLS-1$
+ public static final String ENCRYPTION_ENABLED = "teiid.encryption.enabled"; //$NON-NLS-1$
/** The name of the key. */
- public static final String KEY_NAME = "cluster.key"; //$NON-NLS-1$
+ public static final String KEY_NAME = "teiid.keystore"; //$NON-NLS-1$
public static final URL KEY = CryptoUtil.class.getResource("/" + KEY_NAME); //$NON-NLS-1$
- public static final String OLD_ENCRYPT_PREFIX = "{mmencrypt}"; //$NON-NLS-1$
- public static final String ENCRYPT_PREFIX = "{mm-encrypt}"; //$NON-NLS-1$
+ public static final String OLD_ENCRYPT_PREFIX = "{mm-encrypt}"; //$NON-NLS-1$
+ public static final String ENCRYPT_PREFIX = "{teiid-encrypt}"; //$NON-NLS-1$
// Empty provider means encryption should be disabled
public static final String NONE = "none"; //$NON-NLS-1$
- private static boolean encryptionEnabled = !NONE.equalsIgnoreCase(System.getProperty(JCE_PROVIDER));
+ private static boolean encryptionEnabled = PropertiesUtils.getBooleanProperty(System.getProperties(), ENCRYPTION_ENABLED, true);
private static Cryptor CRYPTOR;
@@ -230,18 +232,20 @@
return false;
}
try {
- if (value.startsWith(ENCRYPT_PREFIX)) {
- try {
- Base64.decode(value.substring(ENCRYPT_PREFIX.length()));
+ if (value.trim().length() == 0) {
+ return false;
+ }
+ String strippedValue = BasicCryptor.stripEncryptionPrefix(value);
+ if (strippedValue.length() != value.length()) {
+ try {
+ Base64.decode(strippedValue);
} catch (IllegalArgumentException e) {
return false;
}
//if we have the encrypt prefix and the rest of the string is base64 encoded, then
//we'll assume that it's properly encrypted
return true;
- } else if (value.trim().length() == 0) {
- return false;
- }
+ }
CryptoUtil.getDecryptor().decrypt(value);
return true;
} catch (CryptoException err) {
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/BasicCryptor.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/BasicCryptor.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/BasicCryptor.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -95,10 +95,7 @@
throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0074, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0074));
}
- //strip prefix
- if (ciphertext.startsWith(CryptoUtil.ENCRYPT_PREFIX)) {
- ciphertext = ciphertext.substring(CryptoUtil.ENCRYPT_PREFIX.length());
- }
+ ciphertext = stripEncryptionPrefix(ciphertext);
// Decode the previously encoded text into bytes...
byte[] cipherBytes = null;
@@ -113,6 +110,15 @@
return new String(cleartext);
}
+ public static String stripEncryptionPrefix(String ciphertext) {
+ if (ciphertext.startsWith(CryptoUtil.ENCRYPT_PREFIX)) {
+ ciphertext = ciphertext.substring(CryptoUtil.ENCRYPT_PREFIX.length());
+ } else if (ciphertext.startsWith(CryptoUtil.OLD_ENCRYPT_PREFIX)) {
+ ciphertext = ciphertext.substring(CryptoUtil.OLD_ENCRYPT_PREFIX.length());
+ }
+ return ciphertext;
+ }
+
/**
* Initialize the ciphers used for encryption and decryption. The ciphers
* define the algorithms to be used. They are initialized with the
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/SymmetricCryptor.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/SymmetricCryptor.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/cipher/SymmetricCryptor.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -28,11 +28,12 @@
import java.net.URL;
import java.security.GeneralSecurityException;
import java.security.Key;
+import java.security.KeyStore;
import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
-import com.metamatrix.common.util.ByteArrayHelper;
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.core.util.ArgCheck;
@@ -44,7 +45,10 @@
public static final String DEFAULT_SYM_KEY_ALGORITHM = "AES"; //$NON-NLS-1$
public static final String DEFAULT_SYM_ALGORITHM = "AES/ECB/PKCS5Padding"; //$NON-NLS-1$
- public static final int DEFAULT_KEY_BITS = 128;
+ public static final int DEFAULT_KEY_BITS = 128;
+ public static final String DEFAULT_STORE_PASSWORD = "changeit"; //$NON-NLS-1$
+ public static final String DEFAULT_ALIAS = "cluster_key"; //$NON-NLS-1$
+
private static KeyGenerator keyGen;
/**
@@ -59,7 +63,7 @@
return new SymmetricCryptor(key);
}
- private static Key generateKey() throws CryptoException {
+ private static SecretKey generateKey() throws CryptoException {
try {
synchronized(SymmetricCryptor.class) {
if (keyGen == null) {
@@ -82,7 +86,18 @@
* @throws IOException
*/
public static SymmetricCryptor getSymmectricCryptor(URL keyResource) throws CryptoException, IOException {
- return getSymmectricCryptor(loadKey(keyResource));
+ ArgCheck.isNotNull(keyResource);
+ InputStream stream = keyResource.openStream();
+ try {
+ KeyStore store = KeyStore.getInstance("JCEKS"); //$NON-NLS-1$
+ store.load(stream, DEFAULT_STORE_PASSWORD.toCharArray());
+ Key key = store.getKey(DEFAULT_ALIAS, DEFAULT_STORE_PASSWORD.toCharArray());
+ return new SymmetricCryptor(key);
+ } catch (GeneralSecurityException e) {
+ throw new CryptoException(e);
+ } finally {
+ stream.close();
+ }
}
/**
@@ -98,13 +113,23 @@
}
public static void generateAndSaveKey(String file) throws CryptoException, IOException {
- Key key = generateKey();
+ SecretKey key = generateKey();
+ saveKey(file, key);
+ }
+
+ private static void saveKey(String file, SecretKey key) throws CryptoException, IOException {
+ ArgCheck.isNotNull(file);
FileOutputStream fos = new FileOutputStream(file);
try {
- fos.write(key.getEncoded());
+ KeyStore store = KeyStore.getInstance("JCEKS"); //$NON-NLS-1$
+ store.load(null,null);
+ store.setKeyEntry(DEFAULT_ALIAS, key, DEFAULT_STORE_PASSWORD.toCharArray(),null);
+ store.store(fos, DEFAULT_STORE_PASSWORD.toCharArray());
+ } catch (GeneralSecurityException e) {
+ throw new CryptoException(e);
} finally {
fos.close();
- }
+ }
}
SymmetricCryptor(Key key) throws CryptoException {
@@ -115,17 +140,11 @@
return this.decryptKey.getEncoded();
}
- private static byte[] loadKey(URL keyResource) throws IOException {
- ArgCheck.isNotNull(keyResource);
- InputStream stream = keyResource.openStream();
- try {
- return ByteArrayHelper.toByteArray(keyResource.openStream());
- } finally {
- stream.close();
+ public static void main(String[] args) throws Exception {
+ if (args.length != 1) {
+ System.out.println("The file to create must be supplied as the only argument."); //$NON-NLS-1$
+ System.exit(-1);
}
+ SymmetricCryptor.generateAndSaveKey(args[0]);
}
-
- public static void main(String[] args) throws Exception {
- SymmetricCryptor.generateAndSaveKey("cluster.key");
- }
}
Deleted: trunk/common-core/src/main/resources/cluster.key
===================================================================
--- trunk/common-core/src/main/resources/cluster.key 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-core/src/main/resources/cluster.key 2009-04-09 20:56:48 UTC (rev 741)
@@ -1 +0,0 @@
-}�ꑟj�7���"�I�
\ No newline at end of file
Added: trunk/common-core/src/main/resources/teiid.keystore
===================================================================
(Binary files differ)
Property changes on: trunk/common-core/src/main/resources/teiid.keystore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -30,6 +30,7 @@
import java.util.Properties;
import com.metamatrix.common.CommonPlugin;
+import com.metamatrix.common.config.api.ComponentTypeID;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.ConfigurationModelContainer;
@@ -199,12 +200,12 @@
*/
public Properties getProperties() {
try {
- Properties result = getReader().getConfigurationModel().getConfiguration().getProperties();
- Properties copyResult = PropertiesUtils.clone(result,getBootStrapProperties(),false,true);
- if ( !(copyResult instanceof UnmodifiableProperties) ) {
- copyResult = new UnmodifiableProperties(copyResult);
- }
- return copyResult;
+ ConfigurationModelContainer cmc = getReader().getConfigurationModel();
+ ComponentTypeID id = cmc.getConfiguration().getComponentTypeID();
+ Properties result = new Properties(getBootStrapProperties());
+ PropertiesUtils.putAll(result, cmc.getDefaultPropertyValues(id));
+ PropertiesUtils.putAll(result, cmc.getConfiguration().getProperties());
+ return new UnmodifiableProperties(result);
} catch (ConfigurationException e) {
throw new MetaMatrixRuntimeException(e);
}
Modified: trunk/common-internal/src/test/java/com/metamatrix/common/util/crypto/keymanage/TestFilePasswordConverter.java
===================================================================
--- trunk/common-internal/src/test/java/com/metamatrix/common/util/crypto/keymanage/TestFilePasswordConverter.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-internal/src/test/java/com/metamatrix/common/util/crypto/keymanage/TestFilePasswordConverter.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -36,8 +36,8 @@
private final static String INPUT_XML_FILE = UnitTestUtil.getTestDataPath() + "/keymanage/config.xml"; //$NON-NLS-1$
private final static String INPUT_VDB_FILE = UnitTestUtil.getTestDataPath() + "/keymanage/ODBCvdb.VDB"; //$NON-NLS-1$
- private final static String KEYSTORE_FILE1 = UnitTestUtil.getTestDataPath() + "/keymanage/cluster.key"; //$NON-NLS-1$
- private final static String KEYSTORE_FILE2 = UnitTestUtil.getTestDataPath() + "/keymanage/other.key"; //$NON-NLS-1$
+ private final static String KEYSTORE_FILE1 = UnitTestUtil.getTestDataPath() + "/keymanage/teiid.keystore"; //$NON-NLS-1$
+ private final static String KEYSTORE_FILE2 = UnitTestUtil.getTestDataPath() + "/keymanage/other.keystore"; //$NON-NLS-1$
private final static String TEMP_PROPERTIES = UnitTestUtil.getTestScratchPath() + "temp.properties"; //$NON-NLS-1$
private final static String TEMP2_PROPERTIES = UnitTestUtil.getTestScratchPath() + "temp2.properties"; //$NON-NLS-1$
@@ -49,7 +49,7 @@
public void testConvertProperties() throws Exception {
//convert from keystore1 to keystore2
String inputFile = INPUT_PROPERTIES_FILE;
- String outputFile = TEMP_PROPERTIES; //$NON-NLS-1$
+ String outputFile = TEMP_PROPERTIES;
String oldKeystoreFile = KEYSTORE_FILE1;
String newKeystoreFile = KEYSTORE_FILE2;
@@ -69,8 +69,8 @@
//convert back from keystore2 to keystore1
- inputFile = TEMP_PROPERTIES; //$NON-NLS-1$
- outputFile = TEMP2_PROPERTIES; //$NON-NLS-1$
+ inputFile = TEMP_PROPERTIES;
+ outputFile = TEMP2_PROPERTIES;
oldKeystoreFile = KEYSTORE_FILE2;
newKeystoreFile = KEYSTORE_FILE1;
@@ -92,7 +92,7 @@
public void testConvertXML() throws Exception {
//convert from keystore1 to keystore2
String inputFile = INPUT_XML_FILE;
- String outputFile = TEMP_XML; //$NON-NLS-1$
+ String outputFile = TEMP_XML;
String oldKeystoreFile = KEYSTORE_FILE1;
String newKeystoreFile = KEYSTORE_FILE2;
@@ -112,8 +112,8 @@
//convert back from keystore2 to keystore1
- inputFile = TEMP_XML; //$NON-NLS-1$
- outputFile = TEMP2_XML; //$NON-NLS-1$
+ inputFile = TEMP_XML;
+ outputFile = TEMP2_XML;
oldKeystoreFile = KEYSTORE_FILE2;
newKeystoreFile = KEYSTORE_FILE1;
@@ -135,7 +135,7 @@
public void testConvertVDB() throws Exception {
//convert from keystore1 to keystore2
String inputFile = INPUT_VDB_FILE;
- String outputFile = TEMP_VDB; //$NON-NLS-1$
+ String outputFile = TEMP_VDB;
String oldKeystoreFile = KEYSTORE_FILE1;
String newKeystoreFile = KEYSTORE_FILE2;
@@ -155,8 +155,8 @@
//convert back from keystore2 to keystore1
- inputFile = TEMP_VDB; //$NON-NLS-1$
- outputFile = TEMP2_VDB; //$NON-NLS-1$
+ inputFile = TEMP_VDB;
+ outputFile = TEMP2_VDB;
oldKeystoreFile = KEYSTORE_FILE2;
newKeystoreFile = KEYSTORE_FILE1;
Deleted: trunk/common-internal/src/test/resources/keymanage/cluster.key
===================================================================
--- trunk/common-internal/src/test/resources/keymanage/cluster.key 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-internal/src/test/resources/keymanage/cluster.key 2009-04-09 20:56:48 UTC (rev 741)
@@ -1 +0,0 @@
-}�ꑟj�7���"�I�
\ No newline at end of file
Deleted: trunk/common-internal/src/test/resources/keymanage/other.key
===================================================================
--- trunk/common-internal/src/test/resources/keymanage/other.key 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/common-internal/src/test/resources/keymanage/other.key 2009-04-09 20:56:48 UTC (rev 741)
@@ -1 +0,0 @@
-������}5̌���&
\ No newline at end of file
Added: trunk/common-internal/src/test/resources/keymanage/other.keystore
===================================================================
(Binary files differ)
Property changes on: trunk/common-internal/src/test/resources/keymanage/other.keystore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common-internal/src/test/resources/keymanage/teiid.keystore
===================================================================
(Binary files differ)
Property changes on: trunk/common-internal/src/test/resources/keymanage/teiid.keystore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -47,7 +47,7 @@
return hostController;
}
if (this.hostControllerStub == null) {
- return null;
+ throw new IllegalStateException("Cannot locate host controller. It may need to be started or restarted if jgroups properties have changed"); //$NON-NLS-1$
}
// when exported to the remote, use remote's message bus instance.
MessageBus bus = this.messageBus;
Modified: trunk/server/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/server/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -84,7 +84,6 @@
*/
private static final String MAX_ACTIVE_SESSIONS = "metamatrix.session.max.connections"; //$NON-NLS-1$
private static final String SESSION_TIME_LIMIT = "metamatrix.session.time.limit"; //$NON-NLS-1$
- public static final String SESSION_MONITOR_ACTIVITY_INTERVAL = "metamatrix.session.sessionMonitor.ActivityInterval"; //$NON-NLS-1$
private static final String SESSION_ID = "SESSION_ID"; //$NON-NLS-1$
Modified: trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -259,8 +259,7 @@
this.vmComponentDefn = deployedVM;
- vmProps = new Properties(CurrentConfiguration.getInstance().getSystemBootStrapProperties());
- PropertiesUtils.putAll(vmProps, config.getConfiguration().getProperties());
+ vmProps = new Properties(config.getConfiguration().getProperties());
PropertiesUtils.putAll(vmProps, host.getProperties());
PropertiesUtils.putAll(vmProps, config.getDefaultPropertyValues(deployedVM.getComponentTypeID()));
PropertiesUtils.putAll(vmProps, config.getConfiguration().getAllPropertiesForComponent(deployedVM.getID()));
Modified: trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-04-09 20:30:04 UTC (rev 740)
+++ trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-04-09 20:56:48 UTC (rev 741)
@@ -42,6 +42,7 @@
import com.metamatrix.common.config.api.exceptions.ConfigurationException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.LogCommonConstants;
+import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.core.MetaMatrixRuntimeException;
/**
@@ -74,7 +75,10 @@
"pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" + //$NON-NLS-1$
"shun=false;print_local_addr=true):" + //$NON-NLS-1$
"pbcast.STATE_TRANSFER"; //$NON-NLS-1$
-
+
+ private static final String ENCRYPT_ALL = ":ENCRYPT(key_store_name=teiid.keystore;store_password=changeit;alias=cluster_key)"; //$NON-NLS-1$
+ private static final String ENCRYPT_ALL_KEY = "metamatrix.encryption.internal.secure.sockets"; //$NON-NLS-1$
+
private static final String UDP_MCAST_SUPPORTED_PROPERTY = "udp.multicast_supported"; //$NON-NLS-1$
private static final String UDP_MCAST_MESSAGEBUS_PORT_PROPERTY = "udp.mcast_messagebus_port"; //$NON-NLS-1$
private static final String UDP_MCAST_ADDR_PROPERTY = "udp.mcast_addr"; //$NON-NLS-1$
@@ -124,7 +128,8 @@
try {
String properties = null;
Properties configProps = CurrentConfiguration.getInstance().getResourceProperties(ResourceNames.JGROUPS);
-
+ boolean useEncrypt = PropertiesUtils.getBooleanProperty(CurrentConfiguration.getInstance().getProperties(), ENCRYPT_ALL_KEY, false);
+
String udpMulticastSupported = configProps.getProperty(UDP_MCAST_SUPPORTED_PROPERTY, DEFAULT_UDP_MCAST_SUPPORTED);
String udpMulticastPort = configProps.getProperty(UDP_MCAST_MESSAGEBUS_PORT_PROPERTY, DEFAULT_UDP_MCAST_PORT);
@@ -171,6 +176,9 @@
"timeout="+pingTimeout+";num_initial_members="+pingInitialMemberCount+"):"; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
}
properties += otherSettings;
+ if (useEncrypt) {
+ properties += ENCRYPT_ALL;
+ }
return properties;
} catch (ConfigurationException e) {
15 years, 8 months
teiid SVN: r740 - trunk.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-04-09 16:30:04 -0400 (Thu, 09 Apr 2009)
New Revision: 740
Modified:
trunk/pom.xml
Log:
Misc: no need for the servlet-api
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-04-09 18:18:42 UTC (rev 739)
+++ trunk/pom.xml 2009-04-09 20:30:04 UTC (rev 740)
@@ -393,6 +393,10 @@
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
15 years, 8 months