Author: vhalbert(a)redhat.com
Date: 2009-05-08 15:21:34 -0400 (Fri, 08 May 2009)
New Revision: 896
Modified:
trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java
Log:
Teiid-569 - changed the exporting of one or more binding to only expect the binding name
or the use of the wildcard (*). This will export any defined binding(s) that is seen in
the ConnectorBindings panel or seen (export the config) in the ConnectorBindings segment.
Modified:
trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java 2009-05-08
15:59:59 UTC (rev 895)
+++
trunk/server/src/main/java/com/metamatrix/admin/server/ServerConfigAdminImpl.java 2009-05-08
19:21:34 UTC (rev 896)
@@ -1087,8 +1087,8 @@
char[] results = null;
- List selectedBindings = new ArrayList();
- List selectedTypes = new ArrayList();
+ List<ConnectorBinding> selectedBindings = new
ArrayList<ConnectorBinding>();
+ List<ComponentType> selectedTypes = new ArrayList<ComponentType>();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutputStream os = new BufferedOutputStream(baos);
@@ -1096,24 +1096,22 @@
XMLConfigurationImportExportUtility util = new
XMLConfigurationImportExportUtility();
try {
// get config data from ConfigurationService
- Configuration config =
getConfigurationServiceProxy().getCurrentConfiguration();
- ConfigurationModelContainer container =
getConfigurationServiceProxy().getConfigurationModel(Configuration.NEXT_STARTUP);
+ ConfigurationModelContainer config =
getConfigurationServiceProxy().getConfigurationModel(Configuration.NEXT_STARTUP);
- Collection components = config.getDeployedComponents();
+ Collection<ConnectorBinding> components =
config.getConfiguration().getConnectorBindings();
- for (Iterator iter = components.iterator(); iter.hasNext();) {
- BasicDeployedComponent component = (BasicDeployedComponent)iter.next();
+ for (Iterator<ConnectorBinding> iter = components.iterator();
iter.hasNext();) {
+ ConnectorBinding binding = iter.next();
- String bindingName = component.getName();
+ String bindingName = binding.getName();
String[] identifierParts = new String[] {
- component.getHostID().getName(),
component.getVMComponentDefnID().getName(), bindingName
+ bindingName
};
- ConnectorBinding binding = config.getConnectorBinding(bindingName);
- if (binding != null &&
identifierMatches(connectorBindingIdentifier, identifierParts)) {
+ if (identifierMatches(connectorBindingIdentifier, identifierParts)) {
selectedBindings.add(binding);
- ComponentType ct =
container.getComponentType(binding.getComponentTypeID().getFullName());
+ ComponentType ct =
config.getComponentType(binding.getComponentTypeID().getFullName());
selectedTypes.add(ct);
}
}
Show replies by date