teiid SVN: r792 - trunk/common-internal/src/main/java/com/metamatrix/common/config/api.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-17 12:15:40 -0400 (Fri, 17 Apr 2009)
New Revision: 792
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
Log:
Teiid - 323 - part of the refacturing of configuration cleanup
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java 2009-04-17 15:15:40 UTC (rev 791)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentDefn.java 2009-04-17 16:15:40 UTC (rev 792)
@@ -34,9 +34,9 @@
public static final int CONNECTOR_COMPONENT_CODE = ComponentType.CONNECTOR_COMPONENT_TYPE_CODE;
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 RESOURCE_DESCRIPTOR_COMPONENT_CODE = ComponentType.RESOURCE_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 SHARED_RESOURCE_COMPONENT_CODE = ComponentType.SHARED_RESOURCE_COMPONENT_TYPE_CODE;
public static final int DEPLOYED_COMPONENT_CODE = ComponentType.DEPLOYED_COMPONENT_TYPE_CODE;
public static final int AUTHPROVIDER_COMPONENT_CODE = ComponentType.AUTHPROVIDER_COMPONENT_TYPE_CODE;
Modified: trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-17 15:15:40 UTC (rev 791)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ComponentType.java 2009-04-17 16:15:40 UTC (rev 792)
@@ -45,7 +45,7 @@
public static final int AUTHPROVIDER_COMPONENT_TYPE_CODE =11;
-// public static final int SHARED_RESOURCE_COMPONENT_TYPE_CODE = 10;
+ public static final int SHARED_RESOURCE_COMPONENT_TYPE_CODE = 10;
/**
15 years, 8 months
teiid SVN: r791 - branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-17 11:15:40 -0400 (Fri, 17 Apr 2009)
New Revision: 791
Modified:
branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java
Log:
Teiid 323 - refactured, removing unused Config API classes: ProductType and ProductTypeID related
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-16 22:53:44 UTC (rev 790)
+++ branches/remove_psc/common-internal/src/main/java/com/metamatrix/common/config/CurrentConfiguration.java 2009-04-17 15:15:40 UTC (rev 791)
@@ -31,6 +31,7 @@
import java.util.Properties;
import com.metamatrix.common.CommonPlugin;
+import com.metamatrix.common.config.api.ComponentType;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.ConfigurationModelContainer;
@@ -287,23 +288,10 @@
* @throws ConfigurationException if an error occurred within or during communication with the Configuration Service.
* @see com.metamatrix.common.api.ComponentType
*/
- public Collection getComponentTypes(boolean includeDeprecated) throws ConfigurationException {
+ public Collection<ComponentType> getComponentTypes(boolean includeDeprecated) throws ConfigurationException {
return getReader().getConfigurationModel().getComponentTypes().values();
}
-
- /**
- * Returns a <code>Collection</code> of type <code>ProductType</code> that represents
- * all the ComponentTypes defined.
- * @return List of type <code>ProductType</code>
- * @throws ConfigurationException if an error occurred within or during communication with the Configuration Service.
- * @see #ProductType
- */
- public Collection getProductTypes() throws ConfigurationException {
- Collection c = new ArrayList(1);
- return c;
-// c.add(BasicProductType.PRODUCT_TYPE);
-// return c;
- }
+
/**
* Returns the Host based on the current running machine.
15 years, 8 months
teiid SVN: r789 - branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-16 16:45:45 -0400 (Thu, 16 Apr 2009)
New Revision: 789
Modified:
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java
Log:
Teiid 323 - removing product related tree nodes
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java 2009-04-16 18:13:00 UTC (rev 788)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java 2009-04-16 20:45:45 UTC (rev 789)
@@ -859,6 +859,10 @@
private void selectNode(final DefaultTreeNode theNode) {
//update tree in the Swing Thread
+ if (theNode == null) {
+ new Exception("Null Node").printStackTrace();
+ return;
+ }
Runnable runnable = new Runnable() {
public void run() {
ArrayList pathNodes = new ArrayList();
15 years, 8 months
teiid SVN: r788 - in trunk: engine/src/main/java/com/metamatrix/query/optimizer/batch and 15 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-04-16 14:13:00 -0400 (Thu, 16 Apr 2009)
New Revision: 788
Removed:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/PreparedBatchUpdatePlanner.java
trunk/engine/src/main/java/com/metamatrix/query/processor/batch/PreparedBatchUpdatePlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedCommandsEvaluator.java
trunk/engine/src/main/java/com/metamatrix/query/sql/lang/PreparedBatchUpdate.java
Modified:
trunk/engine/src/main/java/com/metamatrix/query/optimizer/QueryOptimizer.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/BatchedUpdatePlanner.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/AccessNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedUpdateNode.java
trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Delete.java
trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Insert.java
trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Update.java
trunk/engine/src/main/java/com/metamatrix/query/sql/symbol/Reference.java
trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlanCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestQueryProcessor.java
trunk/engine/src/test/java/com/metamatrix/query/processor/eval/TestExpressionEvaluator.java
trunk/engine/src/test/java/com/metamatrix/query/processor/proc/TestProcedureProcessor.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestBatchedUpdateNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestGroupingNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestJoinNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestProjectNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestRelationalNodeStatistics.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestUnionAllNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestInstructions.java
trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCodeTableCache.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
trunk/test-integration/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java
Log:
TEIID-494 ensured that batched update commands get evaluated if needed. also refactored the planning logic of batched updates.
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/QueryOptimizer.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/QueryOptimizer.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/QueryOptimizer.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -22,7 +22,9 @@
package com.metamatrix.query.optimizer;
-import java.util.*;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
@@ -30,17 +32,19 @@
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.core.id.IntegerIDFactory;
import com.metamatrix.query.analysis.AnalysisRecord;
-import com.metamatrix.query.metadata.*;
+import com.metamatrix.query.metadata.QueryMetadataInterface;
+import com.metamatrix.query.metadata.TempMetadataAdapter;
+import com.metamatrix.query.metadata.TempMetadataStore;
import com.metamatrix.query.optimizer.batch.BatchedUpdatePlanner;
-import com.metamatrix.query.optimizer.batch.PreparedBatchUpdatePlanner;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
import com.metamatrix.query.optimizer.proc.ProcedurePlanner;
-import com.metamatrix.query.optimizer.relational.*;
+import com.metamatrix.query.optimizer.relational.MergeTreeNodeProcessor;
+import com.metamatrix.query.optimizer.relational.PlanHints;
+import com.metamatrix.query.optimizer.relational.RelationalPlanner;
import com.metamatrix.query.optimizer.xml.XMLPlanner;
import com.metamatrix.query.optimizer.xquery.XQueryPlanner;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.lang.Command;
-import com.metamatrix.query.sql.lang.PreparedBatchUpdate;
import com.metamatrix.query.sql.symbol.GroupSymbol;
import com.metamatrix.query.sql.visitor.GroupCollectorVisitor;
import com.metamatrix.query.util.CommandContext;
@@ -62,7 +66,6 @@
private static final CommandPlanner XQUERY_PLANNER = new XQueryPlanner();
private static final CommandPlanner BATCHED_UPDATE_PLANNER = new BatchedUpdatePlanner();
private static final CommandTreeProcessor MERGE_TREE_NODE_PROCESSOR = new MergeTreeNodeProcessor();
- private static final CommandPlanner PREPARED_BATCH_UPDATE_PLANNER = new PreparedBatchUpdatePlanner();
// Can't construct
private QueryOptimizer() {}
@@ -247,8 +250,6 @@
result = XQUERY_PLANNER.optimize(node, idGenerator, metadata, capFinder, analysisRecord, context);
} else if (node.getCommandType() == CommandTreeNode.TYPE_BATCHED_UPDATE_COMMAND){
result = BATCHED_UPDATE_PLANNER.optimize(node, idGenerator, metadata, capFinder, analysisRecord, context);
- }else if (node.getCommandType() == CommandTreeNode.TYPE_PREPARED_BATCH_UPDATE_COMMAND){
- result = PREPARED_BATCH_UPDATE_PLANNER.optimize(node, idGenerator, metadata, capFinder, analysisRecord, context);
}
return result;
}
@@ -265,16 +266,6 @@
optMetadata = new TempMetadataAdapter(metadata, new TempMetadataStore(tempMetadata));
}
- //attach a new node for prepared statement batch update
- if(node.getParent() == null &&command instanceof PreparedBatchUpdate && ((PreparedBatchUpdate)command).isBatchedUpdate()){
- node.setCommandType(CommandTreeNode.TYPE_PREPARED_BATCH_UPDATE_COMMAND);
- CommandTreeNode child = new CommandTreeNode();
- node.addLastChild(child);
- child.setParent(node);
- recursiveGenerateCanonical(child, command, metadata, analysisRecord, context);
- return;
- }
-
// Easy to detect batched update planner, procedural planner, or XQueryPlanner
int commandType = command.getType();
if (commandType == Command.TYPE_BATCHED_UPDATE) {
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/BatchedUpdatePlanner.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/BatchedUpdatePlanner.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/BatchedUpdatePlanner.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -39,6 +39,7 @@
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Capability;
+import com.metamatrix.query.optimizer.relational.RelationalPlanner;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.processor.batch.BatchedUpdatePlan;
import com.metamatrix.query.processor.relational.BatchedUpdateNode;
@@ -51,6 +52,8 @@
import com.metamatrix.query.sql.lang.Query;
import com.metamatrix.query.sql.lang.Update;
import com.metamatrix.query.sql.symbol.GroupSymbol;
+import com.metamatrix.query.sql.util.VariableContext;
+import com.metamatrix.query.sql.visitor.NeedsEvaluationVisitor;
import com.metamatrix.query.util.CommandContext;
@@ -105,7 +108,7 @@
BatchedUpdateCommand batchedUpdateCommand = (BatchedUpdateCommand)node.getCommand();
List updateCommands = batchedUpdateCommand.getUpdateCommands();
int numCommands = updateCommands.size();
-
+ List<VariableContext> allContexts = (List<VariableContext>)node.getProperty(RelationalPlanner.VARIABLE_CONTEXTS);
for (int commandIndex = 0; commandIndex < numCommands; commandIndex++) {
// Potentially the first command of a batch
Command updateCommand = (Command)updateCommands.get(commandIndex);
@@ -119,9 +122,17 @@
// Only attempt batching if the source supports batching
if (caps.supportsCapability(Capability.BATCHED_UPDATES)) {
// Start a new batch
- List batch = new ArrayList();
+ List<Command> batch = new ArrayList<Command>();
+ List<VariableContext> contexts = new ArrayList<VariableContext>();
+ List<Boolean> shouldEvaluate = new ArrayList<Boolean>();
// This is the first command in a potential batch, so add it to the batch
batch.add(updateCommand);
+ if (allContexts != null) {
+ contexts.add(allContexts.get(commandIndex));
+ shouldEvaluate.add(Boolean.TRUE);
+ } else {
+ shouldEvaluate.add(NeedsEvaluationVisitor.needsEvaluation(updateCommand));
+ }
// Find out if there are other commands called on the same physical model
// immediately and contiguously after this one
batchLoop: for (int batchIndex = commandIndex+1; batchIndex < numCommands; batchIndex++) {
@@ -129,6 +140,12 @@
// If this command updates the same model, and is eligible for batching, add it to the batch
if (canBeAddedToBatch(batchingCandidate, batchModelID, metadata)) {
batch.add(batchingCandidate);
+ if (allContexts != null) {
+ contexts.add(allContexts.get(batchIndex));
+ shouldEvaluate.add(Boolean.TRUE);
+ } else {
+ shouldEvaluate.add(NeedsEvaluationVisitor.needsEvaluation(batchingCandidate));
+ }
} else { // Otherwise, stop batching at this point. The next command may well be the start of a new batch
break batchLoop;
}
@@ -138,7 +155,7 @@
ProjectNode projectNode = new ProjectNode(((IntegerID)idGenerator.create()).getValue());
// Create a BatchedUpdateNode that creates a batched request for the connector
BatchedUpdateNode batchNode = new BatchedUpdateNode(((IntegerID)idGenerator.create()).getValue(),
- batch,
+ batch, contexts, shouldEvaluate,
modelName);
List symbols = batchedUpdateCommand.getProjectedSymbols();
projectNode.setSelectSymbols(symbols);
@@ -168,7 +185,7 @@
* @return the group being updated
* @since 4.2
*/
- private static GroupSymbol getUpdatedGroup(Command command) {
+ public static GroupSymbol getUpdatedGroup(Command command) {
int type = command.getType();
if (type == Command.TYPE_INSERT) {
return ((Insert)command).getGroup();
@@ -176,9 +193,7 @@
return ((Update)command).getGroup();
} else if (type == Command.TYPE_DELETE) {
return ((Delete)command).getGroup();
- } else if (type == Command.TYPE_QUERY) { // SELECT INTO
- // Assumes that the group is not a temp group, because the
- // resolver would have thrown an exception if it was
+ } else if (type == Command.TYPE_QUERY) {
return ((Query)command).getInto().getGroup();
}
throw new MetaMatrixRuntimeException(QueryExecPlugin.Util.getString("BatchedUpdatePlanner.unrecognized_command", command)); //$NON-NLS-1$
@@ -193,7 +208,7 @@
* @throws MetaMatrixComponentException
* @since 4.2
*/
- private static boolean isEligibleForBatching(Command command, QueryMetadataInterface metadata) throws QueryMetadataException, MetaMatrixComponentException {
+ public static boolean isEligibleForBatching(Command command, QueryMetadataInterface metadata) throws QueryMetadataException, MetaMatrixComponentException {
// If it's a SELECT INTO, it shouldn't be part of a connector batch.
if (command.getType() == Command.TYPE_QUERY) {
return false;
Deleted: trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/PreparedBatchUpdatePlanner.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/PreparedBatchUpdatePlanner.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/batch/PreparedBatchUpdatePlanner.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -1,178 +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.query.optimizer.batch;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.teiid.dqp.internal.process.PreparedStatementRequest;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.ExpressionEvaluationException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.api.exception.query.QueryPlannerException;
-import com.metamatrix.api.exception.query.QueryResolverException;
-import com.metamatrix.core.id.IDGenerator;
-import com.metamatrix.core.id.IntegerID;
-import com.metamatrix.query.analysis.AnalysisRecord;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.optimizer.CommandPlanner;
-import com.metamatrix.query.optimizer.CommandTreeNode;
-import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
-import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
-import com.metamatrix.query.processor.ProcessorPlan;
-import com.metamatrix.query.processor.batch.BatchedUpdatePlan;
-import com.metamatrix.query.processor.batch.PreparedBatchUpdatePlan;
-import com.metamatrix.query.processor.relational.BatchedCommandsEvaluator;
-import com.metamatrix.query.processor.relational.BatchedUpdateNode;
-import com.metamatrix.query.processor.relational.ProjectNode;
-import com.metamatrix.query.processor.relational.RelationalPlan;
-import com.metamatrix.query.sql.lang.Command;
-import com.metamatrix.query.sql.lang.Delete;
-import com.metamatrix.query.sql.lang.Insert;
-import com.metamatrix.query.sql.lang.PreparedBatchUpdate;
-import com.metamatrix.query.sql.lang.StoredProcedure;
-import com.metamatrix.query.sql.lang.Update;
-import com.metamatrix.query.sql.symbol.GroupSymbol;
-import com.metamatrix.query.sql.visitor.EvaluateExpressionVisitor;
-import com.metamatrix.query.util.CommandContext;
-
-
-/**
- * Planner for PreparedBatchUpdate
- * @since 5.5.2
- */
-public class PreparedBatchUpdatePlanner implements CommandPlanner {
-
- /**
- * @see com.metamatrix.query.optimizer.CommandPlanner#generateCanonical(com.metamatrix.query.optimizer.CommandTreeNode, com.metamatrix.query.metadata.QueryMetadataInterface, com.metamatrix.query.analysis.AnalysisRecord, CommandContext)
- * @since 5.5.2
- */
- public void generateCanonical(CommandTreeNode rootNode,
- QueryMetadataInterface metadata,
- AnalysisRecord analysisRecord, CommandContext context)
- throws QueryPlannerException, QueryMetadataException, MetaMatrixComponentException {
- // do nothing. the planner framework takes care of generating the canonical plan for each of the child commands
- }
-
- /**
- * If the updates are on a physical source and the source support prepared statement batch update,
- * just use the plan for the update comand. Otherwise, use PreparedBatchUpdatePlan.
- * @see com.metamatrix.query.optimizer.CommandPlanner#optimize(com.metamatrix.query.optimizer.CommandTreeNode, com.metamatrix.core.id.IDGenerator, com.metamatrix.query.metadata.QueryMetadataInterface, com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder, com.metamatrix.query.analysis.AnalysisRecord, CommandContext)
- * @since 5.5.2
- */
- public ProcessorPlan optimize(CommandTreeNode node,
- IDGenerator idGenerator,
- QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder,
- AnalysisRecord analysisRecord, CommandContext context)
- throws QueryPlannerException, QueryMetadataException, MetaMatrixComponentException {
- //should have only one child
- CommandTreeNode childNode = node.getFirstChild();
- Command command = childNode.getCommand();
- boolean supportPreparedBatchUpdate = false;
- boolean supportBatchedUpdate = false;
- if (isEligibleForBatching(command, metadata)) {
- GroupSymbol group = getUpdatedGroup(command);
- if(group != null){
- Object batchModelID = metadata.getModelID(group.getMetadataID());
- String modelName = metadata.getFullName(batchModelID);
- SourceCapabilities caps = capFinder.findCapabilities(modelName);
- supportPreparedBatchUpdate = caps.supportsCapability(SourceCapabilities.Capability.PREPARED_BATCH_UPDATE);
- supportBatchedUpdate = caps.supportsCapability(SourceCapabilities.Capability.BATCHED_UPDATES);
- }
- }
-
- ProcessorPlan plan = childNode.getProcessorPlan();
- if(supportPreparedBatchUpdate){
- return plan;
- }
-
- List paramValues = context.getPreparedBatchUpdateValues();
- PreparedBatchUpdate batchUpdate = (PreparedBatchUpdate)childNode.getCommand();
- if(supportBatchedUpdate && paramValues.size() > 1){
- List batch = new ArrayList();
- for(int i=0; i<paramValues.size(); i++ ){
- batch.add(batchUpdate.clone());
- }
- GroupSymbol group = getUpdatedGroup(command);
- Object batchModelID = metadata.getModelID(group.getMetadataID());
- String modelName = metadata.getFullName(batchModelID);
- BatchedUpdateNode batchNode = new BatchedUpdateNode(((IntegerID)idGenerator.create()).getValue(),
- batch,
- modelName);
- batchNode.setCommandsEvaluator(
- new BatchedCommandsEvaluator(){
- public void evaluateExpressions(List commands, CommandContext context) throws ExpressionEvaluationException, QueryResolverException, MetaMatrixComponentException {
- PreparedBatchUpdate batchUpdate = (PreparedBatchUpdate)commands.get(0);
- List parameters = batchUpdate.getParameterReferences();
- Iterator valuesIter = context.getPreparedBatchUpdateValues().iterator();
- Iterator commandIter = commands.iterator();
- while(valuesIter.hasNext()){
- List values = (List)valuesIter.next();
- batchUpdate = (PreparedBatchUpdate)commandIter.next();
- PreparedStatementRequest.resolveParameterValues(parameters, values, context);
- EvaluateExpressionVisitor.replaceExpressions(batchUpdate, true, null, context);
- }
- }
- });
- List symbols = Command.getUpdateCommandSymbol();
- batchNode.setElements(symbols);
- ProjectNode projectNode = new ProjectNode(((IntegerID)idGenerator.create()).getValue());
- projectNode.setSelectSymbols(symbols);
- projectNode.setElements(symbols);
- projectNode.addChild(batchNode);
- List childPlans = new ArrayList();
- RelationalPlan rPlan = new RelationalPlan(projectNode);
- rPlan.setOutputElements(symbols);
- childPlans.add(rPlan);
- return new BatchedUpdatePlan(childPlans, paramValues.size());
- }
-
- return new PreparedBatchUpdatePlan(plan, paramValues, batchUpdate.getParameterReferences());
- }
-
- private static GroupSymbol getUpdatedGroup(Command command) {
- int type = command.getType();
- if (type == Command.TYPE_INSERT) {
- return ((Insert)command).getGroup();
- } else if (type == Command.TYPE_UPDATE) {
- return ((Update)command).getGroup();
- } else if (type == Command.TYPE_DELETE) {
- return ((Delete)command).getGroup();
- } else if (type == Command.TYPE_STORED_PROCEDURE) {
- return ((StoredProcedure)command).getGroup();
- } else {
- return null;
- }
- }
-
- private static boolean isEligibleForBatching(Command command, QueryMetadataInterface metadata) throws QueryMetadataException, MetaMatrixComponentException {
- if (command.getType() == Command.TYPE_QUERY) {
- return false;
- }
- // If the command updates a physical group, it's eligible
- return !metadata.isVirtualGroup(getUpdatedGroup(command).getMetadataID());
- }
-}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/RelationalPlanner.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -72,7 +72,8 @@
/**
* Key for a {@link PlanHints PlanHints} object
*/
- public static final Integer HINTS = new Integer(0);
+ public static final Integer HINTS = Integer.valueOf(0);
+ public static final Integer VARIABLE_CONTEXTS = Integer.valueOf(1);
/**
* @see com.metamatrix.query.optimizer.CommandPlanner#generateCanonical(com.metamatrix.query.optimizer.CommandTreeNode, boolean)
Deleted: trunk/engine/src/main/java/com/metamatrix/query/processor/batch/PreparedBatchUpdatePlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/batch/PreparedBatchUpdatePlan.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/batch/PreparedBatchUpdatePlan.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -1,185 +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.query.processor.batch;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.teiid.dqp.internal.process.PreparedStatementRequest;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.MetaMatrixProcessingException;
-import com.metamatrix.common.buffer.BlockedException;
-import com.metamatrix.common.buffer.BufferManager;
-import com.metamatrix.common.buffer.TupleBatch;
-import com.metamatrix.query.processor.BaseProcessorPlan;
-import com.metamatrix.query.processor.DescribableUtil;
-import com.metamatrix.query.processor.ProcessorDataManager;
-import com.metamatrix.query.processor.ProcessorPlan;
-import com.metamatrix.query.sql.lang.Command;
-import com.metamatrix.query.util.CommandContext;
-
-
-/**
- * Plan for execution for PreparedBatchUpdate.
- * @since 5.5.2
- */
-public class PreparedBatchUpdatePlan extends BaseProcessorPlan {
- private ProcessorPlan[] updatePlans;
- private int[] updateCounts;
- private boolean isPlanOpened;
- private int planIndex = 0;
- private List parameterValuesList;
- private List parameterReferences;
-
- public PreparedBatchUpdatePlan(ProcessorPlan plan, List parameterValuesList, List parameterReferences) {
- this.parameterValuesList = parameterValuesList;
- this.parameterReferences = parameterReferences;
- updatePlans = new ProcessorPlan[parameterValuesList.size()];
- updatePlans[0] = plan;
- for(int i=1; i<updatePlans.length; i++){
- updatePlans[i] = (ProcessorPlan)plan.clone();
- }
- updateCounts = new int[updatePlans.length];
- }
-
- public Object clone() {
- return new PreparedBatchUpdatePlan((ProcessorPlan)updatePlans[0].clone(), parameterValuesList, parameterReferences);
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#initialize(com.metamatrix.query.util.CommandContext, com.metamatrix.query.processor.ProcessorDataManager, com.metamatrix.common.buffer.BufferManager)
- * @since 5.5.2
- */
- public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) {
- for (int i = 0; i < updatePlans.length; i++) {
- updatePlans[i].initialize(context, dataMgr, bufferMgr);
- }
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#getOutputElements()
- * @since 5.5.2
- */
- public List getOutputElements() {
- return Command.getUpdatesCommandSymbol();
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#open()
- * @since 5.5.2
- */
- public void open() throws MetaMatrixComponentException, MetaMatrixProcessingException{
- if (!isPlanOpened) { // Open the plan only once
- PreparedStatementRequest.resolveParameterValues(parameterReferences, (List)parameterValuesList.get(planIndex), this.getContext());
- updatePlans[planIndex].open();
- isPlanOpened = true;
- }
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#nextBatch()
- * @since 5.5.2
- */
- public TupleBatch nextBatch() throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException {
- for (;planIndex < updatePlans.length; planIndex++) {
- open();
- // Execute nextBatch() on each plan in sequence
- List[] currentBatch = updatePlans[planIndex].nextBatch().getAllTuples(); // Can throw BlockedException
- //updateCounts[planIndex] = currentBatch[0].get(0);
- updateCounts[planIndex] = ((Integer)currentBatch[0].get(0)).intValue();
-
- // since we are done with the plan explicitly close it.
- updatePlans[planIndex].close();
- isPlanOpened = false;
- }
- // Add tuples to current batch
- List rows = new ArrayList();
- List row = new ArrayList();
- row.add(updateCounts);
- rows.add(row);
- TupleBatch batch = new TupleBatch(1, rows);
- batch.setTerminationFlag(true);
- return batch;
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#close()
- * @since 5.5.2
- */
- public void close() throws MetaMatrixComponentException {
- }
-
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#reset()
- * @since 5.5.2
- */
- public void reset() {
- super.reset();
- for (int i = 0; i < updatePlans.length; i++) {
- updatePlans[i].reset();
- }
- Arrays.fill(updateCounts, -1);
- planIndex = 0;
- isPlanOpened = false;
- }
-
- /**
- * @see com.metamatrix.query.processor.Describable#getDescriptionProperties()
- * @since 5.5.2
- */
- public Map getDescriptionProperties() {
- Map props = new HashMap();
- props.put(PROP_TYPE, "Batched Update Plan"); //$NON-NLS-1$
- List children = new ArrayList();
- for (int i = 0; i < updatePlans.length; i++) {
- children.add(updatePlans[i].getDescriptionProperties());
- }
- props.put(PROP_CHILDREN, children);
- props.put(PROP_OUTPUT_COLS, DescribableUtil.getOutputColumnProperties(getOutputElements()));
- return props;
- }
-
- public String toString() {
- StringBuffer val = new StringBuffer("PreparedBatchUpdatePlan\n"); //$NON-NLS-1$
- val.append(updatePlans[0]);
- val.append("\nValues:");//$NON-NLS-1$
- val.append(parameterValuesList);
- val.append("\n"); //$NON-NLS-1$
- return val.toString();
- }
-
- /**
- * @see com.metamatrix.query.processor.ProcessorPlan#getChildPlans()
- * @since 5.5.2
- */
- public Collection getChildPlans() {
- return Arrays.asList(updatePlans);
- }
-
-}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/AccessNode.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/AccessNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/AccessNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -28,6 +28,8 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
+import com.metamatrix.api.exception.query.CriteriaEvaluationException;
+import com.metamatrix.api.exception.query.ExpressionEvaluationException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.buffer.TupleBatch;
@@ -36,6 +38,7 @@
import com.metamatrix.query.rewriter.QueryRewriter;
import com.metamatrix.query.sql.lang.Command;
import com.metamatrix.query.sql.visitor.EvaluateExpressionVisitor;
+import com.metamatrix.query.util.CommandContext;
public class AccessNode extends RelationalNode {
@@ -105,18 +108,24 @@
}
protected boolean prepareNextCommand(Command atomicCommand) throws MetaMatrixComponentException, MetaMatrixProcessingException {
- // evaluate all references and any functions on constant values
- EvaluateExpressionVisitor.replaceExpressions(atomicCommand, true, getDataManager(), getContext());
+ return prepareCommand(atomicCommand, this, this.getContext());
+ }
+
+ static boolean prepareCommand(Command atomicCommand, RelationalNode node, CommandContext context)
+ throws ExpressionEvaluationException, MetaMatrixComponentException,
+ MetaMatrixProcessingException, CriteriaEvaluationException {
+ // evaluate all references and any functions on constant values
+ EvaluateExpressionVisitor.replaceExpressions(atomicCommand, true, node.getDataManager(), context);
try {
// Defect 16059 - Rewrite the command once the references have been replaced with values.
- QueryRewriter.rewrite(atomicCommand, null, null, getContext());
+ QueryRewriter.rewrite(atomicCommand, null, null, context);
} catch (QueryValidatorException e) {
throw new MetaMatrixProcessingException(e, QueryExecPlugin.Util.getString("AccessNode.rewrite_failed", atomicCommand)); //$NON-NLS-1$
}
return RelationalNodeUtil.shouldExecute(atomicCommand, true);
- }
+ }
public TupleBatch nextBatchDirect()
throws BlockedException, MetaMatrixComponentException, MetaMatrixProcessingException {
Deleted: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedCommandsEvaluator.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedCommandsEvaluator.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedCommandsEvaluator.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -1,34 +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.query.processor.relational;
-
-import java.util.List;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.ExpressionEvaluationException;
-import com.metamatrix.api.exception.query.QueryResolverException;
-import com.metamatrix.query.util.CommandContext;
-
-public interface BatchedCommandsEvaluator {
- void evaluateExpressions(List commands, CommandContext context) throws ExpressionEvaluationException, QueryResolverException, MetaMatrixComponentException;
-}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedUpdateNode.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedUpdateNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchedUpdateNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -36,6 +36,8 @@
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.sql.lang.BatchedUpdateCommand;
import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.sql.util.VariableContext;
+import com.metamatrix.query.util.CommandContext;
/**
@@ -44,22 +46,23 @@
*/
public class BatchedUpdateNode extends RelationalNode {
- private static final List ZERO_COUNT_TUPLE = Arrays.asList(new Object[] {new Integer(0)});
+ private static final List<Integer> ZERO_COUNT_TUPLE = Arrays.asList(Integer.valueOf(0));
/** The commands in this batch. */
- private List updateCommands;
+ private List<Command> updateCommands;
+ private List<VariableContext> contexts;
+ private List<Boolean> shouldEvaluate;
+
/** The model name within the scope of which these commands are being executed. */
private String modelName;
/** The tuple source containing the update counts after the batch has been executed. */
private TupleSource tupleSource;
/** Set containing the indexes of commands that weren't executed. */
- private Set unexecutedCommands;
+ private Set<Integer> unexecutedCommands;
/** Flag indicating that at least one command was sent to the DataManager. */
private boolean commandsWereExecuted = true;
- private BatchedCommandsEvaluator commandsEvaluator;
-
/**
*
* @param nodeID
@@ -67,8 +70,10 @@
* @param modelName The name of the model. All the commands in this batch must update groups only within this model.
* @since 4.2
*/
- public BatchedUpdateNode(int nodeID, List commands, String modelName) {
+ public BatchedUpdateNode(int nodeID, List<Command> commands, List<VariableContext> contexts, List<Boolean> shouldEvaluate, String modelName) {
super(nodeID);
+ this.shouldEvaluate = shouldEvaluate;
+ this.contexts = contexts;
this.updateCommands = commands;
this.modelName = modelName;
}
@@ -79,18 +84,27 @@
*/
public void open() throws MetaMatrixComponentException, MetaMatrixProcessingException {
super.open();
- unexecutedCommands = new HashSet(updateCommands.size(), 1.0f);
- List commandsToExecute = new ArrayList(updateCommands.size());
- if(commandsEvaluator != null){
- commandsEvaluator.evaluateExpressions(updateCommands, this.getContext());
- }
+ unexecutedCommands = new HashSet<Integer>();
+ List<Command> commandsToExecute = new ArrayList<Command>(updateCommands.size());
// Find the commands to be executed
for (int i = 0; i < updateCommands.size(); i++) {
- Command updateCommand = (Command)updateCommands.get(i);
- if (RelationalNodeUtil.shouldExecute(updateCommand, true)) {
+ Command updateCommand = (Command)updateCommands.get(i).clone();
+ CommandContext context = this.getContext();
+ if (this.contexts != null) {
+ context = (CommandContext)context.clone();
+ context.setVariableContext(this.contexts.get(i));
+ }
+ boolean needProcessing = false;
+ if(shouldEvaluate != null && shouldEvaluate.get(i)) {
+ updateCommand = (Command) updateCommand.clone();
+ needProcessing = AccessNode.prepareCommand(updateCommand, this, context);
+ } else {
+ needProcessing = RelationalNodeUtil.shouldExecute(updateCommand, true);
+ }
+ if (needProcessing) {
commandsToExecute.add(updateCommand);
} else {
- unexecutedCommands.add(new Integer(i));
+ unexecutedCommands.add(Integer.valueOf(i));
}
}
if (commandsToExecute.isEmpty()) {
@@ -114,7 +128,7 @@
List tuple;
for ( int i = 0; i < numExpectedCounts; i++) {
// If the command at this index was not executed
- if (unexecutedCommands.contains(new Integer(i))) {
+ if (unexecutedCommands.contains(Integer.valueOf(i))) {
addBatchRow(ZERO_COUNT_TUPLE);
} else { // Otherwise, get the next count in the batch
tuple = tupleSource.nextTuple();
@@ -172,14 +186,9 @@
for (int i = 0; i < updateCommands.size(); i++) {
clonedCommands.add(((Command)updateCommands.get(i)).clone());
}
- BatchedUpdateNode clonedNode = new BatchedUpdateNode(getID(), clonedCommands, modelName);
- clonedNode.commandsEvaluator = this.commandsEvaluator;
+ BatchedUpdateNode clonedNode = new BatchedUpdateNode(getID(), clonedCommands, contexts, shouldEvaluate, modelName);
super.copy(this, clonedNode);
return clonedNode;
}
- public void setCommandsEvaluator(BatchedCommandsEvaluator commandsEvaluator) {
- this.commandsEvaluator = commandsEvaluator;
- }
-
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Delete.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Delete.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Delete.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -37,7 +37,7 @@
* "DELETE FROM <group> [WHERE <criteria>]".
* Implements Command interface.
*/
-public class Delete extends PreparedBatchUpdate {
+public class Delete extends ProcedureContainer {
/** Identifies the group to delete data from. */
private GroupSymbol group;
@@ -186,7 +186,6 @@
Delete copy = new Delete(copyGroup, copyCrit);
copyMetadataState(copy);
- copy.setParameterReferences(this.getParameterReferences());
return copy;
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Insert.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Insert.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Insert.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -42,7 +42,7 @@
* Represents a SQL Insert statement of the form:
* "INSERT INTO <group> (<variables>) VALUES <values>".
*/
-public class Insert extends PreparedBatchUpdate {
+public class Insert extends ProcedureContainer {
/** Identifies the group to be udpdated. */
private GroupSymbol group;
@@ -261,7 +261,6 @@
Insert copy = new Insert(copyGroup, copyVars, copyVals);
this.copyMetadataState(copy);
- copy.setParameterReferences(this.getParameterReferences());
return copy;
}
Deleted: trunk/engine/src/main/java/com/metamatrix/query/sql/lang/PreparedBatchUpdate.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/sql/lang/PreparedBatchUpdate.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/sql/lang/PreparedBatchUpdate.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -1,56 +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.query.sql.lang;
-
-import java.util.List;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-
-public abstract class PreparedBatchUpdate extends ProcedureContainer{
- private List parameterReferences; //List<Reference>
- private int updatingModelCount = -1;
-
- public List getParameterReferences() {
- return parameterReferences;
- }
-
- public void setParameterReferences(List parameterReferences) {
- this.parameterReferences = parameterReferences;
- }
-
- public boolean isBatchedUpdate(){
- return parameterReferences != null;
- }
-
- public int updatingModelCount(QueryMetadataInterface metadata) throws MetaMatrixComponentException{
- if(updatingModelCount != -1){
- return updatingModelCount;
- }
- return super.updatingModelCount(metadata);
- }
-
- public void setUpdatingModelCount(int updatingModelCount) {
- this.updatingModelCount = updatingModelCount;
- }
-}
Modified: trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Update.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Update.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/sql/lang/Update.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -41,7 +41,7 @@
* Represents a SQL Update statement of the form:
* "UPDATE <group> SET <element> = <expression>, ... [WHERE <criteria>]".
*/
-public class Update extends PreparedBatchUpdate {
+public class Update extends ProcedureContainer {
/** Identifies the group to be udpdated. */
private GroupSymbol group;
@@ -234,7 +234,6 @@
}
this.copyMetadataState(copy);
- copy.setParameterReferences(this.getParameterReferences());
return copy;
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/sql/symbol/Reference.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/sql/symbol/Reference.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/sql/symbol/Reference.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -76,7 +76,7 @@
public ElementSymbol getExpression() {
if (this.isPositional() && this.expression == null) {
- return new ElementSymbol("$param.pos" + this.refIndex); //$NON-NLS-1$
+ return new ElementSymbol("$param/pos" + this.refIndex); //$NON-NLS-1$
}
return this.expression;
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -23,7 +23,6 @@
package com.metamatrix.query.util;
import java.io.Serializable;
-import java.util.List;
import java.util.Properties;
import java.util.Random;
import java.util.Stack;
@@ -58,8 +57,6 @@
private String userName;
- private Serializable trustedPayload;
-
private Serializable commandPayload;
private String vdbName;
@@ -84,8 +81,6 @@
private SecurityFunctionEvaluator securityFunctionEvaluator;
- private List preparedBatchUpdateValues;
-
private Object tempTableStore;
private TimeZone timezone = TimeZone.getDefault();
@@ -101,12 +96,10 @@
* @param collectNodeStatistics TODO
*/
public CommandContext(Object processorID, String connectionID, String userName,
- Serializable trustedPayload, Serializable commandPayload, String vdbName, String vdbVersion, Properties envProperties, boolean processDebug,
- boolean collectNodeStatistics) {
+ Serializable commandPayload, String vdbName, String vdbVersion, Properties envProperties, boolean processDebug, boolean collectNodeStatistics) {
setProcessorID(processorID);
setConnectionID(connectionID);
setUserName(userName);
- setTrustedPayload(trustedPayload);
setCommandPayload(commandPayload);
setVdbName(vdbName);
setVdbVersion(vdbVersion);
@@ -118,11 +111,11 @@
/**
* Construct a new context.
*/
- public CommandContext(Object processorID, String connectionID, int outputBatchSize,
- String userName, Serializable trustedPayLoad, String vdbName, String vdbVersion) {
+ public CommandContext(Object processorID, String connectionID, String userName,
+ String vdbName, String vdbVersion) {
- this(processorID, connectionID, userName, trustedPayLoad, null,
- vdbName, vdbVersion, null, false, false);
+ this(processorID, connectionID, userName, null, vdbName,
+ vdbVersion, null, false, false);
}
@@ -133,7 +126,6 @@
setProcessorID(context.processorID);
setUserName(context.userName);
- setTrustedPayload(context.trustedPayload);
setCommandPayload(context.commandPayload);
setVdbName(context.vdbName);
setVdbVersion(context.vdbVersion);
@@ -147,7 +139,6 @@
}
setOptimisticTransaction(context.isOptimisticTransaction());
this.setSecurityFunctionEvaluator(context.getSecurityFunctionEvaluator());
- this.preparedBatchUpdateValues = context.preparedBatchUpdateValues;
this.planToProcessConverter = context.planToProcessConverter;
this.queryProcessorFactory = context.queryProcessorFactory;
this.variableContext = context.variableContext;
@@ -179,21 +170,6 @@
processorID = object;
}
- public boolean equals(Object obj) {
- if(this == obj) {
- return true;
- }
-
- if(obj instanceof CommandContext) {
- return this.processorID.equals(((CommandContext)obj).getProcessorID());
- }
- return false;
- }
-
- public int hashCode() {
- return this.processorID.hashCode();
- }
-
public Object clone() {
return new CommandContext(this);
}
@@ -210,13 +186,6 @@
}
/**
- * @return Serializable
- */
- public Serializable getTrustedPayload() {
- return trustedPayload;
- }
-
- /**
* @return String
*/
public String getUserName() {
@@ -246,14 +215,6 @@
}
/**
- * Sets the trustedPayLoad.
- * @param trustedPayLoad The trustedPayLoad to set
- */
- public void setTrustedPayload(Serializable trustedPayLoad) {
- this.trustedPayload = trustedPayLoad;
- }
-
- /**
* Sets the userName.
* @param userName The userName to set
*/
@@ -402,14 +363,6 @@
this.securityFunctionEvaluator = securityFunctionEvaluator;
}
- public List getPreparedBatchUpdateValues() {
- return preparedBatchUpdateValues;
- }
-
- public void setPreparedBatchUpdateValues(List preparedBatchUpdateValues) {
- this.preparedBatchUpdateValues = preparedBatchUpdateValues;
- }
-
public Object getTempTableStore() {
return tempTableStore;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -207,7 +207,7 @@
private MetadataResult obtainMetadataForPreparedSql(String sql, String sessionId, boolean isDoubleQuotedVariablesAllowed) throws QueryParserException, QueryResolverException, MetaMatrixComponentException {
Command command = null;
- PreparedPlanCache.PreparedPlan plan = planCache.getPreparedPlan(sessionId, sql, false);
+ PreparedPlanCache.PreparedPlan plan = planCache.getPreparedPlan(sessionId, sql);
if(plan != null) {
command = plan.getCommand();
} else {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlanCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlanCache.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedPlanCache.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -30,6 +30,7 @@
import com.metamatrix.query.analysis.AnalysisRecord;
import com.metamatrix.query.processor.ProcessorPlan;
import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.sql.symbol.Reference;
/**
* This class is used to cahce plan and related objects for prepared statement
@@ -37,7 +38,7 @@
public class PreparedPlanCache {
public static final int DEFAULT_MAX_SIZE_TOTAL = 100;
- private LRUCache cache;
+ private LRUCache<CacheID, PreparedPlan> cache;
PreparedPlanCache(){
this(DEFAULT_MAX_SIZE_TOTAL);
@@ -47,33 +48,33 @@
if(maxSize < 0){
maxSize = DEFAULT_MAX_SIZE_TOTAL;
}
- cache = new LRUCache(maxSize);
+ cache = new LRUCache<CacheID, PreparedPlan>(maxSize);
}
/**
* Return the PreparedPlan for the given session and SQl query
+ * @param sql SQL query string
* @param session ClientConnection
- * @param sql SQL query string
* @return PreparedPlan for the given clientConn and SQl query. Null if not exist.
*/
- public synchronized PreparedPlan getPreparedPlan(String sessionId, String sql, boolean isPreparedBatchUpdate){
+ public synchronized PreparedPlan getPreparedPlan(String sessionId, String sql){
ArgCheck.isNotNull(sessionId);
ArgCheck.isNotNull(sql);
- CacheID cID = new CacheID(sessionId, sql, isPreparedBatchUpdate);
+ CacheID cID = new CacheID(sessionId, sql);
- return (PreparedPlan)cache.get(cID);
+ return cache.get(cID);
}
/**
* Create PreparedPlan for the given clientConn and SQl query
*/
- public synchronized PreparedPlan createPreparedPlan(String sessionId, String sql, boolean isPreparedBatchUpdate){
+ public synchronized PreparedPlan createPreparedPlan(String sessionId, String sql){
ArgCheck.isNotNull(sessionId);
ArgCheck.isNotNull(sql);
- CacheID cID = new CacheID(sessionId, sql, isPreparedBatchUpdate);
- PreparedPlan preparedPlan = (PreparedPlan)cache.get(cID);
+ CacheID cID = new CacheID(sessionId, sql);
+ PreparedPlan preparedPlan = cache.get(cID);
if(preparedPlan == null){
preparedPlan = new PreparedPlan();
cache.put(cID, preparedPlan);
@@ -104,10 +105,9 @@
int hashCode;
private boolean isPreparedBatchUpdate;
- CacheID(String sessionId, String sql, boolean isPreparedBatchUpdate){
+ CacheID(String sessionId, String sql){
this.sessionId = sessionId;
this.sql = sql;
- this.isPreparedBatchUpdate = isPreparedBatchUpdate;
hashCode = HashCodeUtil.hashCode(HashCodeUtil.hashCode(0, sessionId), sql);
}
@@ -132,7 +132,8 @@
static class PreparedPlan{
private ProcessorPlan plan;
private Command command;
- private List refs;
+ private Command rewritenCommand;
+ private List<Reference> refs;
private AnalysisRecord analysisRecord;
/**
@@ -159,7 +160,7 @@
/**
* Return the list of Reference.
*/
- public List getReferences(){
+ public List<Reference> getReferences(){
return refs;
}
@@ -187,9 +188,17 @@
/**
* Set the list of Reference.
*/
- public void setReferences(List refsValue){
+ public void setReferences(List<Reference> refsValue){
refs = refsValue;
}
+
+ public void setRewritenCommand(Command rewritenCommand) {
+ this.rewritenCommand = rewritenCommand;
+ }
+
+ public Command getRewritenCommand() {
+ return rewritenCommand;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -23,24 +23,31 @@
package org.teiid.dqp.internal.process;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.ExpressionEvaluationException;
+import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryParserException;
import com.metamatrix.api.exception.query.QueryPlannerException;
import com.metamatrix.api.exception.query.QueryResolverException;
import com.metamatrix.api.exception.query.QueryValidatorException;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.QueryPlugin;
import com.metamatrix.query.eval.Evaluator;
+import com.metamatrix.query.optimizer.CommandTreeNode;
+import com.metamatrix.query.optimizer.batch.BatchedUpdatePlanner;
+import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
+import com.metamatrix.query.optimizer.relational.RelationalPlanner;
import com.metamatrix.query.processor.ProcessorPlan;
+import com.metamatrix.query.processor.relational.AccessNode;
+import com.metamatrix.query.processor.relational.RelationalPlan;
import com.metamatrix.query.resolver.util.ResolverUtil;
+import com.metamatrix.query.sql.lang.BatchedUpdateCommand;
import com.metamatrix.query.sql.lang.Command;
-import com.metamatrix.query.sql.lang.PreparedBatchUpdate;
import com.metamatrix.query.sql.lang.SPParameter;
import com.metamatrix.query.sql.lang.StoredProcedure;
import com.metamatrix.query.sql.symbol.Constant;
@@ -61,27 +68,23 @@
}
@Override
- protected void checkReferences(List references)
+ protected void checkReferences(List<Reference> references)
throws QueryValidatorException {
- //do nothing - references are allowed
+ prepPlan.setReferences(references);
}
/**
* @see org.teiid.dqp.internal.process.Request#resolveCommand(com.metamatrix.query.sql.lang.Command)
*/
- protected void resolveCommand(Command command, List references) throws QueryResolverException,
+ @Override
+ protected void resolveCommand(Command command) throws QueryResolverException,
MetaMatrixComponentException {
+ handleCallableStatement(command);
- handleCallableStatement(command, references);
-
- super.resolveCommand(command, references);
+ super.resolveCommand(command);
- if(requestMsg.isPreparedBatchUpdate()){
- ((PreparedBatchUpdate)command).setParameterReferences(references);
- }
//save the command in it's present form so that it can be validated later
prepPlan.setCommand((Command) command.clone());
- prepPlan.setReferences(references);
}
/**
@@ -89,7 +92,7 @@
* @param command
* @param references
*/
- private void handleCallableStatement(Command command, List references) {
+ private void handleCallableStatement(Command command) {
if (!this.requestMsg.isCallableStatement() || !(command instanceof StoredProcedure)) {
return;
}
@@ -112,31 +115,13 @@
}
if (param.getExpression() instanceof Reference && index > inParameterCount) {
//assume it's an output parameter
- references.remove(param.getExpression());
+ this.prepPlan.getReferences().remove(param.getExpression());
continue;
}
param.setIndex(index++);
proc.setParameter(param);
}
}
-
- protected void resolveParameterValues() throws QueryResolverException, MetaMatrixComponentException {
- List params = prepPlan.getReferences();
- List values = requestMsg.getParameterValues();
- if(requestMsg.isPreparedBatchUpdate()){
- if(values.size() > 1){
- ((PreparedBatchUpdate)userCommand).setUpdatingModelCount(2);
- }
- for(int i=0; i<values.size(); i++){
- if (params.size() != ((List)values.get(i)).size()) {
- String msg = DQPPlugin.Util.getString("DQPCore.wrong_number_of_values", new Object[] {new Integer(values.size()), new Integer(params.size())}); //$NON-NLS-1$
- throw new QueryResolverException(msg);
- }
- }
- } else {
- PreparedStatementRequest.resolveParameterValues(params, values, this.context);
- }
- }
@Override
protected void validateQueryValues(Command command)
@@ -152,13 +137,13 @@
* @throws QueryPlannerException
* @see org.teiid.dqp.internal.process.Request#generatePlan()
*/
- protected void generatePlan() throws QueryPlannerException, QueryParserException, QueryResolverException, QueryValidatorException, MetaMatrixComponentException {
+ protected Command generatePlan() throws QueryPlannerException, QueryParserException, QueryResolverException, QueryValidatorException, MetaMatrixComponentException {
String sqlQuery = requestMsg.getCommands()[0];
- prepPlan = prepPlanCache.getPreparedPlan(this.workContext.getConnectionID(), sqlQuery, requestMsg.isPreparedBatchUpdate());
+ prepPlan = prepPlanCache.getPreparedPlan(this.workContext.getConnectionID(), sqlQuery);
if (prepPlan == null) {
//if prepared plan does not exist, create one
- prepPlan = prepPlanCache.createPreparedPlan(this.workContext.getConnectionID(), sqlQuery, requestMsg.isPreparedBatchUpdate());
+ prepPlan = prepPlanCache.createPreparedPlan(this.workContext.getConnectionID(), sqlQuery);
LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query does not exist in cache: ", sqlQuery}); //$NON-NLS-1$
}
@@ -166,7 +151,7 @@
Command command = prepPlan.getCommand();
if (cachedPlan == null) {
- super.generatePlan();
+ prepPlan.setRewritenCommand(super.generatePlan());
if (!this.addedLimit) { //TODO: this is a little problematic
// Defect 13751: Clone the plan in its current state (i.e. before processing) so that it can be used for later queries
@@ -183,12 +168,88 @@
this.userCommand = command;
createCommandContext(command);
}
-
- // validate parameters values - right number and right type
- resolveParameterValues();
+
+ if (requestMsg.isPreparedBatchUpdate()) {
+ handlePreparedBatchUpdate();
+ } else {
+ List<Reference> params = prepPlan.getReferences();
+ List<?> values = requestMsg.getParameterValues();
+
+ resolveAndValidateParameters(command, params, values);
+ }
+ return prepPlan.getRewritenCommand();
+ }
+
+ /**
+ * There are two cases
+ * if
+ * The source supports preparedBatchUpdate -> just let the command and values pass to the source
+ * else
+ * create a batchedupdatecommand that represents the batch operation
+ * @param command
+ * @throws QueryMetadataException
+ * @throws MetaMatrixComponentException
+ * @throws QueryResolverException
+ * @throws QueryPlannerException
+ * @throws QueryValidatorException
+ */
+ private void handlePreparedBatchUpdate() throws QueryMetadataException,
+ MetaMatrixComponentException, QueryResolverException, QueryPlannerException, QueryValidatorException {
+ ProcessorPlan plan = this.processPlan;
+ List<List<?>> paramValues = requestMsg.getParameterValues();
+ if (paramValues.isEmpty()) {
+ throw new QueryValidatorException("No batch values sent for prepared batch update"); //$NON-NLS-1$
+ }
+ boolean supportPreparedBatchUpdate = false;
+ if (plan instanceof RelationalPlan) {
+ RelationalPlan rPlan = (RelationalPlan)plan;
+ if (rPlan.getRootNode() instanceof AccessNode) {
+ AccessNode aNode = (AccessNode)rPlan.getRootNode();
+ String modelName = aNode.getModelName();
+ SourceCapabilities caps = capabilitiesFinder.findCapabilities(modelName);
+ supportPreparedBatchUpdate = caps.supportsCapability(SourceCapabilities.Capability.PREPARED_BATCH_UPDATE);
+ }
+ }
+ CommandTreeNode ctn = new CommandTreeNode();
+ List<Command> commands = new LinkedList<Command>();
+ List<VariableContext> contexts = new LinkedList<VariableContext>();
+ for (List<?> values : paramValues) {
+ resolveAndValidateParameters(this.userCommand, this.prepPlan.getReferences(), values);
+ contexts.add(this.context.getVariableContext());
+ if(supportPreparedBatchUpdate){
+ continue; // -- TODO make this work
+ }
+ Command c = (Command)this.prepPlan.getRewritenCommand().clone();
+ commands.add(c);
+ CommandTreeNode child = new CommandTreeNode();
+ child.setCommand(c);
+ child.setProcessorPlan((ProcessorPlan)this.processPlan.clone());
+ ctn.addLastChild(child);
+ }
+
+ if (paramValues.size() > 1) {
+ this.context.setVariableContext(null);
+ }
+
+ if (supportPreparedBatchUpdate || paramValues.size() == 1) {
+ return; // just use the existing plan
+ }
+
+ BatchedUpdateCommand buc = new BatchedUpdateCommand(commands);
+ ctn.setCommand(buc);
+ ctn.setProperty(RelationalPlanner.VARIABLE_CONTEXTS, contexts);
+ BatchedUpdatePlanner planner = new BatchedUpdatePlanner();
+ this.processPlan = planner.optimize(ctn, idGenerator, metadata, capabilitiesFinder, analysisRecord, context);
+ }
+
+ private void resolveAndValidateParameters(Command command, List<Reference> params,
+ List<?> values) throws QueryResolverException,
+ MetaMatrixComponentException, QueryValidatorException {
+ // validate parameters values - right number and right type
+ PreparedStatementRequest.resolveParameterValues(params, values, this.context);
// call back to Request.validateQueryValues to ensure that bound references are valid
super.validateQueryValues(command);
- }
+ }
/**
* @param params
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -95,6 +95,7 @@
import com.metamatrix.query.sql.lang.StoredProcedure;
import com.metamatrix.query.sql.lang.XQuery;
import com.metamatrix.query.sql.symbol.Constant;
+import com.metamatrix.query.sql.symbol.Reference;
import com.metamatrix.query.sql.visitor.ReferenceCollectorVisitor;
import com.metamatrix.query.tempdata.TempTableStore;
import com.metamatrix.query.util.CommandContext;
@@ -121,15 +122,15 @@
private ProcessorDataManager processorDataManager;
private TransactionService transactionService;
private TempTableStore tempTableStore;
- private IDGenerator idGenerator = new IDGenerator();
+ protected IDGenerator idGenerator = new IDGenerator();
private boolean procDebugAllowed = false;
private Map connectorCapabilitiesCache;
DQPWorkContext workContext;
RequestID requestId;
// acquired state
- private CapabilitiesFinder capabilitiesFinder;
- private QueryMetadataInterface metadata;
+ protected CapabilitiesFinder capabilitiesFinder;
+ protected QueryMetadataInterface metadata;
private Set multiSourceModels;
// internal results
@@ -271,12 +272,11 @@
reqID,
groupName,
workContext.getUserName(),
- workContext.getTrustedPayload(),
requestMsg.getExecutionPayload(),
- workContext.getVdbName(),
+ workContext.getVdbName(),
workContext.getVdbVersion(),
- props,
- useProcDebug(command),
+ props,
+ useProcDebug(command),
collectNodeStatistics(command));
this.context.setProcessorBatchSize(bufferManager.getProcessorBatchSize());
this.context.setConnectorBatchSize(bufferManager.getConnectorBatchSize());
@@ -290,79 +290,21 @@
}
context.setSecurityFunctionEvaluator((SecurityFunctionEvaluator)this.env.findService(DQPServiceNames.AUTHORIZATION_SERVICE));
- if(requestMsg.isPreparedBatchUpdate()){
- context.setPreparedBatchUpdateValues(requestMsg.getParameterValues());
- }
context.setTempTableStore(tempTableStore);
context.setQueryProcessorFactory(this);
}
- /**
- * Side effects:
- * creates the analysis record
- * creates the command context
- * sets the pre-rewrite command on the request
- * adds a limit clause if the row limit is specified
- *
- * @return the post rewrite query
- * @throws QueryParserException
- * @throws QueryResolverException
- * @throws QueryValidatorException
- * @throws MetaMatrixComponentException
- */
- protected Command prepareCommand() throws QueryParserException,
- QueryResolverException,
- QueryValidatorException,
- MetaMatrixComponentException {
-
- Command command = getCommand();
-
- List references = ReferenceCollectorVisitor.getReferences(command);
-
- //there should be no reference (?) for query/update executed as statement
- checkReferences(references);
-
- createAnalysisRecord(command);
-
- resolveCommand(command, references);
-
- createCommandContext(command);
-
- validateQuery(command, true);
-
- validateQueryValues(command);
-
- Command preRewrite = command;
-
- command = QueryRewriter.rewrite(command, null, metadata, context);
-
- /*
- * Adds a row limit to a query if Statement.setMaxRows has been called and the command
- * doesn't already have a limit clause.
- */
- if (requestMsg.getRowLimit() > 0 && command instanceof QueryCommand) {
- QueryCommand query = (QueryCommand)command;
- if (query.getLimit() == null) {
- query.setLimit(new Limit(null, new Constant(new Integer(requestMsg.getRowLimit()), DataTypeManager.DefaultDataClasses.INTEGER)));
- this.addedLimit = true;
- }
- }
-
- this.userCommand = preRewrite;
- return command;
- }
-
- protected void checkReferences(List references) throws QueryValidatorException {
+ protected void checkReferences(List<Reference> references) throws QueryValidatorException {
referenceCheck(references);
}
- static void referenceCheck(List references) throws QueryValidatorException {
+ static void referenceCheck(List<Reference> references) throws QueryValidatorException {
if (references != null && !references.isEmpty()) {
throw new QueryValidatorException(DQPPlugin.Util.getString("Request.Invalid_character_in_query")); //$NON-NLS-1$
}
}
- protected void resolveCommand(Command command, List references) throws QueryResolverException, MetaMatrixComponentException {
+ protected void resolveCommand(Command command) throws QueryResolverException, MetaMatrixComponentException {
if (this.tempTableStore != null) {
QueryResolver.setChildMetadata(command, tempTableStore.getMetadataStore().getData(), null);
}
@@ -391,17 +333,15 @@
validateWithVisitor(visitor, metadata, command, false);
}
- private Command getCommand() throws QueryParserException {
+ private Command parseCommand() throws QueryParserException {
String[] commands = requestMsg.getCommands();
ParseInfo parseInfo = new ParseInfo();
- if (requestMsg.isDoubleQuotedVariableAllowed()) {
- parseInfo.allowDoubleQuotedVariable = true;
- }
+ parseInfo.allowDoubleQuotedVariable = requestMsg.isDoubleQuotedVariableAllowed();
if (!requestMsg.isBatchedUpdate()) {
String commandStr = commands[0];
return QueryParser.getQueryParser().parseCommand(commandStr, parseInfo);
}
- List parsedCommands = new ArrayList(commands.length);
+ List<Command> parsedCommands = new ArrayList<Command>(commands.length);
for (int i = 0; i < commands.length; i++) {
String updateCommand = commands[i];
parsedCommands.add(QueryParser.getQueryParser().parseCommand(updateCommand, parseInfo));
@@ -497,7 +437,11 @@
}
/**
- * side effects:
+ * state side effects:
+ * creates the analysis record
+ * creates the command context
+ * sets the pre-rewrite command on the request
+ * adds a limit clause if the row limit is specified
* sets the processor plan
*
* @throws MetaMatrixComponentException
@@ -506,9 +450,40 @@
* @throws QueryResolverException
* @throws QueryValidatorException
*/
- protected void generatePlan() throws MetaMatrixComponentException, QueryPlannerException, QueryParserException, QueryResolverException, QueryValidatorException {
- Command command = prepareCommand();
+ protected Command generatePlan() throws MetaMatrixComponentException, QueryPlannerException, QueryParserException, QueryResolverException, QueryValidatorException {
+ Command command = parseCommand();
+
+ List<Reference> references = ReferenceCollectorVisitor.getReferences(command);
+ //there should be no reference (?) for query/update executed as statement
+ checkReferences(references);
+
+ createAnalysisRecord(command);
+
+ resolveCommand(command);
+
+ createCommandContext(command);
+
+ validateQuery(command, true);
+
+ validateQueryValues(command);
+
+ this.userCommand = command;
+
+ command = QueryRewriter.rewrite(command, null, metadata, context);
+
+ /*
+ * Adds a row limit to a query if Statement.setMaxRows has been called and the command
+ * doesn't already have a limit clause.
+ */
+ if (requestMsg.getRowLimit() > 0 && command instanceof QueryCommand) {
+ QueryCommand query = (QueryCommand)command;
+ if (query.getLimit() == null) {
+ query.setLimit(new Limit(null, new Constant(new Integer(requestMsg.getRowLimit()), DataTypeManager.DefaultDataClasses.INTEGER)));
+ this.addedLimit = true;
+ }
+ }
+
try {
// If using multi-source models, insert a proxy to simplify the supported capabilities. This is
// done OUTSIDE the cache (wrapped around the cache) intentionally to avoid caching the simplified
@@ -538,6 +513,7 @@
String msg = DQPPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.", params); //$NON-NLS-1$
throw new QueryPlannerException(e, msg);
}
+ return command;
}
private void setSchemasForXMLPlan(Command command, QueryMetadataInterface metadata)
@@ -628,7 +604,7 @@
Command newCommand = QueryParser.getQueryParser().parseCommand(query, parseInfo);
QueryResolver.resolveCommand(newCommand, metadata);
- List references = ReferenceCollectorVisitor.getReferences(newCommand);
+ List<Reference> references = ReferenceCollectorVisitor.getReferences(newCommand);
referenceCheck(references);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -233,7 +233,7 @@
try {
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("0", "test", 5, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("0", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataManager);
processor.process();
fail("Expected error during processing, but got none."); //$NON-NLS-1$
@@ -312,7 +312,7 @@
Properties props = new Properties();
props.setProperty("soap_host", "my.host.com"); //$NON-NLS-1$ //$NON-NLS-2$
props.setProperty("soap_port", "12345"); //$NON-NLS-1$ //$NON-NLS-2$
- CommandContext context = new CommandContext("0", "test", "user", null, null, "myvdb", "1", props, DEBUG, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ CommandContext context = new CommandContext("0", "test", "user", null, "myvdb", "1", props, DEBUG, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
context.setProcessorBatchSize(2000);
context.setConnectorBatchSize(2000);
return context;
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestQueryProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/TestQueryProcessor.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/TestQueryProcessor.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -54,7 +54,7 @@
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
FakeDataManager dataManager = new FakeDataManager();
- CommandContext context = new CommandContext("pid", "group", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "group", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataManager);
while(true) {
@@ -171,7 +171,7 @@
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
FakeDataManager dataManager = new FakeDataManager();
- CommandContext context = new CommandContext("pid", "group", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "group", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
final QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataManager);
processor.setBatchHandler(new QueryProcessor.BatchHandler() {
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/eval/TestExpressionEvaluator.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/eval/TestExpressionEvaluator.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/eval/TestExpressionEvaluator.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -310,7 +310,7 @@
func.setFunctionDescriptor(desc);
FakeDataManager dataMgr = new FakeDataManager();
- CommandContext context = new CommandContext(new Long(1), null, -1, null, null, null, null);
+ CommandContext context = new CommandContext(new Long(1), null, null, null, null);
context.setUserName("logon"); //$NON-NLS-1$
assertEquals(context.getUserName(), new Evaluator(Collections.emptyMap(), dataMgr, context).evaluate(func, Collections.emptyList()) );
}
@@ -331,7 +331,7 @@
Properties props = new Properties();
props.setProperty("http_host", "testHostName"); //$NON-NLS-1$ //$NON-NLS-2$
props.setProperty("http_port", "8000"); //$NON-NLS-1$ //$NON-NLS-2$
- CommandContext context = new CommandContext(new Long(1), null, null, null, null, null, null, props, false, false);
+ CommandContext context = new CommandContext(new Long(1), null, null, null, null, null, props, false, false);
func.setArgs(new Expression[] {new Constant("http_host")}); //$NON-NLS-1$
assertEquals("testHostName", new Evaluator(Collections.emptyMap(), dataMgr, context).evaluate(func, Collections.emptyList())); //$NON-NLS-1$
@@ -353,7 +353,7 @@
func.setFunctionDescriptor(desc);
FakeDataManager dataMgr = new FakeDataManager();
- CommandContext context = new CommandContext(new Long(-1), null, "user", null, payload, "vdb", "1", null, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CommandContext context = new CommandContext(new Long(-1), null, "user", payload, "vdb", "1", null, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if(property != null) {
func.setArgs(new Expression[] {new Constant(property)});
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/proc/TestProcedureProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/proc/TestProcedureProcessor.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/proc/TestProcedureProcessor.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -115,7 +115,7 @@
// Process twice, testing reset and clone method of Processor plan
for (int i=1; i<=2; i++) {
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pID", null, 10, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pID", null, null, null, null); //$NON-NLS-1$
context.getNextRand(0);
context.setOptimisticTransaction(optimistic);
context.setProcessDebug(DEBUG);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestBatchedUpdateNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestBatchedUpdateNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestBatchedUpdateNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -22,14 +22,15 @@
package com.metamatrix.query.processor.relational;
+import static org.junit.Assert.*;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.junit.Test;
import org.mockito.Mockito;
-import junit.framework.TestCase;
-
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.buffer.BlockedException;
import com.metamatrix.common.buffer.BufferManager;
@@ -38,7 +39,9 @@
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.batch.TestBatchedUpdatePlanner;
import com.metamatrix.query.processor.ProcessorDataManager;
+import com.metamatrix.query.sql.lang.BatchedUpdateCommand;
import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.sql.visitor.NeedsEvaluationVisitor;
import com.metamatrix.query.unittest.FakeMetadataFactory;
import com.metamatrix.query.util.CommandContext;
@@ -46,14 +49,15 @@
/**
* @since 4.2
*/
-public class TestBatchedUpdateNode extends TestCase {
-
- public TestBatchedUpdateNode(String name) {
- super(name);
- }
-
+public class TestBatchedUpdateNode {
+
private BatchedUpdateNode helpGetNode(String[] sql, QueryMetadataInterface md, ProcessorDataManager pdm) throws Exception {
- BatchedUpdateNode node = new BatchedUpdateNode(1, TestBatchedUpdatePlanner.helpGetCommands(sql, md), "myModelName"); //$NON-NLS-1$
+ List<Command> commands = TestBatchedUpdatePlanner.helpGetCommands(sql, md);
+ List<Boolean> shouldEvaluate = new ArrayList<Boolean>(commands.size());
+ for (Command command : commands) {
+ shouldEvaluate.add(NeedsEvaluationVisitor.needsEvaluation(command));
+ }
+ BatchedUpdateNode node = new BatchedUpdateNode(1, commands, null, shouldEvaluate, "myModelName"); //$NON-NLS-1$
CommandContext context = new CommandContext();
context.setProcessorID("myProcessorID"); //$NON-NLS-1$
node.initialize(context, Mockito.mock(BufferManager.class), pdm);
@@ -72,31 +76,28 @@
assertEquals(Arrays.asList(expectedCommands), pdm.commands);
}
- private void helpTestNextBatch(String[] commands, int[] expectedResults) throws Exception {
+ private FakePDM helpTestNextBatch(String[] commands, int[] expectedResults) throws Exception {
int numExecutedCommands = 0;
for (int i = 0; i < expectedResults.length; i++) {
numExecutedCommands += expectedResults[i];
}
- BatchedUpdateNode node = helpOpen(commands, new FakePDM(numExecutedCommands));
- try {
- TupleBatch batch = node.nextBatch();
- assertNotNull(batch);
- assertTrue(batch.getTerminationFlag());
- assertEquals(expectedResults.length, batch.getRowCount());
- for (int i = 0; i < expectedResults.length; i++) {
- List tuple = batch.getTuple(i+1);
- assertNotNull(tuple);
- Object result = tuple.get(0);
- assertNotNull(result);
- assertEquals(new Integer(expectedResults[i]), result);
- }
- } catch (BlockedException e) {
- e.printStackTrace();
- fail("Should not have blocked on call to nextBatch()");//$NON-NLS-1$
+ FakePDM fakePDM = new FakePDM(numExecutedCommands);
+ BatchedUpdateNode node = helpOpen(commands, fakePDM);
+ TupleBatch batch = node.nextBatch();
+ assertNotNull(batch);
+ assertTrue(batch.getTerminationFlag());
+ assertEquals(expectedResults.length, batch.getRowCount());
+ for (int i = 0; i < expectedResults.length; i++) {
+ List tuple = batch.getTuple(i+1);
+ assertNotNull(tuple);
+ Object result = tuple.get(0);
+ assertNotNull(result);
+ assertEquals(new Integer(expectedResults[i]), result);
}
+ return fakePDM;
}
- public void testOpen1() throws Exception {
+ @Test public void testOpen1() throws Exception {
String[] sql = {"INSERT INTO pm1.g1 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)", //$NON-NLS-1$
"INSERT INTO pm1.g2 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)" //$NON-NLS-1$
};
@@ -104,7 +105,7 @@
helpTestOpen(sql, expectedCommands);
}
- public void testOpen2() throws Exception {
+ @Test public void testOpen2() throws Exception {
String[] sql = {"INSERT INTO pm1.g1 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)", //$NON-NLS-1$
"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE e2 = 50", //$NON-NLS-1$
@@ -114,7 +115,7 @@
helpTestOpen(sql, expectedCommands);
}
- public void testOpenAllCommandsExecuted() throws Exception {
+ @Test public void testOpenAllCommandsExecuted() throws Exception {
String[] sql = {"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE e2 = 50", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE e1 = 'myrow'" //$NON-NLS-1$
@@ -123,7 +124,7 @@
helpTestOpen(sql, expectedCommands);
}
- public void testOpenNoCommandsExecuted() throws Exception {
+ @Test public void testOpenNoCommandsExecuted() throws Exception {
String[] sql = {"UPDATE pm1.g1 SET e2 = 50 WHERE 1 = 0", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE 1 = 0", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE 1 = 0" //$NON-NLS-1$
@@ -132,7 +133,7 @@
helpTestOpen(sql, expectedCommands);
}
- public void testOpenSomeCommandsExecuted() throws Exception {
+ @Test public void testOpenSomeCommandsExecuted() throws Exception {
String[] sql = {"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE 1 = 0", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE e1 = 'myrow'" //$NON-NLS-1$
@@ -141,7 +142,7 @@
helpTestOpen(sql, expectedCommands);
}
- public void testNextBatch1() throws Exception {
+ @Test public void testNextBatch1() throws Exception {
String[] commands = {"INSERT INTO pm1.g1 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)", //$NON-NLS-1$
"INSERT INTO pm1.g2 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)" //$NON-NLS-1$
};
@@ -149,7 +150,7 @@
helpTestNextBatch(commands, expectedResults);
}
- public void testNextBatch2() throws Exception {
+ @Test public void testNextBatch2() throws Exception {
String[] commands = {"INSERT INTO pm1.g1 (e1, e2, e3, e4) values ('string1', 1, {b'true'}, 1.0)", //$NON-NLS-1$
"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE e2 = 50", //$NON-NLS-1$
@@ -159,7 +160,7 @@
helpTestNextBatch(commands, expectedResults);
}
- public void testNextBatchAllcommandsExecuted() throws Exception {
+ @Test public void testNextBatchAllcommandsExecuted() throws Exception {
String[] commands = {"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE e2 = 50", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE e1 = 'myrow'" //$NON-NLS-1$
@@ -168,7 +169,7 @@
helpTestNextBatch(commands, expectedResults);
}
- public void testNextBatchNoCommandsExecuted() throws Exception {
+ @Test public void testNextBatchNoCommandsExecuted() throws Exception {
String[] commands = {"UPDATE pm1.g1 SET e2 = 50 WHERE 1 = 0", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE 1 = 0", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE 1 = 0" //$NON-NLS-1$
@@ -177,7 +178,7 @@
helpTestNextBatch(commands, expectedResults);
}
- public void testNextBatchSomeCommandsExecuted() throws Exception {
+ @Test public void testNextBatchSomeCommandsExecuted() throws Exception {
String[] commands = {"UPDATE pm1.g1 SET e2 = 50 WHERE e1 = 'criteria'", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE 1 = 0", //$NON-NLS-1$
"UPDATE pm1.g2 set e2 = 5, e3 = {b'false'}, e4 = 3.33 WHERE e1 = 'myrow'", //$NON-NLS-1$
@@ -187,9 +188,18 @@
helpTestNextBatch(commands, expectedResults);
}
+ @Test public void testNextBatchCommandNeedsEvaluated() throws Exception {
+ String[] commands = {"INSERT INTO pm1.g1 (e1, e2, e3, e4) values (commandpayload(), 1, {b'true'}, 1.0)" //$NON-NLS-1$
+ };
+ int[] expectedResults = {1};
+ FakePDM fpdm = helpTestNextBatch(commands, expectedResults);
+ assertEquals("INSERT INTO pm1.g1 (e1, e2, e3, e4) VALUES (null, 1, TRUE, 1.0)", ((BatchedUpdateCommand)fpdm.actualCommands.get(0)).getContainedCommands().get(0).toString()); //$NON-NLS-1$
+ }
+
private static final class FakePDM implements ProcessorDataManager {
private int numExecutedCommands;
- private List commands = new ArrayList();
+ private List<String> commands = new ArrayList<String>();
+ private List<Command> actualCommands = new ArrayList<Command>();
private FakePDM(int numExecutedCommands) {
this.numExecutedCommands = numExecutedCommands;
}
@@ -199,6 +209,7 @@
assertEquals("myModelName", modelName); //$NON-NLS-1$
assertEquals(1, nodeID);
commands.add(command.toString());
+ actualCommands.add(command);
return new FakeTupleSource(numExecutedCommands);
}
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestGroupingNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestGroupingNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestGroupingNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -158,7 +158,7 @@
List groupingElements = new ArrayList();
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] expected = new List[] {
@@ -192,7 +192,7 @@
List groupingElements = new ArrayList();
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] expected = new List[] {
@@ -228,7 +228,7 @@
List groupingElements = new ArrayList();
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] expected = new List[] {
@@ -260,7 +260,7 @@
// Set grouping elements to null
node.setGroupingElements(null);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] data = new List[] {
@@ -301,7 +301,7 @@
List groupingElements = new ArrayList();
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] data = new List[] {
@@ -350,7 +350,7 @@
List groupingElements = new ArrayList();
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
FakeDataManager dataMgr = new FakeDataManager();
dataMgr.setThrowBlocked(true);
@@ -399,7 +399,7 @@
groupingElements.add(new ElementSymbol("col1")); //$NON-NLS-1$
node.setGroupingElements(groupingElements);
}
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
node.initialize(context, mgr, null);
List[] data = new List[] {
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestJoinNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestJoinNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestJoinNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -227,7 +227,7 @@
public void helpTestJoinDirect(List[] expectedResults, boolean swapExpected) throws MetaMatrixComponentException, MetaMatrixProcessingException {
helpCreateJoin();
BufferManager mgr = NodeTestUtil.getTestBufferManager(1, getProcessorBatchSize());
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
join.addChild(leftNode);
join.addChild(rightNode);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestProjectNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestProjectNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestProjectNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -63,7 +63,7 @@
public ProjectNode helpSetupProject(List elements, List[] data, List childElements, ProcessorDataManager dataMgr) throws MetaMatrixComponentException {
BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
FakeRelationalNode dataNode = new FakeRelationalNode(2, data);
dataNode.setElements(childElements);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestRelationalNodeStatistics.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestRelationalNodeStatistics.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestRelationalNodeStatistics.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -116,7 +116,7 @@
FakeRelationalNode fakeNode = new FakeRelationalNode(1, data, 100);
fakeNode.setElements(elements);
- CommandContext context = new CommandContext("pid", "group", null, null, null, null, null, null, false, true); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "group", null, null, null, null, null, false, true); //$NON-NLS-1$ //$NON-NLS-2$
fakeNode.initialize(context, BufferManagerFactory.getStandaloneBufferManager(), null);
return fakeNode;
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSelectNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -67,7 +67,7 @@
public void helpTestSelect(List elements, Criteria criteria, List childElements, ProcessorDataManager dataMgr, List[] expected, RelationalNode child) throws MetaMatrixComponentException, MetaMatrixProcessingException {
BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
child.setElements(childElements);
child.initialize(context, mgr, dataMgr);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -63,7 +63,7 @@
impl.getConfig().setTotalAvailableMemory(bytesInMemory);
impl.getConfig().setGroupUsePercentage(100);
impl.getConfig().setManagementInterval(0);
- CommandContext context = new CommandContext ("pid", "test", BATCH_SIZE, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext ("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
FakeRelationalNode dataNode = new FakeRelationalNode(2, data);
dataNode.setElements(elements);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestUnionAllNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestUnionAllNode.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestUnionAllNode.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -51,7 +51,7 @@
public void helpTestUnion(RelationalNode[] children, RelationalNode union, List[] expected) throws MetaMatrixComponentException, MetaMatrixProcessingException {
BufferManager mgr = NodeTestUtil.getTestBufferManager(1, 2);
- CommandContext context = new CommandContext("pid", "test", 100, null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ CommandContext context = new CommandContext("pid", "test", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$
for(int i=0; i<children.length; i++) {
union.addChild(children[i]);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestInstructions.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestInstructions.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestInstructions.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -348,7 +348,7 @@
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
XMLPlan temp = new XMLPlan(env);
- CommandContext context = new CommandContext("pid", null, 100, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pid", null, null, null, null); //$NON-NLS-1$
temp.initialize(context,null,bufferMgr);
List schema = new ArrayList();
@@ -404,7 +404,7 @@
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
XMLPlan temp = new XMLPlan(env);
- CommandContext context = new CommandContext("pid", null, 100, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pid", null, null, null, null); //$NON-NLS-1$
temp.initialize(context,null,bufferMgr);
env.addData(resultSetName, command.getProjectedSymbols(), new List[] {
Arrays.asList( new Object[] { "001", "Lamp", new Integer(5) } ), //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -2966,7 +2966,7 @@
// Process twice, to test reset and clone methods
for (int i=1; i<=2; i++) {
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pID", "TestConn", 10, "testUser", null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CommandContext context = new CommandContext("pID", "TestConn", "testUser", null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
context.setProcessDebug(DEBUG);
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
@@ -3012,7 +3012,7 @@
XMLPlan plan = (XMLPlan)QueryOptimizer.optimizePlan(command, metadata, null, new DefaultCapabilitiesFinder(), analysisRecord, null);
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pID", null, 10, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pID", null, null, null, null); //$NON-NLS-1$
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
processor.process();
} catch (Exception e){
@@ -3056,7 +3056,7 @@
}
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pID", null, 10, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pID", null, null, null, null); //$NON-NLS-1$
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
processor.process();
@@ -6063,7 +6063,7 @@
XMLPlan plan = TestXMLPlanner.preparePlan(command, metadata, new DefaultCapabilitiesFinder(), null);
BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
- CommandContext context = new CommandContext("pID", null, 10, null, null, null, null); //$NON-NLS-1$
+ CommandContext context = new CommandContext("pID", null, null, null, null); //$NON-NLS-1$
QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
MetaMatrixComponentException failOnDefaultException = null;
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCodeTableCache.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCodeTableCache.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCodeTableCache.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -38,8 +38,8 @@
*/
public class TestCodeTableCache extends TestCase {
- private static CommandContext TEST_CONTEXT = new CommandContext("pid", "1", 5, null, null, "test", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private static CommandContext TEST_CONTEXT_1 = new CommandContext("pid", "1", 5, null, null, "test", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ private static CommandContext TEST_CONTEXT = new CommandContext("pid", "1", null, "test", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ private static CommandContext TEST_CONTEXT_1 = new CommandContext("pid", "1", null, "test", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
public TestCodeTableCache(String name) {
super(name);
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedPlanCache.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -52,11 +52,11 @@
PreparedPlanCache cache = new PreparedPlanCache();
//No PreparedPlan at the begining
- assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 1, false));
+ assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 1));
//create one
- cache.createPreparedPlan(token, EXAMPLE_QUERY + 1, false);
+ cache.createPreparedPlan(token, EXAMPLE_QUERY + 1);
//should have one now
- assertNotNull("Unable to get prepared plan from cache", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1, false)); //$NON-NLS-1$
+ assertNotNull("Unable to get prepared plan from cache", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1)); //$NON-NLS-1$
}
public void testGetPreparedPlan(){
@@ -65,7 +65,7 @@
helpCreatePreparedPlans(cache, token2, 0, 15);
//read an entry for session2 (token2)
- PreparedPlanCache.PreparedPlan pPlan = cache.getPreparedPlan(token2, EXAMPLE_QUERY + 12, false);
+ PreparedPlanCache.PreparedPlan pPlan = cache.getPreparedPlan(token2, EXAMPLE_QUERY + 12);
assertNotNull("Unable to get prepared plan from cache", pPlan); //$NON-NLS-1$
assertEquals("Error getting plan from cache", new RelationalPlan(new ProjectNode(12)).toString(), pPlan.getPlan().toString()); //$NON-NLS-1$
assertEquals("Error getting command from cache", EXAMPLE_QUERY + 12, pPlan.getCommand().toString()); //$NON-NLS-1$
@@ -77,27 +77,27 @@
PreparedPlanCache cache = new PreparedPlanCache();
//create one for each session token
- cache.createPreparedPlan(token, EXAMPLE_QUERY + 1, false);
- cache.createPreparedPlan(token2, EXAMPLE_QUERY + 1, false);
+ cache.createPreparedPlan(token, EXAMPLE_QUERY + 1);
+ cache.createPreparedPlan(token2, EXAMPLE_QUERY + 1);
//should have one
- assertNotNull("Unable to get prepared plan from cache for token", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1, false)); //$NON-NLS-1$
+ assertNotNull("Unable to get prepared plan from cache for token", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1)); //$NON-NLS-1$
cache.clearAll();
//should not exist for token
- assertNull("Failed remove from cache", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1, false)); //$NON-NLS-1$
+ assertNull("Failed remove from cache", cache.getPreparedPlan(token, EXAMPLE_QUERY + 1)); //$NON-NLS-1$
//should not exist for token2
- assertNull("Unable to get prepared plan from cache for token2", cache.getPreparedPlan(token2, EXAMPLE_QUERY + 1, false)); //$NON-NLS-1$
+ assertNull("Unable to get prepared plan from cache for token2", cache.getPreparedPlan(token2, EXAMPLE_QUERY + 1)); //$NON-NLS-1$
}
public void testMaxSize(){
PreparedPlanCache cache = new PreparedPlanCache(100);
helpCreatePreparedPlans(cache, token, 0, 101);
//the first one should be gone because the max size is 100
- assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 0, false));
+ assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 0));
- assertNotNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 12, false));
+ assertNotNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 12));
helpCreatePreparedPlans(cache, token, 102, 50);
//"sql12" should still be there based on lru policy
- assertNotNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 12, false));
+ assertNotNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 12));
helpCreatePreparedPlans(cache, token2, 0, 121);
helpCreatePreparedPlans(cache, token, 0, 50);
@@ -111,12 +111,12 @@
// Add 1 plan and verify it is not in the cache
helpCreatePreparedPlans(cache, token, 0, 1);
- assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 0, false));
+ assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 0));
assertEquals(0, cache.getSpaceUsed());
// Add another plan and verify it is not in the cache
helpCreatePreparedPlans(cache, token, 1, 1);
- assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 1, false));
+ assertNull(cache.getPreparedPlan(token, EXAMPLE_QUERY + 1));
assertEquals(0, cache.getSpaceUsed());
}
@@ -138,7 +138,7 @@
} catch (QueryParserException e) {
throw new RuntimeException(e);
}
- PreparedPlanCache.PreparedPlan pPlan = cache.createPreparedPlan(token, dummy.toString(), false);
+ PreparedPlanCache.PreparedPlan pPlan = cache.createPreparedPlan(token, dummy.toString());
pPlan.setCommand(dummy);
pPlan.setPlan(new RelationalPlan(new ProjectNode(i)));
Map props = new HashMap();
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -69,9 +69,8 @@
@Override
public synchronized PreparedPlan getPreparedPlan(
- String clientConn, String sql,
- boolean isPreparedBatchUpdate) {
- PreparedPlan plan = super.getPreparedPlan(clientConn, sql, isPreparedBatchUpdate);
+ String clientConn, String sql) {
+ PreparedPlan plan = super.getPreparedPlan(clientConn, sql);
if (plan != null && plan.getPlan() != null) {
hitCount++;
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/multisource/TestMultiSourcePlanToProcessConverter.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -120,7 +120,7 @@
idGenerator.setDefaultFactory(new IntegerIDFactory());
Properties props = new Properties();
- CommandContext context = new CommandContext("0", "test", "user", null, null, vdbName, vdbVersion, props, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CommandContext context = new CommandContext("0", "test", "user", null, vdbName, vdbVersion, props, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
context.setPlanToProcessConverter(new MultiSourcePlanToProcessConverter(metadata, idGenerator, analysis, finder, multiSourceModels, vdbName, vdbService, vdbVersion));
ProcessorPlan plan = QueryOptimizer.optimizePlan(command, wrapper, idGenerator, finder, analysis, context);
Modified: trunk/test-integration/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java
===================================================================
--- trunk/test-integration/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java 2009-04-16 17:33:22 UTC (rev 787)
+++ trunk/test-integration/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java 2009-04-16 18:13:00 UTC (rev 788)
@@ -152,7 +152,7 @@
protected CommandContext createCommandContext() {
Properties props = new Properties();
//props.setProperty(ContextProperties.SOAP_HOST, "my.host.com"); //$NON-NLS-1$
- CommandContext context = new CommandContext("0", "test", "user", null, null, "myvdb", "1", props, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ CommandContext context = new CommandContext("0", "test", "user", null, "myvdb", "1", props, false, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
return context;
}
15 years, 8 months
teiid SVN: r787 - in trunk/client-jdbc/src: test/java/com/metamatrix/jdbc and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-04-16 13:33:22 -0400 (Thu, 16 Apr 2009)
New Revision: 787
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMStatement.java
Log:
TEIID-495 correcting the regression that prevents statement batched updates.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java 2009-04-16 16:26:10 UTC (rev 786)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMCallableStatement.java 2009-04-16 17:33:22 UTC (rev 787)
@@ -84,8 +84,7 @@
@Override
protected RequestMessage createRequestMessage(String[] commands,
- boolean isBatchedCommand, Boolean requiresResultSet)
- throws MMSQLException {
+ boolean isBatchedCommand, Boolean requiresResultSet) {
RequestMessage message = super.createRequestMessage(commands, isBatchedCommand, requiresResultSet);
message.setCallableStatement(true);
message.setPreparedStatement(false);
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-04-16 16:26:10 UTC (rev 786)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-04-16 17:33:22 UTC (rev 787)
@@ -125,46 +125,10 @@
public final static String JDBC_SYSTEM_MODEL_NAME = "System.JDBC"; //$NON-NLS-1$
}
- // decodeString mappings
private static final String TYPE_MAPPING;
-// new StringBuffer( MMJDBCSQLTypeInfo.STRING) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.STRING)) //$NON-NLS-1$
-// .append(",").append(MMJDBCSQLTypeInfo.INTEGER) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.INTEGER)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BOOLEAN) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.BOOLEAN)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.DATE) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.DATE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.TIME) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.TIME)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.TIMESTAMP) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.TIMESTAMP)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.DOUBLE) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.DOUBLE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.FLOAT) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.FLOAT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BIGDECIMAL) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.BIGDECIMAL)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BYTE) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.BYTE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.SHORT) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.SHORT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.LONG) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.LONG)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.CLOB) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.CLOB)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BLOB) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.BLOB)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BIGINTEGER) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.BIGINTEGER)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.CHAR) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.CHAR)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.OBJECT) .append(",").append(MMJDBCSQLTypeInfo.getSQLType(MMJDBCSQLTypeInfo.OBJECT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .toString();
private static final String PRECISION_MAPPING;
-// new StringBuffer( MMJDBCSQLTypeInfo.STRING) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.STRING)) //$NON-NLS-1$
-// .append(",").append(MMJDBCSQLTypeInfo.INTEGER) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.INTEGER)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BOOLEAN) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.BOOLEAN)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.DATE) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.DATE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.TIME) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.TIME)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.TIMESTAMP) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.TIMESTAMP)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.DOUBLE) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.DOUBLE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.FLOAT) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.FLOAT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BIGDECIMAL) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.BIGDECIMAL)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BYTE) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.BYTE)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.SHORT) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.SHORT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.LONG) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.LONG)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.CLOB) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.CLOB)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BLOB) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.BLOB)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.BIGINTEGER) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.BIGINTEGER)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.CHAR) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.CHAR)) //$NON-NLS-1$ //$NON-NLS-2$
-// .append(",").append(MMJDBCSQLTypeInfo.OBJECT) .append(",").append(ResultsMetadataDefaults.getDefaultPrecision(MMJDBCSQLTypeInfo.OBJECT)) //$NON-NLS-1$ //$NON-NLS-2$
-// .toString();
+
static {
String[] internalTypes = MMJDBCSQLTypeInfo.getMMTypeNames();
StringBuffer typeMapping = new StringBuffer();
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java 2009-04-16 16:26:10 UTC (rev 786)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMPreparedStatement.java 2009-04-16 17:33:22 UTC (rev 787)
@@ -201,8 +201,7 @@
@Override
protected RequestMessage createRequestMessage(String[] commands,
- boolean isBatchedCommand, Boolean requiresResultSet)
- throws MMSQLException {
+ boolean isBatchedCommand, Boolean requiresResultSet) {
RequestMessage message = super.createRequestMessage(commands, false, requiresResultSet);
message.setPreparedStatement(true);
message.setParameterValues(isBatchedCommand?getParameterValuesList(): getParameterValues());
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java 2009-04-16 16:26:10 UTC (rev 786)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMStatement.java 2009-04-16 17:33:22 UTC (rev 787)
@@ -32,7 +32,6 @@
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashMap;
@@ -443,11 +442,7 @@
}
protected RequestMessage createRequestMessage(String[] commands,
- boolean isBatchedCommand, Boolean requiresResultSet)
- throws MMSQLException {
- if (isBatchedCommand || requiresResultSet == Boolean.FALSE) {
- throw new MMSQLException(JDBCPlugin.Util.getString("MMStatement.Operation_Not_Supported", Arrays.asList(commands))); //$NON-NLS-1$
- }
+ boolean isBatchedCommand, Boolean requiresResultSet) {
RequestMessage reqMessage = new RequestMessage();
reqMessage.setCommands(commands);
reqMessage.setBatchedUpdate(isBatchedCommand);
Modified: trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMStatement.java
===================================================================
--- trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMStatement.java 2009-04-16 16:26:10 UTC (rev 786)
+++ trunk/client-jdbc/src/test/java/com/metamatrix/jdbc/TestMMStatement.java 2009-04-16 17:33:22 UTC (rev 787)
@@ -22,11 +22,20 @@
package com.metamatrix.jdbc;
+import static org.junit.Assert.*;
+
import java.sql.ResultSet;
+import java.util.Arrays;
+import java.util.List;
import org.junit.Test;
import org.mockito.Mockito;
+import com.metamatrix.dqp.client.ClientSideDQP;
+import com.metamatrix.dqp.client.ResultsFuture;
+import com.metamatrix.dqp.message.RequestMessage;
+import com.metamatrix.dqp.message.ResultsMessage;
+
public class TestMMStatement {
@Test(expected=MMSQLException.class) public void testUpdateException() throws Exception {
@@ -34,4 +43,20 @@
statement.executeQuery("delete from table"); //$NON-NLS-1$
}
+ @Test public void testBatchExecution() throws Exception {
+ MMConnection conn = Mockito.mock(MMConnection.class);
+ ClientSideDQP dqp = Mockito.mock(ClientSideDQP.class);
+ ResultsFuture<ResultsMessage> results = new ResultsFuture<ResultsMessage>();
+ Mockito.stub(dqp.executeRequest(Mockito.anyLong(), (RequestMessage)Mockito.anyObject())).toReturn(results);
+ ResultsMessage rm = new ResultsMessage();
+ rm.setResults(new List<?>[] {Arrays.asList(1), Arrays.asList(2)});
+ rm.setUpdateResult(true);
+ results.getResultsReceiver().receiveResults(rm);
+ Mockito.stub(conn.getDQP()).toReturn(dqp);
+ MMStatement statement = new MMStatement(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+ statement.addBatch("delete from table"); //$NON-NLS-1$
+ statement.addBatch("delete from table1"); //$NON-NLS-1$
+ assertTrue(Arrays.equals(new int[] {1, 2}, statement.executeBatch()));
+ }
+
}
15 years, 8 months
teiid SVN: r786 - in trunk: connector-api/src/main/java/org/teiid/connector/api and 21 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-04-16 12:26:10 -0400 (Thu, 16 Apr 2009)
New Revision: 786
Added:
trunk/connector-api/src/main/java/org/teiid/connector/api/CacheScope.java
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
trunk/engine/src/test/java/org/teiid/dqp/internal/cache/TestDQPContextCache.java
Modified:
trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java
trunk/connector-api/src/main/java/org/teiid/connector/api/ConnectorEnvironment.java
trunk/connector-api/src/main/java/org/teiid/connector/api/ExecutionContext.java
trunk/console/
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/EmbeddedConfigSource.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java
trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java
trunk/engine/src/main/java/com/metamatrix/cache/Cache.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorEnvironmentImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ExecutionContextImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
trunk/engine/src/test/java/com/metamatrix/cache/FakeCache.java
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeBufferService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeExecutionContextImpl.java
trunk/server/src/main/java/com/metamatrix/server/ResourceFinder.java
trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
trunk/server/src/main/java/com/metamatrix/server/dqp/config/PlatformConfigSource.java
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformBufferService.java
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformVDBService.java
trunk/server/src/test/java/com/metamatrix/platform/security/api/TestAuthorizationCache.java
trunk/server/src/test/java/com/metamatrix/platform/security/authorization/service/TestAuthorizationServiceImpl.java
trunk/server/src/test/java/com/metamatrix/platform/security/session/service/TestSessionServiceImpl.java
Log:
TEIID-444: Exposing the Cache to the Connectors. The cache implementation is based on the JBoss Cache. This cache is also context based cache, which provides connector developers with REQUEST/SESSION/SERVICE/VDB/GLOBAL scoped caches for their use. This cache can also be used in the engine with the same scopes.
Modified: trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/cache-jbosscache/src/main/java/com/metamatrix/cache/jboss/JBossCache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -173,5 +173,10 @@
public boolean removeChild(String name) {
Node<K, V> node = this.cacheStore.getNode(this.rootFqn);
return node.removeChild(Fqn.fromString(name));
+ }
+
+ @Override
+ public String getName() {
+ return this.rootFqn.toString();
}
}
Added: trunk/connector-api/src/main/java/org/teiid/connector/api/CacheScope.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/api/CacheScope.java (rev 0)
+++ trunk/connector-api/src/main/java/org/teiid/connector/api/CacheScope.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -0,0 +1,46 @@
+/*
+ * 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 org.teiid.connector.api;
+
+import java.io.Serializable;
+
+/**
+ * Cache Scope
+ *
+ * REQUEST - Items placed in this scope are retained until the end of the top level request. The items to be placed
+ * does not need to implement {@link Serializable}, however recommended. These items are not replicated across the cluster.
+ * SERVICE - Items from this scope are available to the identified connector
+ *
+ * All the items placed in the below scopes must be {@link Serializable}, as they are replicated across cluster.
+ *
+ * SESSION - Items placed in the scope retained until the particular User's session of top level request is alive.
+ * VDB - Items placed with this scope retained until the life of the VDB;
+ *
+ * GLOBAL - Items placed in this will available to all until the Query Service is recycled.
+ */
+public enum CacheScope {
+ REQUEST,
+ SERVICE,
+ SESSION,
+ VDB,
+ GLOBAL;
+}
Property changes on: trunk/connector-api/src/main/java/org/teiid/connector/api/CacheScope.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/connector-api/src/main/java/org/teiid/connector/api/ConnectorEnvironment.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/api/ConnectorEnvironment.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/connector-api/src/main/java/org/teiid/connector/api/ConnectorEnvironment.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -86,4 +86,26 @@
long initialDelay,
long period,
TimeUnit unit);
+
+
+ /**
+ * Get the item from cache based on the scope provided; The required information like session-id, or vdb-name etc
+ * are gleaned from runtime context. If such information is not available then error will be raised.
+ * @param scope - scope of the cache; {@link CacheScope.REQUEST}, scope is not supported, as request information is not
+ * visible. use ExecutionContext.
+ * on {@link ExecutionContext}
+ * @param key
+ * @return
+ */
+ Object getFromCache(CacheScope scope, Object key);
+
+ /**
+ * Store the item in the cache based on the scope provided.The required information like session-id, or vdb-name etc
+ * are gleaned from runtime context. If such information is not available then error will be raised.
+ * @param scope - scope of the cache; {@link CacheScope.REQUEST}, scope is not supported.
+ * on {@link ExecutionContext}
+ * @param key
+ * @param value
+ */
+ void storeInCache(CacheScope scope, Object key, Object value);
}
Modified: trunk/connector-api/src/main/java/org/teiid/connector/api/ExecutionContext.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/connector/api/ExecutionContext.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/connector-api/src/main/java/org/teiid/connector/api/ExecutionContext.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -152,4 +152,18 @@
boolean isTransactional();
+ /**
+ * Get a item that has been placed previously from cache. If no such object then a null will be returned.
+ * The item is placed in {@link CacheScope.REQUEST} scope.
+ * @param key
+ * @return
+ */
+ Object get(Object key);
+
+ /**
+ * Place a item in the Cache in {@link CacheScope.REQUEST} scope.
+ * @param key
+ * @param value
+ */
+ void put(Object key, Object value);
}
Property changes on: trunk/console
___________________________________________________________________
Name: svn:ignore
- target
.project
.settings
.classpath
+ target
.project
.settings
.classpath
console_pref.properties
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/EmbeddedConfigSource.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/EmbeddedConfigSource.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/EmbeddedConfigSource.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -29,7 +29,10 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
import com.google.inject.Binder;
+import com.google.inject.Inject;
import com.metamatrix.common.application.ApplicationService;
import com.metamatrix.common.application.DQPConfigSource;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
@@ -59,6 +62,9 @@
private Properties props;
private boolean useTxn;
+ @Inject
+ DQPContextCache contextCache;
+
/**
* Based the configuration file load the DQP services
* @param configFile
@@ -90,9 +96,7 @@
in.close();
// Merge any user properties with the mm.properties
- if (connectionProperties != null) {
- props.putAll(connectionProperties);
- }
+ props.putAll(connectionProperties);
// this will resolve any nested properties in the properties
// file; this created for testing purpose
@@ -136,7 +140,9 @@
@Override
public void updateBindings(Binder binder) {
-
+ if (contextCache != null) {
+ binder.bind(DQPContextCache.class).toInstance(contextCache);
+ }
}
@Override
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -26,7 +26,14 @@
import java.io.IOException;
import java.util.Properties;
+import org.teiid.connector.api.CacheScope;
+import org.teiid.connector.api.ExecutionContext;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+
+import com.google.inject.Inject;
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.cache.Cache;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
@@ -58,6 +65,9 @@
// Instance
private BufferManager bufferMgr;
private File bufferDir;
+
+ @Inject
+ private DQPContextCache contextCache;
/**
* @param props
@@ -156,4 +166,9 @@
public BufferManager getBufferManager() {
return this.bufferMgr;
}
+
+ @Override
+ public DQPContextCache getContextCache() {
+ return this.contextCache;
+ }
}
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -31,6 +31,11 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.connector.api.CacheScope;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+
+import com.google.inject.Inject;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
@@ -42,7 +47,12 @@
import com.metamatrix.common.vdb.api.VDBDefn;
import com.metamatrix.core.util.StringUtil;
import com.metamatrix.core.vdb.VDBStatus;
+import com.metamatrix.dqp.ResourceFinder;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
+import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
+import com.metamatrix.dqp.service.BufferService;
+import com.metamatrix.dqp.service.DQPServiceNames;
+import com.metamatrix.dqp.service.VDBLifeCycleListener;
import com.metamatrix.dqp.service.VDBService;
import com.metamatrix.vdb.runtime.BasicModelInfo;
import com.metamatrix.vdb.runtime.BasicVDBDefn;
@@ -52,9 +62,12 @@
* A VDBService implementation for Embedded DQP.
* @since 4.3
*/
-public class EmbeddedVDBService extends EmbeddedBaseDQPService implements VDBService {
+public class EmbeddedVDBService extends EmbeddedBaseDQPService implements VDBService, VDBLifeCycleListener {
static final String[] VDB_STATUS = {"INCOMPLETE", "INACTIVE", "ACTIVE", "DELETED"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
+
+ @Inject
+ private DQPContextCache contextCache;
+
/**
* Find the VDB in the list of VDBs available
* @param name
@@ -300,6 +313,7 @@
public void startService(ApplicationEnvironment environment) throws ApplicationLifecycleException {
// deploying VDB at this stage created issues with data service prematurely
// asking for unfinished VDB and starting it
+ getConfigurationService().register(this);
}
/**
@@ -307,5 +321,14 @@
* @since 4.3
*/
public void stopService() throws ApplicationLifecycleException {
- }
+ }
+
+ @Override
+ public void loaded(String vdbName, String vdbVersion) {
+ }
+
+ @Override
+ public void unloaded(String vdbName, String vdbVersion) {
+ this.contextCache.removeVDBScopedCache(vdbName, vdbVersion);
+ }
}
Modified: trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/embedded/src/main/java/com/metamatrix/jdbc/EmbeddedGuiceModule.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -25,9 +25,11 @@
import java.util.Properties;
import org.jboss.cache.Cache;
+import org.teiid.dqp.internal.cache.DQPContextCache;
import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
+import com.google.inject.name.Names;
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.jboss.JBossCacheFactory;
import com.metamatrix.common.application.DQPConfigSource;
@@ -49,12 +51,15 @@
bind(Cache.class).toProvider(CacheProvider.class).in(Scopes.SINGLETON);
bind(CacheFactory.class).to(JBossCacheFactory.class).in(Scopes.SINGLETON);
+ bindConstant().annotatedWith(Names.named("HostName")).to("embedded"); //$NON-NLS-1$ //$NON-NLS-2$
+ bindConstant().annotatedWith(Names.named("ProcessName")).to("embedded"); //$NON-NLS-1$ //$NON-NLS-2$
+ bind(DQPContextCache.class).in(Scopes.SINGLETON);
bind(DQPConfigSource.class).toInstance(new EmbeddedConfigSource(this.props));
bind(LogConfiguration.class).toProvider(LogConfigurationProvider.class).in(Scopes.SINGLETON);
bind(LogListener.class).toProvider(LogListernerProvider.class).in(Scopes.SINGLETON);
-
+
// this needs to be removed.
binder().requestStaticInjection(LogManager.class);
}
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -169,14 +169,14 @@
public void testVDBResource() throws Exception {
- Properties p = EmbeddedTestUtil.getProperties(); //$NON-NLS-1$
+ Properties p = EmbeddedTestUtil.getProperties();
configService.userPreferences = p;
configService.initializeService(p);
assertNotNull(vdbService.getVDBResource("Admin", "1")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testAvailableVDBs() throws Exception {
- Properties p = EmbeddedTestUtil.getProperties(); //$NON-NLS-1$
+ Properties p = EmbeddedTestUtil.getProperties();
configService.userPreferences = p;
configService.initializeService(p);
assertEquals(2, vdbService.getAvailableVDBs().size());
Modified: trunk/engine/src/main/java/com/metamatrix/cache/Cache.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/cache/Cache.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/com/metamatrix/cache/Cache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -39,7 +39,8 @@
AUTHORIZATION_PRINCIPAL("Auhtorization-Principal"), //$NON-NLS-1$
RESULTSET("ResultSet"), //$NON-NLS-1$
VDBMETADATA("VdbMetadata"), //$NON-NLS-1$
- VDBMODELS("VdbModels"); //$NON-NLS-1$
+ VDBMODELS("VdbModels"), //$NON-NLS-1$
+ SCOPED_CACHE("Scoped-Cache"); //$NON-NLS-1$
private String location;
@@ -140,7 +141,7 @@
/**
* Destroys the child from the current node; no-op if node not found
* @param name
- * @return true if removed; false otehrwise
+ * @return true if removed; false otherwise
*/
boolean removeChild(String name);
@@ -150,4 +151,10 @@
* @return
*/
List<Cache> getChildren();
+
+ /**
+ * Name of the cache node
+ * @return
+ */
+ String getName();
}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/BufferService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -22,13 +22,21 @@
package com.metamatrix.dqp.service;
+import org.teiid.connector.api.CacheScope;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+
+import com.metamatrix.cache.Cache;
import com.metamatrix.common.application.ApplicationService;
import com.metamatrix.common.buffer.BufferManager;
+import com.metamatrix.dqp.message.RequestID;
/**
*/
public interface BufferService extends ApplicationService {
BufferManager getBufferManager();
-
-}
+
+ DQPContextCache getContextCache();
+ }
+
Added: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -0,0 +1,112 @@
+/*
+ * 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 org.teiid.dqp.internal.cache;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+import com.metamatrix.cache.Cache;
+import com.metamatrix.cache.CacheConfiguration;
+import com.metamatrix.cache.CacheFactory;
+import com.metamatrix.cache.CacheConfiguration.Policy;
+import com.metamatrix.dqp.message.RequestID;
+import com.metamatrix.platform.security.api.SessionToken;
+
+@Singleton
+public class DQPContextCache {
+ private static enum Scope {REQUEST,SESSION,SERVICE,VDB,GLOBAL;}
+
+ private Cache cache;
+ private String processIdentifier;
+
+ @Inject
+ public DQPContextCache(@Named("HostName") String hostName, @Named("ProcessName") String processName, CacheFactory cacheFactory) {
+ this.cache = cacheFactory.get(Cache.Type.SCOPED_CACHE, new CacheConfiguration(Policy.LRU, 600, 10000));
+ this.processIdentifier = hostName + "-" + processName; //$NON-NLS-1$
+ }
+
+ public Cache getGlobalScopedCache() {
+ return this.cache.addChild(Scope.GLOBAL.name());
+ }
+
+ public void shutdown() {
+ this.cache.removeChild(this.processIdentifier);
+ }
+
+ public Cache getRequestScopedCache(String request) {
+ Cache processCache = this.cache.addChild(this.processIdentifier);
+ Cache scopeNode = processCache.addChild(Scope.REQUEST.name());
+ return scopeNode.addChild(request.toString());
+ }
+
+ public void removeRequestScopedCache(String request) {
+ Cache processCache = this.cache.getChild(this.processIdentifier);
+ if (processCache != null) {
+ Cache scopeNode = processCache.getChild(Scope.REQUEST.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(request.toString());
+ }
+ }
+ }
+
+ public Cache getServiceScopedCache(String serviceId) {
+ Cache processCache = this.cache.addChild(this.processIdentifier);
+ Cache scopeNode = processCache.addChild(Scope.SERVICE.name());
+ return scopeNode.addChild(serviceId);
+ }
+
+ public void removeServiceScopedCache(String serviceId) {
+ Cache processCache = this.cache.getChild(this.processIdentifier);
+ if (processCache != null) {
+ Cache scopeNode = processCache.addChild(Scope.SERVICE.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(serviceId);
+ }
+ }
+ }
+
+ public Cache getSessionScopedCache(String session) {
+ Cache scopeNode = this.cache.addChild(Scope.SESSION.name());
+ return scopeNode.addChild(session);
+ }
+
+ public void removeSessionScopedCache(String session) {
+ Cache scopeNode = this.cache.addChild(Scope.SESSION.name());
+ if (scopeNode != null) {
+ scopeNode.removeChild(session);
+ }
+ }
+
+ public Cache getVDBScopedCache(String vdbName, String vdbVersion) {
+ Cache scopeNode = this.cache.addChild(Scope.VDB.name());
+ String id = vdbName+"-"+vdbVersion; //$NON-NLS-1$
+ return scopeNode.addChild(id.toUpperCase());
+ }
+
+ public void removeVDBScopedCache(String vdbName, String vdbVersion) {
+ Cache scopeNode = this.cache.addChild(Scope.VDB.name());
+ if (scopeNode != null) {
+ String id = vdbName+"-"+vdbVersion; //$NON-NLS-1$
+ scopeNode.removeChild(id.toUpperCase());
+ }
+ }
+}
Property changes on: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorEnvironmentImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorEnvironmentImpl.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorEnvironmentImpl.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -30,15 +30,22 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
+import org.teiid.connector.api.CacheScope;
import org.teiid.connector.api.ConnectorEnvironment;
import org.teiid.connector.api.ConnectorLogger;
import org.teiid.connector.api.TypeFacility;
import org.teiid.connector.internal.ConnectorPropertyNames;
import org.teiid.connector.language.ILanguageFactory;
+import org.teiid.dqp.internal.cache.DQPContextCache;
import org.teiid.dqp.internal.datamgr.language.LanguageFactoryImpl;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+import com.metamatrix.cache.Cache;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.queue.WorkerPool;
+import com.metamatrix.dqp.DQPPlugin;
+import com.metamatrix.dqp.service.BufferService;
+import com.metamatrix.dqp.service.DQPServiceNames;
/**
* Default Connector Environment.
@@ -156,4 +163,62 @@
}
return null;
}
+
+ @Override
+ public Object getFromCache(CacheScope scope, Object key) {
+ DQPWorkContext context = DQPWorkContext.getWorkContext();
+ checkScopeValidity(scope, context);
+
+ Cache cache = getScopedCache(scope, context);
+ if (cache != null) {
+ return cache.get(key);
+ }
+ return null;
+ }
+
+ @Override
+ public void storeInCache(CacheScope scope, Object key, Object value) {
+ DQPWorkContext context = DQPWorkContext.getWorkContext();
+ checkScopeValidity(scope, context);
+ Cache cache = getScopedCache(scope, context);
+ if (cache != null) {
+ cache.put(key, value);
+ }
+ }
+
+ private Cache getScopedCache(CacheScope scope, DQPWorkContext context) {
+ BufferService service = (BufferService) findResource(DQPServiceNames.BUFFER_SERVICE);
+ if (service != null) {
+ DQPContextCache contextCache = service.getContextCache();
+ switch (scope) {
+ case SERVICE:
+ return contextCache.getServiceScopedCache(properties.getProperty(ConnectorPropertyNames.CONNECTOR_ID));
+ case SESSION:
+ return contextCache.getSessionScopedCache(context.getSessionToken().getSessionIDValue());
+ case VDB:
+ return contextCache.getVDBScopedCache(context.getVdbName(), context.getVdbVersion());
+ case GLOBAL:
+ return contextCache.getGlobalScopedCache();
+ }
+ }
+ return null;
+ }
+
+
+ private void checkScopeValidity(CacheScope scope, DQPWorkContext context) {
+ if (scope == CacheScope.REQUEST) {
+ throw new IllegalStateException(DQPPlugin.Util.getString("ConnectorEnvironmentImpl.request_scope_error")); //$NON-NLS-1$
+ }
+
+ if (scope == CacheScope.SESSION) {
+ if (context == null || context.getSessionToken() == null) {
+ throw new IllegalStateException(DQPPlugin.Util.getString("ConnectorEnvironmentImpl.session_scope_error")); //$NON-NLS-1$
+ }
+ }
+ else if (scope == CacheScope.VDB) {
+ if (context == null || context.getVdbName() == null || context.getVdbVersion() == null) {
+ throw new IllegalStateException(DQPPlugin.Util.getString("ConnectorEnvironmentImpl.vdb_scope_error")); //$NON-NLS-1$
+ }
+ }
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -51,6 +51,7 @@
import org.teiid.connector.internal.ConnectorPropertyNames;
import org.teiid.connector.xa.api.XAConnection;
import org.teiid.connector.xa.api.XAConnector;
+import org.teiid.dqp.internal.cache.DQPContextCache;
import org.teiid.dqp.internal.cache.ResultSetCache;
import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
import org.teiid.dqp.internal.pooling.connector.PooledConnector;
@@ -77,6 +78,7 @@
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
import com.metamatrix.dqp.message.RequestID;
+import com.metamatrix.dqp.service.BufferService;
import com.metamatrix.dqp.service.DQPServiceNames;
import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.dqp.service.TrackingService;
@@ -116,6 +118,7 @@
private MetadataService metadataService;
private TrackingService tracker;
private TransactionService transactionService;
+ private DQPContextCache contextCache;
private volatile Boolean started;
@@ -149,7 +152,7 @@
currentThread.setContextClassLoader(classloader);
boolean global = true;
if (caps == null) {
- ExecutionContext context = new ExecutionContextImpl(
+ ExecutionContextImpl context = new ExecutionContextImpl(
message.getVdbName(),
message.getVdbVersion(),
message.getUserName(),
@@ -159,6 +162,8 @@
connectorID.getID(),
requestID.toString(),
"capabilities-request", "0"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ context.setContextCache(this.contextCache);
conn = connector.getConnection(context);
caps = conn.getCapabilities();
@@ -322,6 +327,11 @@
this.exceptionOnMaxRows = PropertiesUtils.getBooleanProperty(props, ConnectorPropertyNames.EXCEPTION_ON_MAX_ROWS, false);
this.synchWorkers = PropertiesUtils.getBooleanProperty(props, ConnectorPropertyNames.SYNCH_WORKERS, true);
+ BufferService bufferService = (BufferService)env.findService(DQPServiceNames.BUFFER_SERVICE);
+ if (bufferService != null) {
+ this.contextCache = bufferService.getContextCache();
+ }
+
// Initialize and start the connector
initStartConnector(connectorEnv);
//check result set cache
@@ -617,6 +627,10 @@
return connectorID;
}
+ DQPContextCache getContextCache() {
+ return this.contextCache;
+ }
+
/**
* Get the human-readable name that this connector is known by.
* <p>Will be <code>null</code> if connector is not started.</p>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -120,6 +120,7 @@
Integer.toString(requestID.getExecutionId())
);
this.securityContext.setBatchSize(this.requestMsg.getFetchSize());
+ this.securityContext.setContextCache(manager.getContextCache());
}
protected void createConnection(Connector connector, QueryMetadataInterface queryMetadata) throws ConnectorException, MetaMatrixComponentException {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ExecutionContextImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ExecutionContextImpl.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ExecutionContextImpl.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -27,11 +27,16 @@
import java.util.LinkedList;
import java.util.List;
+import org.teiid.connector.api.CacheScope;
import org.teiid.connector.api.ConnectorIdentity;
import org.teiid.connector.api.ExecutionContext;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+import com.metamatrix.cache.Cache;
import com.metamatrix.common.buffer.impl.BufferConfig;
import com.metamatrix.core.util.HashCodeUtil;
+import com.metamatrix.dqp.service.BufferService;
/**
*/
@@ -64,6 +69,8 @@
private ConnectorIdentity connectorIdentity;
+ private DQPContextCache contextCache;
+
private int batchSize = BufferConfig.DEFAULT_CONNECTOR_BATCH_SIZE;
private List<Exception> warnings = new LinkedList<Exception>();
@@ -204,4 +211,25 @@
warnings.clear();
return result;
}
+
+ public void setContextCache(DQPContextCache cache) {
+ this.contextCache = cache;
+ }
+
+ @Override
+ public Object get(Object key) {
+ if (this.contextCache != null) {
+ Cache cache = contextCache.getRequestScopedCache(getRequestIdentifier());
+ return cache.get(key);
+ }
+ return null;
+ }
+
+ @Override
+ public void put(Object key, Object value) {
+ if (this.contextCache != null) {
+ Cache cache = contextCache.getRequestScopedCache(getRequestIdentifier());
+ cache.put(key, value);
+ }
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -37,7 +37,9 @@
import javax.transaction.SystemException;
import javax.transaction.xa.Xid;
+import org.teiid.connector.api.CacheScope;
import org.teiid.dqp.internal.cache.CacheID;
+import org.teiid.dqp.internal.cache.DQPContextCache;
import org.teiid.dqp.internal.cache.ResultSetCache;
import org.teiid.dqp.internal.cache.ResultSetCacheUtil;
@@ -146,6 +148,7 @@
private Map<RequestID, RequestWorkItem> requests = Collections.synchronizedMap(new HashMap<RequestID, RequestWorkItem>());
private Map<String, List<RequestID>> requestsByClients = Collections.synchronizedMap(new HashMap<String, List<RequestID>>());
+ private DQPContextCache contextCache;
public DQPCore() {
@@ -164,6 +167,7 @@
@Override
public void stop() throws ApplicationLifecycleException {
processWorkerPool.shutdown();
+ contextCache.shutdown();
super.stop();
}
@@ -296,6 +300,7 @@
clientRequests.remove(workItem.requestID);
}
}
+ contextCache.removeRequestScopedCache(workItem.requestID.toString());
}
boolean areResultsInCache(final RequestMessage requestMsg) {
@@ -434,6 +439,7 @@
throw new MetaMatrixComponentException(err);
}
}
+ contextCache.removeSessionScopedCache(sessionId);
}
public boolean cancelRequest(RequestID requestID)
@@ -609,6 +615,7 @@
//get buffer manager
BufferService bufferService = (BufferService) env.findService(DQPServiceNames.BUFFER_SERVICE);
bufferManager = bufferService.getBufferManager();
+ contextCache = bufferService.getContextCache();
//Get tracking service
tracker = (TrackingService) env.findService(DQPServiceNames.TRACKING_SERVICE);
Modified: trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-04-16 16:26:10 UTC (rev 786)
@@ -460,4 +460,8 @@
TransactionContextImpl.remote_not_supported=Remote connector calls under a transaction are not supported
-CodeTableCache.duplicate_key=Duplicate code table ''{0}'' key ''{1}'' value ''{2}''
\ No newline at end of file
+CodeTableCache.duplicate_key=Duplicate code table ''{0}'' key ''{1}'' value ''{2}''
+connector_cache_closed=Connector cache has been already closed.
+ConnectorEnvironmentImpl.request_scope_error=CacheScope.REQUEST not support on this interface. Use methods on ExecutionContext for REQUEST scoped cache.
+ConnectorEnvironmentImpl.session_scope_error=Session information is not available; SESSION scoped cache can not be accessed.
+ConnectorEnvironmentImpl.vdb_scope_error=VDB information is not available; VDB scoped cache can not be accessed.
\ No newline at end of file
Modified: trunk/engine/src/test/java/com/metamatrix/cache/FakeCache.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/cache/FakeCache.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/test/java/com/metamatrix/cache/FakeCache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -34,7 +34,7 @@
public static class FakeCacheFactory implements CacheFactory{
public Cache get(Type type, CacheConfiguration config) {
- return new FakeCache();
+ return new FakeCache("root"); //$NON-NLS-1$
}
public void destroy() {
@@ -43,7 +43,10 @@
Map<K, V> map = new HashMap();
Map<String, Cache> children = new HashMap();
-
+ String name;
+ public FakeCache(String name) {
+ this.name = name;
+ }
public void addListener(CacheListener listener) {
}
@@ -81,7 +84,11 @@
@Override
public Cache addChild(String name) {
- Cache c = new FakeCache();
+ if (children.get(name) != null) {
+ return children.get(name);
+ }
+
+ Cache c = new FakeCache(name);
children.put(name, c);
return c;
}
@@ -101,4 +108,9 @@
Object obj = children.remove(name);
return obj != null;
}
+
+ @Override
+ public String getName() {
+ return name;
+ }
}
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeBufferService.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeBufferService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeBufferService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -22,7 +22,10 @@
package com.metamatrix.dqp.service;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.cache.FakeCache.FakeCacheFactory;
import com.metamatrix.common.buffer.BufferManager;
import com.metamatrix.common.buffer.BufferManagerFactory;
@@ -52,4 +55,8 @@
return bufferMgr;
}
+ @Override
+ public DQPContextCache getContextCache() {
+ return new DQPContextCache("test", "test", new FakeCacheFactory()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
Added: trunk/engine/src/test/java/org/teiid/dqp/internal/cache/TestDQPContextCache.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/cache/TestDQPContextCache.java (rev 0)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/cache/TestDQPContextCache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -0,0 +1,105 @@
+/*
+ * 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 org.teiid.dqp.internal.cache;
+
+import junit.framework.TestCase;
+
+import org.teiid.connector.api.CacheScope;
+import org.teiid.connector.api.ExecutionContext;
+import org.teiid.dqp.internal.datamgr.impl.FakeExecutionContextImpl;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+
+import com.metamatrix.cache.Cache;
+import com.metamatrix.cache.FakeCache.FakeCacheFactory;
+import com.metamatrix.dqp.message.RequestID;
+import com.metamatrix.platform.security.api.MetaMatrixSessionID;
+import com.metamatrix.platform.security.api.SessionToken;
+
+
+public class TestDQPContextCache extends TestCase {
+
+ DQPContextCache cacheContext = null;
+
+ @Override
+ protected void setUp() throws Exception {
+ cacheContext = new DQPContextCache("host", "process", new FakeCacheFactory()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ }
+
+ private DQPWorkContext getContext() {
+ DQPWorkContext workContext = new DQPWorkContext();
+ workContext.setVdbName("MyVDB"); //$NON-NLS-1$
+ workContext.setVdbVersion("1"); //$NON-NLS-1$
+ workContext.setSessionToken(new SessionToken(new MetaMatrixSessionID(1), "foo")); //$NON-NLS-1$
+ return workContext;
+ }
+
+ // killing a request scope does not kill the session scope
+ public void testRequestScope() {
+ DQPWorkContext context = getContext();
+ Cache cache = this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString());
+ cache.put("key", "request-value"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ cache = this.cacheContext.getSessionScopedCache(context.getSessionToken().getSessionIDValue());
+ cache.put("key", "session-value"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ assertEquals("request-value", this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString()).get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("session-value", this.cacheContext.getSessionScopedCache(context.getSessionToken().getSessionIDValue()).get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // close the request
+ this.cacheContext.removeRequestScopedCache(context.getRequestID(12L).toString());
+
+ assertNull(this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString()).get("key")); //$NON-NLS-1$
+ assertEquals("session-value", this.cacheContext.getSessionScopedCache(context.getSessionToken().getSessionIDValue()).get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ public void testServiceScope() {
+ DQPWorkContext context = getContext();
+ Cache cache = this.cacheContext.getServiceScopedCache("my-connector"); //$NON-NLS-1$
+ cache.put("key", "service-value"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ assertEquals("service-value", this.cacheContext.getServiceScopedCache("my-connector").get("key")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ this.cacheContext.removeServiceScopedCache("my-Connector"); //$NON-NLS-1$
+
+ assertNull(this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString()).get("key")); //$NON-NLS-1$
+ }
+
+ public void testGlobalScope() {
+ DQPWorkContext context = getContext();
+ Cache cache = this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString());
+ cache.put("key", "request-value"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ cache = this.cacheContext.getGlobalScopedCache();
+ cache.put("key", "global-value"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ assertEquals("request-value", this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString()).get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("global-value", this.cacheContext.getGlobalScopedCache().get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ this.cacheContext.shutdown();
+
+ assertNull(this.cacheContext.getRequestScopedCache(context.getRequestID(12L).toString()).get("key")); //$NON-NLS-1$
+ // global only dies when the engine is shutdown
+ assertEquals("global-value", this.cacheContext.getGlobalScopedCache().get("key")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
Property changes on: trunk/engine/src/test/java/org/teiid/dqp/internal/cache/TestDQPContextCache.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeExecutionContextImpl.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeExecutionContextImpl.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeExecutionContextImpl.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -24,29 +24,37 @@
import java.util.concurrent.atomic.AtomicInteger;
-import org.teiid.dqp.internal.datamgr.impl.ExecutionContextImpl;
+import org.teiid.connector.api.ExecutionContext;
/**
*/
public class FakeExecutionContextImpl extends ExecutionContextImpl {
- private final static AtomicInteger COUNT = new AtomicInteger(0);
+ private final static AtomicInteger COUNT = new AtomicInteger(0);
- public FakeExecutionContextImpl() {
- this(COUNT.getAndIncrement());
- }
-
- public FakeExecutionContextImpl(int unique) {
- super("VDB"+unique, //$NON-NLS-1$
- "Version"+unique, //$NON-NLS-1$
- "User"+unique, //$NON-NLS-1$
- "Payload"+unique, //$NON-NLS-1$
- "ExecutionPayload"+unique, //$NON-NLS-1$
- "ConnectionID"+unique, //$NON-NLS-1$
- "ConnectorID"+unique, //$NON-NLS-1$
- "RequestID"+unique, //$NON-NLS-1$
- "PartID"+unique, //$NON-NLS-1$
- "ExecCount"+unique);
- }
-
+ public FakeExecutionContextImpl() {
+ this(COUNT.getAndIncrement());
+ }
+
+ public FakeExecutionContextImpl(int unique) {
+ super("VDB" + unique, //$NON-NLS-1$
+ "Version" + unique, //$NON-NLS-1$
+ "User" + unique, //$NON-NLS-1$
+ "Payload" + unique, //$NON-NLS-1$
+ "ExecutionPayload" + unique, //$NON-NLS-1$
+ "ConnectionID" + unique, //$NON-NLS-1$
+ "ConnectorID" + unique, //$NON-NLS-1$
+ "RequestID" + unique, //$NON-NLS-1$
+ "PartID" + unique, //$NON-NLS-1$
+ "ExecCount" + unique); //$NON-NLS-1$
+ }
+
+ public FakeExecutionContextImpl(ExecutionContext c) {
+ super(c.getVirtualDatabaseName(), c.getVirtualDatabaseVersion(), c
+ .getUser(), c.getTrustedPayload(), c.getExecutionPayload(), c
+ .getConnectionIdentifier(), c.getConnectorIdentifier(), c
+ .getRequestIdentifier(), c.getPartIdentifier(), c
+ .getExecutionCountIdentifier());
+ }
+
}
Modified: trunk/server/src/main/java/com/metamatrix/server/ResourceFinder.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ResourceFinder.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/main/java/com/metamatrix/server/ResourceFinder.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -23,6 +23,8 @@
package com.metamatrix.server;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
import com.google.inject.Injector;
import com.metamatrix.common.messaging.MessageBus;
import com.metamatrix.common.messaging.NoOpMessageBus;
@@ -41,4 +43,8 @@
ResourceFinder.setInjector(injector);
XMLConfigurationMgr.getInstance().setMessageBus(getMessageBus());
}
+
+ public static DQPContextCache getContextCache() {
+ return injector.getInstance(DQPContextCache.class);
+ }
}
Modified: trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/main/java/com/metamatrix/server/ServerGuiceModule.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -24,6 +24,7 @@
import org.jboss.cache.Cache;
import org.jgroups.mux.Multiplexer;
+import org.teiid.dqp.internal.cache.DQPContextCache;
import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
@@ -86,6 +87,7 @@
bind(ProcessManagement.class).to(SocketVMController.class).in(Scopes.SINGLETON);
bind(ServerEvents.class).to(ProcessMonitor.class).in(Scopes.SINGLETON);
bind(HostManagement.class).toProvider(HostManagementProvider.class).in(Scopes.SINGLETON);
+ bind(DQPContextCache.class).in(Scopes.SINGLETON);
// this needs to be removed.
binder().requestStaticInjection(PlatformProxyHelper.class);
Modified: trunk/server/src/main/java/com/metamatrix/server/dqp/config/PlatformConfigSource.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/dqp/config/PlatformConfigSource.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/main/java/com/metamatrix/server/dqp/config/PlatformConfigSource.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -26,6 +26,8 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
import com.google.inject.Binder;
import com.google.inject.name.Names;
import com.metamatrix.common.application.ApplicationService;
@@ -42,6 +44,7 @@
import com.metamatrix.platform.security.api.service.AuthorizationServiceInterface;
import com.metamatrix.platform.util.PlatformProxyHelper;
import com.metamatrix.server.Configuration;
+import com.metamatrix.server.ResourceFinder;
import com.metamatrix.server.dqp.service.PlatformAuthorizationService;
import com.metamatrix.server.dqp.service.PlatformBufferService;
import com.metamatrix.server.dqp.service.PlatformDataService;
@@ -127,6 +130,7 @@
}
binder.bindConstant().annotatedWith(Names.named(Configuration.PROCESSNAME)).to(processName);
binder.bind(Host.class).annotatedWith(Names.named(Configuration.HOST)).toInstance(host);
+ binder.bind(DQPContextCache .class).toInstance(ResourceFinder.getContextCache());
}
}
\ No newline at end of file
Modified: trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformBufferService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformBufferService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformBufferService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -24,6 +24,8 @@
import java.util.Properties;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.metamatrix.api.exception.MetaMatrixComponentException;
@@ -49,11 +51,13 @@
private String processName;
private Host host;
+ private DQPContextCache contextCache;
@Inject
- public PlatformBufferService((a)Named(Configuration.HOST) Host host, @Named(Configuration.PROCESSNAME) String processName) {
+ public PlatformBufferService((a)Named(Configuration.HOST) Host host, @Named(Configuration.PROCESSNAME) String processName, DQPContextCache cache) {
this.host = host;
this.processName = processName;
+ this.contextCache = cache;
}
/*
@@ -96,4 +100,10 @@
bufferMgr.stop();
}
+ @Override
+ public DQPContextCache getContextCache() {
+ return this.contextCache;
+ }
+
+
}
Modified: trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformVDBService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformVDBService.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformVDBService.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -31,6 +31,9 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.dqp.internal.cache.DQPContextCache;
+
+import com.google.inject.Inject;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
@@ -64,7 +67,12 @@
private Map vdbIDs = Collections.synchronizedMap(new HashMap());
private EventObjectListener listener = null;
+ private DQPContextCache contextCache;
+ @Inject
+ public PlatformVDBService(DQPContextCache cache) {
+ this.contextCache = cache;
+ }
/*
* @see com.metamatrix.dqp.service.VDBService#isActiveVDB(java.lang.String, java.lang.String)
*/
@@ -142,7 +150,7 @@
*/
public int getFileVisibility(final String vdbName, final String vdbVersion, final String pathInVDB) throws MetaMatrixComponentException {
// get the name of model
- String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), ".");
+ String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), "."); //$NON-NLS-1$ //$NON-NLS-2$
//return configuration.getModelVisibility(vdbName, vdbVersion, modelName);
@@ -234,8 +242,10 @@
VirtualDatabaseID vdbID = event.getVirtualDatabaseID();
// update the cache for this vdb
removeVirtualDatabaseID(vdbID);
+
+ // remove any cached items
+ this.contextCache.removeVDBScopedCache(vdbID.getName(), vdbID.getVersion());
}
-
}
/**
Modified: trunk/server/src/test/java/com/metamatrix/platform/security/api/TestAuthorizationCache.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/security/api/TestAuthorizationCache.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/test/java/com/metamatrix/platform/security/api/TestAuthorizationCache.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -36,31 +36,18 @@
import com.metamatrix.platform.security.authorization.cache.AuthorizationCache;
public class TestAuthorizationCache extends TestCase {
-
- Cache cacheStore;
- @Override
- protected void setUp() throws Exception {
- CacheFactory factory = new DefaultCacheFactory();
- cacheStore = factory.createCache();
- }
-
- @Override
- protected void tearDown() throws Exception {
- cacheStore.stop();
- }
-
public void testFindPolicyIdsWithNoResult() throws Exception {
- AuthorizationCache cache = new AuthorizationCache(new FakeCache(), new FakeCache(), null);
+ AuthorizationCache cache = new AuthorizationCache(new FakeCache("1"), new FakeCache("2"), null); //$NON-NLS-1$ //$NON-NLS-2$
Collection result = cache.findPolicyIDs(new MetaMatrixPrincipalName("a", MetaMatrixPrincipal.TYPE_USER), null); //$NON-NLS-1$
assertTrue(result.isEmpty());
}
public void testFindPolicyIds() throws Exception {
- AuthorizationCache cache = new AuthorizationCache(new FakeCache(), new FakeCache(),null);
+ AuthorizationCache cache = new AuthorizationCache(new FakeCache("1"), new FakeCache("2"), null); //$NON-NLS-1$ //$NON-NLS-2$
List policyIDs = new LinkedList();
policyIDs.add(new Integer(1));
- SessionToken token = new SessionToken(new MetaMatrixSessionID(1), "dummy"); //$NON-NLS-1$ //$NON-NLS-2$
+ SessionToken token = new SessionToken(new MetaMatrixSessionID(1), "dummy"); //$NON-NLS-1$s
cache.cachePolicyIDsForPrincipal(new MetaMatrixPrincipalName("a", MetaMatrixPrincipal.TYPE_USER), token, policyIDs); //$NON-NLS-1$
Collection result = cache.findPolicyIDs(new MetaMatrixPrincipalName("a", MetaMatrixPrincipal.TYPE_USER), new SessionToken(new MetaMatrixSessionID(2), "dummy")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//different session, result should be empty
Modified: trunk/server/src/test/java/com/metamatrix/platform/security/authorization/service/TestAuthorizationServiceImpl.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/security/authorization/service/TestAuthorizationServiceImpl.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/test/java/com/metamatrix/platform/security/authorization/service/TestAuthorizationServiceImpl.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -51,23 +51,10 @@
private static final String TEST_GROUP = "g1+p1"; //$NON-NLS-1$
private static final String INVALID_GROUP = "foo"; //$NON-NLS-1$
- Cache cacheStore;
-
- @Override
- protected void setUp() throws Exception {
- CacheFactory factory = new DefaultCacheFactory();
- cacheStore = factory.createCache();
- }
-
- @Override
- protected void tearDown() throws Exception {
- cacheStore.stop();
- }
-
public class FakeAuthorizationService extends AuthorizationServiceImpl {
public FakeAuthorizationService() throws Exception {
- this.authorizationCache = new AuthorizationCache(new FakeCache(), new FakeCache(), null);
+ this.authorizationCache = new AuthorizationCache(new FakeCache("1"), new FakeCache("2"), null); //$NON-NLS-1$ //$NON-NLS-2$
this.membershipServiceProxy = Mockito.mock(MembershipServiceInterface.class);
Mockito.stub(this.membershipServiceProxy.getPrincipal(new MetaMatrixPrincipalName(TEST_GROUP, MetaMatrixPrincipal.TYPE_GROUP))).toReturn(new BasicMetaMatrixPrincipal(TEST_GROUP, MetaMatrixPrincipal.TYPE_GROUP));
Mockito.stub(this.membershipServiceProxy.getPrincipal(new MetaMatrixPrincipalName(INVALID_GROUP, MetaMatrixPrincipal.TYPE_GROUP))).toThrow(new InvalidPrincipalException());
Modified: trunk/server/src/test/java/com/metamatrix/platform/security/session/service/TestSessionServiceImpl.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/security/session/service/TestSessionServiceImpl.java 2009-04-16 15:55:11 UTC (rev 785)
+++ trunk/server/src/test/java/com/metamatrix/platform/security/session/service/TestSessionServiceImpl.java 2009-04-16 16:26:10 UTC (rev 786)
@@ -19,7 +19,7 @@
public void testValidateSession() throws Exception {
SessionServiceImpl ssi = new SessionServiceImpl();
ssi.setIdGenerator(new InMemoryIDController());
- ssi.setSessionCache(new FakeCache<MetaMatrixSessionID, MetaMatrixSessionInfo>());
+ ssi.setSessionCache(new FakeCache<MetaMatrixSessionID, MetaMatrixSessionInfo>("1")); //$NON-NLS-1$
MembershipServiceInterface msi = Mockito.mock(MembershipServiceInterface.class);
Mockito.stub(msi.authenticateUser("steve", null, null, "foo")).toReturn(new SuccessfulAuthenticationToken(null, "steve@somedomain")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ssi.setMembershipService(msi);
@@ -32,7 +32,7 @@
}
- MetaMatrixSessionInfo info = ssi.createSession("steve", null, null, "foo", new Properties()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ MetaMatrixSessionInfo info = ssi.createSession("steve", null, null, "foo", new Properties()); //$NON-NLS-1$ //$NON-NLS-2$
id1 = info.getSessionID();
ssi.validateSession(id1);
15 years, 8 months
teiid SVN: r785 - branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-16 11:55:11 -0400 (Thu, 16 Apr 2009)
New Revision: 785
Modified:
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
Log:
Teiid 323 - changes to console due to refactured, removing unused Config API classes: ProductType, ProductTypeID and ConfigurationLock
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-04-16 15:09:06 UTC (rev 784)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-04-16 15:55:11 UTC (rev 785)
@@ -60,8 +60,8 @@
private PropertiedObjectPanelHolder popHolder;
private POPWithButtons popWithButtons = null;
- private TextFieldWidget txfServiceName = new TextFieldWidget();
- private LabelWidget lblServiceName = new LabelWidget();
+// private TextFieldWidget txfServiceName = new TextFieldWidget();
+// private LabelWidget lblServiceName = new LabelWidget();
// private TextFieldWidget txfBindingName = new TextFieldWidget();
// private LabelWidget lblBindingName = new LabelWidget();
private JPanel pnlOuter = new JPanel();
@@ -104,10 +104,10 @@
pnlOuter.setLayout(new GridBagLayout());
// lblBindingName.setText("Service Name:"); //$NON-NLS-1$
- lblServiceName.setText("Servicie Name:"); //$NON-NLS-1$
+// lblServiceName.setText("Servicie Name:"); //$NON-NLS-1$
// txfBindingName.setEditable(false);
- txfServiceName.setEditable(false);
+ // txfServiceName.setEditable(false);
add(pnlPOPShell, BorderLayout.CENTER);
}
15 years, 8 months
teiid SVN: r784 - in branches/remove_psc/console/src/main: java/com/metamatrix/console/ui/views/deploy/util and 1 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-16 11:09:06 -0400 (Thu, 16 Apr 2009)
New Revision: 784
Modified:
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java
branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties
Log:
Teiid 323 - changes to console due to refactured, removing unused Config API classes: ProductType, ProductTypeID and ConfigurationLock
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java 2009-04-16 12:46:52 UTC (rev 783)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java 2009-04-16 15:09:06 UTC (rev 784)
@@ -235,16 +235,7 @@
TitledBorder tBorder;
-
-// JPanel pnlOps = new JPanel();
-// gbc = new GridBagConstraints();
-// gbc.gridx = 0;
-// gbc.gridy = 4;
-// gbc.gridwidth = GridBagConstraints.REMAINDER;
-// gbc.insets = new Insets(3, 3, 3, 3);
-// pnl.add(pnlOps, gbc);
-
-
+
pnlPropsOuter = new JPanel(new GridLayout(1, 1));
setPnlPropsOuterBorder(null);
@@ -420,7 +411,7 @@
new Object[] {getClass(), "initTable"}), //$NON-NLS-1$
""+theException.getMessage(), //$NON-NLS-1$
theException);
- LogManager.logError(LogContexts.PSCDEPLOY,
+ LogManager.logError(LogContexts.CONFIG,
theException,
getClass() + ":initTable"); //$NON-NLS-1$
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java 2009-04-16 12:46:52 UTC (rev 783)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java 2009-04-16 15:09:06 UTC (rev 784)
@@ -38,11 +38,14 @@
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
+import javax.swing.border.Border;
+import javax.swing.event.ChangeListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.TableColumn;
import com.metamatrix.common.config.api.Configuration;
+import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.console.connections.ConnectionInfo;
@@ -62,6 +65,7 @@
import com.metamatrix.console.util.StaticUtilities;
import com.metamatrix.toolbox.ui.widget.Splitter;
import com.metamatrix.toolbox.ui.widget.TableWidget;
+import com.metamatrix.toolbox.ui.widget.TitledBorder;
import com.metamatrix.toolbox.ui.widget.table.DefaultTableComparator;
import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
@@ -85,7 +89,7 @@
private ServiceDefinitionPropertiesPanel propertiesPanel;
/** List <ServiceComponentDefn> */
- private List selectedSvc = new ArrayList();
+ private ServiceComponentDefn selectedSvc = null;
private ListSelectionListener listSelectionListener;
@@ -118,7 +122,7 @@
UserCapabilities cap = null;
try {
cap = UserCapabilities.getInstance();
- canModify = cap.canModifyConnectorBindings(connection);
+ canModify = cap.canUpdateConfiguration(connection);
if (canModify) {
getConfigurationManager().addConfigurationChangeListener(this);
@@ -202,29 +206,30 @@
nameServiceDefnMap.clear();
Configuration config = this.getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID);
- Collection<ServiceComponentDefn> bindings = config.getServiceComponentDefns();
- for (Iterator<ServiceComponentDefn> it = bindings.iterator(); it.hasNext();) {
- ServiceComponentDefn cb = it.next();
+ Collection<ServiceComponentDefn> svcs = config.getServiceComponentDefns();
+ for (Iterator<ServiceComponentDefn> it = svcs.iterator(); it.hasNext();) {
+ ServiceComponentDefn svc = it.next();
Vector vec = new Vector(Arrays.asList(new Object[] {
null, null, null
}));
- vec.setElementAt(cb.getName(), SVC_DEFN_COL_NUM);
- vec.setElementAt(cb.isEssential(), ESSENTIAL_COL_NUM);
- vec.setElementAt(cb.getDescription(), DESCRIPTION_COL_NUM);
+ vec.setElementAt(svc.getName(), SVC_DEFN_COL_NUM);
+ vec.setElementAt(svc.isEssential(), ESSENTIAL_COL_NUM);
+ vec.setElementAt(svc.getDescription(), DESCRIPTION_COL_NUM);
tableModel.addRow(vec);
- nameServiceDefnMap.put(cb.getName(), cb);
+ nameServiceDefnMap.put(svc.getName(), svc);
}
-
+
+
} catch (Exception ex) {
ExceptionUtility.showMessage("Retrieve service definition info", ex); //$NON-NLS-1$
LogManager.logError(LogContexts.CONFIG, ex, "Error retrieving service definition info."); //$NON-NLS-1$
}
- forceTableSelection(getSelectedService());
+
}
/**
@@ -234,18 +239,17 @@
* List<ConnectorBinding>
* @since 4.2
*/
- private void forceTableSelection(List bindings) {
+ private void forceTableSelection(ServiceComponentDefn svc) {
table.getSelectionModel().clearSelection();
- Iterator iter = bindings.iterator();
- while (iter.hasNext()) {
- ServiceComponentDefn svc = (ServiceComponentDefn)iter.next();
- int rowForSelected = rowForService(svc.getName());
- if (rowForSelected >= 0) {
- table.getSelectionModel().addSelectionInterval(rowForSelected, rowForSelected);
- table.scrollRectToVisible(table.getCellRect(rowForSelected, 0, true));
- }
- }
+ int rowForSelected = rowForService(svc.getName());
+ if (rowForSelected >= 0) {
+ table.getSelectionModel().addSelectionInterval(rowForSelected,
+ rowForSelected);
+ table.scrollRectToVisible(table
+ .getCellRect(rowForSelected, 0, true));
+ }
+
}
public void postRealize() {
@@ -282,8 +286,7 @@
* @since 4.2
*/
private void setSelectedService(ServiceComponentDefn svc) {
- selectedSvc.clear();
- selectedSvc.add(svc);
+ selectedSvc = svc;
}
/**
@@ -293,10 +296,10 @@
* List<ConnectorBinding>
* @since 4.2
*/
- private void setSelectedServiceDefn(List svcs) {
- selectedSvc.clear();
- selectedSvc.addAll(svcs);
- }
+// private void setSelectedServiceDefn(List svcs) {
+// selectedSvc.clear();
+// selectedSvc.addAll(svcs);
+// }
/**
* Clear the list of selected connector bindings.
@@ -306,7 +309,7 @@
* @since 4.2
*/
private void clearSelectedService() {
- selectedSvc.clear();
+ selectedSvc=null;
}
/**
@@ -315,36 +318,52 @@
* @return List<ConnectorBinding>
* @since 4.2
*/
- private List getSelectedService() {
- return selectedSvc;
+ private ServiceComponentDefn getSelectedService() {
+ int[] selectedRows = table.getSelectedRows();
+ int numSelected = selectedRows.length;
+
+ if (numSelected == 0) {
+ return null;
+ // tableSelectionChangedNoneSelected();
+ } else if (numSelected == 1) {
+ int convertedRow = table.convertRowIndexToModel(selectedRows[0]);
+ String selectedName = (String)table.getModel().getValueAt(convertedRow, SVC_DEFN_COL_NUM);
+ ServiceComponentDefn svc = (ServiceComponentDefn)getServiceDefnXref().get(selectedName);
+ return svc;
+
+ }
+ return null;
}
public void refresh() {
// save the currently selected bindings
- List oldSelectedConnectedBindings = new ArrayList(getSelectedService());
-
+ ServiceComponentDefn olddefn = getSelectedService();
+
try {
- // refresh the connector bindings in the manager
- // this.getConfigurationManager().refresh();
- // constructServiceDefnXref();
populateTable();
- } catch (Exception ex) {
+
+ // get first row
+ if (olddefn == null) {
+ String curRowSvc = table.getValueAt(1, SVC_DEFN_COL_NUM).toString();
+ olddefn = (ServiceComponentDefn) nameServiceDefnMap.get(curRowSvc);
+ }
+
+ } catch (Exception ex) {
ExceptionUtility.showMessage("Failed while refreshing the Services list", ex); //$NON-NLS-1$
LogManager.logError(LogContexts.CONFIG, ex, "Failed while refreshing the Services list"); //$NON-NLS-1$
}
// restore the binding and select it in the table:
- setSelectedServiceDefn(oldSelectedConnectedBindings);
- forceTableSelection(oldSelectedConnectedBindings);
+ setSelectedService(olddefn);
+ forceTableSelection(olddefn);
}
private void tableSelectionChanged() {
boolean cancelled = false;
- List svcs = getSelectedService();
- if (svcs.size() == 1 && anyValueChanged()) {
- ServiceComponentDefn svc = (ServiceComponentDefn) svcs.get(0);
-
+ ServiceComponentDefn svc = getSelectedService();
+ if (anyValueChanged() && svc != null) {
+
String message = "Save changes to Service Definition " + svc + " ?"; //$NON-NLS-1$//$NON-NLS-2$
int response = DialogUtility.showPendingChangesDialog(message, getConnection().getURL(), getConnection().getUser());
@@ -365,9 +384,7 @@
table.getSelectionModel().removeListSelectionListener(listSelectionListener);
//revert to original selection
- ArrayList newList = new ArrayList();
- newList.add(svc);
- forceTableSelection(newList);
+ forceTableSelection(svc);
//restore the listener
table.getSelectionModel().addListSelectionListener(listSelectionListener);
@@ -380,13 +397,14 @@
if (! cancelled) {
StaticUtilities.startWait(ViewManager.getMainFrame());
- int[] selectedRows = table.getSelectedRows();
- int numSelected = selectedRows.length;
+ // int[] selectedRows = table.getSelectedRows();
+ // int numSelected = selectedRows.length;
- if (numSelected == 0) {
- tableSelectionChangedNoneSelected();
- } else if (numSelected == 1) {
- tableSelectionChangedOneSelected(selectedRows[0]);
+ if (svc == null) {
+ clearSelectedService();
+ } else {
+ setSelectedService(svc);
+ tableSelectionChangedOneSelected(svc);
}
forceRepaint();
@@ -394,23 +412,40 @@
}
}
- private void tableSelectionChangedNoneSelected() {
- // clear list of selected bindings
- clearSelectedService();
+// private void tableSelectionChangedNoneSelected() {
+// // clear list of selected bindings
+// clearSelectedService();
+//
+// }
- }
+ private void tableSelectionChangedOneSelected(ServiceComponentDefn defn) {
+ Border border = createTabBorder(defn);
+ int curTab = tabbedPane.getSelectedIndex();
+
+ propertiesPanel.setServiceComponentDefn(defn);
+ propertiesPanel.setBorder(border);
- private void tableSelectionChangedOneSelected(int selectedRow) {
// set list of selected bindings
- int convertedRow = table.convertRowIndexToModel(selectedRow);
- String selectedName = (String)table.getModel().getValueAt(convertedRow, SVC_DEFN_COL_NUM);
- ServiceComponentDefn svc = (ServiceComponentDefn)getServiceDefnXref().get(selectedName);
- setSelectedService(svc);
+// int convertedRow = table.convertRowIndexToModel(selectedRow);
+// String selectedName = (String)table.getModel().getValueAt(convertedRow, SVC_DEFN_COL_NUM);
+// ServiceComponentDefn svc = (ServiceComponentDefn)getServiceDefnXref().get(selectedName);
+ setSelectedService(defn);
}
+ private Border createTabBorder(ServiceComponentDefn defn) {
+ TitledBorder border;
+ String title;
+ if (defn == null) {
+ title = ""; //$NON-NLS-1$
+ } else {
+ title = "Service: " + defn.toString(); //$NON-NLS-1$
+ }
+ border = new TitledBorder(title);
+ return border;
+ }
public java.util.List /* <Action> */resume() {
@@ -432,25 +467,6 @@
return nameServiceDefnMap;
}
-// private void constructServiceDefnXref() {
-// nameServiceDefnMap = new HashMap();
-// ArrayList connectorsList = null;
-// try {
-// connectorsList = getConnectorManager().getConnectorBindings(false);
-// } catch (Exception e) {
-// ExceptionUtility.showMessage("Failed while loading data into Connector Binding Panel", e); //$NON-NLS-1$
-// }
-//
-// Iterator it = connectorsList.iterator();
-// ConnectorBinding tempDefn = null;
-//
-// while (it.hasNext()) {
-// ConnectorAndBinding cab = (ConnectorAndBinding)it.next();
-// tempDefn = (ConnectorBinding)cab.getBinding();
-// nameServiceDefnMap.put(tempDefn.toString(), tempDefn);
-// }
-//
-// }
private void forceRepaint() {
StaticUtilities.jiggleSplitter(splitPane);
@@ -488,5 +504,5 @@
}
-}// end ConnectorBindingPanel
+}// end Panel
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-04-16 12:46:52 UTC (rev 783)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-04-16 15:09:06 UTC (rev 784)
@@ -22,27 +22,32 @@
package com.metamatrix.console.ui.views.deploy;
-import java.awt.*;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JPanel;
-import com.metamatrix.common.actions.ModificationActionQueue;
import com.metamatrix.common.config.api.ComponentDefnID;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationObjectEditor;
-import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.object.PropertiedObject;
-import com.metamatrix.common.object.PropertiedObjectEditor;
import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.models.ConnectorManager;
+import com.metamatrix.console.models.ConfigurationManager;
+import com.metamatrix.console.models.ConfigurationPropertiedObjectEditor;
import com.metamatrix.console.models.ModelManager;
import com.metamatrix.console.ui.layout.ConsoleMainFrame;
-import com.metamatrix.console.ui.util.*;
-import com.metamatrix.console.util.*;
+import com.metamatrix.console.ui.util.POPWithButtons;
+import com.metamatrix.console.ui.util.POPWithButtonsController;
+import com.metamatrix.console.ui.util.PropertiedObjectPanelHolder;
+import com.metamatrix.console.util.ExceptionUtility;
+import com.metamatrix.console.util.LogContexts;
+import com.metamatrix.console.util.StaticUtilities;
import com.metamatrix.toolbox.ui.widget.LabelWidget;
import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
@@ -55,18 +60,18 @@
private PropertiedObjectPanelHolder popHolder;
private POPWithButtons popWithButtons = null;
- private TextFieldWidget txfConnectorName = new TextFieldWidget();
- private LabelWidget lblConnectorName = new LabelWidget();
- private TextFieldWidget txfBindingName = new TextFieldWidget();
- private LabelWidget lblBindingName = new LabelWidget();
+ private TextFieldWidget txfServiceName = new TextFieldWidget();
+ private LabelWidget lblServiceName = new LabelWidget();
+ // private TextFieldWidget txfBindingName = new TextFieldWidget();
+// private LabelWidget lblBindingName = new LabelWidget();
private JPanel pnlOuter = new JPanel();
private JPanel pnlPOPShell = new JPanel(new GridLayout(1, 1));
private PropertiedObject poPropObject;
- private PropertiedObjectEditor poe;
+ private ConfigurationPropertiedObjectEditor poe;
private ServiceComponentDefn serviceDefn;
private boolean canModify;
private ConnectionInfo connection;
- private ModificationActionQueue maq = null;
+// private ModificationActionQueue maq = null;
private ConfigurationObjectEditor coe = null;
@@ -76,19 +81,19 @@
this.connection = connection;
init();
try {
- coe = getConnectorManager().getConnectorBindingEditor();
- maq = coe.getDestination();
- poe = getConnectorManager().getPropertiedObjectEditor(maq);
+ coe = getConfigurationManager().getEditor();
+ // maq = coe.getDestination();
+ poe = getPropertiedObjectEditor();
} catch (Exception ex) {
- LogManager.logError(LogContexts.CONNECTOR_BINDINGS, ex,
+ LogManager.logError(LogContexts.CONFIG, ex,
"Error creating Connector Binding Properties Panel."); //$NON-NLS-1$
ExceptionUtility.showMessage(
"Error creating Connector Binding Properties Panel", ex); //$NON-NLS-1$
}
}
- private ConnectorManager getConnectorManager() {
- return ModelManager.getConnectorManager(connection);
+ private ConfigurationManager getConfigurationManager() {
+ return ModelManager.getConfigurationManager(connection);
}
private void init() {
@@ -98,23 +103,23 @@
pnlOuter.setLayout(new GridBagLayout());
- lblBindingName.setText("Binding Name:"); //$NON-NLS-1$
- lblConnectorName.setText("Connector Type:"); //$NON-NLS-1$
+ // lblBindingName.setText("Service Name:"); //$NON-NLS-1$
+ lblServiceName.setText("Servicie Name:"); //$NON-NLS-1$
- txfBindingName.setEditable(false);
- txfConnectorName.setEditable(false);
+// txfBindingName.setEditable(false);
+ txfServiceName.setEditable(false);
add(pnlPOPShell, BorderLayout.CENTER);
}
- private PropertiedObjectEditor getPropertiedObjectEditor() {
+ private ConfigurationPropertiedObjectEditor getPropertiedObjectEditor() {
if (poe == null) {
// 4. create a PropertiedObjectEditor
try {
- poe = getConnectorManager().getPropertiedObjectEditor();
+ poe = getConfigurationManager().getPropertiedObjectEditor();
} catch (Exception e) {
ExceptionUtility.showMessage(
- "Failed to get editor for Binding propd panel ", e); //$NON-NLS-1$
+ "Failed to get editor for Service Properties panel ", e); //$NON-NLS-1$
}
}
return poe;
@@ -130,7 +135,7 @@
poe = getPropertiedObjectEditor();
// 5. Create the PropertiedObjectPanel
- pop = new PropertiedObjectPanel(poe, getConnectorManager().getEncryptor());
+ pop = new PropertiedObjectPanel(poe, getConfigurationManager().getEncryptor());
} catch (RuntimeException ex) {
StaticUtilities.endWait(ConsoleMainFrame.getInstance());
throw ex;
@@ -156,19 +161,19 @@
StaticUtilities.endWait(ConsoleMainFrame.getInstance());
}
- public void setConnectorBinding(ServiceComponentDefn svcDefn) {
+ public void setServiceComponentDefn(ServiceComponentDefn svcDefn) {
this.serviceDefn = svcDefn;
populateTable();
}
- public ServiceComponentDefn getConnectorBinding() {
+ public ServiceComponentDefn getServiceComponentDefn() {
return serviceDefn;
}
public void updatePropertiedObjectPanel() {
- ServiceComponentDefn connectorBindingDefn = getConnectorBinding();
+ ServiceComponentDefn svcdefn = getServiceComponentDefn();
try {
- poPropObject = getConnectorManager().getPropertiedObject(connectorBindingDefn);
+ poPropObject = getConfigurationManager().getPropertiedObjectForComponentObject(svcdefn);
getPropertiedObjectPanel().setNameColumnHeaderWidth(0);
getPropertiedObjectPanel().setPropertiedObject(poPropObject, poe);
poe.setReadOnly(poPropObject, false);
@@ -217,7 +222,7 @@
getPropertiedObjectPanel().refreshDisplay();
}
- public ServiceComponentDefn getNewConnectorBinding() {
+ public ServiceComponentDefn getNewComponentDefn() {
return serviceDefn;
}
@@ -227,15 +232,16 @@
StaticUtilities.displayModalDialogWithOK("Modify Service Definition", //$NON-NLS-1$
"Note: Change will not take effect until connector is " + //$NON-NLS-1$
"restarted in the System State panel."); //$NON-NLS-1$
- getConnectorManager().saveConnectorBinding(maq);
+ // getConfigurationManager().saveConnectorBinding(maq);
+ getConfigurationManager().modifyPropertiedObject(poe);
- ConnectorBinding cb = (ConnectorBinding) getConnectorManager().getConfigurationAdminAPI().getComponentDefn(Configuration.NEXT_STARTUP_ID,
+ ServiceComponentDefn svc = (ServiceComponentDefn) getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID).getServiceComponentDefn(
(ComponentDefnID) serviceDefn.getID());
- setConnectorBinding(cb);
+ setServiceComponentDefn(svc);
} catch (Exception ex) {
- LogManager.logError(LogContexts.CONNECTOR_BINDINGS, ex,
+ LogManager.logError(LogContexts.CONFIG, ex,
"Error saving service definition changes."); //$NON-NLS-1$
ExceptionUtility.showMessage("Error saving service definition changes", //$NON-NLS-1$
ex);
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java 2009-04-16 12:46:52 UTC (rev 783)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java 2009-04-16 15:09:06 UTC (rev 784)
@@ -74,8 +74,9 @@
public static final String[] SERV_DEF_HDRS;
// public static final int VM_COL = 0;
public static final int SERV_COL = 0;
- public static final int ENABLED_COL = 1;
- public static final int ESSENTIAL_COL = 2;
+ public static final int CONNECTOR_COL= 1;
+ public static final int ENABLED_COL = 2;
+ public static final int ESSENTIAL_COL = 3;
/** Key for UserPreferences file for last import/export directory. */
// public static final String LAST_DIR =
@@ -105,9 +106,10 @@
DEPLOY_HDRS[PROCESS_COL] = getString("dpu.deployedprocess.hdr");
// DEPLOY_HDRS[DEPLOY_SVC_COL] = getString("dpu.deployedsvc.hdr");
- SERV_DEF_HDRS = new String[3];
+ SERV_DEF_HDRS = new String[4];
// SERV_DEF_HDRS[VM_COL] = getString("dpu.vm.hdr");
SERV_DEF_HDRS[SERV_COL] = getString("dpu.service.hdr");
+ SERV_DEF_HDRS[CONNECTOR_COL] = getString("dpu.connector.hdr");
SERV_DEF_HDRS[ENABLED_COL] = getString("dpu.enabled.hdr");
SERV_DEF_HDRS[ESSENTIAL_COL] = getString("dpu.essential.hdr");
@@ -255,11 +257,13 @@
row.setElementAt(dsvc, SERV_COL);
ServiceComponentDefnID svcID = (ServiceComponentDefnID) dsvc.getServiceComponentDefnID();
+ ServiceComponentDefn svc = null;
+
+ svc = (ServiceComponentDefn) theConfiguration.getComponentDefn(svcID);
- ServiceComponentDefn svc = theConfiguration
- .getServiceComponentDefn(dsvc
- .getServiceComponentDefnID());
-
+ if (dsvc.isDeployedConnector()) {
+ row.setElementAt(svc.getComponentTypeID().getName(), CONNECTOR_COL);
+ }
row.setElementAt(new Boolean(dsvc.isEnabled()), ENABLED_COL);
row.setElementAt(new Boolean(svc.isEssential()),
ESSENTIAL_COL);
Modified: branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties
===================================================================
--- branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties 2009-04-16 12:46:52 UTC (rev 783)
+++ branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties 2009-04-16 15:09:06 UTC (rev 784)
@@ -184,6 +184,7 @@
dpu.deployedhost.hdr="Host Identifier"
dpu.deployedprocess.hdr="Process"
dpu.deployedsvc.hdr="Service"
+dpu.connector.hdr="Connector Type"
dpu.enabled.hdr="Enabled"
dpu.essential.hdr="Essential"
dpu.msg.initerror="DeployPkgUtils init"
15 years, 8 months
teiid SVN: r783 - in branches/remove_psc/console: src/main/java/com/metamatrix/console/models and 13 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-04-16 08:46:52 -0400 (Thu, 16 Apr 2009)
New Revision: 783
Added:
branches/remove_psc/console/console_prefs.properties
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
Removed:
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardPSCEnablePanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardPSCEnablePanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/CreatePSCPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedPscPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ProductDefinitionPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscDefinitionPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscSummaryPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/UpdatePSCPanel.java
Modified:
branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConfigurationManager.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConnectorManager.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/models/RuntimeMgmtManager.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTree.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTreeModel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/WorkspaceController.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardController.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardRenamePanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardController.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigSummaryPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigurationTreeCellRenderer.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedServicePanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeploymentsSummaryPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DetailPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationChangeEvent.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationTreeModelEvent.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/ProcessMgmtPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeMgmtPanel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeStateCellRenderer.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/model/RuntimeMgmtModel.java
branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/util/RuntimeMgmtUtils.java
branches/remove_psc/console/src/main/resources/com/metamatrix/console/i18n.properties
branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties
branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/runtime/data/ui.properties
branches/remove_psc/console/src/test/resources/console_config.properties
Log:
Teiid 323 - changes to console due to refactured, removing unused Config API classes: ProductType, ProductTypeID and ConfigurationLock
Added: branches/remove_psc/console/console_prefs.properties
===================================================================
--- branches/remove_psc/console/console_prefs.properties (rev 0)
+++ branches/remove_psc/console/console_prefs.properties 2009-04-16 12:46:52 UTC (rev 783)
@@ -0,0 +1,21 @@
+#MetaMatrix preferences file - all rights reserved
+#Wed Apr 15 12:27:12 CDT 2009
+refresh_rate.transaction=60
+refresh_enabled.transaction=60
+refresh_rate.summary=60
+refresh_rate.resource_pools=60
+refresh_rate.syslog=60
+timeformat=hh\:mm\:ss a
+refresh_enabled.summary=60
+connection.use_last_url_as_default=true
+refresh_rate.session=60
+connection_default=mm\://localhost\:31000
+refresh_enabled.session=60
+connection.url.name.1=mm\://localhost\:31000
+refresh_rate.query=60
+refresh_enabled.syslog=60
+dateformat=MMM dd, yyyy
+metamatrix.console.directory=/Users/vanhalbert/svn/products/jbedsp/trunk/jbedsp-build/target/distribution/artifacts/server-0.0.1-SNAPSHOT/util
+refresh_enabled.resource_pools=60
+default.username=mmadmin
+refresh_enabled.query=60
Property changes on: branches/remove_psc/console/console_prefs.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConfigurationManager.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConfigurationManager.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConfigurationManager.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -40,7 +40,6 @@
import com.metamatrix.api.exception.security.AuthorizationException;
import com.metamatrix.common.actions.ActionDefinition;
import com.metamatrix.common.actions.ModificationActionQueue;
-import com.metamatrix.common.config.api.ComponentDefnID;
import com.metamatrix.common.config.api.ComponentObject;
import com.metamatrix.common.config.api.ComponentTypeDefn;
import com.metamatrix.common.config.api.ComponentTypeID;
@@ -50,13 +49,8 @@
import com.metamatrix.common.config.api.ConfigurationObjectEditor;
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.DeployedComponent;
-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.ServiceComponentDefn;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
@@ -106,29 +100,29 @@
private ConfigurationObjectEditor configEditor;
- private HashMap configs = new HashMap();
+ private ConfigurationModelContainer config = null;
//key=HostID
//value=HashMap (key=ConfigID, value=Collection of VMComponentDefnIDs)
- private HashMap hostDeployments = new HashMap();
+ // private HashMap hostDeployments = new HashMap();
// Key=VMComponentDefn id
// value=Collection of ProductServiceConfigIDs
- private HashMap deployedPscs = new HashMap();
+// private HashMap deployedPscs = new HashMap();
// Key=ProductServiceConfig id
// value=(key=VMComponentDefnID value=Collection of DeployedComponentID-services)
// ProductServiceConfigID -> {VMComponentDefnID -> ArrayList[DeployedComponentID]}
- private HashMap deployedServices = new HashMap();
+ // private HashMap deployedServices = new HashMap();
//Key=id, value=ProductType/
// private HashMap products = new HashMap();
//key=ProductType ID, value=HashMap (key=ConfigID, value=Collection of psc def IDs)
- private HashMap prodPscDefs = new HashMap();
+// private HashMap prodPscDefs = new HashMap();
//key=ProductServiceConfigID id, value=value=Collection of service def IDs
- private HashMap serviceDefnMap = new HashMap();
+// private HashMap serviceDefnMap = new HashMap();
private ConfigurationID nextStartUpId = Configuration.NEXT_STARTUP_ID;
@@ -216,16 +210,13 @@
}
private void notifyHostChangeToConfigs(Host theHost, int eventType) {
- Iterator itr = configs.values().iterator();
- while (itr.hasNext()) {
- ConfigurationModelContainer config = (ConfigurationModelContainer)itr.next();
- fireConfigurationChange(
+ fireConfigurationChange(
new ConfigurationChangeEvent(
eventType,
theHost,
config.getConfiguration(),
new Object[] { config.getConfiguration()}));
- }
+
}
/**
@@ -235,19 +226,19 @@
* @param theProcess the process the PSCs belong to
* @param theConfigId the ID of the configuration
*/
- public void changeDeployedPsc(
- ProductServiceConfig theOldPsc,
- ProductServiceConfig theNewPsc,
- VMComponentDefn theProcess,
- Host theHost,
- ConfigurationID theConfigId)
- throws ExternalException {
+// public void changeDeployedPsc(
+// ProductServiceConfig theOldPsc,
+// ProductServiceConfig theNewPsc,
+// VMComponentDefn theProcess,
+// Host theHost,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+////??// this should really be wrapped in a transaction!!!!
+// deleteDeployedPsc(theOldPsc, theProcess, theHost, theConfigId);
+// deployPsc(theNewPsc, theProcess, theHost, theConfigId);
+// }
-//??// this should really be wrapped in a transaction!!!!
- deleteDeployedPsc(theOldPsc, theProcess, theHost, theConfigId);
- deployPsc(theNewPsc, theProcess, theHost, theConfigId);
- }
-
public void commitImportedObjects(Collection theImportedObjects)
throws ExternalException {
@@ -370,19 +361,19 @@
getAPI().executeTransaction(editor.getDestination().popActions());
// update local cache
- HashMap map = (HashMap)hostDeployments.get(theHost.getID());
- if (map == null) {
- // this is first deployed process
- map = new HashMap();
- hostDeployments.put(theHost.getID(), map);
- }
- Collection procs = (Collection)map.get(theConfigId);
- if (procs == null) {
- // first deployed process
- procs = new ArrayList(1);
- map.put(theConfigId, procs);
- }
- procs.add(processDefn.getID());
+// HashMap map = (HashMap)hostDeployments.get(theHost.getID());
+// if (map == null) {
+// // this is first deployed process
+// map = new HashMap();
+// hostDeployments.put(theHost.getID(), map);
+// }
+// Collection procs = (Collection)map.get(theConfigId);
+// if (procs == null) {
+// // first deployed process
+// procs = new ArrayList(1);
+// map.put(theConfigId, procs);
+// }
+ // procs.add(processDefn.getID());
// notify listeners
fireConfigurationChange(
@@ -416,63 +407,63 @@
* definition is contained in.
* @throws ExternalException if problem occurs creating the PSC definition
*/
- public ProductServiceConfig copyPscDef(
- String thePscDefName,
- ProductServiceConfig thePscBeingCopied,
- ConfigurationID theConfigId)
- throws ExternalException {
-
- ConfigurationObjectEditor editor = null;
- String attemptedAction = ""; //$NON-NLS-1$
- try {
- Configuration config = getConfig(theConfigId);
- editor = getEditor();
- attemptedAction = "createProductServiceConfig()"; //$NON-NLS-1$
- ProductServiceConfig pscDef =
- editor.createProductServiceConfig(
- config, thePscBeingCopied, thePscDefName);
- attemptedAction = "executeTransaction()"; //$NON-NLS-1$
- getAPI().executeTransaction(editor.getDestination().popActions());
-
- // update cache
- ProductType product = getProduct(thePscBeingCopied);
- Map map = (Map)prodPscDefs.get(product.getID());
- attemptedAction = "map.get()"; //$NON-NLS-1$
- Collection pscDefs = (Collection)map.get(theConfigId);
- if (pscDefs == null) {
- pscDefs = new ArrayList();
- }
- attemptedAction = "pscDefs.add()"; //$NON-NLS-1$
- pscDefs.add(pscDef.getID());
-
- // notify listeners
- attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- pscDef,
- config,
- new Object[] {getProduct(pscDef), config}));
-
- // add Service defns
- attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
- getServiceDefinitions(pscDef, config);
- return pscDef;
- } catch (Exception theException) {
- // rollback
- if (editor != null) {
- editor.getDestination().popActions();
- }
- throw new ExternalException(
- formatErrorMsg("createPscDef", //$NON-NLS-1$
- "psc name=" + thePscDefName + //$NON-NLS-1$
- ", source PSC=" + thePscBeingCopied + //$NON-NLS-1$
- ", config=" + theConfigId + //$NON-NLS-1$
- ", attempted action = " + attemptedAction, //$NON-NLS-1$
- theException),
- theException);
- }
- }
+// public ProductServiceConfig copyPscDef(
+// String thePscDefName,
+// ProductServiceConfig thePscBeingCopied,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+// ConfigurationObjectEditor editor = null;
+// String attemptedAction = ""; //$NON-NLS-1$
+// try {
+// Configuration config = getConfig(theConfigId);
+// editor = getEditor();
+// attemptedAction = "createProductServiceConfig()"; //$NON-NLS-1$
+// ProductServiceConfig pscDef =
+// editor.createProductServiceConfig(
+// config, thePscBeingCopied, thePscDefName);
+// attemptedAction = "executeTransaction()"; //$NON-NLS-1$
+// getAPI().executeTransaction(editor.getDestination().popActions());
+//
+// // update cache
+// ProductType product = BasicProductType.PRODUCT_TYPE;
+// Map map = (Map)prodPscDefs.get(product.getID());
+// attemptedAction = "map.get()"; //$NON-NLS-1$
+// Collection pscDefs = (Collection)map.get(theConfigId);
+// if (pscDefs == null) {
+// pscDefs = new ArrayList();
+// }
+// attemptedAction = "pscDefs.add()"; //$NON-NLS-1$
+// pscDefs.add(pscDef.getID());
+//
+// // notify listeners
+// attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// pscDef,
+// config,
+// new Object[] {BasicProductType.PRODUCT_TYPE, config}));
+//
+// // add Service defns
+// attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
+// getServiceDefinitions(pscDef, config);
+// return pscDef;
+// } catch (Exception theException) {
+// // rollback
+// if (editor != null) {
+// editor.getDestination().popActions();
+// }
+// throw new ExternalException(
+// formatErrorMsg("createPscDef", //$NON-NLS-1$
+// "psc name=" + thePscDefName + //$NON-NLS-1$
+// ", source PSC=" + thePscBeingCopied + //$NON-NLS-1$
+// ", config=" + theConfigId + //$NON-NLS-1$
+// ", attempted action = " + attemptedAction, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// }
/**
* Updates a PSC definition. The the service IDs will replace the current
@@ -481,62 +472,63 @@
* @param theServiceIds the service IDs to replace current service IDs
* @throws ExternalException if problem occurs updating the PSC definition
*/
- public ProductServiceConfig updatePscDef(
- ProductServiceConfig thePscDef,
- Collection theServiceIds)
- throws ExternalException {
-
- ConfigurationObjectEditor editor = null;
- String attemptedAction = ""; //$NON-NLS-1$
- try {
- Configuration config = getConfig(Configuration.NEXT_STARTUP_ID);
- editor = getEditor();
- attemptedAction = "updateProductServiceConfig()"; //$NON-NLS-1$
-
- thePscDef = editor.updateProductServiceConfig(config, thePscDef, theServiceIds);
-
- attemptedAction = "executeTransaction()"; //$NON-NLS-1$
- getAPI().executeTransaction(editor.getDestination().popActions());
-
- ProductType product = getProduct(thePscDef);
- Map map = (Map)prodPscDefs.get(product.getID());
- attemptedAction = "map.get()"; //$NON-NLS-1$
- Collection pscDefs = (Collection)map.get(config.getID());
- if (pscDefs == null) {
- pscDefs = new ArrayList();
- }
- attemptedAction = "pscDefs.updated()"; //$NON-NLS-1$
- pscDefs.add(thePscDef.getID());
-
- // notify listeners
- attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.MODIFIED,
- thePscDef,
- config,
- new Object[] {getProduct(thePscDef), config}));
-
- // add Service defns
- attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
- getServiceDefinitions(thePscDef, config);
- return thePscDef;
- } catch (Exception theException) {
- // rollback
- if (editor != null) {
- editor.getDestination().popActions();
- }
- throw new ExternalException(
- formatErrorMsg("updatePscDef", //$NON-NLS-1$
- "psc name=" + thePscDef.getName() + //$NON-NLS-1$
- ", prodType=" + thePscDef.getComponentTypeID() + //$NON-NLS-1$
- ", config=" + Configuration.NEXT_STARTUP_ID + //$NON-NLS-1$
- ", attempted action = " + attemptedAction, //$NON-NLS-1$
- theException),
- theException);
- }
-
- }
+// public ProductServiceConfig updatePscDef(
+// ProductServiceConfig thePscDef,
+// Collection theServiceIds)
+// throws ExternalException {
+//
+// ConfigurationObjectEditor editor = null;
+// String attemptedAction = ""; //$NON-NLS-1$
+// try {
+// Configuration config = getConfig(Configuration.NEXT_STARTUP_ID);
+// editor = getEditor();
+// attemptedAction = "updateProductServiceConfig()"; //$NON-NLS-1$
+//
+// thePscDef = editor.updateProductServiceConfig(config, thePscDef, theServiceIds);
+//
+// attemptedAction = "executeTransaction()"; //$NON-NLS-1$
+// getAPI().executeTransaction(editor.getDestination().popActions());
+//
+// ProductType product = BasicProductType.PRODUCT_TYPE;
+// //getProduct(thePscDef);
+// Map map = (Map)prodPscDefs.get(product.getID());
+// attemptedAction = "map.get()"; //$NON-NLS-1$
+// Collection pscDefs = (Collection)map.get(config.getID());
+// if (pscDefs == null) {
+// pscDefs = new ArrayList();
+// }
+// attemptedAction = "pscDefs.updated()"; //$NON-NLS-1$
+// pscDefs.add(thePscDef.getID());
+//
+// // notify listeners
+// attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.MODIFIED,
+// thePscDef,
+// config,
+// new Object[] {BasicProductType.PRODUCT_TYPE, config}));
+//
+// // add Service defns
+// attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
+// getServiceDefinitions(thePscDef, config);
+// return thePscDef;
+// } catch (Exception theException) {
+// // rollback
+// if (editor != null) {
+// editor.getDestination().popActions();
+// }
+// throw new ExternalException(
+// formatErrorMsg("updatePscDef", //$NON-NLS-1$
+// "psc name=" + thePscDef.getName() + //$NON-NLS-1$
+// ", prodType=" + thePscDef.getComponentTypeID() + //$NON-NLS-1$
+// ", config=" + Configuration.NEXT_STARTUP_ID + //$NON-NLS-1$
+// ", attempted action = " + attemptedAction, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+//
+// }
/**
* Creates a PSC definition. New PSC definitions are created by copying
@@ -547,70 +539,70 @@
* definition is contained in.
* @throws ExternalException if problem occurs creating the PSC definition
*/
- public ProductServiceConfig createPscDef(
- String thePscDefName,
- ProductTypeID thePscProdTypeID,
- Collection theServiceIds,
- ConfigurationID theConfigId)
- throws ExternalException {
-
- ConfigurationObjectEditor editor = null;
- String attemptedAction = ""; //$NON-NLS-1$
- try {
- Configuration config = getConfig(theConfigId);
- editor = getEditor();
- attemptedAction = "createProductServiceConfig()"; //$NON-NLS-1$
- ProductServiceConfig pscDef =
- editor.createProductServiceConfig(config, thePscProdTypeID, thePscDefName);
-
-
- for (Iterator sidIt=theServiceIds.iterator(); sidIt.hasNext(); ) {
- ServiceComponentDefnID id = (ServiceComponentDefnID) sidIt.next();
-
- editor.addServiceComponentDefn(pscDef, id);
- }
-
- attemptedAction = "executeTransaction()"; //$NON-NLS-1$
- getAPI().executeTransaction(editor.getDestination().popActions());
-
- ProductType product = getProduct(pscDef);
- Map map = (Map)prodPscDefs.get(product.getID());
- attemptedAction = "map.get()"; //$NON-NLS-1$
- Collection pscDefs = (Collection)map.get(theConfigId);
- if (pscDefs == null) {
- pscDefs = new ArrayList();
- }
- attemptedAction = "pscDefs.add()"; //$NON-NLS-1$
- pscDefs.add(pscDef.getID());
-
- // notify listeners
- attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- pscDef,
- config,
- new Object[] {getProduct(pscDef), config}));
-
- // add Service defns
- attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
- getServiceDefinitions(pscDef, config);
- return pscDef;
- } catch (Exception theException) {
- // rollback
- if (editor != null) {
- editor.getDestination().popActions();
- }
- throw new ExternalException(
- formatErrorMsg("createPscDef", //$NON-NLS-1$
- "psc name=" + thePscDefName + //$NON-NLS-1$
- ", prodType=" + thePscProdTypeID + //$NON-NLS-1$
- ", config=" + theConfigId + //$NON-NLS-1$
- ", attempted action = " + attemptedAction, //$NON-NLS-1$
- theException),
- theException);
- }
- }
+// public ProductServiceConfig createPscDef(
+// String thePscDefName,
+// ProductTypeID thePscProdTypeID,
+// Collection theServiceIds,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+// ConfigurationObjectEditor editor = null;
+// String attemptedAction = ""; //$NON-NLS-1$
+// try {
+// Configuration config = getConfig(theConfigId);
+// editor = getEditor();
+// attemptedAction = "createProductServiceConfig()"; //$NON-NLS-1$
+// ProductServiceConfig pscDef =
+// editor.createProductServiceConfig(config, thePscProdTypeID, thePscDefName);
+//
+//
+// for (Iterator sidIt=theServiceIds.iterator(); sidIt.hasNext(); ) {
+// ServiceComponentDefnID id = (ServiceComponentDefnID) sidIt.next();
+//
+// editor.addServiceComponentDefn(pscDef, id);
+// }
+//
+// attemptedAction = "executeTransaction()"; //$NON-NLS-1$
+// getAPI().executeTransaction(editor.getDestination().popActions());
+//
+// ProductType product = BasicProductType.PRODUCT_TYPE;
+// Map map = (Map)prodPscDefs.get(product.getID());
+// attemptedAction = "map.get()"; //$NON-NLS-1$
+// Collection pscDefs = (Collection)map.get(theConfigId);
+// if (pscDefs == null) {
+// pscDefs = new ArrayList();
+// }
+// attemptedAction = "pscDefs.add()"; //$NON-NLS-1$
+// pscDefs.add(pscDef.getID());
+//
+// // notify listeners
+// attemptedAction = "fireConfigurationChange()"; //$NON-NLS-1$
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// pscDef,
+// config,
+// new Object[] {BasicProductType.PRODUCT_TYPE, config}));
+//
+// // add Service defns
+// attemptedAction = "getServiceDefinitions()"; //$NON-NLS-1$
+// getServiceDefinitions(pscDef, config);
+// return pscDef;
+// } catch (Exception theException) {
+// // rollback
+// if (editor != null) {
+// editor.getDestination().popActions();
+// }
+// throw new ExternalException(
+// formatErrorMsg("createPscDef", //$NON-NLS-1$
+// "psc name=" + thePscDefName + //$NON-NLS-1$
+// ", prodType=" + thePscProdTypeID + //$NON-NLS-1$
+// ", config=" + theConfigId + //$NON-NLS-1$
+// ", attempted action = " + attemptedAction, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// }
/**
@@ -649,70 +641,70 @@
}
}
- public void deleteDeployedPsc(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess,
- Host theHost,
- ConfigurationID theConfigId)
- throws ExternalException {
-
- ConfigurationObjectEditor editor = null;
- try {
- // since PSCs are not really deployed, must get all their deployed
- // services and delete them
- Configuration config = getConfig(theConfigId);
- // each process has only one deployed component
-// Collection deployedComps =
-// config.getDeployedComponents((ComponentDefnID)theProcess.getID());
-// if ((deployedComps == null) || (deployedComps.isEmpty())) {
-// throw new IllegalStateException(
-// "ConfigurationManager.deleteDeployedPsc:" + //$NON-NLS-1$
-// " VM does not have a deployed component. PSC=" + thePsc + //$NON-NLS-1$
-// ", process=" + theProcess + ", config=" + theConfigId); //$NON-NLS-1$ //$NON-NLS-2$
+// public void deleteDeployedPsc(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess,
+// Host theHost,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+// ConfigurationObjectEditor editor = null;
+// try {
+// // since PSCs are not really deployed, must get all their deployed
+// // services and delete them
+// Configuration config = getConfig(theConfigId);
+// // each process has only one deployed component
+//// Collection deployedComps =
+//// config.getDeployedComponents((ComponentDefnID)theProcess.getID());
+//// if ((deployedComps == null) || (deployedComps.isEmpty())) {
+//// throw new IllegalStateException(
+//// "ConfigurationManager.deleteDeployedPsc:" + //$NON-NLS-1$
+//// " VM does not have a deployed component. PSC=" + thePsc + //$NON-NLS-1$
+//// ", process=" + theProcess + ", config=" + theConfigId); //$NON-NLS-1$ //$NON-NLS-2$
+//// }
+//// DeployedComponent deployedVm =
+//// (DeployedComponent)deployedComps.iterator().next();
+// Collection services = config.getDeployedServices(theProcess, thePsc);
+// if (services != null) {
+// editor = getEditor();
+// Iterator servItr = services.iterator();
+// while (servItr.hasNext()) {
+// ComponentObject service = (ComponentObject)servItr.next();
+// editor.delete(service, config, true);
+//
+// }
+// // persist delete
+// getAPI().executeTransaction(editor.getDestination().popActions());
+//
+// Collection pscs = (Collection)deployedPscs.get(theProcess.getID());
+// pscs.remove(thePsc.getID());
+// HashMap map = (HashMap)deployedServices.get(thePsc.getID());
+// map.remove(theProcess.getID());
+//
+//
+// // notify listeners
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.DELETED,
+// thePsc,
+// config,
+// new Object[] {theProcess, theHost, config}));
// }
-// DeployedComponent deployedVm =
-// (DeployedComponent)deployedComps.iterator().next();
- Collection services = config.getDeployedServices(theProcess, thePsc);
- if (services != null) {
- editor = getEditor();
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- ComponentObject service = (ComponentObject)servItr.next();
- editor.delete(service, config, true);
+// } catch (Exception theException) {
+// // rollback
+// if (editor != null) {
+// editor.getDestination().popActions();
+// }
+// throw new ExternalException(
+// formatErrorMsg("deleteDeployedPsc", //$NON-NLS-1$
+// "PSC=" + thePsc + ", process=" + theProcess + //$NON-NLS-1$ //$NON-NLS-2$
+// ", host=" + theHost + //$NON-NLS-1$
+// ", config=" + theConfigId, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// }
- }
- // persist delete
- getAPI().executeTransaction(editor.getDestination().popActions());
-
- Collection pscs = (Collection)deployedPscs.get(theProcess.getID());
- pscs.remove(thePsc.getID());
- HashMap map = (HashMap)deployedServices.get(thePsc.getID());
- map.remove(theProcess.getID());
-
-
- // notify listeners
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.DELETED,
- thePsc,
- config,
- new Object[] {theProcess, theHost, config}));
- }
- } catch (Exception theException) {
- // rollback
- if (editor != null) {
- editor.getDestination().popActions();
- }
- throw new ExternalException(
- formatErrorMsg("deleteDeployedPsc", //$NON-NLS-1$
- "PSC=" + thePsc + ", process=" + theProcess + //$NON-NLS-1$ //$NON-NLS-2$
- ", host=" + theHost + //$NON-NLS-1$
- ", config=" + theConfigId, //$NON-NLS-1$
- theException),
- theException);
- }
- }
-
public void deleteHost(
Host theHost,
ConfigurationID theConfigId)
@@ -743,16 +735,13 @@
}
private void deleteHostFromConfigs(Host theHost) {
- Iterator itr = configs.values().iterator();
- while (itr.hasNext()) {
- ConfigurationModelContainer config = (ConfigurationModelContainer)itr.next();
- fireConfigurationChange(
+ fireConfigurationChange(
new ConfigurationChangeEvent(
ConfigurationChangeEvent.DELETED,
theHost,
config.getConfiguration(),
new Object[] {config.getConfiguration()}));
- }
+
}
public void deleteProcess(
@@ -776,24 +765,18 @@
// update caches
BaseID processID = theProcess.getID();
- Collection pscs = (Collection)deployedPscs.get(processID);
- if (pscs != null) {
- // process first deployed psc
- pscs = new ArrayList();
- deployedPscs.remove(processID);
- }
- Iterator pscItr = deployedServices.values().iterator();
- while (pscItr.hasNext()) {
- Map pscToSvcMap = (Map) pscItr.next();
- pscToSvcMap.remove(processID);
- }
+// Iterator pscItr = deployedServices.values().iterator();
+// while (pscItr.hasNext()) {
+// Map pscToSvcMap = (Map) pscItr.next();
+// pscToSvcMap.remove(processID);
+// }
- HashMap map = (HashMap)hostDeployments.get(hostId);
- Collection procs = (Collection)map.get(theConfigId);
- if (procs != null) {
- procs.remove(processID);
- }
+// HashMap map = (HashMap)hostDeployments.get(hostId);
+// Collection procs = (Collection)map.get(theConfigId);
+// if (procs != null) {
+// procs.remove(processID);
+// }
// notify listeners
Host host = config.getHost(hostId.getFullName());
@@ -816,117 +799,117 @@
}
}
- public void deletePscDefinition(
- ProductServiceConfig thePsc,
- ProductType theProduct,
- ConfigurationID theConfigId)
- throws ExternalException {
+// public void deletePscDefinition(
+// ProductServiceConfig thePsc,
+// ProductType theProduct,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+// try {
+// delete(thePsc, theConfigId, false);
+//
+// // update cache
+// Map map = (Map)prodPscDefs.get(theProduct.getID());
+// Collection pscDefs = (Collection)map.get(theConfigId);
+// if (pscDefs != null) {
+// pscDefs.remove(thePsc.getID());
+// }
+//
+// // notify listeners
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.DELETED,
+// thePsc,
+// getConfig(theConfigId),
+// new Object[] {theProduct,
+// getConfig(theConfigId)}));
+// } catch (Exception theException) {
+// throw new ExternalException(
+// formatErrorMsg("deletePscDefinition", //$NON-NLS-1$
+// "PSC=" + thePsc + //$NON-NLS-1$
+// ", product=" + theProduct + //$NON-NLS-1$
+// ", config=" + theConfigId, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// }
- try {
- delete(thePsc, theConfigId, false);
-
- // update cache
- Map map = (Map)prodPscDefs.get(theProduct.getID());
- Collection pscDefs = (Collection)map.get(theConfigId);
- if (pscDefs != null) {
- pscDefs.remove(thePsc.getID());
- }
-
- // notify listeners
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.DELETED,
- thePsc,
- getConfig(theConfigId),
- new Object[] {theProduct,
- getConfig(theConfigId)}));
- } catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("deletePscDefinition", //$NON-NLS-1$
- "PSC=" + thePsc + //$NON-NLS-1$
- ", product=" + theProduct + //$NON-NLS-1$
- ", config=" + theConfigId, //$NON-NLS-1$
- theException),
- theException);
- }
- }
-
// creates a new PSC under a process
- public void deployPsc(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess,
- Host theHost,
- ConfigurationID theConfigId)
- throws ExternalException {
+// public void deployPsc(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess,
+// Host theHost,
+// ConfigurationID theConfigId)
+// throws ExternalException {
+//
+// ConfigurationObjectEditor editor = null;
+// try {
+// editor = getEditor();
+// Configuration config = getConfig(theConfigId);
+// Collection result =
+// editor.deployProductServiceConfig(
+// config,
+// thePsc,
+// (HostID)theHost.getID(),
+// (VMComponentDefnID)theProcess.getID());
+// getAPI().executeTransaction(editor.getDestination().popActions());
+//
+// // update cache
+// Collection pscs = (Collection)deployedPscs.get(theProcess.getID());
+// if (pscs == null) {
+// // process first deployed psc
+// pscs = new ArrayList();
+// deployedPscs.put(theProcess.getID(), pscs);
+// }
+// pscs.add(thePsc.getID());
+// HashMap map = new HashMap();
+// Collection ids = new ArrayList(result.size());
+// for (Iterator it=result.iterator(); it.hasNext(); ) {
+// DeployedComponent dc=(DeployedComponent)it.next();
+// ids.add(dc.getID());
+// }
+// map.put(theProcess.getID(), ids);
+// deployedServices.put(thePsc.getID(), map);
+//
+// // notify listeners
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// thePsc,
+// config,
+// new Object[] {theProcess,
+// theHost,
+// config}));
+// if (result != null) {
+// Iterator itr = result.iterator();
+// while (itr.hasNext()) {
+// DeployedComponent service = (DeployedComponent)itr.next();
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// service,
+// config,
+// new Object[] {thePsc, theProcess, theHost, config}));
+// }
+// }
+//
+// // update cache
+// } catch (Exception theException) {
+// // rollback
+// if (editor != null) {
+// editor.getDestination().popActions();
+// }
+// throw new ExternalException(
+// formatErrorMsg("deployPsc", //$NON-NLS-1$
+// "PSC=" + thePsc + //$NON-NLS-1$
+// ", process=" + theProcess + //$NON-NLS-1$
+// ", host=" + theHost + //$NON-NLS-1$
+// ", config=" + theConfigId, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// }
- ConfigurationObjectEditor editor = null;
- try {
- editor = getEditor();
- Configuration config = getConfig(theConfigId);
- Collection result =
- editor.deployProductServiceConfig(
- config,
- thePsc,
- (HostID)theHost.getID(),
- (VMComponentDefnID)theProcess.getID());
- getAPI().executeTransaction(editor.getDestination().popActions());
-
- // update cache
- Collection pscs = (Collection)deployedPscs.get(theProcess.getID());
- if (pscs == null) {
- // process first deployed psc
- pscs = new ArrayList();
- deployedPscs.put(theProcess.getID(), pscs);
- }
- pscs.add(thePsc.getID());
- HashMap map = new HashMap();
- Collection ids = new ArrayList(result.size());
- for (Iterator it=result.iterator(); it.hasNext(); ) {
- DeployedComponent dc=(DeployedComponent)it.next();
- ids.add(dc.getID());
- }
- map.put(theProcess.getID(), ids);
- deployedServices.put(thePsc.getID(), map);
-
- // notify listeners
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- thePsc,
- config,
- new Object[] {theProcess,
- theHost,
- config}));
- if (result != null) {
- Iterator itr = result.iterator();
- while (itr.hasNext()) {
- DeployedComponent service = (DeployedComponent)itr.next();
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- service,
- config,
- new Object[] {thePsc, theProcess, theHost, config}));
- }
- }
-
- // update cache
- } catch (Exception theException) {
- // rollback
- if (editor != null) {
- editor.getDestination().popActions();
- }
- throw new ExternalException(
- formatErrorMsg("deployPsc", //$NON-NLS-1$
- "PSC=" + thePsc + //$NON-NLS-1$
- ", process=" + theProcess + //$NON-NLS-1$
- ", host=" + theHost + //$NON-NLS-1$
- ", config=" + theConfigId, //$NON-NLS-1$
- theException),
- theException);
- }
- }
-
private void fireConfigurationChange(ConfigurationChangeEvent theEvent) {
LogManager.logDetail(LogContexts.PSCDEPLOY,
"ConfigurationChangeEvent=" + theEvent.paramString()); //$NON-NLS-1$
@@ -961,7 +944,7 @@
}
public ConfigurationModelContainer getConfigModel(ConfigurationID theId) {
- return (ConfigurationModelContainer) configs.get(theId);
+ return config;
}
public Collection getConfigObjects(ConfigurationID theConfigId)
@@ -980,103 +963,101 @@
}
}
- public Collection getDeployedPscs(VMComponentDefn theProcess)
- throws ExternalException {
+// public Collection getDeployedPscs(VMComponentDefn theProcess)
+// throws ExternalException {
+//
+// ComponentDefnID procId = (ComponentDefnID)theProcess.getID();
+// Configuration config = getConfig(theProcess.getConfigurationID());
+//
+// Collection result = (Collection)deployedPscs.get(procId);
+// if (result == null) {
+// // deployed pscs have not been requested
+//
+// if (config == null) {
+// LogManager.logCritical(
+// LogContexts.PSCDEPLOY,
+// "ConfigurationManager.getDeployedPscs:" + //$NON-NLS-1$
+// "Configuration for process " + theProcess + //$NON-NLS-1$
+// " not found."); //$NON-NLS-1$
+// } else {
+//
+//// Collection deployedComps =
+//// config.getDeployedComponents(procId);
+//// if ((deployedComps != null) && (!deployedComps.isEmpty())) {
+// try {
+//// Iterator itr = deployedComps.iterator();
+//// DeployedComponent dp = (DeployedComponent)itr.next();
+// // per Scott, process will only have one
+// // deployed component
+// result = config.getPSCsForVM(theProcess);
+//
+//
+// Collection ids = new ArrayList(result.size());
+// for (Iterator it=result.iterator(); it.hasNext(); ) {
+// ProductServiceConfig psc=(ProductServiceConfig)it.next();
+// ids.add(psc.getID());
+// }
+// deployedPscs.put(theProcess.getID(), ids);
+//
+// // cache the pscs
+// // fire the events
+// if (result != null) {
+// Host host = getHost(theProcess);
+// Iterator pscItr = result.iterator();
+// while (pscItr.hasNext()) {
+// ProductServiceConfig psc =
+// (ProductServiceConfig)pscItr.next();
+//
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// psc,
+// config,
+// new Object[] {theProcess,
+// host,
+// config}));
+//
+// // cache the deployed services
+// getDeployedServices(psc, theProcess);
+//
+// }
+//
+// }
+// } catch (Exception theException) {
+// throw new ExternalException(
+// formatErrorMsg("getDeployedPscs", //$NON-NLS-1$
+// "process=" + theProcess, //$NON-NLS-1$
+// theException),
+// theException);
+// }
+// // }
+// }
+// } else {
+// Collection r = new ArrayList(result.size());
+// for (Iterator it=result.iterator(); it.hasNext();) {
+// ProductServiceConfigID pscID = (ProductServiceConfigID) it.next();
+// r.add( config.getPSC(pscID) );
+//
+// }
+// result = r;
+// }
+//
+// return result;
+// }
- ComponentDefnID procId = (ComponentDefnID)theProcess.getID();
- Configuration config = getConfig(theProcess.getConfigurationID());
-
- Collection result = (Collection)deployedPscs.get(procId);
- if (result == null) {
- // deployed pscs have not been requested
-
- if (config == null) {
- LogManager.logCritical(
- LogContexts.PSCDEPLOY,
- "ConfigurationManager.getDeployedPscs:" + //$NON-NLS-1$
- "Configuration for process " + theProcess + //$NON-NLS-1$
- " not found."); //$NON-NLS-1$
- } else {
-
-// Collection deployedComps =
-// config.getDeployedComponents(procId);
-// if ((deployedComps != null) && (!deployedComps.isEmpty())) {
- try {
-// Iterator itr = deployedComps.iterator();
-// DeployedComponent dp = (DeployedComponent)itr.next();
- // per Scott, process will only have one
- // deployed component
- result = config.getPSCsForVM(theProcess);
-
-
- Collection ids = new ArrayList(result.size());
- for (Iterator it=result.iterator(); it.hasNext(); ) {
- ProductServiceConfig psc=(ProductServiceConfig)it.next();
- ids.add(psc.getID());
- }
- deployedPscs.put(theProcess.getID(), ids);
-
- // cache the pscs
- // fire the events
- if (result != null) {
- Host host = getHost(theProcess);
- Iterator pscItr = result.iterator();
- while (pscItr.hasNext()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)pscItr.next();
-
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- psc,
- config,
- new Object[] {theProcess,
- host,
- config}));
-
- // cache the deployed services
- getDeployedServices(psc, theProcess);
-
- }
-
- }
- } catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("getDeployedPscs", //$NON-NLS-1$
- "process=" + theProcess, //$NON-NLS-1$
- theException),
- theException);
- }
- // }
- }
- } else {
- Collection r = new ArrayList(result.size());
- for (Iterator it=result.iterator(); it.hasNext();) {
- ProductServiceConfigID pscID = (ProductServiceConfigID) it.next();
- r.add( config.getPSC(pscID) );
-
- }
- result = r;
- }
-
- return result;
- }
-
public Collection getDeployedServices(
- ProductServiceConfig thePsc,
VMComponentDefn theProcess)
throws ExternalException {
- ProductServiceConfigID pscId = (ProductServiceConfigID)thePsc.getID();
- Configuration config = getConfig(thePsc.getConfigurationID());
+ Configuration config = getConfig(theProcess.getConfigurationID());
- HashMap map = (HashMap)deployedServices.get(pscId);
- if (map == null) {
- map = new HashMap();
- }
+// HashMap map = (HashMap)deployedServices.get(pscId);
+// if (map == null) {
+// map = new HashMap();
+// }
Collection ids = null;
- Collection result = (Collection)map.get(theProcess.getID());
- if ((result == null) && !map.containsKey(theProcess.getID())) {
+ Collection result = null;
+// if ((result == null) && !map.containsKey(theProcess.getID())) {
// get the process deployed component
// will only have one
@@ -1090,7 +1071,7 @@
// DeployedComponent dp = (DeployedComponent)itr.next();
// get the services that are deployed to the VM and PSC
- Collection serviceComps = config.getDeployedServices(theProcess, thePsc);
+ Collection serviceComps = config.getDeployedServicesForVM(theProcess);
if (serviceComps != null) {
result = new ArrayList(serviceComps.size());
ids = new ArrayList(serviceComps.size());
@@ -1105,25 +1086,23 @@
ConfigurationChangeEvent.NEW,
service,
config,
- new Object[] {thePsc,
- theProcess,
+ new Object[] {theProcess,
getHost(theProcess),
config}));
}
}
- if (map == null) {
- map = new HashMap();
- }
- map.put(theProcess.getID(), ids);
- deployedServices.put(pscId, map);
+// if (map == null) {
+// map = new HashMap();
+// }
+// map.put(theProcess.getID(), ids);
+// deployedServices.put(pscId, map);
} catch (Exception theException) {
throw new ExternalException(
formatErrorMsg("getDeployedServices", //$NON-NLS-1$
- "PSC=" + thePsc + //$NON-NLS-1$
- ", process=" + theProcess + //$NON-NLS-1$
- ", config=" + config, //$NON-NLS-1$
+ "Process=" + theProcess + //$NON-NLS-1$
+ ", config=" + config, //$NON-NLS-1$
theException),
theException);
}
@@ -1131,16 +1110,16 @@
// map.put(theProcess.getID(), null);
// deployedServices.put(pscId, map);
// }
- } else {
- Collection r = new ArrayList(result.size());
- for (Iterator it=result.iterator(); it.hasNext();) {
- DeployedComponentID dcID = (DeployedComponentID) it.next();
- r.add( config.getDeployedComponent(dcID) );
-
- }
- result = r;
-
- }
+// } else {
+// Collection r = new ArrayList(result.size());
+// for (Iterator it=result.iterator(); it.hasNext();) {
+// DeployedComponentID dcID = (DeployedComponentID) it.next();
+// r.add( config.getDeployedComponent(dcID) );
+//
+// }
+// result = r;
+//
+// }
return result;
}
@@ -1211,27 +1190,29 @@
LogContexts.PSCDEPLOY,
"ConfigurationManager.getHostProcesses:" + //$NON-NLS-1$
"Configuration " + config + " not found."); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
+ result = Collections.EMPTY_LIST;
-
- HashMap map = (HashMap)hostDeployments.get(theHost.getID());
- if (map == null) {
- // host deployed processes has not be requested
- map = new HashMap();
- hostDeployments.put(theHost.getID(), map);
- }
- if (map.containsKey(theConfigId)) {
- // is cached, but collection can be null if
- // no deployed processes
- ids = (Collection)map.get(theConfigId);
-
- result = new ArrayList(ids.size());
- for (Iterator it=ids.iterator(); it.hasNext();) {
- VMComponentDefnID vmID = (VMComponentDefnID) it.next();
- result.add( config.getVMComponentDefn(vmID));
- }
-
- } else {
+ }
+
+//
+// HashMap map = (HashMap)hostDeployments.get(theHost.getID());
+// if (map == null) {
+// // host deployed processes has not be requested
+// map = new HashMap();
+// hostDeployments.put(theHost.getID(), map);
+// }
+// if (map.containsKey(theConfigId)) {
+// // is cached, but collection can be null if
+// // no deployed processes
+// ids = (Collection)map.get(theConfigId);
+//
+// result = new ArrayList(ids.size());
+// for (Iterator it=ids.iterator(); it.hasNext();) {
+// VMComponentDefnID vmID = (VMComponentDefnID) it.next();
+// result.add( config.getVMComponentDefn(vmID));
+// }
+//
+// } else {
// not been cached
// see if it already cached
@@ -1240,7 +1221,7 @@
if (hostProcesses == null) {
// host has no deployed processes
// cache it
- map.put(theConfigId, null);
+ // map.put(theConfigId, null);
result = Collections.EMPTY_LIST;
} else {
result = new ArrayList(hostProcesses.size());
@@ -1267,13 +1248,13 @@
config}));
// call this to cache the pscs
- getDeployedPscs(process);
+ // getDeployedPscs(process);
} // end of while
- map.put(theConfigId, ids);
+ // map.put(theConfigId, ids);
} // end if itr of host processes
} // end of hostprocesses = null
- } // end of map not containing configid
- } // end of where config = null
+ // } // end of map not containing configid
+ // } // end of where config = null
return result;
} catch (Exception theException) {
throw new ExternalException(
@@ -1284,41 +1265,41 @@
}
}
- public ProductType getProduct(ProductTypeID theId) {
- return this.getConfigModel(Configuration.NEXT_STARTUP_ID).getProductType(theId.getFullName());
+ // private ProductType getProduct(ProductTypeID theId) {
+ //// return BasicProductType.PRODUCT_TYPE;
+// return this.getConfigModel(Configuration.NEXT_STARTUP_ID).getProductType(theId.getFullName());
// return (ProductType)products.get(theId);
- }
+ // }
- public ProductType getProduct(ProductServiceConfig thePsc) {
- ProductTypeID prodId = (ProductTypeID) thePsc.getComponentTypeID();
- return getProduct(prodId);
- }
+// public ProductType getProduct(ProductServiceConfig thePsc) {
+// ProductTypeID prodId = (ProductTypeID) thePsc.getComponentTypeID();
+// return getProduct(prodId);
+// }
- public Map getAllProductPscs(ConfigurationID theConfigId)
- throws ExternalException {
- HashMap map = new HashMap();
- Collection prods = getProducts();
- if (prods != null) {
- Configuration config = getConfig(theConfigId);
+// public Map getAllProductPscs(ConfigurationID theConfigId)
+// throws ExternalException {
+// HashMap map = new HashMap();
+//
+// Configuration config = getConfig(theConfigId);
+//
+// ArrayList pscs = new ArrayList();
+// ProductType prod = BasicProductType.PRODUCT_TYPE;
+// Collection temp = getPscDefinitions(prod, config);
+// if (temp != null) {
+// pscs.addAll(temp);
+// }
+// map.put(prod, pscs);
+//
+//
+// return map;
+// }
- Iterator prodItr = prods.iterator();
- while (prodItr.hasNext()) {
- ArrayList pscs = new ArrayList();
- ProductType prod = (ProductType)prodItr.next();
- Collection temp = getPscDefinitions(prod, config);
- if (temp != null) {
- pscs.addAll(temp);
- }
- map.put(prod, pscs);
- }
- }
- return map;
- }
+// public Collection getProducts() {
+// Collection products = new ArrayList(1);
+// products.add(BasicProductType.PRODUCT_TYPE);
+// return products;
+// }
- public Collection getProducts() {
- return this.getConfigModel(Configuration.NEXT_STARTUP_ID).getProductTypes();
- }
-
public ConfigurationPropertiedObjectEditor getPropertiedObjectEditor()
throws ExternalException {
@@ -1389,130 +1370,134 @@
}
+//
+// private Collection getPscs(
+// ServiceComponentDefn theService,
+// Configuration theConfig) {
+//
+// Iterator itr = serviceDefnMap.keySet().iterator();
+// ProductServiceConfigID pscId = null;
+//
+// Collection result = new ArrayList(20);
+// while (itr.hasNext()) {
+// Object key = itr.next();
+// Collection serviceIDs = (Collection)serviceDefnMap.get(key);
+// if (serviceIDs.contains(theService.getID())) {
+// pscId = (ProductServiceConfigID)key;
+// ProductServiceConfig psConfig = theConfig.getPSC(pscId);
+// if(psConfig!=null) {
+// result.add(psConfig);
+// }
+// }
+//
+// }
+// return result;
+//
+// }
- private Collection getPscs(
- ServiceComponentDefn theService,
- Configuration theConfig) {
-
- Iterator itr = serviceDefnMap.keySet().iterator();
- ProductServiceConfigID pscId = null;
-
- Collection result = new ArrayList(20);
- while (itr.hasNext()) {
- Object key = itr.next();
- Collection serviceIDs = (Collection)serviceDefnMap.get(key);
- if (serviceIDs.contains(theService.getID())) {
- pscId = (ProductServiceConfigID)key;
- ProductServiceConfig psConfig = theConfig.getPSC(pscId);
- if(psConfig!=null) {
- result.add(psConfig);
- }
- }
-
- }
- return result;
-
- }
-
- public Collection getPscDefinitions(
- ProductType theProduct,
- Configuration theConfiguration)
- throws ExternalException {
-
- Collection result = null;
- Collection ids = null;
- ConfigurationID configId = (ConfigurationID)theConfiguration.getID();
- ProductTypeID prodId = (ProductTypeID)theProduct.getID();
- HashMap map = (HashMap)prodPscDefs.get(prodId);
- if ((map == null) && !prodPscDefs.containsKey(prodId)) {
- // product pscs has not be requested
- map = new HashMap();
- prodPscDefs.put(prodId, map);
- }
- if (map.containsKey(configId)) {
- // is cached, but collection can be null if no psc defs
- ids = (Collection)map.get(configId);
- result = new ArrayList(ids.size());
- for (Iterator it=ids.iterator(); it.hasNext();) {
- ProductServiceConfigID pscID = (ProductServiceConfigID) it.next();
- result.add( theConfiguration.getPSC(pscID) );
- }
-
-
-
- } else {
- // not been cached
- Collection pscIds = theConfiguration.getComponentDefnIDs(prodId);
- if (pscIds != null) {
- result = new ArrayList(pscIds.size());
- ids = new ArrayList(pscIds.size());
- Iterator pscIdItr = pscIds.iterator();
- while (pscIdItr.hasNext()) {
- ProductServiceConfigID pscId =
- (ProductServiceConfigID)pscIdItr.next();
- ProductServiceConfig psc =
- theConfiguration.getPSC(pscId);
- //getComponentDefn(pscId);
- result.add(psc);
- ids.add(pscId);
-
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- psc,
- theConfiguration,
- new Object[] {theProduct, theConfiguration}));
- //fireModelChangedEvent(MODEL_CHANGED);
- getServiceDefinitions(psc, theConfiguration);
-
- }
- map.put(configId, ids);
- }
-
- }
- return result;
- }
-
+// public Collection getPscDefinitions(
+// ProductType theProduct,
+// Configuration theConfiguration)
+// throws ExternalException {
+//
+// Collection result = null;
+// Collection ids = null;
+// ConfigurationID configId = (ConfigurationID)theConfiguration.getID();
+// ProductTypeID prodId = (ProductTypeID)theProduct.getID();
+// HashMap map = (HashMap)prodPscDefs.get(prodId);
+// if ((map == null) && !prodPscDefs.containsKey(prodId)) {
+// // product pscs has not be requested
+// map = new HashMap();
+// prodPscDefs.put(prodId, map);
+// }
+// if (map.containsKey(configId)) {
+// // is cached, but collection can be null if no psc defs
+// ids = (Collection)map.get(configId);
+// result = new ArrayList(ids.size());
+// for (Iterator it=ids.iterator(); it.hasNext();) {
+// ProductServiceConfigID pscID = (ProductServiceConfigID) it.next();
+// result.add( theConfiguration.getPSC(pscID) );
+// }
+//
+//
+//
+// } else {
+// // not been cached
+// Collection pscIds = theConfiguration.getComponentDefnIDs(prodId);
+// if (pscIds != null) {
+// result = new ArrayList(pscIds.size());
+// ids = new ArrayList(pscIds.size());
+// Iterator pscIdItr = pscIds.iterator();
+// while (pscIdItr.hasNext()) {
+// ProductServiceConfigID pscId =
+// (ProductServiceConfigID)pscIdItr.next();
+// ProductServiceConfig psc =
+// theConfiguration.getPSC(pscId);
+// //getComponentDefn(pscId);
+// result.add(psc);
+// ids.add(pscId);
+//
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.NEW,
+// psc,
+// theConfiguration,
+// new Object[] {theProduct, theConfiguration}));
+// //fireModelChangedEvent(MODEL_CHANGED);
+// getServiceDefinitions(psc, theConfiguration);
+//
+// }
+// map.put(configId, ids);
+// }
+//
+// }
+// return result;
+// }
+//
public Collection getServiceDefinitions(
- ProductServiceConfig thePsc,
+ VMComponentDefn theVM,
Configuration theConfiguration)
throws ExternalException {
- Object product = getProduct(thePsc);
- Collection services = null;
- ProductServiceConfigID pscId = (ProductServiceConfigID)thePsc.getID();
+ Collection services = null;
+ VMComponentDefnID vmId = (VMComponentDefnID)theVM.getID();
Collection svcIDs = null;
- if (serviceDefnMap.containsKey(theConfiguration.getID())) {
- // is cached, but collection can be null if no psc defs
- svcIDs = (Collection)serviceDefnMap.get(theConfiguration.getID());
- services = new ArrayList(svcIDs.size());
- for (Iterator it=svcIDs.iterator(); it.hasNext();) {
- ServiceComponentDefnID id =
- (ServiceComponentDefnID)it.next();
- ServiceComponentDefn service =
- (ServiceComponentDefn)theConfiguration.getComponentDefn(id);
-
- services.add( service );
- }
- } else {
+ // Collection svcdefns = theConfiguration.getDeployedServicesForVM(theVM);
+
+
+// if (serviceDefnMap.containsKey(theConfiguration.getID())) {
+// // is cached, but collection can be null if no psc defs
+// svcIDs = (Collection)serviceDefnMap.get(theConfiguration.getID());
+// services = new ArrayList(svcIDs.size());
+// for (Iterator it=svcIDs.iterator(); it.hasNext();) {
+// ServiceComponentDefnID id =
+// (ServiceComponentDefnID)it.next();
+// ServiceComponentDefn service =
+// (ServiceComponentDefn)theConfiguration.getComponentDefn(id);
+//
+// services.add( service );
+// }
+// } else {
+
// svcIDs = (Collection)serviceDefs.get(pscId);
// service defs have not been cached
- Collection sdfnIds = thePsc.getServiceComponentDefnIDs();
- if (sdfnIds != null) {
+ Host host = theConfiguration.getHost(theVM.getHostID().getName());
+ Collection svcdfns = theConfiguration.getDeployedServicesForVM(theVM);
+ if (svcdfns != null) {
- services = new ArrayList(sdfnIds.size());
- svcIDs = new ArrayList(sdfnIds.size());
- Iterator servIdItr = sdfnIds.iterator();
+ services = new ArrayList(svcdfns.size());
+ svcIDs = new ArrayList(svcdfns.size());
+ Iterator servIdItr = svcdfns.iterator();
while (servIdItr.hasNext()) {
- ServiceComponentDefnID id =
- (ServiceComponentDefnID)servIdItr.next();
ServiceComponentDefn service =
- (ServiceComponentDefn)theConfiguration.getComponentDefn(id);
+ (ServiceComponentDefn)servIdItr.next();
+ ServiceComponentDefnID id = (ServiceComponentDefnID) service.getID();
+
services.add(service);
svcIDs.add(id);
@@ -1521,8 +1506,8 @@
ConfigurationChangeEvent.NEW,
service,
theConfiguration,
- new Object[] {thePsc,
- product,
+ new Object[] {theVM,
+ host,
theConfiguration}));
}
@@ -1530,9 +1515,9 @@
}
// serviceDefs.put(pscId, svcIDs);
- serviceDefnMap.put(pscId, svcIDs);
+ // serviceDefnMap.put(pscId, svcIDs);
- }
+ // }
// else {
//
@@ -1574,35 +1559,15 @@
Host theHost,
ConfigurationID theConfigId) {
- ConfigurationModelContainer model = getConfigModel(theConfigId);
- if (model.getConfiguration().getHost(theHost.getFullName()) != null) {
- return true;
- }
+ if (this.getHost(theHost.getFullName(), theConfigId) != null) {
+ return true;
+ }
+
return false;
}
- /**
- * Indicates if the configuration can be edited.
- * @param theId the configuration identifier whose mode is being requested
- * @return <code>true</code> if configuration can be edited;
- * <code>false</code> otherwise.
- */
- public boolean isEditable(ConfigurationID theId) {
- return isNextStartUpConfig(theId);
- }
- /**
- * Indicates if the given parameter is the identifier of the
- * next startup configuration.
- * @param theId the identifier being compared
- * @return <code>true</code> if equal to the next startup configuration;
- * <code>false</code> otherwise.
- */
- public boolean isNextStartUpConfig(ConfigurationID theId) {
- return nextStartUpId.equals(theId);
- }
-
public boolean isRefreshNeeded() {
return refreshNeeded;
}
@@ -1638,10 +1603,7 @@
Host host = (Host)modify(theHost, theProperties);
// modify host in all configurations
- Iterator itr = configs.values().iterator();
- while (itr.hasNext()) {
- ConfigurationModelContainer config = (ConfigurationModelContainer)itr.next();
- if (isDeployed(theHost, config.getConfigurationID())) {
+ if (isDeployed(theHost, config.getConfigurationID())) {
fireConfigurationChange(
new ConfigurationChangeEvent(
ConfigurationChangeEvent.MODIFIED,
@@ -1649,9 +1611,9 @@
config.getConfiguration(),
new Object[] {config.getConfiguration()}));
}
- }
- return host;
+
+ return host;
} catch (Exception theException) {
throw new ExternalException(
formatErrorMsg("modifyHost", "host=" + theHost, theException), //$NON-NLS-1$ //$NON-NLS-2$
@@ -1704,32 +1666,32 @@
- public ProductServiceConfig modifyPsc(
- ProductServiceConfig thePscDef,
- Properties theProperties)
- throws ExternalException {
+// public ProductServiceConfig modifyPsc(
+// ProductServiceConfig thePscDef,
+// Properties theProperties)
+// throws ExternalException {
+//
+// try {
+// ProductServiceConfig pscDef =
+// (ProductServiceConfig)modify(thePscDef, theProperties);
+// Configuration config = getConfig(pscDef.getConfigurationID());
+// ProductType product = BasicProductType.PRODUCT_TYPE;
+//
+// // update local cache
+// fireConfigurationChange(
+// new ConfigurationChangeEvent(
+// ConfigurationChangeEvent.MODIFIED,
+// pscDef,
+// config,
+// new Object[] {product, config}));
+// return pscDef;
+// } catch (Exception theException) {
+// throw new ExternalException(
+// formatErrorMsg("modifyPsc", "PSC=" + thePscDef, theException), //$NON-NLS-1$ //$NON-NLS-2$
+// theException);
+// }
+// }
- try {
- ProductServiceConfig pscDef =
- (ProductServiceConfig)modify(thePscDef, theProperties);
- Configuration config = getConfig(pscDef.getConfigurationID());
- ProductType product = getProduct(thePscDef);
-
- // update local cache
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.MODIFIED,
- pscDef,
- config,
- new Object[] {product, config}));
- return pscDef;
- } catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("modifyPsc", "PSC=" + thePscDef, theException), //$NON-NLS-1$ //$NON-NLS-2$
- theException);
- }
- }
-
public ServiceComponentDefn modifyService(
ServiceComponentDefn theService,
Properties theProperties)
@@ -1739,20 +1701,16 @@
ServiceComponentDefn service =
(ServiceComponentDefn)modify(theService, theProperties);
Configuration config = getConfig(service.getConfigurationID());
-
- Collection pscs = getPscs(service, config);
- for (Iterator it=pscs.iterator(); it.hasNext(); ) {
- ProductServiceConfig psc = (ProductServiceConfig) it.next();
- ProductType product = getProduct(psc);
-
+
+
fireConfigurationChange(
new ConfigurationChangeEvent(
ConfigurationChangeEvent.MODIFIED,
service,
config,
- new Object[] {psc, product, config}));
- }
+ new Object[] {config}));
+
return service;
} catch (Exception theException) {
throw new ExternalException(
@@ -1762,34 +1720,13 @@
theException);
}
}
-
- private void addConfig(ConfigurationModelContainer theConfig) {
- configs.put(theConfig.getConfigurationID(), theConfig);
-
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- theConfig.getConfiguration(),
- theConfig.getConfiguration(),
- null));
- Iterator itr = getProducts().iterator();
- while (itr.hasNext()) {
- ProductType product = (ProductType)itr.next();
- fireConfigurationChange(
- new ConfigurationChangeEvent(
- ConfigurationChangeEvent.NEW,
- product,
- theConfig.getConfiguration(),
- new Object[] {theConfig.getConfiguration()}));
- }
- }
public void refresh(){
super.refresh();
this.setRefreshNeeded();
try {
refreshImpl();
-// refreshConfigs();
+ refreshConfigs();
} catch (ExternalException e) {
LogManager.logCritical(
LogContexts.CONFIG,
@@ -1806,8 +1743,7 @@
new ConfigurationChangeEvent(ConfigurationChangeEvent.REFRESH_START,
this));
- configs.clear();
-
+
try {
ConfigurationModelContainer nextStartUp = getAPI().getConfigurationModel(Configuration.NEXT_STARTUP);
if (nextStartUp == null) {
@@ -1816,7 +1752,7 @@
"ConfigurationManager.refreshConfigs:" + //$NON-NLS-1$
"Next Startup Configuration is null."); //$NON-NLS-1$
} else {
- addConfig(nextStartUp);
+ config = nextStartUp;
}
fireConfigurationChange(
@@ -1831,55 +1767,6 @@
}
}
- private void refreshDeployedHosts()
- throws ExternalException {
-
- hostDeployments.clear();
- deployedPscs.clear();
- deployedServices.clear();
-
- Iterator configItr = configs.values().iterator();
- while (configItr.hasNext()) {
- ConfigurationModelContainer config = (ConfigurationModelContainer)configItr.next();
- Iterator itr = config.getHosts().iterator();
- while (itr.hasNext()) {
- Host host = (Host)itr.next();
- getHostProcesses(host, config.getConfigurationID());
- }
- }
- }
-
-
-
- private void refreshHosts()
- throws ExternalException {
-
- try {
- Collection hostCollection = getConfigModel(Configuration.NEXT_STARTUP_ID).getHosts();
- if ((hostCollection == null) || (hostCollection.isEmpty())) {
- LogManager.logCritical(
- LogContexts.CONFIG,
- "ConfigurationManager.refreshHosts:" + //$NON-NLS-1$
- "No hosts found or is null."); //$NON-NLS-1$
- } else {
- Iterator itr = hostCollection.iterator();
- while (itr.hasNext()) {
- Host host = (Host)itr.next();
- LogManager.logDetail(
- LogContexts.CONFIG,
- "ConfigurationManager.refreshHosts:" + //$NON-NLS-1$
- "Adding Host:" + host); //$NON-NLS-1$
- notifyHostChangeToConfigs(host, ConfigurationChangeEvent.NEW);
-
- }
- }
- } catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("refreshHosts", theException), //$NON-NLS-1$
- theException);
- }
- }
-
public void refreshImpl()
throws ExternalException {
@@ -1887,32 +1774,15 @@
new ConfigurationChangeEvent(ConfigurationChangeEvent.REFRESH_START,
this));
refreshConfigs();
- refreshHosts();
- refreshDeployedHosts();
- refreshPscDefinitions();
- fireConfigurationChange(
+// refreshHosts();
+ // refreshDeployedHosts();
+ fireConfigurationChange(
new ConfigurationChangeEvent(ConfigurationChangeEvent.REFRESH_END,
this));
refreshNeeded = false;
}
- private void refreshPscDefinitions()
- throws ExternalException {
- prodPscDefs.clear();
- serviceDefnMap.clear();
-
- Iterator configItr = configs.values().iterator();
- while (configItr.hasNext()) {
- ConfigurationModelContainer config = (ConfigurationModelContainer)configItr.next();
- Iterator prodItr = getProducts().iterator();
- while (prodItr.hasNext()) {
- ProductType product = (ProductType)prodItr.next();
- getPscDefinitions(product, config.getConfiguration());
- }
- }
- }
-
/**
* Removes the given listener from those being notified.
* @param theListener the listener being removed
@@ -1924,8 +1794,7 @@
}
public void setEnabled(
- ServiceComponentDefn theService,
- ProductServiceConfig psc,
+ DeployedComponent thedeployed,
boolean theEnableFlag,
Configuration theConfig)
throws ExternalException {
@@ -1933,33 +1802,10 @@
ConfigurationObjectEditor editor = null;
try {
editor = getEditor();
- Collection deletedServComps =
- editor.setEnabled(theConfig, theService, psc, theEnableFlag, true);
+ thedeployed = editor.setEnabled(thedeployed, theEnableFlag);
getAPI().executeTransaction(editor.getDestination().popActions());
-
- // update cache
-
-
- if (!deletedServComps.isEmpty()) {
- Iterator itr = deletedServComps.iterator();
- while (itr.hasNext()) {
- DeployedComponent dc = (DeployedComponent)itr.next();
- ProductServiceConfigID pscId = dc.getProductServiceConfigID();
- VMComponentDefnID vmId = dc.getVMComponentDefnID();
- Map map = (Map)deployedServices.get(pscId);
- Collection services = (Collection)map.get(vmId);
- if (theEnableFlag) {
- if (services == null) {
- services = new ArrayList();
- }
- services.add(dc.getID());
- } else {
- services.remove(dc.getID());
- }
- }
- }
-
+
} catch (Exception theException) {
// rollback
if (editor != null) {
@@ -1967,7 +1813,7 @@
}
throw new ExternalException(
formatErrorMsg("setEnabled", //$NON-NLS-1$
- "service=" + theService + //$NON-NLS-1$
+ "service=" + thedeployed.getName() + //$NON-NLS-1$
", enable=" + theEnableFlag + //$NON-NLS-1$
", config=" + theConfig, //$NON-NLS-1$
theException),
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConnectorManager.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConnectorManager.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/models/ConnectorManager.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -660,48 +660,47 @@
return propertiedObjectEditor;
}
- public void setEnableForBindingInPSC(ServiceComponentDefn scdBinding,
- ProductServiceConfig psc,
- boolean bEnabled, ConfigurationObjectEditor coe)
- throws Exception {
- // Ask Scott what this boolean does, and what value we should use:
- boolean bDeleteDeployedComponents = true;
+// public void setEnableForBindingInPSC(ServiceComponentDefn scdBinding,
+// ProductServiceConfig psc,
+// boolean bEnabled, ConfigurationObjectEditor coe)
+// throws Exception {
+// // Ask Scott what this boolean does, and what value we should use:
+// boolean bDeleteDeployedComponents = true;
+//
+// coe.setEnabled(getNextStartupConfig(), scdBinding, psc, bEnabled, bDeleteDeployedComponents);
+// }
- coe.setEnabled(getNextStartupConfig(), scdBinding, psc, bEnabled, bDeleteDeployedComponents);
- }
+// public void setEnableForBindingInPSCByConfig(
+// Configuration cfg,
+// ServiceComponentDefn scdBinding,
+// ProductServiceConfig psc,
+// boolean bEnabled,
+// ConfigurationObjectEditor coe)
+// throws Exception {
+// boolean bDeleteDeployedComponents = true;
+// coe.setEnabled(cfg,
+// scdBinding,
+// psc,
+// bEnabled, bDeleteDeployedComponents);
+// }
- public void setEnableForBindingInPSCByConfig(
- Configuration cfg,
- ServiceComponentDefn scdBinding,
- ProductServiceConfig psc,
- boolean bEnabled,
- ConfigurationObjectEditor coe)
- throws Exception {
- boolean bDeleteDeployedComponents = true;
- coe.setEnabled(cfg,
- scdBinding,
- psc,
- bEnabled, bDeleteDeployedComponents);
- }
-
/**
- * Method to commit actions to create a conector binding. The
+ * Method to create a connector binding and have it deployed to all exising VM's. The
* ConfigurationObjectEditor argument is expected to to have the connector,
* the connector binding name, and the properties.
*
* @param binding ServiceComponentDefn for the binding
* @param coe editor expected to have the connector, the binding name, and the binding properties
- * @param pscs array of PSCs for which the binding is to be enabled
*/
- public void createConnectorBinding(ServiceComponentDefn binding,
- ConfigurationObjectEditor coe, ProductServiceConfig[] pscs)
- throws Exception {
- ServiceComponentDefnID bindingID = (ServiceComponentDefnID)binding.getID();
+ public void createConnectorBinding(ConnectorBinding binding, ConfigurationObjectEditor coe) throws Exception {
+ ConnectorBindingID bindingID = (ConnectorBindingID)binding.getID();
Configuration nextStartupConfig = getNextStartupConfig();
- for (int i = 0; i < pscs.length; i++) {
- coe.addServiceComponentDefn(pscs[i], bindingID);
- coe.deployServiceDefn(nextStartupConfig, binding,
- (ProductServiceConfigID)pscs[i].getID());
+
+ Collection<VMComponentDefn> vms = nextStartupConfig.getVMComponentDefns();
+ for (Iterator<VMComponentDefn> it=vms.iterator(); it.hasNext();) {
+ VMComponentDefn vm = it.next();
+
+ coe.deployServiceDefn(nextStartupConfig, binding, (VMComponentDefnID) vm.getID());
}
getConfigurationAdminAPI().executeTransaction(
@@ -724,19 +723,30 @@
* @param pscs array of PSCs for which the binding is to be enabled
*/
public void createConnectorBinding(Collection bindings,
- ConfigurationObjectEditor coe, ProductServiceConfig[] pscs)
+ ConfigurationObjectEditor coe, VMComponentDefn[] vms)
throws Exception {
Configuration nextStartupConfig = getNextStartupConfig();
+ if (vms == null || vms.length == 0) {
+ Collection<VMComponentDefn> vmsc = nextStartupConfig.getVMComponentDefns();
+ vms = new VMComponentDefn[vmsc.size()];
+ int x = 0;
+ for (Iterator<VMComponentDefn> it=vmsc.iterator(); it.hasNext(); x++) {
+ vms[x] = (VMComponentDefn) it.next();
+ }
+
+ }
+
for (Iterator it=bindings.iterator(); it.hasNext();) {
ConnectorBinding cb = (ConnectorBinding) it.next();
ConnectorBindingID cbID = (ConnectorBindingID) cb.getID();
- for (int i = 0; i < pscs.length; i++) {
- coe.addServiceComponentDefn(pscs[i], cbID);
- coe.deployServiceDefn(nextStartupConfig, cb,
- (ProductServiceConfigID)pscs[i].getID());
-
+ if (vms != null && vms.length > 0) {
+ for (int i = 0; i < vms.length; i++) {
+ coe.deployServiceDefn(nextStartupConfig, cb,
+ (VMComponentDefnID) vms[i].getID());
+
+ }
}
}
getConfigurationAdminAPI().executeTransaction(
@@ -771,15 +781,15 @@
//deploy to the same PSCS as the original connector binding
ConnectorBindingID oldBindingID = (ConnectorBindingID) oldBinding.getID();
Configuration nextStartupConfig = getNextStartupConfig();
- Collection pscs = nextStartupConfig.getPSCsForServiceDefn(oldBindingID);
+ Collection olddeploys = nextStartupConfig.getDeployedComponents( (ComponentDefnID) oldBinding.getID());
- for (Iterator iter = pscs.iterator(); iter.hasNext(); ) {
- ProductServiceConfig psc = (ProductServiceConfig) iter.next();
- coe.addServiceComponentDefn(psc, newBindingID);
- coe.deployServiceDefn(nextStartupConfig, newBinding, (ProductServiceConfigID) psc.getID());
-
+ // remove the old deployment and add the new binding to the vm
+ for (Iterator iter = olddeploys.iterator(); iter.hasNext(); ) {
+ DeployedComponent dep = (DeployedComponent) iter.next();
+ coe.delete(dep, nextStartupConfig);
+ coe.deployServiceDefn(nextStartupConfig, newBinding, dep.getVMComponentDefnID());
}
-
+
//execute the transaction and return the results
getConfigurationAdminAPI().executeTransaction(coe.getDestination().popActions());
ModelManager.getConfigurationManager(getConnection()).setRefreshNeeded();
@@ -789,72 +799,4 @@
}
- public ServiceComponentDefn getBindingCopyFromPsc(ProductServiceConfig psc,
- ServiceComponentDefn scdBinding, ConnectionInfo connection)
- throws Exception {
- ServiceComponentDefn scdBindingCopy = getBindingFromPSC(
- getNextStartupConfig(), scdBinding.getRoutingUUID(), psc);
- return scdBindingCopy;
- }
-
- public ServiceComponentDefn getBindingCopyFromPscByConfig(
- Configuration cfg,
- ProductServiceConfig psc,
- ServiceComponentDefn scdBinding)
- throws Exception {
- ServiceComponentDefn scdBindingCopy = getBindingFromPSC(cfg,
- scdBinding.getRoutingUUID(),
- psc);
- return scdBindingCopy;
- }
-
- /**
- * @return Collection of all ProductServiceConfig objects for the
- * "Connectors" product type
- */
- public Collection getAllConnectorsPSCs() throws Exception {
- return getAllConnectorsPSCsByConfig( getNextStartupConfig() );
- }
-
- /**
- * @return Collection of all ProductServiceConfig objects for the
- * "Connectors" product type
- */
- public Collection getAllConnectorsPSCsByConfig(Configuration cfg)
- throws Exception {
- ProductTypeID connectorProductTypeID =
- new ProductTypeID(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME);
- Iterator itAllConnectorPSCs =
- cfg.getComponentDefnIDs(connectorProductTypeID).iterator();
- ProductServiceConfigID pscID = null;
- ProductServiceConfig psc = null;
- Collection colResult = new HashSet();
-
- while (itAllConnectorPSCs.hasNext()) {
- pscID = (ProductServiceConfigID)itAllConnectorPSCs.next();
- psc = (ProductServiceConfig)cfg.getComponentDefn(pscID);
- colResult.add(psc);
- }
- return colResult;
- }
-
- /**
- * @return the copy of the "global" binding that was placed in the indicated
- * PSC
- */
- private ServiceComponentDefn getBindingFromPSC(Configuration config,
- String routingUUID, ProductServiceConfig psc) {
- Iterator iter = psc.getServiceComponentDefnIDs().iterator();
- ServiceComponentDefnID bindingID = null;
- ServiceComponentDefn binding = null;
- while (iter.hasNext()) {
- bindingID = (ServiceComponentDefnID)iter.next();
- binding = (ServiceComponentDefn)config.getComponentDefn(bindingID);
- if (binding.getRoutingUUID().equals(routingUUID)) {
- return binding;
- }
- }
- //should never get here!!!
- return null;
- }
}//end ConnectorManager
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/models/RuntimeMgmtManager.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/models/RuntimeMgmtManager.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/models/RuntimeMgmtManager.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -34,7 +34,6 @@
import com.metamatrix.console.util.LogContexts;
import com.metamatrix.platform.admin.api.RuntimeStateAdminAPI;
import com.metamatrix.platform.admin.api.runtime.HostData;
-import com.metamatrix.platform.admin.api.runtime.PSCData;
import com.metamatrix.platform.admin.api.runtime.ProcessData;
import com.metamatrix.platform.admin.api.runtime.ServiceData;
import com.metamatrix.platform.admin.api.runtime.SystemState;
@@ -117,16 +116,16 @@
" >"; //$NON-NLS-1$
}
- public Integer[] getPscCounts(ProcessData theProcess) {
+ public Integer[] getServiceCounts(ProcessData theProcess) {
Integer[] counts = (Integer[])procPscMap.get(theProcess);
if (counts == null) {
int notRegistered = 0;
int registered = 0;
- Collection pscs = theProcess.getPSCs();
- if ((pscs != null) && !pscs.isEmpty()) {
- Iterator itr = pscs.iterator();
- PSCData psc = (PSCData)itr.next();
- if (psc.isRegistered()) {
+ Collection svcs = theProcess.getServices();
+ if ((svcs != null) && !svcs.isEmpty()) {
+ Iterator itr = svcs.iterator();
+ ServiceData svc = (ServiceData)itr.next();
+ if (svc.isRegistered()) {
registered++;
}
else {
@@ -196,15 +195,15 @@
//
// loop through PSCs
//
- Collection pscs = process.getPSCs();
- if ((pscs != null) && (!pscs.isEmpty())) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- PSCData psc = (PSCData)pscItr.next();
+// Collection pscs = process.getPSCs();
+// if ((pscs != null) && (!pscs.isEmpty())) {
+// Iterator pscItr = pscs.iterator();
+// while (pscItr.hasNext()) {
+// PSCData psc = (PSCData)pscItr.next();
//
// loop through services
//
- Collection services = psc.getServices();
+ Collection services = process.getServices();
if ((services != null) &&
(!services.isEmpty())) {
Iterator serviceItr =
@@ -220,8 +219,8 @@
}
}
}
- } // end while PSCs
- } // end if PSCs
+// } // end while PSCs
+// } // end if PSCs
} // end while Processes
@@ -292,19 +291,19 @@
}
}
- public void startPsc(PSCData thePsc)
- throws ExternalException {
- refreshImpl();
- try {
- getAPI().startPSC(thePsc.getPscID());
- }
- catch (Exception theException) {
-
- throw new ExternalException(
- formatErrorMsg("startPsc", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
- theException);
- }
- }
+// public void startPsc(PSCData thePsc)
+// throws ExternalException {
+// refreshImpl();
+// try {
+// getAPI().startPSC(thePsc.getPscID());
+// }
+// catch (Exception theException) {
+//
+// throw new ExternalException(
+// formatErrorMsg("startPsc", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
+// theException);
+// }
+// }
public void startService(ServiceData theService)
throws ExternalException {
@@ -370,31 +369,31 @@
}
}
- public void stopPsc(PSCData thePsc)
- throws ExternalException {
- refreshImpl();
- try {
- getAPI().stopPSC(thePsc.getPscID());
- }
- catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("stopPsc", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
- theException);
- }
- }
+// public void stopPsc(PSCData thePsc)
+// throws ExternalException {
+// refreshImpl();
+// try {
+// getAPI().stopPSC(thePsc.getPscID());
+// }
+// catch (Exception theException) {
+// throw new ExternalException(
+// formatErrorMsg("stopPsc", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
+// theException);
+// }
+// }
- public void stopPscNow(PSCData thePsc)
- throws ExternalException {
- refreshImpl();
- try {
- getAPI().stopPSCNow(thePsc.getPscID());
- }
- catch (Exception theException) {
- throw new ExternalException(
- formatErrorMsg("stopPscNow", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
- theException);
- }
- }
+// public void stopPscNow(PSCData thePsc)
+// throws ExternalException {
+// refreshImpl();
+// try {
+// getAPI().stopPSCNow(thePsc.getPscID());
+// }
+// catch (Exception theException) {
+// throw new ExternalException(
+// formatErrorMsg("stopPscNow", "psc=" + thePsc, theException), //$NON-NLS-1$ //$NON-NLS-2$
+// theException);
+// }
+// }
public void stopService(ServiceData theService)
throws ExternalException {
@@ -467,15 +466,15 @@
//
// loop through PSCs
//
- Collection pscs = process.getPSCs();
- if ((pscs != null) && (!pscs.isEmpty())) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- PSCData psc = (PSCData)pscItr.next();
+// Collection pscs = process.getPSCs();
+// if ((pscs != null) && (!pscs.isEmpty())) {
+// Iterator pscItr = pscs.iterator();
+// while (pscItr.hasNext()) {
+// PSCData psc = (PSCData)pscItr.next();
//
// loop through services
//
- Collection services = psc.getServices();
+ Collection services = process.getServices();
if ((services != null) &&
(!services.isEmpty())) {
Iterator serviceItr =
@@ -489,8 +488,8 @@
}
}
}
- }
- }
+// }
+// }
}
}
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTree.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTree.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTree.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -261,12 +261,7 @@
} else if (hdrText.equals(PanelsTreeModel.AUTHORIZATION)) {
icons.add(AUTH_ICON);
}
- if (secondNode.getChildCount() > 0) {
- String secondNodeName = secondNode.getName();
- if (secondNodeName.equals(PanelsTreeModel.MM_SERVER)) {
- icons.add(MM_SERVER_ICON);
- }
- }
+
Icon[] iconsArray = new Icon[icons.size()];
Iterator it = icons.iterator();
for (int j = 0; it.hasNext(); j++) {
@@ -355,9 +350,7 @@
String hdrTxt = model.getHeaderNodeText(node);
if (hdrTxt != null) {
- if (node.getName().equals(PanelsTreeModel.MM_SERVER)) {
- setIcon(MM_SERVER_ICON);
- } else if (hdrTxt.equals(PanelsTreeModel.RUNTIME)) {
+ if (hdrTxt.equals(PanelsTreeModel.RUNTIME)) {
setIcon((node.getName().equals(PanelsTreeModel.RUNTIME))
? RUNTIME_HDR_ICON
: RUNTIME_ICON);
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTreeModel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTreeModel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/PanelsTreeModel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -57,16 +57,19 @@
public static final String TRANSACTIONS = "Transactions";
public static final Class TRANSACTIONS_PANEL_CLASS =
com.metamatrix.console.ui.views.transactions.TransactionsPanel.class;
+
+
public static final String CONFIGURATION = "Configuration"; //$NON-NLS-1$
+
public static final String SYS_PROPS = "System Properties"; //$NON-NLS-1$
public static final Class SYSTEM_PROPERTIES_PANEL_CLASS =
com.metamatrix.console.ui.views.properties.PropertiesMasterPanel.class;
- public static final String POOLS_CONFIG = "Connection Pools"; //$NON-NLS-1$
+// public static final String POOLS_CONFIG = "Connection Pools"; //$NON-NLS-1$
public static final String RESOURCES = "Resources"; //$NON-NLS-1$
public static final Class RESOURCES_PANEL_CLASS =
com.metamatrix.console.ui.views.resources.ResourcesMainPanel.class;
- public static final String PSC_DEPLOY = "Deployment"; //$NON-NLS-1$
- public static final Class DEPLOY_PSC_DEFN_PANEL_CLASS =
+ public static final String DEPLOYMENT = "Deployment"; //$NON-NLS-1$
+ public static final Class DEPLOYMENT_PANEL_CLASS =
com.metamatrix.console.ui.views.deploy.DeployMainPanel.class;
public static final String VDB = "Virtual Databases"; //$NON-NLS-1$
public static final Class VDB_PANEL_CLASS =
@@ -77,6 +80,10 @@
public static final String CONNECTOR_BINDINGS = "Connector Bindings"; //$NON-NLS-1$
public static final Class CONNECTOR_BINDINGS_PANEL_CLASS =
com.metamatrix.console.ui.views.connectorbinding.ConnectorBindingPanel.class;
+ public static final String SERVICE_DEFINTIONS = "Services"; //$NON-NLS-1$
+ public static final Class SERVICE_DEFINITION_PANEL_CLASS =
+ com.metamatrix.console.ui.views.deploy.ServiceDefinitionPanel.class;
+
public static final String AUTHORIZATION = "Security"; //$NON-NLS-1$
public static final String AUTHORIZATION_SUMMARY = "Summary"; //$NON-NLS-1$
@@ -233,8 +240,8 @@
// PSC definition & deployments panel node
- PanelsTreeNode pscDeploy = new PanelsTreeNode(PSC_DEPLOY,
- DEPLOY_PSC_DEFN_PANEL_CLASS, connection, false);
+ PanelsTreeNode pscDeploy = new PanelsTreeNode(DEPLOYMENT,
+ DEPLOYMENT_PANEL_CLASS, connection, false);
tipText = ConsolePlugin.Util.getString("PanelsTreeModel.pscDeployPanel.tooltip"); //$NON-NLS-1$
pscDeploy.setToolTipText(tipText);
configuration.add(pscDeploy);
@@ -245,6 +252,13 @@
tipText = ConsolePlugin.Util.getString("PanelsTreeModel.systemPropsPanel.tooltip"); //$NON-NLS-1$
props.setToolTipText(tipText);
configuration.add(props);
+
+ // connector bindings panel node
+ PanelsTreeNode services = new PanelsTreeNode(SERVICE_DEFINTIONS,
+ SERVICE_DEFINITION_PANEL_CLASS, connection, false);
+ tipText = ConsolePlugin.Util.getString("PanelsTreeModel.servicesPanel.tooltip"); //$NON-NLS-1$
+ services.setToolTipText(tipText);
+ configuration.add(services);
// Resources panel node
PanelsTreeNode resources = new PanelsTreeNode(RESOURCES,
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/WorkspaceController.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/WorkspaceController.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/layout/WorkspaceController.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -54,6 +54,7 @@
import com.metamatrix.console.ui.views.connector.ConnectorPanel;
import com.metamatrix.console.ui.views.connectorbinding.ConnectorBindingPanel;
import com.metamatrix.console.ui.views.deploy.DeployMainPanel;
+import com.metamatrix.console.ui.views.deploy.ServiceDefinitionPanel;
import com.metamatrix.console.ui.views.entitlements.EntitlementsPanel;
import com.metamatrix.console.ui.views.extensionsource.ExtensionSourcesPanel;
import com.metamatrix.console.ui.views.logsetup.SystemLogSetUpPanel;
@@ -368,6 +369,8 @@
panel = createResourcesPanel(connection);
} else if (cls == TransactionsPanel.class) {
panel = createTransactionsPanel(connection);
+ } else if (cls == ServiceDefinitionPanel.class) {
+ panel = createServicesDefnPanel(connection);
}
if (panel instanceof AutoRefreshable) {
addToAutoRefreshableXref(panel);
@@ -455,6 +458,11 @@
ConnectorBindingPanel panel = new ConnectorBindingPanel(connection);
return panel;
}
+
+ private WorkspacePanel createServicesDefnPanel(ConnectionInfo connection) {
+ ServiceDefinitionPanel panel = new ServiceDefinitionPanel(connection);
+ return panel;
+ }
private WorkspacePanel createAuthSummaryPanel(ConnectionInfo connection) {
SummaryMain panel = new SummaryMain(connection);
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardController.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardController.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardController.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -42,7 +42,6 @@
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationObjectEditor;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.api.ProductServiceConfig;
import com.metamatrix.common.config.util.ConfigurationImportExportUtility;
import com.metamatrix.common.config.util.InvalidConfigurationElementException;
import com.metamatrix.common.config.xml.XMLConfigurationImportExportUtility;
@@ -69,15 +68,15 @@
protected final static int FILE_SELECTOR_PAGE = 0;
protected final static int CONNECTOR_ID_PAGE = 1;
- protected final static int PSC_ASSIGNMENT_PAGE = 2;
- protected final static int CONFIRMATION_PAGE = 3;
+ // protected final static int PSC_ASSIGNMENT_PAGE = 2;
+ protected final static int CONFIRMATION_PAGE = 2;
protected final static int CALLED_FOR_CONNECTOR_TYPE = 1;
protected final static int CALLED_FOR_CONNECTOR_BINDING = 2;
protected ImportWizardFileSelectorPanel fileSelectorPanel;
- protected ImportBindingWizardPSCEnablePanel pscEnablePanel;
+// protected ImportBindingWizardPSCEnablePanel pscEnablePanel;
private ImportBindingWizardRenamePanel itemRenamePanel;
private ButtonWidget nextButton;
@@ -187,12 +186,12 @@
itemRenamePanel = new ImportBindingWizardRenamePanel(this, connectorManager);
// confirmPanel = new ImportWizardConfirmationPanel(this, this, CALLED_FOR_CONNECTOR_BINDING);
- pscEnablePanel = new ImportBindingWizardPSCEnablePanel(this, connectorManager);
+// pscEnablePanel = new ImportBindingWizardPSCEnablePanel(this, connectorManager);
//new NewBindingWizardPSCEnablePanel(this, connectorManager);
addPage(fileSelectorPanel);
addPage(itemRenamePanel);
- addPage(pscEnablePanel);
+ // addPage(pscEnablePanel);
// addPage(confirmPanel);
dialogTitle = "Import Connector Binding(s) Wizard"; //$NON-NLS-1$
@@ -261,9 +260,10 @@
if (renameMapping == null || renameMapping.isEmpty()) {
// nothing to import
bContinue = false;
- } else {
- pscEnablePanel.setNewConnectorBindingInfo(renameMapping.values());
}
+// else {
+// pscEnablePanel.setNewConnectorBindingInfo(renameMapping.values());
+// }
break;
// case CONFIRMATION_PAGE:
@@ -272,7 +272,7 @@
// break;
- case PSC_ASSIGNMENT_PAGE:
+// case PSC_ASSIGNMENT_PAGE:
// pscEnablePanel.get
// bContinue = createNewItem(deFile);
// if (bContinue) {
@@ -286,7 +286,7 @@
- break;
+ // break;
}
if (bContinue) {
currentPage += 1;
@@ -300,10 +300,10 @@
Collection newBindings = createNewBindings();
- ProductServiceConfig[] enabledConfigs =
- pscEnablePanel.getEnabledConfigs();
+// ProductServiceConfig[] enabledConfigs =
+// pscEnablePanel.getEnabledConfigs();
- if (saveNewItemToServer(newBindings, enabledConfigs)) {
+ if (saveNewItemToServer(newBindings)) {
validateExtensions(newBindings);
dialog.dispose();
}
@@ -613,12 +613,12 @@
return cieuImportUtil;
}
- protected boolean saveNewItemToServer(Collection bindings, ProductServiceConfig[] pscs) {
+ protected boolean saveNewItemToServer(Collection bindings) {
try {
ConfigurationObjectEditor newComponentEditor = getNewItemEditor();
- connectorManager.createConnectorBinding(bindings, newComponentEditor, pscs);
+ connectorManager.createConnectorBinding(bindings, newComponentEditor, null);
} catch (Exception e) {
String msg;
msg = "Failed attempting to save changes on server."; //$NON-NLS-1$
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardPSCEnablePanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardPSCEnablePanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardPSCEnablePanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,431 +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.console.ui.views.connectorbinding;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Vector;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.models.ConnectorManager;
-import com.metamatrix.console.ui.util.BasicWizardSubpanelContainer;
-import com.metamatrix.console.ui.util.WizardInterface;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-// ===
-
-public class ImportBindingWizardPSCEnablePanel
- extends BasicWizardSubpanelContainer
- implements ActionListener,
- ListSelectionListener,
- TableModelListener {
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
-// private int TEXTAREA_MAXLENGTH = 255;
-
-
- private static /*final*/ String[] SERVICE_HDRS;
- private static final int PSC_COL = 0;
- private static final int ENABLED_COL = 1;
-
-
- private static /*final*/ String[] BINDING_HDRS;
- private static final int BINDING_COL = 0;
-
- private static final String STEP_DESC="Set Enabled State for each PSC to deploy the Binding(s) to and select Finish to Create the Binding(s)."; //$NON-NLS-1$
-
-
-
- ///////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- ///////////////////////////////////////////////////////////////////////////
-
- static {
- SERVICE_HDRS = new String[2];
- SERVICE_HDRS[PSC_COL] = "PSC"; //$NON-NLS-1$
- SERVICE_HDRS[ENABLED_COL] = "Enabled"; //$NON-NLS-1$
-
- BINDING_HDRS = new String[1];
- BINDING_HDRS[BINDING_COL] = "PSC"; //$NON-NLS-1$
-
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblPSCs;
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private DefaultTableModel tmdlPSCs;
-
- // Next Startup PSC Map: Map PSC to enabled state
- private HashMap mapPSCtoEnabledForNextStartup = new HashMap();
-
- // PSC Name to Next Startup PSC Xref
- private HashMap mapNextStartupPSCXref = new HashMap();
-
- private int numRowsDifferentNextStartup = 0;
- private CheckBox chk; // the table cell editor component for the enabled col
-
- private TableWidget tblBindings;
-
- private DefaultTableModel tmdlBindings;
-
- private JPanel pnlOuter = new JPanel();
-
- private JPanel pnlTable = new JPanel();
-
- private ConnectorManager connectorManager;
-
- public ImportBindingWizardPSCEnablePanel(WizardInterface wizardInterface, ConnectorManager connecMgr) {
- super(wizardInterface);
- connectorManager = connecMgr;
- init();
- }
-
- public void setNewConnectorBindingInfo(Collection bindingNames) {
-
- populateTable(bindingNames);
-
- }
-
- private void init() {
- createTablePanel();
-
- pnlOuter.setLayout(new GridBagLayout());
-
- JPanel bTablePanel = createBindingsTable();
-
- pnlOuter.add(bTablePanel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.5,
- GridBagConstraints.NORTH, GridBagConstraints.BOTH,
- new Insets(2, 0, 2, 0), 0, 0));
-
-
- pnlOuter.add(pnlTable, new GridBagConstraints(0, 2,
- GridBagConstraints.REMAINDER, GridBagConstraints.REMAINDER,
- 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(12, 3, 3, 3), 0, 0));
-
-
- setMainContent(pnlOuter);
- setStepText(3, STEP_DESC);
- populateTable();
- }
-
- private JPanel createTablePanel() {
- pnlTable = new JPanel();
- pnlTable.setLayout(new GridLayout(1, 1));
- tblPSCs = new TableWidget();
-
- tmdlPSCs = DeployPkgUtils.setup(
- tblPSCs,
- SERVICE_HDRS,
- 10,
- new int[] {ENABLED_COL});
- tblPSCs.getSelectionModel().addListSelectionListener(this);
- tblPSCs.setComparator(new DeployTableSorter());
-
- doTableSetup();
-
- tmdlPSCs.addTableModelListener(this);
-
- JScrollPane spnServices = new JScrollPane(tblPSCs);
- pnlTable.add(spnServices);
-
- return pnlTable;
- }
-
- private JPanel createBindingsTable() {
- JPanel bindingTable = new JPanel();
- bindingTable.setLayout(new GridLayout(1, 1));
- tblBindings = new TableWidget();
- tblBindings.setComparator(new DeployTableSorter());
-
- tmdlBindings = DeployPkgUtils.setup(
- tblBindings,
- BINDING_HDRS,
- 5,
- new int[] {});
-
- tmdlBindings.setEditable(false);
-
- JScrollPane spnServices = new JScrollPane(tblBindings);
- bindingTable.add(spnServices);
-
- TitledBorder border;
- String title = "Binding(s) to import"; //$NON-NLS-1$
- border = new TitledBorder(title);
-
-
- bindingTable.setBorder(border);
- return bindingTable;
- }
-
-
- private void populateTable() {
- loadPSCsForNextStartup();
-
- createPSCXrefs();
-
- tmdlPSCs.setNumRows(0);
- try {
-
- // Process Next Startup set
- if (mapPSCtoEnabledForNextStartup != null) {
- Iterator itPsc
- = mapPSCtoEnabledForNextStartup.keySet().iterator();
-
- // drive the process by walking the NextStartup hashmap
- while (itPsc.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)itPsc.next();
-
- Vector row = new Vector(SERVICE_HDRS.length);
- row.setSize(SERVICE_HDRS.length);
-
- row.setElementAt(psc, PSC_COL);
-
- Boolean enabledForNextStartup =
- (Boolean)mapPSCtoEnabledForNextStartup.get(psc);
-
- row.setElementAt(enabledForNextStartup, ENABLED_COL);
-
- tmdlPSCs.addRow(row);
- }
- }
- } catch (Exception theException) {
- ExceptionUtility.showMessage(" ", //$NON-NLS-1$
- //getString("msg.configmgrproblem",
- // new Object[] {getClass(), "setDomainObject"}),
- theException);
- LogManager.logError(
- LogContexts.CONNECTOR_BINDINGS,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
- private void populateTable(Collection bindings) {
- tmdlBindings.setRowCount(0);
- try {
-
- // Process Next Startup set
- Iterator itBinding = bindings.iterator();
-
- // drive the process by walking the NextStartup hashmap
- while (itBinding.hasNext()) {
- String binding =
- (String)itBinding.next();
-
- Vector row = new Vector(BINDING_HDRS.length);
- row.setSize(BINDING_HDRS.length);
-
- row.setElementAt(binding, BINDING_COL);
-
- tmdlBindings.addRow(row);
-
- }
- } catch (Exception theException) {
- ExceptionUtility.showMessage(" ", //$NON-NLS-1$
- //getString("msg.configmgrproblem",
- // new Object[] {getClass(), "setDomainObject"}),
- theException);
- LogManager.logError(
- LogContexts.CONNECTOR_BINDINGS,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
-
-
- private void doTableSetup() {
- // customize the table
- tblPSCs.sizeColumnsToFitData();
-
- // fix column for Next Startup
- EnhancedTableColumnModel etcmNextStartup =
- tblPSCs.getEnhancedColumnModel();
- TableColumn clmConnBindColumnNextStartup =
- etcmNextStartup.getColumn(ENABLED_COL);
- tblPSCs.sizeColumnToFitData(
- (EnhancedTableColumn)clmConnBindColumnNextStartup);
- sortPSCTable();
- }
-
- private void sortPSCTable() {
- EnhancedTableColumnModel etcmPSCs = tblPSCs.getEnhancedColumnModel();
- TableColumn clmPSCColumn = etcmPSCs.getColumn(PSC_COL);
- etcmPSCs
- .setColumnSortedAscending((EnhancedTableColumn)clmPSCColumn, false);
- }
-
- private void loadPSCsForNextStartup() {
- mapPSCtoEnabledForNextStartup.clear();
- try {
- Configuration config = getNextStartupConfig();
- Collection colPsc = connectorManager.getAllConnectorsPSCsByConfig(
- config);
-
- if (colPsc != null) {
- Iterator itPsc = colPsc.iterator();
- while (itPsc.hasNext()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)itPsc.next();
-
- Boolean enabled = null;
- if (psc.getServiceComponentDefnIDs().size() > 0) {
- enabled = Boolean.TRUE;
- } else {
- enabled = Boolean.FALSE;
- }
- mapPSCtoEnabledForNextStartup.put(psc, enabled);
- }
- }
- } catch (Exception theException) {
- ExceptionUtility.showMessage(" ", //$NON-NLS-1$
- theException);
- LogManager.logError(LogContexts.CONNECTOR_BINDINGS, theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
- private void createPSCXrefs() {
- // Next Startup
- Iterator itPscs = mapPSCtoEnabledForNextStartup.keySet().iterator();
- while(itPscs.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)itPscs.next();
- mapNextStartupPSCXref.put(psc.getName(), psc);
- }
- }
-
- public void actionPerformed(ActionEvent theEvent) {
- }
-
- public void tableChanged(TableModelEvent theEvent) {
- int row = theEvent.getFirstRow();
- ProductServiceConfig psc
- = (ProductServiceConfig)tmdlPSCs.getValueAt(row, PSC_COL);
-
- // get the proper PSC for NextStartup
- ProductServiceConfig pscNS
- = (ProductServiceConfig)
- mapNextStartupPSCXref.get(psc.getName());
-
- Object saveEnabled = mapPSCtoEnabledForNextStartup.get(pscNS);
-
- if (!saveEnabled.equals(tmdlPSCs.getValueAt(row, ENABLED_COL))) {
- numRowsDifferentNextStartup++;
- } else {
- if (numRowsDifferentNextStartup > 0) {
- numRowsDifferentNextStartup--;
- }
- }
- checkResetState();
- }
-
- public void valueChanged(ListSelectionEvent theEvent) {
- // done one time to setup the checkbox action listener
- int row = tblPSCs.getSelectedRow();
- if (row != -1) {
- TableCellEditor editor = tblPSCs.getCellEditor(row, ENABLED_COL);
- chk = (CheckBox)editor.getTableCellEditorComponent(
- tblPSCs,
- tblPSCs.getValueAt(row, ENABLED_COL),
- true,
- row,
- ENABLED_COL);
- chk.addActionListener(this);
- tblPSCs.getSelectionModel().removeListSelectionListener(this);
- }
- }
-
- private void checkResetState() {
- }
-
- private Configuration getNextStartupConfig() {
- Configuration cfg = null;
- try {
- cfg = connectorManager.getNextStartupConfig();
- } catch (Exception e) {
- ExceptionUtility.showMessage(
- "Failed retrieving the Next Startup Config", e); //$NON-NLS-1$
- }
- return cfg;
- }
-
- public ProductServiceConfig[] getEnabledConfigs() {
- int numRows = tblPSCs.getRowCount();
- java.util.List pscsList = new ArrayList(numRows);
- for (int i = 0; i < numRows; i++) {
- Boolean enabledBool = (Boolean)tblPSCs.getModel().getValueAt(i,
- ENABLED_COL);
- if (enabledBool.booleanValue()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)tblPSCs.getModel().getValueAt(i,
- PSC_COL);
- pscsList.add(psc);
- }
- }
- ProductServiceConfig[] pscs =
- new ProductServiceConfig[pscsList.size()];
- Iterator it = pscsList.iterator();
- for (int i = 0; it.hasNext(); i++) {
- pscs[i] = (ProductServiceConfig)it.next();
- }
- return pscs;
- }
-}
\ No newline at end of file
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardRenamePanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardRenamePanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/ImportBindingWizardRenamePanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -491,10 +491,10 @@
try {
config = getNextStartupConfig();
- Collection colPsc = connectorManager.getAllConnectorsPSCsByConfig(
- config);
+// Collection colPsc = connectorManager.getAllConnectorsPSCsByConfig(
+// config);
- if (colPsc != null) {
+ // if (colPsc != null) {
Iterator itBinding = bindings.iterator();
while (itBinding.hasNext()) {
String binding =
@@ -509,7 +509,7 @@
}
mapDoesBindingExist.put(binding, name);
}
- }
+ // }
} catch (Exception theException) {
ExceptionUtility.showMessage(" ", //$NON-NLS-1$
//getString("msg.configmgrproblem",
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardController.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardController.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardController.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -36,7 +36,6 @@
import com.metamatrix.common.config.api.ComponentType;
import com.metamatrix.common.config.api.ConfigurationObjectEditor;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.api.ProductServiceConfig;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.console.connections.ConnectionInfo;
@@ -53,13 +52,13 @@
private final static int CONNECTOR_SELECT_PAGE_NUM = 0;
private final static int SPECIFICATION_PAGE_NUM = 1;
- private final static int PSC_ENABLE_PAGE_NUM = 2;
+// private final static int PSC_ENABLE_PAGE_NUM = 2;
private NewBindingWizardConnectorSelectPanel connectorSelectPanel;
private ComponentType currentlySelectedConnector = null;
private String sNewCBName = null;
private NewBindingWizardSpecificationPanel specsPanel;
- private NewBindingWizardPSCEnablePanel pscEnablePanel;
+// private NewBindingWizardPSCEnablePanel pscEnablePanel;
private JDialog dialog;
private int currentPage = -1;
@@ -85,13 +84,14 @@
public ServiceComponentDefn runWizard() {
connectorSelectPanel = new NewBindingWizardConnectorSelectPanel(this, connection);
specsPanel = new NewBindingWizardSpecificationPanel(this, connection);
- pscEnablePanel = new NewBindingWizardPSCEnablePanel(this, connection);
+ // pscEnablePanel = new NewBindingWizardPSCEnablePanel(this, connection);
- if ((connectorSelectPanel != null) && (specsPanel != null) && (pscEnablePanel != null)) {
+ if ((connectorSelectPanel != null) && (specsPanel != null) ) {
+ // && (pscEnablePanel != null)) {
addPage(connectorSelectPanel);
addPage(specsPanel);
- addPage(pscEnablePanel);
+ // addPage(pscEnablePanel);
dialog = new JDialog(ConsoleMainFrame.getInstance(), "Create New Connector Binding Wizard"); //$NON-NLS-1$
dialog.setModal(true);
@@ -226,11 +226,11 @@
break;
case SPECIFICATION_PAGE_NUM:
- pscEnablePanel.setNewConnectorBindingInfo(this.getNewBindingName(), this.getSelectedConnectorName());
+// pscEnablePanel.setNewConnectorBindingInfo(this.getNewBindingName(), this.getSelectedConnectorName());
break;
- case PSC_ENABLE_PAGE_NUM:
- break;
+// case PSC_ENABLE_PAGE_NUM:
+// break;
}
return bContinue;
}
@@ -303,9 +303,9 @@
private void createBinding() {
ConnectorBinding binding = specsPanel.getNewConnectorBinding();
ConfigurationObjectEditor coe = specsPanel.getConfigurationObjectEditor();
- ProductServiceConfig[] enabledConfigs = pscEnablePanel.getEnabledConfigs();
+ // ProductServiceConfig[] enabledConfigs = pscEnablePanel.getEnabledConfigs();
try {
- getConnectorManager().createConnectorBinding(binding, coe, enabledConfigs);
+ getConnectorManager().createConnectorBinding(binding, coe);
scdNewConnectorBinding = binding;
} catch (Exception ex) {
String msg = "Error creating connector binding."; //$NON-NLS-1$
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardPSCEnablePanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardPSCEnablePanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardPSCEnablePanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,376 +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.console.ui.views.connectorbinding;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Vector;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.models.ConnectorManager;
-import com.metamatrix.console.models.ModelManager;
-import com.metamatrix.console.ui.util.BasicWizardSubpanelContainer;
-import com.metamatrix.console.ui.util.WizardInterface;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-// ===
-
-public class NewBindingWizardPSCEnablePanel extends BasicWizardSubpanelContainer implements
- ActionListener,
- ListSelectionListener,
- TableModelListener {
-
- // /////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- // /////////////////////////////////////////////////////////////////////////
-
- private static/* final */String[] SERVICE_HDRS;
- private static final int PSC_COL = 0;
- private static final int CONFIGURATION_COL = 1;
- private static final int ENABLED_COL = 2;
-
- private static final String NEXT_STARTUP_CONFIG = "Next Startup"; //$NON-NLS-1$
-
- public static/* final */SimpleDateFormat DATE_FORMATTER;
-
- // /////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- // /////////////////////////////////////////////////////////////////////////
-
- static {
- SERVICE_HDRS = new String[3];
- SERVICE_HDRS[PSC_COL] = "PSC"; //$NON-NLS-1$
- SERVICE_HDRS[CONFIGURATION_COL] = "Configuration"; //$NON-NLS-1$
- SERVICE_HDRS[ENABLED_COL] = "Enabled"; //$NON-NLS-1$
-
- String pattern = DeployPkgUtils.getString("pfp.datepattern", true); //$NON-NLS-1$
- if (pattern == null) {
- pattern = "MMM dd, yyyy hh:mm:ss"; //$NON-NLS-1$
- }
- DATE_FORMATTER = new SimpleDateFormat(pattern);
- }
-
- // /////////////////////////////////////////////////////////////////////////
- // CONTROLS
- // /////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblPSCs;
-
- // /////////////////////////////////////////////////////////////////////////
- // FIELDS
- // /////////////////////////////////////////////////////////////////////////
-
- private DefaultTableModel tmdlPSCs;
-
- // Next Startup PSC Map: Map PSC to enabled state
- private HashMap mapPSCtoEnabledForNextStartup = new HashMap();
-
- // PSC Name to Next Startup PSC Xref
- private HashMap mapNextStartupPSCXref = new HashMap();
-
- private int numRowsDifferentNextStartup = 0;
- private CheckBox chk; // the table cell editor component for the enabled col
-
- // private NewBindingWizardController controller = null;
-
- private LabelWidget lblConnectorName = new LabelWidget("Connector Type:"); //$NON-NLS-1$
- private TextFieldWidget txfConnectorName = new TextFieldWidget();
- private TextFieldWidget txfBindingName = new TextFieldWidget();
- private LabelWidget lblBindingName = new LabelWidget("Binding Name:"); //$NON-NLS-1$
- private JPanel pnlOuter = new JPanel();
-
- private JPanel pnlTable = new JPanel();
-
- private ConnectionInfo connection;
-
- public NewBindingWizardPSCEnablePanel(WizardInterface wizardInterface,
- ConnectionInfo connection) {
- super(wizardInterface);
- this.connection = connection;
- init();
- }
-
- private ConnectorManager getConnectorManager() {
- return ModelManager.getConnectorManager(connection);
- }
-
- public void setNewConnectorBindingInfo(String bindingName,
- String connectorTypeName) {
- txfBindingName.setText(bindingName);
- txfConnectorName.setText(connectorTypeName);
- }
-
- private void init() {
- createTablePanel();
- txfBindingName.setEditable(false);
- txfConnectorName.setEditable(false);
- Insets insDefault = new Insets(3, 3, 3, 3);
-
- pnlOuter.setLayout(new GridBagLayout());
- pnlOuter.add(lblBindingName, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
- GridBagConstraints.NONE, insDefault, 0, 0));
- pnlOuter.add(txfBindingName, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.HORIZONTAL, insDefault, 0, 0));
-
- pnlOuter.add(lblConnectorName, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
- GridBagConstraints.NONE, insDefault, 0, 0));
- pnlOuter.add(txfConnectorName, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.HORIZONTAL, insDefault, 0, 0));
-
- pnlOuter.add(pnlTable, new GridBagConstraints(0, 2, GridBagConstraints.REMAINDER, GridBagConstraints.REMAINDER, 1.0, 1.0,
- GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(12, 3, 3, 3), 0, 0));
-
- setMainContent(pnlOuter);
- setStepText(3, "Set Enabled State of New Binding in PSCs, and Create the Binding."); //$NON-NLS-1$
- populateTable();
- }
-
- private JPanel createTablePanel() {
- pnlTable = new JPanel();
- pnlTable.setLayout(new GridLayout(1, 1));
- tblPSCs = new TableWidget();
-
- tmdlPSCs = DeployPkgUtils.setup(tblPSCs, SERVICE_HDRS, 10, new int[] {
- ENABLED_COL
- });
- tblPSCs.getSelectionModel().addListSelectionListener(this);
- tblPSCs.setComparator(new DeployTableSorter());
-
- doTableSetup();
-
- tmdlPSCs.addTableModelListener(this);
-
- JScrollPane spnServices = new JScrollPane(tblPSCs);
- pnlTable.add(spnServices);
-
- return pnlTable;
- }
-
- private void populateTable() {
- loadPSCsForNextStartup();
-
- createPSCXrefs();
-
- tmdlPSCs.setNumRows(0);
- try {
-
- // Process Next Startup set
- if (mapPSCtoEnabledForNextStartup != null) {
- Iterator itPsc = mapPSCtoEnabledForNextStartup.keySet().iterator();
-
- // drive the process by walking the NextStartup hashmap
- while (itPsc.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)itPsc.next();
-
- Vector row = new Vector(SERVICE_HDRS.length);
- row.setSize(SERVICE_HDRS.length);
-
- row.setElementAt(psc, PSC_COL);
-
- row.setElementAt(NEXT_STARTUP_CONFIG, CONFIGURATION_COL);
-
- Boolean enabledForNextStartup = (Boolean)mapPSCtoEnabledForNextStartup.get(psc);
-
- row.setElementAt(enabledForNextStartup, ENABLED_COL);
-
- tmdlPSCs.addRow(row);
- }
- }
- } catch (Exception theException) {
- ExceptionUtility.showMessage(" ", //$NON-NLS-1$
- // getString("msg.configmgrproblem",
- // new Object[] {getClass(), "setDomainObject"}),
- theException);
- LogManager.logError(LogContexts.PSCDEPLOY, theException, getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
- private void doTableSetup() {
- // customize the table
- tblPSCs.sizeColumnsToFitData();
-
- // fix column for Next Startup
- EnhancedTableColumnModel etcmNextStartup = tblPSCs.getEnhancedColumnModel();
- TableColumn clmConnBindColumnNextStartup = etcmNextStartup.getColumn(ENABLED_COL);
- tblPSCs.sizeColumnToFitData((EnhancedTableColumn)clmConnBindColumnNextStartup);
- sortPSCTable();
- }
-
- private void sortPSCTable() {
- EnhancedTableColumnModel etcmPSCs = tblPSCs.getEnhancedColumnModel();
- TableColumn clmPSCColumn = etcmPSCs.getColumn(PSC_COL);
- etcmPSCs.setColumnSortedAscending((EnhancedTableColumn)clmPSCColumn, false);
- }
-
- private void loadPSCsForNextStartup() {
- mapPSCtoEnabledForNextStartup.clear();
- try {
- Configuration config = getNextStartupConfig();
- Collection colPsc = getConnectorManager().getAllConnectorsPSCsByConfig(config);
-
- if (colPsc != null) {
- Iterator itPsc = colPsc.iterator();
- while (itPsc.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)itPsc.next();
-
- Boolean enabled = null;
- // if (ConnectorManager.isStandardConnectorPSCName(
- // psc.getName())) {
- // enabled = Boolean.TRUE;
- // } else
- if (psc.getServiceComponentDefnIDs().size() > 0) {
- enabled = Boolean.TRUE;
- } else {
- enabled = Boolean.FALSE;
- }
- mapPSCtoEnabledForNextStartup.put(psc, enabled);
- }
- }
- } catch (Exception theException) {
- ExceptionUtility.showMessage(" ", //$NON-NLS-1$
- // getString("msg.configmgrproblem",
- // new Object[] {getClass(), "setDomainObject"}),
- theException);
- LogManager.logError(LogContexts.PSCDEPLOY, theException, getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
- private void createPSCXrefs() {
- // Next Startup
- Iterator itPscs = mapPSCtoEnabledForNextStartup.keySet().iterator();
- while (itPscs.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)itPscs.next();
- mapNextStartupPSCXref.put(psc.getName(), psc);
- }
- }
-
- public void actionPerformed(ActionEvent theEvent) {
- }
-
- public void tableChanged(TableModelEvent theEvent) {
- int iSelectedRow = theEvent.getFirstRow();
- String sConfigOfSelectedRow = getConfigTypeForRow(iSelectedRow);
-
- if (sConfigOfSelectedRow.equals(NEXT_STARTUP_CONFIG)) {
- int row = theEvent.getFirstRow();
- ProductServiceConfig psc = (ProductServiceConfig)tmdlPSCs.getValueAt(row, PSC_COL);
-
- // get the proper PSC for NextStartup
- ProductServiceConfig pscNS = (ProductServiceConfig)mapNextStartupPSCXref.get(psc.getName());
-
- Object saveEnabled = mapPSCtoEnabledForNextStartup.get(pscNS);
-
- if (!saveEnabled.equals(tmdlPSCs.getValueAt(row, ENABLED_COL))) {
- numRowsDifferentNextStartup++;
- } else {
- if (numRowsDifferentNextStartup > 0) {
- numRowsDifferentNextStartup--;
- }
- }
- checkResetState();
- }
- }
-
- private String getConfigTypeForRow(int iRow) {
- String sConfigOfSelectedRow = (String)tmdlPSCs.getValueAt(iRow, CONFIGURATION_COL);
- return sConfigOfSelectedRow;
- }
-
- public void valueChanged(ListSelectionEvent theEvent) {
- // done one time to setup the checkbox action listener
- int row = tblPSCs.getSelectedRow();
- if (row != -1) {
- TableCellEditor editor = tblPSCs.getCellEditor(row, ENABLED_COL);
- chk = (CheckBox)editor.getTableCellEditorComponent(tblPSCs,
- tblPSCs.getValueAt(row, ENABLED_COL),
- true,
- row,
- ENABLED_COL);
- chk.addActionListener(this);
- tblPSCs.getSelectionModel().removeListSelectionListener(this);
- }
- }
-
- private void checkResetState() {
- }
-
- private Configuration getNextStartupConfig() {
- Configuration cfg = null;
- try {
- cfg = getConnectorManager().getNextStartupConfig();
- } catch (Exception e) {
- ExceptionUtility.showMessage("Failed retrieving the Next Startup Config", e); //$NON-NLS-1$
- }
- return cfg;
- }
-
- public ProductServiceConfig[] getEnabledConfigs() {
- int numRows = tblPSCs.getRowCount();
- java.util.List pscsList = new ArrayList(numRows);
- for (int i = 0; i < numRows; i++) {
- Boolean enabledBool = (Boolean)tblPSCs.getModel().getValueAt(i, ENABLED_COL);
- if (enabledBool.booleanValue()) {
- ProductServiceConfig psc = (ProductServiceConfig)tblPSCs.getModel().getValueAt(i, PSC_COL);
- pscsList.add(psc);
- }
- }
- ProductServiceConfig[] pscs = new ProductServiceConfig[pscsList.size()];
- Iterator it = pscsList.iterator();
- for (int i = 0; it.hasNext(); i++) {
- pscs[i] = (ProductServiceConfig)it.next();
- }
- return pscs;
- }
-}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigSummaryPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigSummaryPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigSummaryPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -60,7 +60,7 @@
///////////////////////////////////////////////////////////////////////////
private TableWidget tblDeployments;
- private TableWidget tblPscs;
+ private TableWidget tblSvcs;
///////////////////////////////////////////////////////////////////////////
// FIELDS
@@ -68,7 +68,7 @@
private Configuration config;
private DefaultTableModel deployTblModel;
- private DefaultTableModel pscsTblModel;
+ private DefaultTableModel svcsTblModel;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTORS
@@ -123,7 +123,7 @@
pnlDeployments.add(spnDeployments);
JPanel pnlPscs = new JPanel(new GridLayout(1, 1));
- tBorder = new TitledBorder(getString("csp.pnlPscs.title")); //$NON-NLS-1$
+ tBorder = new TitledBorder(getString("csp.pnlSvcs.title")); //$NON-NLS-1$
pnlPscs.setBorder(
new CompoundBorder(tBorder,
@@ -136,17 +136,17 @@
gbc.weighty = 1.0;
pnl.add(pnlPscs, gbc);
- tblPscs = new TableWidget();
- pscsTblModel =
+ tblSvcs = new TableWidget();
+ svcsTblModel =
DeployPkgUtils.setup(
- tblPscs,
- DeployPkgUtils.PSC_SERV_DEF_HDRS,
+ tblSvcs,
+ DeployPkgUtils.SERV_DEF_HDRS,
DeployPkgUtils.getInt("csp.psctblrows", 10), //$NON-NLS-1$
null);
- tblPscs.setComparator(new DeployTableSorter());
+ tblSvcs.setComparator(new DeployTableSorter());
- JScrollPane spnPscs = new JScrollPane(tblPscs);
- pnlPscs.add(spnPscs);
+ JScrollPane spnSvcs = new JScrollPane(tblSvcs);
+ pnlPscs.add(spnSvcs);
return pnl;
}
@@ -176,14 +176,14 @@
try {
// clear and load deployments table
- DeployPkgUtils.loadDeployments(config, deployTblModel, getConnectionInfo());
+ DeployPkgUtils.loadProcesses(config, deployTblModel, getConnectionInfo());
tblDeployments.sizeColumnsToFitData();
sortFirstColumnInTable(tblDeployments);
// clear and load psc service defintion table
- DeployPkgUtils.loadPscServiceDefintions(config, pscsTblModel,
+ DeployPkgUtils.loadServiceDefintions(config, svcsTblModel,
getConnectionInfo());
- tblPscs.sizeColumnsToFitData();
- sortFirstColumnInTable(tblPscs);
+ tblSvcs.sizeColumnsToFitData();
+ sortFirstColumnInTable(tblSvcs);
}
catch (ExternalException theException) {
ExceptionUtility.showMessage(
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigurationTreeCellRenderer.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigurationTreeCellRenderer.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ConfigurationTreeCellRenderer.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -31,7 +31,6 @@
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.DeployedComponent;
-import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.console.connections.ConnectionInfo;
@@ -49,32 +48,25 @@
// CONSTANTS
///////////////////////////////////////////////////////////////////////////
- private static final Icon NEXT_CONFIG_ICON;
+// private static final Icon NEXT_CONFIG_ICON;
private static final Icon HOST_ICON;
private static final Icon PROCESS_ICON;
private static final Icon SERVICE_ICON;
- private static final Icon PSC_ICON;
- private static final Icon DEPLOYMENTS_ICON;
- private static final Icon CONNECTOR_ICON;
- private static final Icon METAMATRIX_SERVER_ICON;
- private static final Icon PLATFORM_ICON;
- private static final Icon PSC_HDR_ICON;
+// private static final Icon DEPLOYMENTS_ICON;
///////////////////////////////////////////////////////////////////////////
// INITIALIZER
///////////////////////////////////////////////////////////////////////////
static {
- NEXT_CONFIG_ICON = DeployPkgUtils.getIcon("icon.nextstartup"); //$NON-NLS-1$
+ // NEXT_CONFIG_ICON = DeployPkgUtils.getIcon("icon.nextstartup"); //$NON-NLS-1$
HOST_ICON = DeployPkgUtils.getIcon("icon.host"); //$NON-NLS-1$
PROCESS_ICON = DeployPkgUtils.getIcon("icon.process"); //$NON-NLS-1$
SERVICE_ICON = DeployPkgUtils.getIcon("icon.service"); //$NON-NLS-1$
- PSC_ICON = DeployPkgUtils.getIcon("icon.psc"); //$NON-NLS-1$
- DEPLOYMENTS_ICON = DeployPkgUtils.getIcon("icon.deployments"); //$NON-NLS-1$
- CONNECTOR_ICON = DeployPkgUtils.getIcon("icon.connector"); //$NON-NLS-1$
- METAMATRIX_SERVER_ICON = DeployPkgUtils.getIcon("icon.mmserver"); //$NON-NLS-1$
- PLATFORM_ICON = DeployPkgUtils.getIcon("icon.platform"); //$NON-NLS-1$
- PSC_HDR_ICON = DeployPkgUtils.getIcon("icon.pschdr"); //$NON-NLS-1$
+// DEPLOYMENTS_ICON = DeployPkgUtils.getIcon("icon.deployments"); //$NON-NLS-1$
+// CONNECTOR_ICON = DeployPkgUtils.getIcon("icon.connector"); //$NON-NLS-1$
+// METAMATRIX_SERVER_ICON = DeployPkgUtils.getIcon("icon.mmserver"); //$NON-NLS-1$
+// PLATFORM_ICON = DeployPkgUtils.getIcon("icon.platform"); //$NON-NLS-1$
}
private ConnectionInfo connectionInfo;
@@ -108,29 +100,14 @@
// set the icon
Object userObj = ((DefaultTreeNode)value).getContent();
if (userObj instanceof Configuration) {
- if (((DefaultTreeNode)value).getName().equals(
- ConfigurationTreeModel.DEPLOYMENTS_HDR)) {
- setIcon(DEPLOYMENTS_ICON);
- } else if (((DefaultTreeNode)value).getName().equals(
- ConfigurationTreeModel.PSC_DEFS_HDR)) {
- setIcon(PSC_HDR_ICON);
- } else {
- ConfigurationID configId =
- (ConfigurationID)((Configuration)userObj).getID();
- if (getConfigurationManager().isNextStartUpConfig(configId)) {
- setIcon(NEXT_CONFIG_ICON);
- }
- }
+// ConfigurationID configId =
+// (ConfigurationID)((Configuration)userObj).getID();
} else if (userObj instanceof ServiceComponentDefn) {
setIcon(SERVICE_ICON);
- } else if (userObj instanceof ConfigurationTreeModel.PscWrapper) {
- setIcon(PSC_ICON);
} else if (userObj instanceof VMComponentDefn) {
setIcon(PROCESS_ICON);
} else if (userObj instanceof ConfigurationTreeModel.HostWrapper) {
setIcon(HOST_ICON);
- } else if (userObj instanceof ProductType) {
- setIcon(METAMATRIX_SERVER_ICON);
} else if (userObj instanceof DeployedComponent) {
setIcon(SERVICE_ICON);
}
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/CreatePSCPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/CreatePSCPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/CreatePSCPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,191 +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.console.ui.views.deploy;
-
-import java.awt.BorderLayout;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.util.*;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.KeyStroke;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-
-import com.metamatrix.common.config.api.ComponentDefnID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.*;
-
-public final class CreatePSCPanel
- extends ConfirmationPanel
- implements ActionListener,
- DocumentListener {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
- private static final KeyStroke ENTER_RELEASED =
- KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true);
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TextFieldWidget txf;
- private ButtonWidget btnCreate;
-
- private AccumulatorPanel pnlAssignments;
-
- private ProductServiceConfig pscDef;
- private List serviceNames;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public CreatePSCPanel(
- String theMessageId,
- String theIconId,
- String theLabelId,
- String theNameTypeId,
- ProductServiceConfig psc,
- List serviceNames) {
-
- super(theMessageId, theIconId, "rp.btnCreate", "rp.btnCancel"); //$NON-NLS-1$ //$NON-NLS-2$
- this.pscDef = psc;
- this.serviceNames = serviceNames;
- JPanel mainPanel = new JPanel(new BorderLayout());
-
- JPanel pnl = new JPanel();
- JLabel lbl = new LabelWidget(DeployPkgUtils.getString(theLabelId));
- pnl.add(lbl);
- txf = DeployPkgUtils.createTextField(theNameTypeId);
- txf.getDocument().addDocumentListener(this);
- txf.registerKeyboardAction(this, ENTER_RELEASED, WHEN_FOCUSED);
- pnl.add(txf);
- mainPanel.add(pnl, BorderLayout.NORTH);
- mainPanel.add(createAssignmentPanel(), BorderLayout.CENTER);
- addContent(mainPanel);
- btnCreate = getAcceptButton();
- btnCreate.setEnabled(false);
- }
-
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- public void actionPerformed(ActionEvent theEvent) {
- btnCreate.doClick();
- }
-
- public void changedUpdate(DocumentEvent theEvent) {
- if ((txf.getText().length() > 0) && !btnCreate.isEnabled()) {
- btnCreate.setEnabled(true);
- }
- else if ((txf.getText().length() == 0) && btnCreate.isEnabled()) {
- btnCreate.setEnabled(false);
- }
- }
-
- public String getName() {
- return txf.getText();
- }
-
- public void insertUpdate(DocumentEvent theEvent) {
- changedUpdate(theEvent);
- }
-
- public void removeUpdate(DocumentEvent theEvent) {
- changedUpdate(theEvent);
- }
-
-
- private JPanel createAssignmentPanel() {
-
- JPanel pnl = new JPanel(new GridLayout(1, 1));
- List currNames = null;
- // if this is for an existing psc the present the existing
- // services in the psc
- if (pscDef != null) {
- Iterator itIds = pscDef.getServiceComponentDefnIDs().iterator();
-
- currNames = new ArrayList(pscDef.getServiceComponentDefnIDs().size());
-
- while(itIds.hasNext()){
- ComponentDefnID id = (ComponentDefnID) itIds.next();
- currNames.add(id);
- }
- } else {
- currNames = Collections.EMPTY_LIST;
- }
-
-
- if (serviceNames == null) {
- Exception theException = new Exception("Null ServiceNames"); //$NON-NLS-1$
- LogManager.logError(
- LogContexts.USERS,
- theException,
- "Error calling UserManager.getRoles()"); //$NON-NLS-1$
- return pnl;
- }
-
- Collections.sort(serviceNames);
- if (!currNames.isEmpty()) {
- Collections.sort(currNames);
- }
- pnlAssignments = new AccumulatorPanel(serviceNames);
- pnlAssignments.getAcceptButton().setVisible(false);
- pnlAssignments.getCancelButton().setVisible(false);
- pnlAssignments.setAllowsReorderingValues(false);
- pnlAssignments.setInitialValues(currNames);
- pnlAssignments.setMinimumValuesAllowed(
- DeployPkgUtils.getInt("rp.minselected", 0)); //$NON-NLS-1$
- pnlAssignments.remove(pnlAssignments.getNavigationBar());
- pnlAssignments.getAvailableValuesHeader()
- .setText(
- DeployPkgUtils.getString(
- "rp.avail.hdr")); //$NON-NLS-1$
- pnlAssignments.getValuesHeader()
- .setText(
- DeployPkgUtils.getString(
- "rp.select.hdr")); //$NON-NLS-1$
- pnl.add(pnlAssignments);
- return pnl;
- }
-
-
- public List getSelectedServices() {
- return pnlAssignments.getValues();
- }
-
-
-}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployMainPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -67,7 +67,6 @@
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.DeployedComponent;
-import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.config.util.ConfigurationPropertyNames;
@@ -94,7 +93,6 @@
import com.metamatrix.console.ui.views.deploy.event.ConfigurationTreeModelListener;
import com.metamatrix.console.ui.views.deploy.model.ConfigurationTreeModel;
import com.metamatrix.console.ui.views.deploy.model.ConfigurationTreeModel.HostWrapper;
-import com.metamatrix.console.ui.views.deploy.model.ConfigurationTreeModel.PscWrapper;
import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
import com.metamatrix.console.ui.views.runtime.util.RuntimeMgmtUtils;
import com.metamatrix.console.util.DialogUtility;
@@ -151,11 +149,7 @@
private ConfigSummaryPanel pnlConfigSummary;
private DeployedHostPanel pnlDeployedHost;
private DeployedProcessPanel pnlDeployedProcess;
- private DeployedPscPanel pnlDeployedPsc;
private DeployedServicePanel pnlDeployedService;
- private PscSummaryPanel pnlPscSummary;
- private ProductDefinitionPanel pnlProductDefn;
- private PscDefinitionPanel pnlPscDefn;
private ServiceDefinitionPanel pnlServiceDefn;
private DeploymentsSummaryPanel pnlDeploymentsSummary;
private JPanel pnlTreeOpsSizer;
@@ -406,6 +400,8 @@
tree.getSelectionModel().setSelectionMode(
TreeSelectionModel.SINGLE_TREE_SELECTION);
treeModel = new ConfigurationTreeModel();
+ treeModel.init(getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID));
+
tree.setModel(treeModel);
renderer = new ConfigurationTreeCellRenderer(connection);
tree.setCellRenderer(renderer);
@@ -603,9 +599,10 @@
if (!treeModel.isHeaderNode(node) &&
(node != treeModel.getRoot())) {
Object content = node.getContent();
- if (content instanceof PscWrapper) {
- ancestors.add(((PscWrapper)content).getPsc());
- } else if (content instanceof HostWrapper) {
+// if (content instanceof PscWrapper) {
+// ancestors.add(((PscWrapper)content).getPsc());
+// } else
+ if (content instanceof HostWrapper) {
ancestors.add(((HostWrapper)content).getHost());
} else {
ancestors.add(content);
@@ -753,17 +750,18 @@
pnlDetail = null;
// need to select same node as before refresh, if possible
- boolean deploymentHdr = false;
- boolean pscDefHdr = false;
+ // boolean deploymentHdr = false;
+ // boolean pscDefHdr = false;
Object userObj = null;
if( saveNode != null ) {
userObj = saveNode.getContent();
}
- if (treeModel.isDeploymentsHeaderNode(saveNode)) {
- deploymentHdr = true;
- } else if (treeModel.isPscDefinitionsHeaderNode(saveNode)) {
- pscDefHdr = true;
- }
+ // if (treeModel.isDeploymentsHeaderNode(saveNode)) {
+ // deploymentHdr = true;
+ // }
+// else if (treeModel.isPscDefinitionsHeaderNode(saveNode)) {
+// pscDefHdr = true;
+// }
DefaultTreeNode tempSaveNode = saveNode;
saveNode = null;
@@ -806,14 +804,14 @@
//select same node as before refresh if it still exists
DefaultTreeNode node = null;
- if (deploymentHdr) {
- node = treeModel.getDeploymentsHeaderNode((Configuration)userObj);
- } else if (pscDefHdr) {
- node = treeModel.getPscDefinitionsHeaderNode(
- (Configuration)userObj);
- } else {
+/// if (deploymentHdr) {
+// node = treeModel.getDeploymentsHeaderNode((Configuration)userObj);
+// } else if (pscDefHdr) {
+// node = treeModel.getPscDefinitionsHeaderNode(
+// (Configuration)userObj);
+ // } else {
node = treeModel.getUserObjectNode(userObj);
- }
+ // }
eventProcessing = false;
@@ -1044,7 +1042,7 @@
Configuration config = theEvent.getConfiguration();
if (config.getID().equals(pnlDetail.getConfigId())) {
// select the appropriate deployment summary node
- selectNode(treeModel.getDeploymentsHeaderNode(config));
+ selectNode(treeModel.getUserObjectNode(config));
}
} else if (!(pnlDetail instanceof DeployedProcessPanel) ||
((pnlDetail instanceof DeployedProcessPanel) &&
@@ -1179,42 +1177,44 @@
// TreeWidget switches to the wait cursor automatically
configId = getConfigId(node);
Object domainObj = node.getContent();
- if (treeModel.isDeploymentsHeaderNode(node)) {
- if (pnlDeploymentsSummary == null) {
- pnlDeploymentsSummary =
- new DeploymentsSummaryPanel(configId,
- connection);
- }
- pnl = pnlDeploymentsSummary;
- } else if (treeModel.isPscDefinitionsHeaderNode(node)) {
- if (pnlPscSummary == null) {
- pnlPscSummary = new PscSummaryPanel(configId,
- connection);
- }
- pnl = pnlPscSummary;
- } else if (domainObj instanceof PscWrapper) {
- PscWrapper wrapper = (PscWrapper)domainObj;
- if (wrapper.isDefinition()) {
- if (pnlPscDefn == null) {
- pnlPscDefn = new PscDefinitionPanel(
- configId,connection, this);
- }
- pnl = pnlPscDefn;
- } else {
- if (pnlDeployedPsc == null) {
- pnlDeployedPsc = new DeployedPscPanel(connection,
- configId);
- }
- pnl = pnlDeployedPsc;
- }
- domainObj = wrapper.getPsc();
- } else if (domainObj instanceof ServiceComponentDefn) {
- if (pnlServiceDefn == null) {
- pnlServiceDefn = new ServiceDefinitionPanel(
- true, null, configId, connection);
- }
- pnl = pnlServiceDefn;
- } else if (domainObj instanceof Configuration) {
+// if (treeModel.isDeploymentsHeaderNode(node)) {
+// if (pnlDeploymentsSummary == null) {
+// pnlDeploymentsSummary =
+// new DeploymentsSummaryPanel(configId,
+// connection);
+// }
+// pnl = pnlDeploymentsSummary;
+// } else if (treeModel.isPscDefinitionsHeaderNode(node)) {
+// if (pnlPscSummary == null) {
+// pnlPscSummary = new PscSummaryPanel(configId,
+// connection);
+// }
+// pnl = pnlPscSummary;
+// } else if (domainObj instanceof PscWrapper) {
+// PscWrapper wrapper = (PscWrapper)domainObj;
+// if (wrapper.isDefinition()) {
+// if (pnlPscDefn == null) {
+// pnlPscDefn = new PscDefinitionPanel(
+// configId,connection, this);
+// }
+// pnl = pnlPscDefn;
+// } else {
+// if (pnlDeployedPsc == null) {
+// pnlDeployedPsc = new DeployedPscPanel(connection,
+// configId);
+// }
+// pnl = pnlDeployedPsc;
+// }
+// domainObj = wrapper.getPsc();
+// } else
+// if (domainObj instanceof ServiceComponentDefn) {
+// if (pnlServiceDefn == null) {
+// pnlServiceDefn = new ServiceDefinitionPanel(
+// true, null, configId, connection);
+// }
+// pnl = pnlServiceDefn;
+// } else
+ if (domainObj instanceof Configuration) {
if (pnlConfigSummary == null) {
pnlConfigSummary = new ConfigSummaryPanel(
configId, connection);
@@ -1227,12 +1227,12 @@
}
pnl = pnlDeployedHost;
domainObj = ((HostWrapper)domainObj).getHost();
- } else if (domainObj instanceof ProductType) {
- if (pnlProductDefn == null) {
- pnlProductDefn = new ProductDefinitionPanel(
- configId, connection);
- }
- pnl = pnlProductDefn;
+// } else if (domainObj instanceof ProductType) {
+// if (pnlProductDefn == null) {
+// pnlProductDefn = new ProductDefinitionPanel(
+// configId, connection);
+// }
+// pnl = pnlProductDefn;
} else if (domainObj instanceof VMComponentDefn) {
if (pnlDeployedProcess == null) {
pnlDeployedProcess = new DeployedProcessPanel(
@@ -1247,17 +1247,25 @@
pnl = pnlDeployedService;
} else {
- String msg = DeployPkgUtils.getString("dmp.msg.unknowntype") + //$NON-NLS-1$
- domainObj.getClass();
-
- IllegalStateException ise = new IllegalStateException(msg);
- ExceptionUtility.showMessage(
- DeployPkgUtils.getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "valueChanged"}), //$NON-NLS-1$
- ""+msg, ise); //$NON-NLS-1$
- LogManager.logError(LogContexts.PSCDEPLOY, ise,
- "valueChanged"); //$NON-NLS-1$
- return;
+ if (pnlDeploymentsSummary == null) {
+ pnlDeploymentsSummary =
+ new DeploymentsSummaryPanel(configId,
+ connection);
+ }
+ pnl = pnlDeploymentsSummary;
+
+//
+// String msg = DeployPkgUtils.getString("dmp.msg.unknowntype") + //$NON-NLS-1$
+// domainObj.getClass();
+//
+// IllegalStateException ise = new IllegalStateException(msg);
+// ExceptionUtility.showMessage(
+// DeployPkgUtils.getString("msg.configmgrproblem", //$NON-NLS-1$
+// new Object[] {getClass(), "valueChanged"}), //$NON-NLS-1$
+// ""+msg, ise); //$NON-NLS-1$
+// LogManager.logError(LogContexts.PSCDEPLOY, ise,
+// "valueChanged"); //$NON-NLS-1$
+// return;
}
// set config type if different than last selected
@@ -1293,9 +1301,10 @@
saveNode = node;
// check to see if configuration of node is editable
- boolean enable = editMode &&
- getConfigurationManager().isEditable(configId);
- pnl.setEnabled(enable);
+// boolean enable = editMode &&
+// getConfigurationManager().isEditable(configId);
+
+ pnl.setEnabled(true);
currentTreePath = theEvent.getNewLeadSelectionPath();
} else {
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedProcessPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -53,10 +53,9 @@
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
+import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
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.VMComponentDefn;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.object.PropertiedObject;
@@ -112,25 +111,25 @@
private static final String NO_PSC =
DeployPkgUtils.getString("drp.nodeployedpsc"); //$NON-NLS-1$
- private static /*final*/ String[] PSC_HDRS;
- private static final int PROD_COL = 0;
- private static final int PSC_COL = 1;
+// private static /*final*/ String[] SVC_HDRS;
+// private static final int SVC_COL = 0;
+// private static final int ENABLED_COL = 1;
///////////////////////////////////////////////////////////////////////////
// INITIALIZER
///////////////////////////////////////////////////////////////////////////
- static {
- PSC_HDRS = new String[2];
- PSC_HDRS[PROD_COL] = DeployPkgUtils.getString("drp.product.hdr"); //$NON-NLS-1$
- PSC_HDRS[PSC_COL] = DeployPkgUtils.getString("drp.psc.hdr"); //$NON-NLS-1$
- }
+// static {
+// SVC_HDRS = new String[2];
+// SVC_HDRS[SVC_COL] = DeployPkgUtils.getString("drp.service.hdr"); //$NON-NLS-1$
+// SVC_HDRS[ENABLED_COL] = DeployPkgUtils.getString("drp.enabled.hdr"); //$NON-NLS-1$
+// }
///////////////////////////////////////////////////////////////////////////
// CONTROLS
///////////////////////////////////////////////////////////////////////////
- private TableWidget tblPscs;
+ private TableWidget tblSvcs;
private TextFieldWidget txfHost;
///////////////////////////////////////////////////////////////////////////
@@ -143,14 +142,11 @@
private VMComponentDefn process;
private ProcessPOP pnlProps;
private JPanel pnlPropsOuter;
-// private JSplitPane splitPane;
private DefaultTableModel tblModel;
private HashMap prodRowMap = new HashMap();
private HashMap propValueMap = new HashMap();
private HashMap propDefsMap = new HashMap();
- private int numPscsDifferent = 0;
- private PscCellComponent pscCellComp;
private boolean processEvents = true;
private ConfigurationPropertiedObjectEditor propEditor;
private PropertiedObject propObj;
@@ -186,7 +182,8 @@
private void checkResetState() {
- if (isPropertiesValid() && (propsDifferent || (numPscsDifferent > 0))) {
+ if (isPropertiesValid() && (propsDifferent) ) {
+ //|| (numPscsDifferent > 0))) {
if (!actionApply.isEnabled()) {
actionApply.setEnabled(true);
actionReset.setEnabled(true);
@@ -287,7 +284,7 @@
}
JPanel pnlPscs = new JPanel(new GridLayout(1, 1));
- tBorder = new TitledBorder(getString("drp.pnlPscs.title")); //$NON-NLS-1$
+ tBorder = new TitledBorder(getString("drp.pnlSvcs.title")); //$NON-NLS-1$
pnlPscs.setBorder(
new CompoundBorder(tBorder,
DeployPkgUtils.EMPTY_BORDER));
@@ -300,21 +297,23 @@
gbc.weighty = 1.0;
pnl.add(pnlPscs, gbc);
- tblPscs = new TableWidget();
+ tblSvcs = new TableWidget();
tblModel =
DeployPkgUtils.setup(
- tblPscs,
- PSC_HDRS,
- DeployPkgUtils.getInt("drp.pscstblrows", 10), //$NON-NLS-1$
- new int[] {PSC_COL});
- TableColumn pscCol = tblPscs.getColumnModel().getColumn(PSC_COL);
- pscCellComp = new PscCellComponent();
- pscCol.setCellEditor(pscCellComp);
- pscCol.setCellRenderer(pscCellComp);
- tblPscs.setSortable(false);
- tblPscs.setComparator(new DeployTableSorter());
+ tblSvcs,
+ DeployPkgUtils.SERV_DEF_HDRS,
+ DeployPkgUtils.getInt("csp.psctblrows", 10), //$NON-NLS-1$
+ null); // new int[] {SVC_COL, ENABLED_COL});
+ tblSvcs.setComparator(new DeployTableSorter());
+
+ // TableColumn vmCol = tblSvcs.getColumnModel().getColumn(SVC_COL);
+// pscCellComp = new PscCellComponent();
+// vmCol.setCellEditor(pscCellComp);
+// pscCol.setCellRenderer(pscCellComp);
+ tblSvcs.setSortable(false);
+ tblSvcs.setComparator(new DeployTableSorter());
- JScrollPane spnPscs = new JScrollPane(tblPscs);
+ JScrollPane spnPscs = new JScrollPane(tblSvcs);
pnlPscs.add(spnPscs);
@@ -378,26 +377,14 @@
if (pnlConfirm.isConfirmed()) {
deleting = true;
getConfigurationManager().deleteProcess(process, getConfigId());
- numPscsDifferent = 0;
- propsDifferent = false;
+ propsDifferent = false;
checkResetState();
deleting = false;
}
}
- private int findProductRow(ProductType theProduct) {
- int row = -1;
- for (int rows=tblModel.getRowCount(), i=0; i<rows; i++) {
- if (tblModel.getValueAt(i, PROD_COL).equals(theProduct)) {
- row = i;
- break;
- }
- }
- return row;
- }
-
public String getProcessName() {
String str = ""; //$NON-NLS-1$
if (process != null) {
@@ -408,18 +395,23 @@
private void initTable() {
try {
- Map prodPscs = getConfigurationManager().getAllProductPscs(
- getConfigId());
- pscCellComp.setPscValues(prodPscs);
+ Configuration config = getConfigurationManager().getConfig(getConfigId());
+// Collection services = config.getDeployedServicesForVM(process);
+
+// pscCellComp.setPscValues(prodPscs);
if (tblModel.getRowCount() == 0) {
- Iterator prodItr = prodPscs.keySet().iterator();
- while (prodItr.hasNext()) {
- Vector row = new Vector(PSC_HDRS.length);
- row.setSize(PSC_HDRS.length);
- row.setElementAt(prodItr.next(), PROD_COL);
- row.setElementAt(NO_PSC, PSC_COL);
- tblModel.addRow(row);
- }
+
+ DeployPkgUtils.loadServiceDefintions(config, tblModel,
+ getConnectionInfo());
+
+// Iterator svcItr = services.iterator();
+// while (svcItr.hasNext()) {
+// Vector row = new Vector(SVC_HDRS.length);
+// row.setSize(SVC_HDRS.length);
+// row.setElementAt(svcItr.next(), SVC_COL);
+// row.setElementAt(NO_PSC, ENABLED_COL);
+// tblModel.addRow(row);
+// }
}
}
catch (Exception theException) {
@@ -433,12 +425,7 @@
getClass() + ":initTable"); //$NON-NLS-1$
}
- // set each psc to none
- for (int rows=tblModel.getRowCount(), i=0;
- i<rows;
- tblModel.setValueAt(NO_PSC, i++, PSC_COL)) {
-
- }
+
}
@@ -504,33 +491,19 @@
public void itemStateChanged(ItemEvent theEvent) {
if (processEvents) {
JComboBox pscEditor = (JComboBox)theEvent.getSource();
- int row = tblPscs.getSelectedRow();
+ int row = tblSvcs.getSelectedRow();
if ((theEvent.getStateChange() == ItemEvent.SELECTED) &&
(row != -1) &&
(pscEditor.getSelectedIndex() != -1)) {
- Object psc = pscEditor.getSelectedItem();
- tblModel.setValueAt(psc, row, PSC_COL);
- Object saveValue = prodRowMap.get(tblModel.getValueAt(row, PROD_COL));
+ Object vm = pscEditor.getSelectedItem();
+ tblModel.setValueAt(vm, row, DeployPkgUtils.SERV_COL);
+ Object saveValue = prodRowMap.get(tblModel.getValueAt(row, DeployPkgUtils.ENABLED_COL));
boolean diff = false;
- if (saveValue == null) {
- if (!psc.equals(NO_PSC)) {
- diff = true;
- }
+ if (!vm.equals(saveValue)) {
+ diff = true;
}
- else {
- if (!psc.equals(saveValue)) {
- diff = true;
- }
- }
- if (diff) {
- numPscsDifferent++;
- }
- else {
- if (numPscsDifferent > 0) {
- numPscsDifferent--;
- }
- }
+
checkResetState();
}
}
@@ -547,44 +520,6 @@
}
checkResetState();
-
- // update pscs if necessary
- if (numPscsDifferent > 0) {
- for (int rows = tblModel.getRowCount(), i=0; i<rows; i++) {
- ProductType prod = (ProductType)tblModel.getValueAt(i, PROD_COL);
- Object savedPsc = prodRowMap.get(prod);
- Object currentPsc = tblModel.getValueAt(i, PSC_COL);
- Object[] ancestors = getAncestors();
- Host host = (Host)ancestors[0];
- if ((savedPsc == null) && (!currentPsc.equals(NO_PSC))) {
- // no previous psc deployed for product and now there is
- getConfigurationManager().deployPsc(
- (ProductServiceConfig)currentPsc,
- process,
- host,
- getConfigId());
- prodRowMap.put(prod, currentPsc);
- }
- else if ((savedPsc != null) &&
- (!savedPsc.equals(currentPsc)) &&
- (!currentPsc.equals(NO_PSC))) {
- // deployed psc has changed, delete then add
- getConfigurationManager().changeDeployedPsc(
- (ProductServiceConfig)savedPsc,
- (ProductServiceConfig)currentPsc, process, host,
- getConfigId());
- prodRowMap.put(prod, currentPsc);
- }
- else if ((savedPsc != null) && (currentPsc.equals(NO_PSC))) {
- // deployed psc deleted and no replacement
- getConfigurationManager().deleteDeployedPsc(
- (ProductServiceConfig)savedPsc, process, host,
- getConfigId());
- prodRowMap.put(prod, null);
- }
- }
- }
- numPscsDifferent = 0;
checkResetState();
}
@@ -595,24 +530,6 @@
resetPropertiedObject();
}
-
- //reset PSC table here
- for (int rows=tblModel.getRowCount(), i=0; i<rows; i++) {
- Object prod = tblModel.getValueAt(i, PROD_COL);
- Object psc = prodRowMap.get(prod);
- if (psc == null) {
- if (!tblModel.getValueAt(i, PSC_COL).equals(NO_PSC)) {
- tblModel.setValueAt(NO_PSC, i, PSC_COL);
- }
- }
- else {
- if (!tblModel.getValueAt(i, PSC_COL).equals(psc)) {
- tblModel.setValueAt(psc, i, PSC_COL);
- }
- }
- }
-
- numPscsDifferent = 0;
propsDifferent = false;
checkResetState();
}
@@ -635,7 +552,7 @@
public void setConfigId(ConfigurationID theConfigId) {
super.setConfigId(theConfigId);
//This needs checking out. Changed by dropping oper. config. BWP 11/08/02:
- setMMLEnabled(true);
+ // setMMLEnabled(true);
}
public void setDomainObject(
@@ -694,17 +611,19 @@
initTable();
// populate PSC column
prodRowMap.clear();
- Collection pscs = getConfigurationManager().getDeployedPscs(process);
- if (pscs != null) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- ProductServiceConfig psc = (ProductServiceConfig)pscItr.next();
- ProductType product = getConfigurationManager().getProduct(psc);
- //tblModel.setValueAt(psc, findProductRow(product), PSC_COL);
- prodRowMap.put(product, psc);
- }
- }
- tblPscs.sizeColumnsToFitData();
+// Collection pscs = getConfigurationManager().getDeployedPscs(process);
+// if (pscs != null) {
+// Iterator pscItr = pscs.iterator();
+// while (pscItr.hasNext()) {
+// ProductServiceConfig psc = (ProductServiceConfig)pscItr.next();
+//
+// ProductType product = BasicProductType.PRODUCT_TYPE;
+// // getConfigurationManager().getProduct(psc);
+// //tblModel.setValueAt(psc, findProductRow(product), PSC_COL);
+// prodRowMap.put(product, psc);
+// }
+// }
+ tblSvcs.sizeColumnsToFitData();
}
catch (Exception theException) {
ExceptionUtility.showMessage(
@@ -737,21 +656,21 @@
actionDelete.setEnabled(theEnableFlag);
- tblPscs.setColumnEditable(PSC_COL, theEnableFlag);
+ tblSvcs.setColumnEditable(DeployPkgUtils.ENABLED_COL, theEnableFlag);
if (!theEnableFlag) {
- tblPscs.editingStopped(new ChangeEvent(this));
+ tblSvcs.editingStopped(new ChangeEvent(this));
}
}
}
- public void setMMLEnabled(boolean theEnableFlag) {
- pnlProps.setReadOnlyForced(!theEnableFlag);
- pnlProps.refreshDisplay();
-
- if (!theEnableFlag) {
- tblPscs.editingStopped(new ChangeEvent(this));
- }
- }
+// public void setMMLEnabled(boolean theEnableFlag) {
+// pnlProps.setReadOnlyForced(!theEnableFlag);
+// pnlProps.refreshDisplay();
+//
+// if (!theEnableFlag) {
+// tblPscs.editingStopped(new ChangeEvent(this));
+// }
+// }
///////////////////////////////////////////////////////////////////////////
// INNER CLASSES
@@ -814,78 +733,6 @@
}
}
- private class PscCellComponent
- extends DefaultCellEditor
- implements TableCellRenderer {
-
- HashMap map = new HashMap();
- JComboBox cbxRenderer;
-
- public PscCellComponent() {
- super(new JComboBox() {
- public void updateUI() {
- setUI(javax.swing.plaf.basic.BasicComboBoxUI.createUI(this));
- }
- });
- JComboBox cbx = (JComboBox)getComponent();
- cbx.addItemListener(DeployedProcessPanel.this);
- // setup renderer component
- cbxRenderer = new JComboBox() {
- public void updateUI() {
- setUI(javax.swing.plaf.basic.BasicComboBoxUI.createUI(this));
- }
- };
- }
-
- public Component getTableCellEditorComponent(
- JTable theTable,
- Object theValue,
- boolean theSelectedFlag,
- int theRow,
- int theColumn) {
-
- JComboBox cbx = (JComboBox)getComponent();
- Object prod = tblModel.getValueAt(theRow, PROD_COL);
- DefaultComboBoxModel model = (DefaultComboBoxModel)map.get(prod);
- processEvents = false;
- cbx.setModel(model);
- cbx.setSelectedItem(tblModel.getValueAt(theRow, PSC_COL));
- processEvents = true;
- return cbx;
- }
-
- public Component getTableCellRendererComponent(
- JTable theTable,
- Object theValue,
- boolean theSelectedFlag,
- boolean hasFocus,
- int theRow,
- int theColumn) {
-
- cbxRenderer.setModel(
- new DefaultComboBoxModel(new Object[] {theValue}));
- Color clr = (theSelectedFlag)
- ? theTable.getSelectionBackground()
- : theTable.getBackground();
- cbxRenderer.setBackground(clr);
- return cbxRenderer;
- }
-
- public void setPscValues(Map theProductPscs) {
- map.clear();
- if (theProductPscs != null) {
- Iterator prodItr = theProductPscs.keySet().iterator();
- while (prodItr.hasNext()) {
- ProductType product = (ProductType)prodItr.next();
- List pscs = (List)theProductPscs.get(product);
- pscs.add(0, NO_PSC);
- DefaultComboBoxModel model =
- new DefaultComboBoxModel(pscs.toArray());
- map.put(product, model);
- }
- }
- }
- }
class ProcessPOP extends PropertiedObjectPanel {
public ProcessPOP(PropertiedObjectEditor poe) {
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedPscPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedPscPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedPscPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,309 +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.console.ui.views.deploy;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Vector;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.border.CompoundBorder;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ConfigurationID;
-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.ServiceComponentDefn;
-import com.metamatrix.common.config.api.ServiceComponentDefnID;
-import com.metamatrix.common.config.api.VMComponentDefn;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.ui.views.deploy.util.PropertyConstants;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.ExternalException;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-/**
- * @version 1.0
- * @author Dan Florian
- */
-public final class DeployedPscPanel
- extends DetailPanel
- implements PropertyConstants {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
- private static final String[] SERVICE_HDRS;
- private static final int SERV_COL = 0;
- private static final int ESSENTIAL_COL = 1;
-
- ///////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- ///////////////////////////////////////////////////////////////////////////
-
- static {
- SERVICE_HDRS = new String[2];
- SERVICE_HDRS[SERV_COL] = DeployPkgUtils.getString("dpp.service.hdr"); //$NON-NLS-1$
- SERVICE_HDRS[ESSENTIAL_COL] = DeployPkgUtils.getString("dpp.essential.hdr"); //$NON-NLS-1$
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblServices;
- private TextFieldWidget txfHost;
- private TextFieldWidget txfProcess;
- private TextFieldWidget txfProduct;
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private ProductServiceConfig psc;
- private DefaultTableModel tblModel;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public DeployedPscPanel(ConnectionInfo connInfo) {
- super(connInfo);
- setTitle(getString("dpp.title") ); //$NON-NLS-1$
- }
-
- public DeployedPscPanel(ConnectionInfo connInfo, ConfigurationID theConfigId)
- throws ExternalException {
-
- this(connInfo);
- setConfigId(theConfigId);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- protected JPanel construct(boolean readOnly) {
- JPanel pnl = new JPanel(new GridBagLayout());
-
- LabelWidget lblHost = DeployPkgUtils.createLabel("dpp.lblHost"); //$NON-NLS-1$
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.insets = new Insets(3, 3, 3, 3);
- gbc.gridx = 0;
- gbc.gridy = 0;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblHost, gbc);
-
- txfHost = DeployPkgUtils.createTextField("hostname"); //$NON-NLS-1$
- txfHost.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 0;
- gbc.weightx = 0.2;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfHost, gbc);
-
- LabelWidget lblProcess = DeployPkgUtils.createLabel("dpp.lblProcess"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 1;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblProcess, gbc);
-
- txfProcess = DeployPkgUtils.createTextField("processname"); //$NON-NLS-1$
- txfProcess.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 1;
- gbc.weightx = 0.2;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfProcess, gbc);
-
- LabelWidget lblProduct = DeployPkgUtils.createLabel("dpp.lblProduct"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 2;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblProduct, gbc);
-
- txfProduct = DeployPkgUtils.createTextField("productname"); //$NON-NLS-1$
- txfProduct.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 2;
- gbc.weightx = 0.2;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfProduct, gbc);
-
-// LabelWidget lblPsc = DeployPkgUtils.createLabel("dpp.lblPsc"); //$NON-NLS-1$
-// gbc.gridx = 2;
-// gbc.gridy = 1;
-// gbc.weightx = 0;
-// gbc.weighty = 0;
-// gbc.anchor = GridBagConstraints.EAST;
-// pnl.add(lblPsc, gbc);
-//
-// txfPsc = DeployPkgUtils.createTextField("pscname"); //$NON-NLS-1$
-// txfPsc.setEditable(false);
-// gbc.gridx = 3;
-// gbc.gridy = 1;
-// gbc.weightx = 0.2;
-// gbc.weighty = 0;
-// gbc.anchor = GridBagConstraints.WEST;
-// pnl.add(txfPsc, gbc);
-
- JPanel pnlServices = new JPanel(new GridLayout(1, 1));
- TitledBorder tBorder;
- tBorder = new TitledBorder(getString("dpp.pnlServices.title")); //$NON-NLS-1$
- pnlServices.setBorder(
- new CompoundBorder(tBorder , DeployPkgUtils.EMPTY_BORDER));
-
-
- gbc.gridx = 0;
- gbc.gridy = 3;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.fill = GridBagConstraints.BOTH;
- gbc.weightx = 1.0;
- gbc.weighty = 1.0;
- pnl.add(pnlServices, gbc);
-
- tblServices = new TableWidget();
- tblModel =
- DeployPkgUtils.setup(
- tblServices,
- SERVICE_HDRS,
- DeployPkgUtils.getInt("dpp.servicestblrows", 10), //$NON-NLS-1$
- null);
- tblServices.setComparator(new DeployTableSorter());
-
- JScrollPane spnServices = new JScrollPane(tblServices);
- pnlServices.add(spnServices);
-
- return pnl;
- }
-
- public void setConfigId(ConfigurationID theConfigId) {
-
- super.setConfigId(theConfigId);
- setTitleSuffix(getString("dpp.title.suffix")); //$NON-NLS-1$
- }
-
- private void sortFirstColumnInTable(TableWidget twidget)
- {
- // Connector Binding Table
- EnhancedTableColumnModel etcmTabelCM
- = twidget.getEnhancedColumnModel();
- TableColumn tColumn = etcmTabelCM.getColumn(0);
- etcmTabelCM.setColumnSortedAscending((EnhancedTableColumn)tColumn, false);
- }
-
- public void setDomainObject(
- Object theDomainObject,
- Object[] theAncestors) {
-
- if (theDomainObject instanceof ProductServiceConfig) {
- psc = (ProductServiceConfig)theDomainObject;
- setTitleSuffix(psc.getName());
- }
- else {
- throw new IllegalArgumentException(
- getString("msg.invalidclass", //$NON-NLS-1$
- new Object[] {"ProductServiceConfig", //$NON-NLS-1$
- theDomainObject.getClass()}));
- }
- super.setDomainObject(psc, theAncestors);
-
- try {
- Configuration config = getConfigurationManager().getConfig(getConfigId());
-
- VMComponentDefn process = (VMComponentDefn)theAncestors[0];
- txfProcess.setText(process.getName());
-
- Host host = (Host)theAncestors[1];
- txfHost.setText(host.getName());
-
-// ProductType product = getConfigurationManager().getProduct(psc);
-// txfProduct.setText(product.getName());
-
- // populate table
- tblModel.setNumRows(0);
-
- Collection services = getConfigurationManager().getDeployedServices(
- psc, process);
- if (services != null) {
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- DeployedComponent servDp =
- (DeployedComponent)servItr.next();
- ServiceComponentDefnID id = servDp.getServiceComponentDefnID();
- ServiceComponentDefn service =
- (ServiceComponentDefn)config.getComponentDefn(id);
- Vector row = new Vector(SERVICE_HDRS.length);
- row.setSize(SERVICE_HDRS.length);
- row.setElementAt(service, SERV_COL);
- String essential = service.getProperty(ESSENTIAL_PROP);
- if (essential == null) essential = ""; //$NON-NLS-1$
- row.setElementAt(new Boolean(essential),
- ESSENTIAL_COL);
- tblModel.addRow(row);
- }
- }
- tblServices.sizeColumnsToFitData();
- sortFirstColumnInTable(tblServices);
- } catch (Exception theException) {
- ExceptionUtility.showMessage(
- getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "setDomainObject"}), //$NON-NLS-1$
- ""+theException.getMessage(), //$NON-NLS-1$
- theException);
- LogManager.logError(
- LogContexts.PSCDEPLOY,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedServicePanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedServicePanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeployedServicePanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -35,8 +35,6 @@
import com.metamatrix.common.config.api.ConfigurationID;
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.ServiceComponentDefn;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
import com.metamatrix.common.config.api.VMComponentDefn;
@@ -76,9 +74,9 @@
private JPanel pnlPropsOuter;
private TextFieldWidget txfHost;
private TextFieldWidget txfProc;
- private TextFieldWidget txfProd;
- private TextFieldWidget txfPsc;
- private TextFieldWidget txfService;
+ // private TextFieldWidget txfProd;
+ // private TextFieldWidget txfPsc;
+ // private TextFieldWidget txfService;
///////////////////////////////////////////////////////////////////////////
// FIELDS
@@ -136,59 +134,61 @@
gbc.anchor = GridBagConstraints.WEST;
pnl.add(txfProc, gbc);
- LabelWidget lblProd = DeployPkgUtils.createLabel("dvp.lblProduct"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 1;
- gbc.insets = new Insets(3, 3, 10, 3);
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblProd, gbc);
+// LabelWidget lblProd = DeployPkgUtils.createLabel("dvp.lblProduct"); //$NON-NLS-1$
+// gbc.gridx = 0;
+// gbc.gridy = 1;
+// gbc.insets = new Insets(3, 3, 10, 3);
+// gbc.anchor = GridBagConstraints.EAST;
+// pnl.add(lblProd, gbc);
+//
+// txfProd = DeployPkgUtils.createTextField("type.productname"); //$NON-NLS-1$
+// txfProd.setEditable(false);
+// gbc.gridx = 1;
+// gbc.gridy = 1;
+// gbc.anchor = GridBagConstraints.WEST;
+// pnl.add(txfProd, gbc);
+//
+// LabelWidget lblPsc = DeployPkgUtils.createLabel("dvp.lblPsc"); //$NON-NLS-1$
+// gbc.gridx = 2;
+// gbc.gridy = 1;
+// gbc.anchor = GridBagConstraints.EAST;
+// pnl.add(lblPsc, gbc);
+//
+// txfPsc = DeployPkgUtils.createTextField("type.pscname"); //$NON-NLS-1$
+// txfPsc.setEditable(false);
+// gbc.gridx = 3;
+// gbc.gridy = 1;
+// gbc.anchor = GridBagConstraints.WEST;
+// pnl.add(txfPsc, gbc);
- txfProd = DeployPkgUtils.createTextField("type.productname"); //$NON-NLS-1$
- txfProd.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfProd, gbc);
+// LabelWidget lblService = DeployPkgUtils.createLabel("dvp.lblService"); //$NON-NLS-1$
+// gbc.gridx = 0;
+// gbc.gridy = 2;
+// gbc.insets = new Insets(3, 3, 3, 3);
+// gbc.anchor = GridBagConstraints.EAST;
+// pnl.add(lblService, gbc);
+//
+// txfService = DeployPkgUtils.createTextField("type.servicename"); //$NON-NLS-1$
+// txfService.setEditable(false);
+// gbc.gridx = 1;
+// gbc.gridy = 2;
+// gbc.anchor = GridBagConstraints.WEST;
+// pnl.add(txfService, gbc);
- LabelWidget lblPsc = DeployPkgUtils.createLabel("dvp.lblPsc"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblPsc, gbc);
-
- txfPsc = DeployPkgUtils.createTextField("type.pscname"); //$NON-NLS-1$
- txfPsc.setEditable(false);
- gbc.gridx = 3;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfPsc, gbc);
-
- LabelWidget lblService = DeployPkgUtils.createLabel("dvp.lblService"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 2;
- gbc.insets = new Insets(3, 3, 3, 3);
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblService, gbc);
-
- txfService = DeployPkgUtils.createTextField("type.servicename"); //$NON-NLS-1$
- txfService.setEditable(false);
+ LabelWidget lblEssential = DeployPkgUtils.createLabel("dvp.lblEssential"); //$NON-NLS-1$
gbc.gridx = 1;
gbc.gridy = 2;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfService, gbc);
-
- LabelWidget lblEssential = DeployPkgUtils.createLabel("dvp.lblEssential"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 2;
gbc.anchor = GridBagConstraints.EAST;
pnl.add(lblEssential, gbc);
chkEssential = new CheckBox();
chkEssential.setEnabled(false);
- gbc.gridx = 3;
+ gbc.gridx = 2;
gbc.gridy = 2;
gbc.anchor = GridBagConstraints.WEST;
pnl.add(chkEssential, gbc);
+
+
pnlPropsOuter = new JPanel(new GridLayout(1, 1));
TitledBorder tBorder = new TitledBorder(getString("dvp.pnlProps.title")); //$NON-NLS-1$
@@ -240,6 +240,8 @@
theDomainObject.getClass()}));
}
+ DeployedComponent dc = (DeployedComponent) theDomainObject;
+
ServiceComponentDefnID id =
((DeployedComponent)theDomainObject).getServiceComponentDefnID();
Configuration config =
@@ -250,30 +252,32 @@
super.setDomainObject(service, theAncestors);
setTitleSuffix(service.toString());
- txfService.setText(service.toString());
+ // txfService.setText(service.toString());
- Host host = (Host)theAncestors[2];
+ Host host = (Host)theAncestors[1];
txfHost.setText(host.getName());
- VMComponentDefn process = (VMComponentDefn)theAncestors[1];
+ VMComponentDefn process = (VMComponentDefn)theAncestors[0];
txfProc.setText(process.getName());
- ProductServiceConfig psc = (ProductServiceConfig)theAncestors[0];
- txfPsc.setText(psc.getName());
+// ProductServiceConfig psc = (ProductServiceConfig)theAncestors[0];
+// txfPsc.setText(psc.getName());
+//
+// ProductType product = getConfigurationManager().getProduct(psc);
+// txfProd.setText(product.getName());
- ProductType product = getConfigurationManager().getProduct(psc);
- txfProd.setText(product.getName());
+// String essential = service.getProperty(ESSENTIAL_PROP);
+// if (essential == null) {
+// essential = ""; //$NON-NLS-1$
+// }
+ chkEssential.setSelected(service.isEssential());
- String essential = service.getProperty(ESSENTIAL_PROP);
- if (essential == null) {
- essential = ""; //$NON-NLS-1$
- }
- chkEssential.setSelected((new Boolean(essential)).booleanValue());
-
PropertiedObject propObj = getConfigurationManager()
- .getPropertiedObjectForComponentObject(service);
+ .getPropertiedObjectForComponentObject(dc);
pnlProps.setNameColumnHeaderWidth(0);
pnlProps.setPropertiedObject(propObj);
+
+
}
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeploymentsSummaryPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeploymentsSummaryPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DeploymentsSummaryPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -217,7 +217,7 @@
try {
// clear and load deployments table
- DeployPkgUtils.loadDeployments(config, deployTblModel, getConnectionInfo());
+ DeployPkgUtils.loadProcesses(config, deployTblModel, getConnectionInfo());
tblDeployments.sizeColumnsToFitData();
sortFirstColumnInTable(tblDeployments);
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DetailPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DetailPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/DetailPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -186,9 +186,9 @@
configId = theConfigId;
String iconId = null;
- if (getConfigurationManager().isNextStartUpConfig(configId)) {
+// if (getConfigurationManager().isNextStartUpConfig(configId)) {
iconId = "icon.nextstartup.big"; //$NON-NLS-1$
- }
+// }
if (iconId != null) {
lblConfig.setIcon(getIcon(iconId));
Configuration config = getConfigurationManager().getConfig(configId);
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ProductDefinitionPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ProductDefinitionPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ProductDefinitionPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,400 +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.console.ui.views.deploy;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.border.CompoundBorder;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ProductTypeID;
-import com.metamatrix.common.config.api.ServiceComponentDefn;
-import com.metamatrix.common.config.api.ServiceComponentDefnID;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.models.ConfigurationManager;
-import com.metamatrix.console.ui.layout.MenuEntry;
-import com.metamatrix.console.ui.util.AbstractPanelAction;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.ui.views.deploy.util.PropertyConstants;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.ExternalException;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.core.util.MetaMatrixProductVersion;
-import com.metamatrix.toolbox.ui.widget.ButtonWidget;
-import com.metamatrix.toolbox.ui.widget.DialogWindow;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-/**
- * @version 1.0
- * @author Dan Florian
- */
-public final class ProductDefinitionPanel
- extends DetailPanel
- implements PropertyConstants {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
- private static final String[] SERVICES_HDRS;
- private static final int PSC_COL = 0;
- private static final int SERVICE_COL = 1;
- private static final int ENABLED_COL = 2;
- private static final int ESSENTIAL_COL = 3;
-
- ///////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- ///////////////////////////////////////////////////////////////////////////
-
- static {
- SERVICES_HDRS = new String[4];
- SERVICES_HDRS[PSC_COL] = DeployPkgUtils.getString("pdp.psc.hdr"); //$NON-NLS-1$
- SERVICES_HDRS[SERVICE_COL] = DeployPkgUtils.getString("pdp.service.hdr"); //$NON-NLS-1$
- SERVICES_HDRS[ENABLED_COL] = DeployPkgUtils.getString("pdp.enabled.hdr"); //$NON-NLS-1$
- SERVICES_HDRS[ESSENTIAL_COL] = DeployPkgUtils.getString("pdp.essential.hdr"); //$NON-NLS-1$
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblServices;
- private TextFieldWidget txfProduct;
-
-
- private PanelAction actionNew;
-
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private ProductType product;
- private DefaultTableModel tblModel;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public ProductDefinitionPanel(ConnectionInfo connectionInfo) {
- super(connectionInfo);
- setTitle(getString("pdp.title")); //$NON-NLS-1$
- }
-
- public ProductDefinitionPanel(ConfigurationID theConfigId,
- ConnectionInfo connectionInfo)
- throws ExternalException {
-
- this(connectionInfo);
- setConfigId(theConfigId);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- protected JPanel construct(boolean readOnly) {
-
-
- JPanel pnl = new JPanel(new GridBagLayout());
-
- actionNew = new PanelAction(PanelAction.NEW);
-
-
- LabelWidget lblProduct = DeployPkgUtils.createLabel("pdp.lblProduct"); //$NON-NLS-1$
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.insets = new Insets(3, 3, 3, 3);
- gbc.gridx = 0;
- gbc.gridy = 0;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblProduct, gbc);
-
- txfProduct = DeployPkgUtils.createTextField("productname"); //$NON-NLS-1$
- txfProduct.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 0;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfProduct, gbc);
-
- JPanel pnlServices = new JPanel(new GridLayout(1, 1));
- TitledBorder tBorder;
- tBorder = new TitledBorder(getString("pdp.pnlServices.title")); //$NON-NLS-1$
- pnlServices.setBorder(
- new CompoundBorder(tBorder,
- DeployPkgUtils.EMPTY_BORDER));
-
- gbc.gridx = 0;
- gbc.gridy = 1;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.fill = GridBagConstraints.BOTH;
- gbc.weightx = 1.0;
- gbc.weighty = 1.0;
- pnl.add(pnlServices, gbc);
-
- tblServices = new TableWidget();
- tblModel =
- DeployPkgUtils.setup(
- tblServices,
- SERVICES_HDRS,
- DeployPkgUtils.getInt("pdp.servicestblrows", 10), //$NON-NLS-1$
- null);
- tblServices.setComparator(new DeployTableSorter());
-
- JScrollPane spnServices = new JScrollPane(tblServices);
- pnlServices.add(spnServices);
-
- JPanel pnlOps = new JPanel();
- gbc = new GridBagConstraints();
- gbc.gridx = 0;
- gbc.gridy = 2;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(3, 3, 3, 3);
- pnl.add(pnlOps, gbc);
-
-
- JPanel pnlOpsSizer = new JPanel(new GridLayout(1, 1, 10, 0));
- pnlOps.add(pnlOpsSizer);
-
-
- ButtonWidget btnNew = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnNew, actionNew);
- pnlOpsSizer.add(btnNew);
-
-
- return pnl;
- }
-
- public void setEnabled(boolean theEnableFlag) {
- actionNew.setEnabled(theEnableFlag);
- }
-
-
- public void setConfigId(ConfigurationID theConfigId) {
-
- super.setConfigId(theConfigId);
- setTitleSuffix(getString("pdp.title.suffix")); //$NON-NLS-1$
- }
-
- private void sortFirstColumnInTable(TableWidget twidget)
- {
- // Connector Binding Table
- EnhancedTableColumnModel etcmTabelCM
- = twidget.getEnhancedColumnModel();
- TableColumn tColumn = etcmTabelCM.getColumn(0);
- etcmTabelCM.setColumnSortedAscending((EnhancedTableColumn)tColumn, false);
- }
-
- public void setDomainObject(
- Object theDomainObject,
- Object[] theAncestors) {
-
- if (theDomainObject instanceof ProductType) {
- product = (ProductType)theDomainObject;
- setTitleSuffix(product.getName());
- }
- else {
- throw new IllegalArgumentException(
- getString("msg.invalidclass", //$NON-NLS-1$
- new Object[] {"ProductType", //$NON-NLS-1$
- theDomainObject.getClass()}));
- }
- super.setDomainObject(product, theAncestors);
- txfProduct.setText(product.getName());
-
- Configuration config = (Configuration)theAncestors[0];
-
- tblModel.setNumRows(0);
- try {
- ConfigurationManager configMgr = getConfigurationManager();
- Collection pscs = configMgr.getPscDefinitions(product, config);
- if (pscs != null) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)pscItr.next();
- Collection services =
- configMgr.getServiceDefinitions(psc, config);
-
- if (services != null) {
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- ServiceComponentDefn service =
- (ServiceComponentDefn)servItr.next();
- Vector row = new Vector(SERVICES_HDRS.length);
- row.setSize(SERVICES_HDRS.length);
- row.setElementAt(psc, PSC_COL);
- row.setElementAt(service, SERVICE_COL);
-
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) service.getID();
- if (!psc.containsService(svcID)) {
- throw new Exception("Service " + svcID + " not contained in PSC " + psc.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- Boolean enabled = new Boolean(psc.isServiceEnabled( svcID ) );
-
-// Boolean enabled = new Boolean(service.isEnabled());
- row.setElementAt(enabled, ENABLED_COL);
- row.setElementAt(
- new Boolean(service.getProperty(ESSENTIAL_PROP)),
- ESSENTIAL_COL);
- tblModel.addRow(row);
- }
- }
- }
- }
- tblServices.sizeColumnsToFitData();
- sortFirstColumnInTable(tblServices);
- }
- catch (Exception theException) {
- ExceptionUtility.showMessage(
- getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "setDomainObject"}), //$NON-NLS-1$
- ""+theException.getMessage(), //$NON-NLS-1$
- theException);
- LogManager.logError(LogContexts.PSCDEPLOY,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
- private void newPSC()
- throws ExternalException {
- Configuration config = this.getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID);
-
- List pscServiceNames = null;
- if (product.getName().equals(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
-
-
-// if (pscDef.getComponentTypeID().getName().equals(ProductType.CONNECTOR_PRODUCT_TYPE_NAME)) {
-
- Collection bindings = config.getConnectorBindings();
-
- // get all the names of the available bindings to choose from
- if (bindings != null) {
-
- pscServiceNames = new ArrayList(bindings.size());
- Iterator itCbs = bindings.iterator();
- while (itCbs.hasNext()) {
- ConnectorBinding cb = (ConnectorBinding) itCbs.next();
- pscServiceNames.add(cb.getID());
- }
- } else {
-
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- } else {
- Collection d = config.getServiceComponentDefns();
- // get all the names of the available bindings to choose from
- if (d != null) {
- pscServiceNames = new ArrayList(d.size());
- Iterator itIDs = d.iterator();
- while (itIDs.hasNext()) {
- ServiceComponentDefn cd = (ServiceComponentDefn) itIDs.next();
- ServiceComponentDefnID id = (ServiceComponentDefnID) cd.getID();
- pscServiceNames.add(id);
- }
- } else {
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- }
- CreatePSCPanel pnl = new CreatePSCPanel("pfp.msg.createpscdef", //$NON-NLS-1$
- "icon.psc.big", //$NON-NLS-1$
- "pfp.lblnewpscdef", //$NON-NLS-1$
- "pscname", //$NON-NLS-1$
- null,
- pscServiceNames);
-
-
- DialogWindow.show(
- this,
- DeployPkgUtils.getString("pfp.newpscdefdlg.title"), //$NON-NLS-1$
- pnl);
- if (pnl.isConfirmed()) {
- // get the process name from the panel
- String pscDefName = pnl.getName();
- List services = pnl.getSelectedServices();
-
- getConfigurationManager().createPscDef(pscDefName, (ProductTypeID) product.getID(),
- services,
- getConfigId());
- }
-
-}
-
-
- private class PanelAction extends AbstractPanelAction {
- public static final int NEW = 4;
-
-
- public PanelAction(int theType) {
- super(theType);
-
- if (theType == NEW) {
- putValue(NAME, getString("pfp.actionNew")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionNew.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionNew.mnemonic")); //$NON-NLS-1$
- } else {
- throw new IllegalArgumentException(
- getString("msg.invalidactiontype") + theType); //$NON-NLS-1$
- }
- }
-
- protected void actionImpl(ActionEvent theEvent)
- throws ExternalException {
-
-
- if (type == NEW) {
- newPSC();
- }
- }
- }
-
-
-}
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscDefinitionPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscDefinitionPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscDefinitionPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,999 +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.console.ui.views.deploy;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.SwingUtilities;
-import javax.swing.border.CompoundBorder;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.config.api.ConnectorBinding;
-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.ServiceComponentDefn;
-import com.metamatrix.common.config.api.ServiceComponentDefnID;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.ui.NotifyOnExitConsole;
-import com.metamatrix.console.ui.layout.MenuEntry;
-import com.metamatrix.console.ui.util.AbstractPanelAction;
-import com.metamatrix.console.ui.views.deploy.event.ConfigurationModifier;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.ui.views.deploy.util.PropertyConstants;
-import com.metamatrix.console.util.DialogUtility;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.ExternalException;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.console.util.StaticUtilities;
-import com.metamatrix.core.util.MetaMatrixProductVersion;
-import com.metamatrix.toolbox.ui.widget.ButtonWidget;
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.DialogWindow;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.Splitter;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-/**
- * @version 1.0
- * @author Dan Florian
- */
-public final class PscDefinitionPanel
- extends DetailPanel
- implements ActionListener,
- ConfigurationModifier,
- NotifyOnExitConsole,
- //Note 1:DocumentListener,
- ListSelectionListener,
- PropertyConstants,
- TableModelListener {
-
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
- private static /*final*/ String[] SERVICE_HDRS;
- private static final int SERV_COL = 0;
- private static final int ENABLED_COL = 1;
- private static final int ESSENTIAL_COL = 2;
- public static /*final*/ SimpleDateFormat DATE_FORMATTER;
-
- ///////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- ///////////////////////////////////////////////////////////////////////////
-
- static {
- SERVICE_HDRS = new String[3];
- SERVICE_HDRS[SERV_COL] = DeployPkgUtils.getString("pfp.service.hdr"); //$NON-NLS-1$
- SERVICE_HDRS[ENABLED_COL] = DeployPkgUtils.getString("pfp.enabled.hdr"); //$NON-NLS-1$
- SERVICE_HDRS[ESSENTIAL_COL] = DeployPkgUtils.getString("pfp.essential.hdr"); //$NON-NLS-1$
-
- String pattern = DeployPkgUtils.getString("pfp.datepattern", true); //$NON-NLS-1$
- if (pattern == null) {
- pattern = "MMM dd, yyyy hh:mm:ss"; //$NON-NLS-1$
- }
- DATE_FORMATTER = new SimpleDateFormat(pattern);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblServices;
- private TextFieldWidget txfProd;
-// private TextFieldWidget txfPsc;
- private TextFieldWidget txfCreated;
- private TextFieldWidget txfCreatedBy;
- private TextFieldWidget txfModified;
- private TextFieldWidget txfModifiedBy;
- private ServiceDefinitionPanel sdp;
- private DeployMainPanel dmp;
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private PanelAction actionApply;
- private PanelAction actionCopy;
-
- private PanelAction actionNew;
- private PanelAction actionAssign;
-
- private PanelAction actionDelete;
- private PanelAction actionReset;
- private ProductServiceConfig pscDef;
- private DefaultTableModel tblModel;
- private ArrayList treeActions;
-
- private HashMap saveServEnabledMap = new HashMap();
- private int numRowsDifferent = 0;
- private CheckBox chk; // the table cell editor component for the enabled col
- private boolean programmaticTableSelectionChange = false;
- private Map /*<ProductServiceConfig to SelectedServiceInfo>*/
- pscToSelectedServiceMap = new HashMap();
- private boolean deleting = false;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public PscDefinitionPanel(ConnectionInfo connInfo, DeployMainPanel mainPanel) {
- super(connInfo);
- dmp=mainPanel;
- setTitle(getString("pfp.title")); //$NON-NLS-1$
- }
-
- public PscDefinitionPanel(ConfigurationID theConfigId,
- ConnectionInfo connInfo, DeployMainPanel mainPanel) throws ExternalException {
- this(connInfo, mainPanel);
- setConfigId(theConfigId);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- public void actionPerformed(ActionEvent theEvent) {
- tblModel.setValueAt(new Boolean(chk.isSelected()),
- tblServices.convertRowIndexToModel(
- tblServices.getSelectedRow()),
- ENABLED_COL);
- tblServices.editingCanceled(new ChangeEvent(this));
- }
-
- public void checkResetState() {
- if ((numRowsDifferent > 0) || sdp.propertiesHaveChanged()) {
- if (!actionApply.isEnabled()) {
- actionApply.setEnabled(true);
- actionReset.setEnabled(true);
- }
- } else {
- if (actionApply.isEnabled()) {
- actionApply.setEnabled(false);
- actionReset.setEnabled(false);
- }
- }
-
-
- }
-
- protected JPanel construct(boolean readOnly) {
- // setup actions first
- treeActions = new ArrayList();
- actionApply = new PanelAction(PanelAction.APPLY);
- actionApply.setEnabled(false);
- actionCopy = new PanelAction(PanelAction.COPY);
- //Adding action "Copy PSC..." adds it a second time, so commenting out.
- //BWP 09/10/02
- //treeActions.add(actionCopy);
- actionNew = new PanelAction(PanelAction.NEW);
- actionAssign = new PanelAction(PanelAction.ASSIGN);
-
- actionDelete = new PanelAction(PanelAction.DELETE);
- actionReset = new PanelAction(PanelAction.RESET);
- actionReset.setEnabled(false);
-
- JPanel pnl = new JPanel(new GridBagLayout());
-
- LabelWidget lblProd = DeployPkgUtils.createLabel("pfp.lblProduct"); //$NON-NLS-1$
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.insets = new Insets(3, 3, 5, 3);
- gbc.gridx = 0;
- gbc.gridy = 0;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblProd, gbc);
-
- txfProd = DeployPkgUtils.createTextField("productname"); //$NON-NLS-1$
- txfProd.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 0;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfProd, gbc);
-
-// LabelWidget lblPsc = DeployPkgUtils.createLabel("pfp.lblPsc"); //$NON-NLS-1$
-// gbc.gridx = 2;
-// gbc.gridy = 0;
-// gbc.anchor = GridBagConstraints.EAST;
-// pnl.add(lblPsc, gbc);
-//
-// txfPsc = DeployPkgUtils.createTextField("pscname"); //$NON-NLS-1$
-// txfPsc.setEditable(false); //Note 1
-// gbc.gridx = 3;
-// gbc.gridy = 0;
-// gbc.anchor = GridBagConstraints.WEST;
-// pnl.add(txfPsc, gbc);
-
- LabelWidget lblCreated = DeployPkgUtils.createLabel("pfp.lblCreated"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 1;
- gbc.insets = new Insets(3, 3, 3, 3);
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblCreated, gbc);
-
- txfCreated = DeployPkgUtils.createTextField("timestamp"); //$NON-NLS-1$
- txfCreated.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfCreated, gbc);
-
- LabelWidget lblCreatedBy = DeployPkgUtils.createLabel("pfp.lblCreatedBy"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblCreatedBy, gbc);
-
- txfCreatedBy = DeployPkgUtils.createTextField("username"); //$NON-NLS-1$
- txfCreatedBy.setEditable(false);
- gbc.gridx = 3;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfCreatedBy, gbc);
-
- LabelWidget lblModified = DeployPkgUtils.createLabel("pfp.lblModified"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 2;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblModified, gbc);
-
- txfModified = DeployPkgUtils.createTextField("timestamp"); //$NON-NLS-1$
- txfModified.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 2;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfModified, gbc);
-
- LabelWidget lblModifiedBy = DeployPkgUtils.createLabel("pfp.lblModifiedBy"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 2;
- gbc.anchor = GridBagConstraints.EAST;
- pnl.add(lblModifiedBy, gbc);
-
- txfModifiedBy = DeployPkgUtils.createTextField("username"); //$NON-NLS-1$
- txfModifiedBy.setEditable(false);
- gbc.gridx = 3;
- gbc.gridy = 2;
- gbc.anchor = GridBagConstraints.WEST;
- pnl.add(txfModifiedBy, gbc);
-
- JPanel pnlServices = new JPanel(new GridLayout(1, 1));
- TitledBorder tBorder;
- tBorder = new TitledBorder(getString("pfp.pnlServices.title")); //$NON-NLS-1$
- pnlServices.setBorder(
- new CompoundBorder(tBorder, DeployPkgUtils.EMPTY_BORDER));
-
-
- gbc.gridx = 0;
- gbc.gridy = 3;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.fill = GridBagConstraints.BOTH;
- gbc.insets = new Insets(3, 3, 5, 3);
- gbc.weightx = 1.0;
- gbc.weighty = 1.0;
- pnl.add(pnlServices, gbc);
-
- tblServices = new TableWidget();
- tblModel =
- DeployPkgUtils.setup(
- tblServices,
- SERVICE_HDRS,
- DeployPkgUtils.getInt("pfp.servicestblrows", 10), //$NON-NLS-1$
- new int[] {ENABLED_COL});
- tblServices.getSelectionModel().addListSelectionListener(this);
- tblServices.getSelectionModel().addListSelectionListener(
- new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent ev) {
- listSelectionChanged();
- }
- });
- tblServices.setComparator(new DeployTableSorter());
- tblModel.addTableModelListener(this);
-
- JScrollPane spnServices = new JScrollPane(tblServices);
-
- sdp = new ServiceDefinitionPanel(false, this, getConfigId(), getConnectionInfo());
-
-
- final JSplitPane splitPane = new Splitter(JSplitPane.VERTICAL_SPLIT,
- true, spnServices, sdp);
- pnlServices.add(splitPane);
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- splitPane.setDividerLocation(0.5);
- }
- });
-
- JPanel pnlOps = new JPanel();
- gbc = new GridBagConstraints();
- gbc.gridx = 0;
- gbc.gridy = 4;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets = new Insets(3, 3, 3, 3);
- pnl.add(pnlOps, gbc);
-
- JPanel pnlOpsSizer = new JPanel(new GridLayout(1, 4, 10, 0));
- pnlOps.add(pnlOpsSizer);
-
- ButtonWidget btnApply = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnApply, actionApply);
- pnlOpsSizer.add(btnApply);
-
- ButtonWidget btnNew = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnNew, actionNew);
- pnlOpsSizer.add(btnNew);
-
-
- ButtonWidget btnAssign = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnAssign, actionAssign);
- pnlOpsSizer.add(btnAssign);
-
- ButtonWidget btnCopy = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnCopy, actionCopy);
- pnlOpsSizer.add(btnCopy);
-
- ButtonWidget btnDelete = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnDelete, actionDelete);
- pnlOpsSizer.add(btnDelete);
-
- ButtonWidget btnReset = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnReset, actionReset);
- pnlOpsSizer.add(btnReset);
-
-
-
- return pnl;
- }
-
- private void copy()
- throws ExternalException {
- // show dialog asking for new process name
- CreatePanel pnl = new CreatePanel("pfp.msg.createpscdef", //$NON-NLS-1$
- "icon.psc.big", //$NON-NLS-1$
- "pfp.lblnewpscdef", //$NON-NLS-1$
- "pscname"); //$NON-NLS-1$
-
- DialogWindow.show(
- this,
- DeployPkgUtils.getString("pfp.newpscdefdlg.title"), //$NON-NLS-1$
- pnl);
- if (pnl.isConfirmed()) {
- // get the process name from the panel
-// Object[] ancestors =
- getAncestors();
- String pscDefName = pnl.getName();
-// ProductServiceConfig newPscDef =
- getConfigurationManager().copyPscDef(pscDefName, pscDef,
- getConfigId());
- }
- }
-
- private void newPSC()
- throws ExternalException {
- Configuration config = this.getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID);
-
- List pscServiceNames = null;
- if (pscDef.getComponentTypeID().getName().equals(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
-
- Collection bindings = config.getConnectorBindings();
-
- // get all the names of the available bindings to choose from
- if (bindings != null) {
-
- pscServiceNames = new ArrayList(bindings.size());
- Iterator itCbs = bindings.iterator();
- while (itCbs.hasNext()) {
- ConnectorBinding cb = (ConnectorBinding) itCbs.next();
- pscServiceNames.add(cb.getID());
- }
- } else {
-
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- } else {
- Collection d = config.getServiceComponentDefns();
- // get all the names of the available bindings to choose from
- if (d != null) {
- pscServiceNames = new ArrayList(d.size());
- Iterator itIDs = d.iterator();
- while (itIDs.hasNext()) {
- ServiceComponentDefn cd = (ServiceComponentDefn) itIDs.next();
- ServiceComponentDefnID id = (ServiceComponentDefnID) cd.getID();
- pscServiceNames.add(id);
- }
- } else {
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- }
- CreatePSCPanel pnl = new CreatePSCPanel("pfp.msg.createpscdef", //$NON-NLS-1$
- "icon.psc.big", //$NON-NLS-1$
- "pfp.lblnewpscdef", //$NON-NLS-1$
- "pscname", //$NON-NLS-1$
- pscDef,
- pscServiceNames);
-
-
- DialogWindow.show(
- this,
- DeployPkgUtils.getString("pfp.newpscdefdlg.title"), //$NON-NLS-1$
- pnl);
- if (pnl.isConfirmed()) {
- // get the process name from the panel
- String pscDefName = pnl.getName();
- List services = pnl.getSelectedServices();
-
- getConfigurationManager().createPscDef(pscDefName, (ProductTypeID) pscDef.getComponentTypeID(),
- services,
- getConfigId());
- }
-
- }
-
- private void assign()
- throws ExternalException {
- Configuration config = this.getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID);
-
- List pscServiceNames = null;
- if (pscDef.getComponentTypeID().getName().equals(MetaMatrixProductVersion.CONNECTOR_PRODUCT_TYPE_NAME)) {
-
- Collection bindings = config.getConnectorBindings();
-
- // get all the names of the available bindings to choose from
- if (bindings != null) {
-
- pscServiceNames = new ArrayList(bindings.size());
- Iterator itCbs = bindings.iterator();
- while (itCbs.hasNext()) {
- ConnectorBinding cb = (ConnectorBinding) itCbs.next();
- pscServiceNames.add(cb.getID());
- }
- } else {
-
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- } else {
- Collection d = config.getServiceComponentDefns();
- // get all the names of the available bindings to choose from
- if (d != null) {
- pscServiceNames = new ArrayList(d.size());
- Iterator itIDs = d.iterator();
- while (itIDs.hasNext()) {
- ServiceComponentDefn cd = (ServiceComponentDefn) itIDs.next();
- ServiceComponentDefnID id = (ServiceComponentDefnID) cd.getID();
- pscServiceNames.add(id);
- }
- } else {
- pscServiceNames = Collections.EMPTY_LIST;
- }
-
- }
-
-
- UpdatePSCPanel pnl = new UpdatePSCPanel("pfp.msg.editpscdef", //$NON-NLS-1$
- "icon.psc.big", //$NON-NLS-1$
- "pfp.lbleditpscdef", //$NON-NLS-1$
- "pscname", //$NON-NLS-1$
- pscDef,
- pscServiceNames,
- true);
-
- DialogWindow.show(
- this,
- DeployPkgUtils.getString("pfp.editpscdefdlg.title"), //$NON-NLS-1$
- pnl);
- if (pnl.isConfirmed()) {
- // get the process name from the panel
- List services = pnl.getSelectedServices();
- pscDef = getConfigurationManager().updatePscDef(pscDef, services);
- getConfigurationManager().setRefreshNeeded();
- dmp.refresh();
-
- // super.setDomainObject(pscDef, this.getAncestors());
-
- }
-
- }
-
-
- private void delete()
- throws ExternalException {
-
- if (getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID).isPSCDeployed((ProductServiceConfigID) pscDef.getID()) ) {
- String msg = "PSC " + pscDef.getID() + " cannot be deleted until it has be undeployed." //$NON-NLS-1$ //$NON-NLS-2$
- + " Please undeploy the PSC and then try again."; //$NON-NLS-1$
- String hdr = "Deleting PSC"; //$NON-NLS-1$
- StaticUtilities.displayModalDialogWithOK(hdr, msg);
- return;
- }
-
-
-
- // show dialog to save/abort changes
- ConfirmationPanel pnlConfirm =
- new ConfirmationPanel("pfp.msg.confirmdelete"); //$NON-NLS-1$
- DialogWindow.show(
- this,
- DeployPkgUtils.getString("pfp.confirmdelete.title", //$NON-NLS-1$
- new Object[] {pscDef.getName()}),
- pnlConfirm);
- if (pnlConfirm.isConfirmed()) {
- deleting = true;
- ProductType product = (ProductType)getAncestors()[0];
- getConfigurationManager().deletePscDefinition(pscDef, product,
- getConfigId());
- deleting = false;
- }
- }
-
- public List getTreeActions() {
- return treeActions;
- }
-
- public boolean havePendingChanges() {
- return (!isPersisted());
- }
-
- public boolean finishUp() {
- boolean continuing = true;
- if (sdp.propertiesHaveChanged()) {
- continuing = savePropertiesForService();
- }
- if (continuing) {
- if (numRowsDifferent > 0) {
- String msg = "Save changes to PSC " + pscDef.toString() + "?"; //$NON-NLS-1$ //$NON-NLS-2$
- int response = DialogUtility.showPendingChangesDialog(msg,
- getConfigurationManager().getConnection().getURL(),
- getConfigurationManager().getConnection().getUser());
- switch (response) {
- case DialogUtility.YES:
- try {
- persist();
- } catch (ExternalException ex) {
- String errMsg = "Error saving changes to PSC"; //$NON-NLS-1$
- LogManager.logError(LogContexts.PSCDEPLOY, ex, errMsg);
- ExceptionUtility.showMessage(errMsg, ex);
- }
- break;
- case DialogUtility.NO:
- continuing = true;
- reset();
- break;
- case DialogUtility.CANCEL:
- continuing = false;
- break;
- }
- }
- }
- return continuing;
- }
-
- public boolean isPersisted() {
- boolean persisted = true;
- if (!deleting) {
- if (actionApply.isEnabled()) {
- persisted = false;
- }
- }
- return persisted;
- }
-
- public void persist() throws ExternalException {
- if (sdp.propertiesHaveChanged()) {
- sdp.persist();
- }
-
- if (numRowsDifferent > 0) {
- //change deployed services here
- for (int rows=tblModel.getRowCount(), i=0; i<rows; i++) {
- Object service = tblModel.getValueAt(i, SERV_COL);
- Boolean saveEnabled = (Boolean)saveServEnabledMap.get(service);
- Boolean enabled = (Boolean)tblModel.getValueAt(i, ENABLED_COL);
- if (saveEnabled.booleanValue() != enabled.booleanValue()) {
- getConfigurationManager().setEnabled(
- (ServiceComponentDefn)service,
- pscDef,
- enabled.booleanValue(),
- getConfigurationManager().getConfig(getConfigId()));
- saveServEnabledMap.put(service, enabled);
- }
- }
- numRowsDifferent = 0;
- }
- checkResetState();
- }
-
- public void reset() {
- if (numRowsDifferent > 0) {
- // reset service enabled state if necessary
- for (int rows=tblModel.getRowCount(), i=0; i<rows; i++) {
- Object saveEnabled =
- saveServEnabledMap.get(tblModel.getValueAt(i, SERV_COL));
- if (!saveEnabled.equals(tblModel.getValueAt(i, ENABLED_COL))) {
- tblModel.setValueAt(saveEnabled, i, ENABLED_COL);
- tblServices.editingCanceled(new ChangeEvent(this));
- }
- }
- }
- numRowsDifferent = 0;
- sdp.reset();
- checkResetState();
- }
-
- public void setConfigId(ConfigurationID theConfigId) {
-
- super.setConfigId(theConfigId);
- setTitleSuffix(getString("pfp.title.suffix")); //$NON-NLS-1$
- }
-
- private void setCreateModifiedFields(ProductServiceConfig thePsc) {
- Date createDate = thePsc.getCreatedDate();
- if (createDate != null) {
- txfCreated.setText(DATE_FORMATTER.format(createDate));
- txfCreatedBy.setText(thePsc.getCreatedBy());
- }
-
- Date modDate = thePsc.getLastChangedDate();
- if (modDate != null) {
- txfModified.setText(DATE_FORMATTER.format(modDate));
- txfModifiedBy.setText(thePsc.getLastChangedBy());
- }
- }
-
- private void sortFirstColumnInTable(TableWidget twidget) {
- // Connector Binding Table
- EnhancedTableColumnModel etcmTabelCM
- = twidget.getEnhancedColumnModel();
- TableColumn tColumn = etcmTabelCM.getColumn(0);
- etcmTabelCM.setColumnSortedAscending((EnhancedTableColumn)tColumn, false);
- }
-
- public void setDomainObject(Object theDomainObject, Object[] theAncestors) {
-
- if (theDomainObject instanceof ProductServiceConfig) {
- pscDef = (ProductServiceConfig)theDomainObject;
- setTitleSuffix(pscDef.getName());
- SelectedServiceInfo servInfo =
- (SelectedServiceInfo)pscToSelectedServiceMap.get(pscDef);
- if (servInfo == null) {
- sdp.displayDetailFor(null, null);
- } else {
- sdp.displayDetailFor(servInfo.getService(), servInfo.getAncestors());
- }
- } else {
- throw new IllegalArgumentException(
- getString("msg.invalidclass", //$NON-NLS-1$
- new Object[] {"ProductServiceConfig", //$NON-NLS-1$
- theDomainObject.getClass()}));
- }
- super.setDomainObject(pscDef, theAncestors);
-
-// String savePsc = pscDef.getName();
-// txfPsc.setText(savePsc);
-
- setCreateModifiedFields(pscDef);
-
- // populate table
- saveServEnabledMap.clear();
- tblModel.setNumRows(0);
- try {
- ProductType product = (ProductType)theAncestors[0];
- txfProd.setText(product.getName());
-
- Configuration config = getConfigurationManager().getConfig(
- getConfigId());
- Collection services = getConfigurationManager().getServiceDefinitions(
- pscDef, config);
- if (services != null) {
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- ServiceComponentDefn service =
- (ServiceComponentDefn)servItr.next();
- Vector row = new Vector(SERVICE_HDRS.length);
- row.setSize(SERVICE_HDRS.length);
- row.setElementAt(service, SERV_COL);
-
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) service.getID();
- if (!pscDef.containsService(svcID)) {
- throw new Exception("Service " + svcID + " not contained in PSC " + pscDef.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- Boolean enabled = new Boolean(pscDef.isServiceEnabled( svcID ) );
-//service.isEnabled());
-
- row.setElementAt(enabled, ENABLED_COL);
- saveServEnabledMap.put(service, enabled);
- row.setElementAt(
- new Boolean(service.getProperty(ESSENTIAL_PROP)),
- ESSENTIAL_COL);
- tblModel.addRow(row);
- }
- }
- tblServices.sizeColumnsToFitData();
- sortFirstColumnInTable(tblServices);
- } catch (Exception theException) {
- ExceptionUtility.showMessage(
- getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "setDomainObject"}), //$NON-NLS-1$
- theException);
- LogManager.logError(
- LogContexts.PSCDEPLOY,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
-
- }
-
- public void setEnabled(boolean theEnableFlag) {
- actionCopy.setEnabled(theEnableFlag);
- actionNew.setEnabled(theEnableFlag);
- actionAssign.setEnabled(theEnableFlag);
-
- actionDelete.setEnabled(theEnableFlag);
- tblServices.setColumnEditable(PscDefinitionPanel.ENABLED_COL, theEnableFlag);
- }
-
- public void tableChanged(TableModelEvent theEvent) {
- // should be the only editable column but check anyways
- if (theEvent.getColumn() == ENABLED_COL) {
- int row = theEvent.getFirstRow();
- Object service = tblModel.getValueAt(row, SERV_COL);
- Object saveEnabled = saveServEnabledMap.get(service);
- if (!saveEnabled.equals(tblModel.getValueAt(row, ENABLED_COL))) {
- numRowsDifferent++;
- } else {
- if (numRowsDifferent > 0) {
- numRowsDifferent--;
- }
- }
- checkResetState();
- }
- }
-
- public void valueChanged(ListSelectionEvent theEvent) {
- if (!programmaticTableSelectionChange) {
- // done one time to setup the checkbox action listener
- int row = tblServices.getSelectedRow();
- if (row != -1) {
- TableCellEditor editor = tblServices.getCellEditor(row,
- ENABLED_COL);
- int modelRow = tblServices.convertRowIndexToModel(row);
- chk = (CheckBox)editor.getTableCellEditorComponent(tblServices,
- tblServices.getValueAt(modelRow, ENABLED_COL), true, row,
- ENABLED_COL);
- chk.addActionListener(this);
- tblServices.getSelectionModel().removeListSelectionListener(this);
- }
- }
- }
-
- private void listSelectionChanged() {
- if (!programmaticTableSelectionChange) {
- boolean cancellingChange = false;
- if (sdp.propertiesHaveChanged()) {
- cancellingChange = (!savePropertiesForService());
- }
- if (cancellingChange) {
- int prevModelRow = getModelRowForService(sdp.getService());
- int prevViewRow = tblServices.convertRowIndexToView(prevModelRow);
- programmaticTableSelectionChange = true;
- tblServices.getSelectionModel().setSelectionInterval(prevViewRow,
- prevViewRow);
- programmaticTableSelectionChange = false;
- } else {
- int row = tblServices.getSelectedRow();
- if (row < 0) {
- pscToSelectedServiceMap.put(pscDef, null);
- sdp.displayDetailFor(null, null);
- } else {
- int modelRow = tblServices.convertRowIndexToModel(row);
- ServiceComponentDefn serviceDef = getServiceDefForRow(
- modelRow);
- Object[] ancestors = getAncestors();
- pscToSelectedServiceMap.put(pscDef, new SelectedServiceInfo(
- serviceDef, ancestors));
- sdp.displayDetailFor(serviceDef, ancestors);
- }
- }
- }
- }
-
- /**
- * @Return true if proceeding (with changing selected item or exiting program), false if cancelling
- */
- private boolean savePropertiesForService() {
- boolean cancellingChange = false;
- String msg = "Save changes to properties for service " + //$NON-NLS-1$
- sdp.getService().toString() + "?"; //$NON-NLS-1$
- int response = DialogUtility.showPendingChangesDialog(msg,
- getConfigurationManager().getConnection().getURL(),
- getConfigurationManager().getConnection().getUser());
- switch (response) {
- case DialogUtility.YES:
- try {
- sdp.persist();
- } catch (ExternalException ex) {
- String errMsg = "Error saving service property changes"; //$NON-NLS-1$
- LogManager.logError(LogContexts.PSCDEPLOY, ex, errMsg);
- ExceptionUtility.showMessage(errMsg, ex);
- }
- cancellingChange = false;
- break;
- case DialogUtility.NO:
- cancellingChange = true;
- reset();
- break;
- case DialogUtility.CANCEL:
- cancellingChange = true;
- break;
- }
- return (!cancellingChange);
- }
-
- private int getModelRowForService(ServiceComponentDefn service) {
- int matchRow = -1;
- int curRow = 0;
- int numRows = tblServices.getRowCount();
- while ((matchRow < 0) && (curRow < numRows)) {
- ServiceComponentDefn curService =
- (ServiceComponentDefn)tblModel.getValueAt(curRow, SERV_COL);
- if (curService.equals(service)) {
- matchRow = curRow;
- } else {
- curRow++;
- }
- }
- return matchRow;
- }
-
- private ServiceComponentDefn getServiceDefForRow(int modelRow) {
- ServiceComponentDefn def =
- (ServiceComponentDefn)tblModel.getValueAt(modelRow, SERV_COL);
- return def;
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // INNER CLASSES
- ///////////////////////////////////////////////////////////////////////////
-
- private class PanelAction extends AbstractPanelAction {
- public static final int APPLY = 0;
- public static final int COPY = 1;
- public static final int DELETE = 2;
- public static final int RESET = 3;
- public static final int NEW = 4;
- public static final int ASSIGN = 5;
-
-
- public PanelAction(int theType) {
- super(theType);
- if (theType == APPLY) {
- putValue(NAME, getString("pfp.actionApply")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionApply.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionApply.mnemonic")); //$NON-NLS-1$
- } else if (theType == COPY) {
- putValue(NAME, getString("pfp.actionCopy")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionCopy.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionCopy.mnemonic")); //$NON-NLS-1$
- } else if (theType == DELETE) {
- putValue(NAME, getString("pfp.actionDelete")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionDelete.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionDelete.mnemonic")); //$NON-NLS-1$
- } else if (theType == RESET) {
- putValue(NAME, getString("pfp.actionReset")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionReset.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionReset.mnemonic")); //$NON-NLS-1$
-
- } else if (theType == NEW) {
- putValue(NAME, getString("pfp.actionNew")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionNew.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionNew.mnemonic")); //$NON-NLS-1$
- } else if (theType == ASSIGN) {
- putValue(NAME, getString("pfp.actionEdit")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("pfp.actionEdit.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("pfp.actionEdit.mnemonic")); //$NON-NLS-1$
-
- } else {
- throw new IllegalArgumentException(
- getString("msg.invalidactiontype") + theType); //$NON-NLS-1$
- }
- }
-
- protected void actionImpl(ActionEvent theEvent)
- throws ExternalException {
-
- if (type == APPLY) {
- persist();
- } else if (type == NEW) {
- newPSC();
- } else if (type == ASSIGN) {
- assign();
-
- } else if (type == COPY) {
- copy();
- } else if (type == DELETE) {
- delete();
- } else if (type == RESET) {
- reset();
- }
- }
- }
-}//end PscDefinitionPanel
-
-
-
-class SelectedServiceInfo {
- private ServiceComponentDefn service;
- private Object[] ancestors;
-
- public SelectedServiceInfo(ServiceComponentDefn srv, Object[] anc) {
- super();
- service = srv;
- ancestors = anc;
- }
-
- public ServiceComponentDefn getService() {
- return service;
- }
-
- public Object[] getAncestors() {
- return ancestors;
- }
-}//end SelectedServiceInfo
-
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscSummaryPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscSummaryPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/PscSummaryPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,156 +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.console.ui.views.deploy;
-
-import java.awt.GridLayout;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.border.CompoundBorder;
-import javax.swing.table.TableColumn;
-
-import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.DeployTableSorter;
-import com.metamatrix.console.util.ExceptionUtility;
-import com.metamatrix.console.util.ExternalException;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.TableWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.table.DefaultTableModel;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
-import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
-
-/**
- * @version 1.0
- * @author Dan Florian
- */
-public final class PscSummaryPanel
- extends DetailPanel {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TableWidget tblPscs;
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private Configuration config;
- private DefaultTableModel pscsTblModel;
- private ConnectionInfo connection;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public PscSummaryPanel(ConnectionInfo connInfo) {
- super(connInfo);
- this.connection = connInfo;
- setTitle(getString("psp.title")); //$NON-NLS-1$
- }
-
- public PscSummaryPanel(ConfigurationID theConfigId,
- ConnectionInfo connInfo)
- throws ExternalException {
- this(connInfo);
- setConfigId(theConfigId);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- protected JPanel construct(boolean readOnly) {
- JPanel pnl = new JPanel(new GridLayout(1, 1));
- TitledBorder tBorder;
- tBorder = new TitledBorder(getString("psp.pnl.title")); //$NON-NLS-1$
- pnl.setBorder(
- new CompoundBorder(tBorder,
- DeployPkgUtils.EMPTY_BORDER));
-
- tblPscs = new TableWidget();
- pscsTblModel =
- DeployPkgUtils.setup(
- tblPscs,
- DeployPkgUtils.PSC_SERV_DEF_HDRS,
- DeployPkgUtils.getInt("psp.psctblrows", 10), //$NON-NLS-1$
- null);
- tblPscs.setComparator(new DeployTableSorter());
-
- JScrollPane spnPscs = new JScrollPane(tblPscs);
- pnl.add(spnPscs);
-
- return pnl;
- }
-
- private void sortFirstColumnInTable(TableWidget twidget)
- {
- // Connector Binding Table
- EnhancedTableColumnModel etcmTabelCM
- = twidget.getEnhancedColumnModel();
- TableColumn tColumn = etcmTabelCM.getColumn(0);
- etcmTabelCM.setColumnSortedAscending((EnhancedTableColumn)tColumn, false);
- }
-
- public void setDomainObject(
- Object theDomainObject,
- Object[] theAncestors) {
-
- if (theDomainObject instanceof Configuration) {
- config = (Configuration)theDomainObject;
- }
- else {
- throw new IllegalArgumentException(
- getString("msg.invalidclass", //$NON-NLS-1$
- new Object[] {"Configuration", //$NON-NLS-1$
- theDomainObject.getClass()}));
- }
- super.setDomainObject(config, theAncestors);
-
- try {
- // clear and load psc service defintion table
- DeployPkgUtils.loadPscServiceDefintions(config, pscsTblModel,
- connection);
- tblPscs.sizeColumnsToFitData();
- sortFirstColumnInTable(tblPscs);
- }
- catch (ExternalException theException) {
- ExceptionUtility.showMessage(
- getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "setDomainObject"}), //$NON-NLS-1$
- ""+theException.getMessage(), //$NON-NLS-1$
- theException);
- LogManager.logError(LogContexts.PSCDEPLOY,
- theException,
- getClass() + ":setDomainObject"); //$NON-NLS-1$
- }
- }
-
-}
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,644 +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.console.ui.views.deploy;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.swing.JPanel;
-import javax.swing.border.CompoundBorder;
-
-import com.metamatrix.admin.api.objects.PropertyDefinition.RestartType;
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.config.api.ProductType;
-import com.metamatrix.common.config.api.ServiceComponentDefn;
-import com.metamatrix.common.config.api.ServiceComponentDefnID;
-import com.metamatrix.common.object.PropertiedObject;
-import com.metamatrix.common.object.PropertiedObjectEditor;
-import com.metamatrix.common.object.PropertyDefinition;
-import com.metamatrix.console.connections.ConnectionInfo;
-import com.metamatrix.console.models.ConfigurationPropertiedObjectEditor;
-import com.metamatrix.console.security.UserCapabilities;
-import com.metamatrix.console.ui.layout.MenuEntry;
-import com.metamatrix.console.ui.util.AbstractPanelAction;
-import com.metamatrix.console.ui.views.deploy.event.ConfigurationModifier;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.ui.views.deploy.util.PropertyConstants;
-import com.metamatrix.console.util.ExternalException;
-import com.metamatrix.console.util.StaticUtilities;
-import com.metamatrix.toolbox.ui.widget.ButtonWidget;
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
-import com.metamatrix.toolbox.ui.widget.TitledBorder;
-import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
-import com.metamatrix.toolbox.ui.widget.property.PropertyDefinitionLabel;
-
-/**
- * @version 1.0
- * @author Dan Florian
- */
-public final class ServiceDefinitionPanel
- extends DetailPanel
- implements ActionListener,
- ConfigurationModifier,
- PropertyChangeListener,
- PropertyConstants {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private CheckBox chkEnabled;
- private CheckBox chkEssential;
- private ServiceDefPOP pnlProps;
- private JPanel pnlPropsOuter;
- private TextFieldWidget txfProd;
- private TextFieldWidget txfPsc;
- private TextFieldWidget txfService;
-
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
-
- private PanelAction actionApply;
- private PanelAction actionReset;
- private ConfigurationPropertiedObjectEditor propEditor;
- private boolean saveEnabled;
- private ServiceComponentDefn service;
- private HashMap propValueMap = new HashMap();
- private PropertiedObject propObj;
- private HashMap propDefsMap = new HashMap();
- private boolean propsDifferent = false;
-
- /**Set<String> set of the names of properties that have been changed*/
- private Set changedPropertyNames = new HashSet();
-
-
- //whether any properties have changed that require a restart
- private RestartType propsDifferentRequiresRestart = RestartType.NONE;
-
- private PscDefinitionPanel parentPanel;
- private boolean editMode;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
-
- public ServiceDefinitionPanel(boolean includingHdr,
- PscDefinitionPanel parentPanel,
- ConfigurationID theConfigId,
- ConnectionInfo connInfo) {
-
- super(includingHdr, connInfo);
- this.parentPanel = parentPanel;
- setTitle(getString("sdp.title")); //$NON-NLS-1$
- setConfigId(theConfigId);
-
- this.editMode = UserCapabilities.getInstance().canUpdateConfiguration(connInfo);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- public void actionPerformed(ActionEvent theEvent) {
- checkResetState();
- }
-
- private void checkResetState() {
- if (includingHdr()) {
- if (isPropertiesValid() &&
- (propsDifferent || (chkEnabled.isSelected() != saveEnabled))) {
- if (!actionApply.isEnabled()) {
- actionApply.setEnabled(true);
- actionReset.setEnabled(true);
- }
- } else {
- if (actionApply.isEnabled()) {
- actionApply.setEnabled(false);
- actionReset.setEnabled(false);
- }
- }
- } else {
- parentPanel.checkResetState();
- }
- }
-
- protected JPanel construct(boolean readOnly) {
- // setup actions first
- actionApply = new PanelAction(PanelAction.APPLY);
- actionApply.setEnabled(false);
- actionReset = new PanelAction(PanelAction.RESET);
- actionReset.setEnabled(false);
-
- JPanel pnl = new JPanel(new GridBagLayout());
-
- LabelWidget lblProd = DeployPkgUtils.createLabel("sdp.lblProd"); //$NON-NLS-1$
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.insets = new Insets(3, 3, 10, 3);
- gbc.gridx = 0;
- gbc.gridy = 0;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- if (includingHdr()) {
- pnl.add(lblProd, gbc);
- }
-
- txfProd = DeployPkgUtils.createTextField("productname"); //$NON-NLS-1$
- txfProd.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 0;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.WEST;
- if (includingHdr()) {
- pnl.add(txfProd, gbc);
- }
-
- LabelWidget lblPsc = DeployPkgUtils.createLabel("sdp.lblPsc"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 0;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- if (includingHdr()) {
- pnl.add(lblPsc, gbc);
- }
-
- txfPsc = DeployPkgUtils.createTextField("pscname"); //$NON-NLS-1$
- txfPsc.setEditable(false);
- gbc.gridx = 3;
- gbc.gridy = 0;
- gbc.weightx = 0.2;
- gbc.weighty = 0;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.anchor = GridBagConstraints.WEST;
- if (includingHdr()) {
- pnl.add(txfPsc, gbc);
- }
-
- LabelWidget lblService = DeployPkgUtils.createLabel("sdp.lblService"); //$NON-NLS-1$
- gbc.gridx = 0;
- gbc.gridy = 1;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.gridwidth = 1;
- gbc.insets = new Insets(3, 3, 3, 3);
- gbc.anchor = GridBagConstraints.EAST;
- if (includingHdr()) {
- pnl.add(lblService, gbc);
- }
-
- txfService = DeployPkgUtils.createTextField("servicename"); //$NON-NLS-1$
- txfService.setEditable(false);
- gbc.gridx = 1;
- gbc.gridy = 1;
- gbc.weightx = 0.3;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.WEST;
- if (includingHdr()) {
- pnl.add(txfService, gbc);
- }
-
- LabelWidget lblEnabled = DeployPkgUtils.createLabel("sdp.lblEnabled"); //$NON-NLS-1$
- gbc.gridx = 2;
- gbc.gridy = 1;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- if (includingHdr()) {
- pnl.add(lblEnabled, gbc);
- }
-
- chkEnabled = new CheckBox();
- chkEnabled.addActionListener(this);
- gbc.gridx = 3;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- if (includingHdr()) {
- pnl.add(chkEnabled, gbc);
- }
-
- LabelWidget lblEssential = DeployPkgUtils.createLabel("sdp.lblEssential"); //$NON-NLS-1$
- gbc.gridx = 4;
- gbc.gridy = 1;
- gbc.weightx = 0;
- gbc.weighty = 0;
- gbc.anchor = GridBagConstraints.EAST;
- if (includingHdr()) {
- pnl.add(lblEssential, gbc);
- }
-
- chkEssential = new CheckBox();
- chkEssential.setEnabled(false);
- gbc.gridx = 5;
- gbc.gridy = 1;
- gbc.anchor = GridBagConstraints.WEST;
- if (includingHdr()) {
- pnl.add(chkEssential, gbc);
- }
-
- pnlPropsOuter = new JPanel(new GridLayout(1, 1));
- setPnlPropsOuterBorder(null);
- gbc.gridx = 0;
- gbc.gridy = 2;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.fill = GridBagConstraints.BOTH;
- if (includingHdr()) {
- gbc.insets = new Insets(3, 3, 20, 3);
- } else {
- gbc.insets = new Insets(0, 0, 0, 0);
- }
- gbc.anchor = GridBagConstraints.WEST;
- gbc.weightx = 1.0;
- gbc.weighty = 1.0;
- pnl.add(pnlPropsOuter, gbc);
-
- JPanel pnlOps = new JPanel();
- gbc.gridx = 0;
- gbc.gridy = 3;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.CENTER;
- if (includingHdr()) {
- gbc.insets = new Insets(3, 3, 3, 3);
- } else {
- gbc.insets = new Insets(0, 0, 0, 0);
- }
- gbc.weightx = 0.0;
- gbc.weighty = 0.0;
- pnl.add(pnlOps, gbc);
-
- if (includingHdr()) {
- JPanel pnlOpsSizer = new JPanel(new GridLayout(1, 2, 10, 0));
- pnlOps.add(pnlOpsSizer);
-
- ButtonWidget btnApply = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnApply, actionApply);
- pnlOpsSizer.add(btnApply);
-
- ButtonWidget btnReset = new ButtonWidget();
- setup(MenuEntry.ACTION_MENUITEM, btnReset, actionReset);
- pnlOpsSizer.add(btnReset);
- }
-
- // initialize the properties editor and panel
- try {
- propEditor = getConfigurationManager().getPropertiedObjectEditor();
- pnlProps = new ServiceDefPOP(propEditor);
- pnlProps.setReadOnlyForced(readOnly);
- pnlProps.createComponent();
- pnlProps.setColumnHeaderNames(getString("pop.propertyname.hdr"), //$NON-NLS-1$
- getString("pop.propertyvalue.hdr")); //$NON-NLS-1$
- pnlProps.addPropertyChangeListener(this);
- pnlProps.setShowInvalidProperties(true);
- pnlProps.setShowRequiredProperties(true);
- pnlProps.setShowExpertProperties(true);
- pnlPropsOuter.add(pnlProps);
- } catch (ExternalException theException) {
- throw new IllegalStateException(
- getString("msg.configmgrproblem", //$NON-NLS-1$
- new Object[] {getClass(), "construct"})); //$NON-NLS-1$
- }
-
- return pnl;
- }
-
- private void setPnlPropsOuterBorder(String serviceName) {
- String title;
- if (serviceName == null) {
- title = "Properties"; //$NON-NLS-1$
- } else {
- title = "Properties of " + serviceName; //$NON-NLS-1$
- }
- TitledBorder tBorder;
- tBorder = new TitledBorder(title);
- if (includingHdr()) {
- pnlPropsOuter.setBorder(
- new CompoundBorder(tBorder,DeployPkgUtils.EMPTY_BORDER));
- } else {
- pnlPropsOuter.setBorder(tBorder);
- }
- }
-
- private boolean equivalent(
- Object theValue,
- Object theOtherValue) {
-
- return (((theValue == null) && (theOtherValue == null)) ||
- ((theValue != null) && (theOtherValue != null) &&
- theValue.equals(theOtherValue)));
- }
-
- public boolean isPersisted() {
- boolean persisted;
- if (includingHdr()) {
- persisted = (!actionApply.isEnabled());
- } else {
- persisted = parentPanel.isPersisted();
- }
- return persisted;
- }
-
- private boolean isPropertiesValid() {
- return pnlProps.getInvalidDefinitions().isEmpty();
- }
-
- public void persist() throws ExternalException {
-
- if (includingHdr() && (saveEnabled != chkEnabled.isSelected())) {
- saveEnabled = chkEnabled.isSelected();
- }
- if (propsDifferent) {
- String message = null;
- switch (propsDifferentRequiresRestart) {
- case NONE:
- message = "The change will take effect immediately."; //$NON-NLS-1$
- break;
- case SERVICE:
- message = "The change(s) will not take effect until the affected services/connectors are restarted in the Runtime panel."; //$NON-NLS-1$
- break;
- case PROCESS:
- message = "You have changed some properties marked " + PropertyDefinitionLabel.REQUIRES_PROCESS_RESTART_LABEL + "These properties will not take effect until the server is restarted or bounced."; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- case ALL_PROCESSES:
- message = "You have changed some properties marked " + PropertyDefinitionLabel.REQUIRES_BOUNCE_LABEL + "These properties will not take effect until the system is bounced."; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- case CLUSTER:
- message = "You have changed some properties marked " + PropertyDefinitionLabel.REQUIRES_CLUSTER_RESTART_LABEL + "These properties will not take effect until the system, including host controllers, is restarted."; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- }
-
- StaticUtilities.displayModalDialogWithOK("Modify Service Properties", message); //$NON-NLS-1$
-
- getConfigurationManager().modifyPropertiedObject(propEditor);
- propValueMap.clear();
- propsDifferent = false;
- propsDifferentRequiresRestart = RestartType.NONE;
- changedPropertyNames.clear();
- }
- checkResetState();
- }
-
- public void propertyChange(PropertyChangeEvent theEvent) {
- // if the property value has been changed before check
- // to see if it now agrees with the original value. if it
- // does, remove it from the list of changed properties.
- String eventProp = theEvent.getPropertyName();
- if (propValueMap.containsKey(eventProp)) {
-
- Object original = propValueMap.get(eventProp);
- Object current = theEvent.getNewValue();
- boolean different = !equivalent(original, current);
- if (different) {
- changedPropertyNames.add(eventProp);
- } else {
- changedPropertyNames.remove(eventProp);
- }
- } else {
- // save original value if not previously saved
- // propValueMap contains properties that have changed at one time
- // they may now hold the original value however
- propValueMap.put(eventProp, theEvent.getOldValue());
- changedPropertyNames.add(eventProp);
- }
-
- propsDifferent = (changedPropertyNames.size() > 0);
- propsDifferentRequiresRestart = checkPropsDifferentRequiresRestart();
-
- checkResetState();
- }
-
- /**
- * Check if any properties have changed for which getRequiresRestart()==true
- * @return
- * @since 4.3
- */
- private RestartType checkPropsDifferentRequiresRestart() {
- RestartType result = RestartType.NONE;
- if (propsDifferent) {
- Iterator itr = changedPropertyNames.iterator();
- while (itr.hasNext()) {
- String prop = (String) itr.next();
- PropertyDefinition def = (PropertyDefinition) propDefsMap.get(prop);
- if (def != null && def.getRequiresRestart().compareTo(result) > 0) {
- result = def.getRequiresRestart();
- }
- }
- }
- return result;
- }
-
-
-
- public boolean propertiesHaveChanged() {
- return propsDifferent;
- }
-
- public void reset() {
- if (chkEnabled.isSelected() != saveEnabled) {
- chkEnabled.setSelected(saveEnabled);
- }
- if (propsDifferent) {
- resetPropertiedObject();
- }
- checkResetState();
- }
-
- private void resetPropertiedObject() {
- propsDifferent = false;
- propsDifferentRequiresRestart = RestartType.NONE;
- changedPropertyNames.clear();
- Iterator itr = propValueMap.keySet().iterator();
- while (itr.hasNext()) {
- String prop = (String)itr.next();
- PropertyDefinition def = (PropertyDefinition)propDefsMap.get(prop);
- propEditor.setValue(propObj, def, propValueMap.get(prop));
- }
- pnlProps.refreshDisplay();
- propValueMap.clear();
- }
-
- private void savePropertyDefinitions() {
- if (propObj != null) {
- List defs = propEditor.getPropertyDefinitions(propObj);
- Iterator it = defs.iterator();
- while (it.hasNext()) {
- PropertyDefinition def = (PropertyDefinition)it.next();
- propDefsMap.put(def.getName(), def);
- }
- }
- }
-
- public void setConfigId(ConfigurationID theConfigId) {
-
- super.setConfigId(theConfigId);
- setTitleSuffix(getString("sdp.title.suffix")); //$NON-NLS-1$
- }
-
- public ServiceComponentDefn getService() {
- return service;
- }
-
- public void displayDetailFor(ServiceComponentDefn serviceDef,
- Object[] theAncestors) {
- setDomainObject(serviceDef, theAncestors);
- }
-
- public void setDomainObject(Object theDomainObject, Object[] theAncestors) {
- if (theDomainObject instanceof ServiceComponentDefn) {
- service = (ServiceComponentDefn)theDomainObject;
- setTitleSuffix(service.toString());
- setPnlPropsOuterBorder(service.toString());
- } else {
- if (theDomainObject != null) {
- throw new IllegalArgumentException(
- getString("msg.invalidclass", //$NON-NLS-1$
- new Object[] {"ServiceComponentDefn", //$NON-NLS-1$
- theDomainObject.getClass()}));
- }
- service = null;
- setPnlPropsOuterBorder(null);
- }
- super.setDomainObject(service, theAncestors);
-
- if (includingHdr()) {
- ProductServiceConfig psc = (ProductServiceConfig)theAncestors[0];
- txfPsc.setText(psc.getName());
- txfService.setText(service.toString());
- String essential = service.getProperty(ESSENTIAL_PROP);
- if (essential == null) {
- essential = ""; //$NON-NLS-1$
- }
- chkEssential.setSelected((new Boolean(essential)).booleanValue());
- ProductType product = getConfigurationManager().getProduct(psc);
- txfProd.setText(product.getName());
-
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) service.getID();
-
- if (!psc.containsService(svcID)) {
- throw new IllegalArgumentException("Service " + svcID + " not contained in PSC " + psc.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Boolean enabled = new Boolean(service.isEnabled());
-
- saveEnabled = psc.isServiceEnabled( (ServiceComponentDefnID) service.getID() ) ;
-// Boolean enabled = new Boolean(psc.isServiceEnabled( (ServiceComponentDefnID) service.getID() ) );
-
-// saveEnabled = enabled.booleanValue();
- chkEnabled.setSelected(saveEnabled);
- }
-
- propDefsMap.clear();
- propValueMap.clear();
-
- if (theDomainObject != null) {
- propObj = getConfigurationManager()
- .getPropertiedObjectForComponentObject(service);
- pnlProps.setNameColumnHeaderWidth(0);
- pnlProps.setPropertiedObject(propObj);
-
- setEnabled(editMode && getConfigurationManager().isEditable(service.getConfigurationID()));
-
- } else {
- propObj = null;
- pnlProps.setPropertiedObject(null);
- }
-
- pnlProps.resizeNameColumn();
- savePropertyDefinitions();
-
- }
-
- public void setEnabled(boolean theEnableFlag) {
- chkEnabled.setEnabled(theEnableFlag);
- pnlProps.setReadOnlyForced(!theEnableFlag);
-
- ///propEditor.setReadOnly(propObj, !theEnableFlag);
-
- pnlProps.refreshDisplay();
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // INNER CLASSES
- ///////////////////////////////////////////////////////////////////////////
-
- private class PanelAction extends AbstractPanelAction {
- public static final int APPLY = 0;
- public static final int RESET = 1;
-
- public PanelAction(int theType) {
- super(theType);
- if (theType == APPLY) {
- putValue(NAME, getString("sdp.actionApply")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("sdp.actionApply.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("sdp.actionApply.mnemonic")); //$NON-NLS-1$
- } else if (theType == RESET) {
- putValue(NAME, getString("sdp.actionReset")); //$NON-NLS-1$
- putValue(SHORT_DESCRIPTION, getString("sdp.actionReset.tip")); //$NON-NLS-1$
- setMnemonic(getMnemonicChar("sdp.actionReset.mnemonic")); //$NON-NLS-1$
- } else {
- throw new IllegalArgumentException(
- getString("msg.invalidactiontype") + theType); //$NON-NLS-1$
- }
- }
- protected void actionImpl(ActionEvent theEvent)
- throws ExternalException {
- if (type == APPLY) {
- persist();
- } else if (type == RESET) {
- reset();
- }
- }
- }
-
-
-
- class ServiceDefPOP extends PropertiedObjectPanel {
- public ServiceDefPOP(PropertiedObjectEditor poe) {
- super(poe, getEncryptor());
- }
-
- public void resizeNameColumn() {
- super.resizeNameColumn();
- }
- }//end ServiceDefPOP
-}//end ServiceDefinitionPanel
-
-
-
Added: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java (rev 0)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -0,0 +1,492 @@
+/*
+ * 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.console.ui.views.deploy;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.table.TableColumn;
+
+import com.metamatrix.common.config.api.Configuration;
+import com.metamatrix.common.config.api.ServiceComponentDefn;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.console.connections.ConnectionInfo;
+import com.metamatrix.console.models.ConfigurationManager;
+import com.metamatrix.console.models.ModelManager;
+import com.metamatrix.console.notification.RuntimeUpdateNotification;
+import com.metamatrix.console.security.UserCapabilities;
+import com.metamatrix.console.ui.ViewManager;
+import com.metamatrix.console.ui.layout.BasePanel;
+import com.metamatrix.console.ui.layout.WorkspacePanel;
+import com.metamatrix.console.ui.views.deploy.event.ConfigurationChangeEvent;
+import com.metamatrix.console.ui.views.deploy.event.ConfigurationChangeListener;
+import com.metamatrix.console.util.DialogUtility;
+import com.metamatrix.console.util.ExceptionUtility;
+import com.metamatrix.console.util.LogContexts;
+import com.metamatrix.console.util.Refreshable;
+import com.metamatrix.console.util.StaticUtilities;
+import com.metamatrix.toolbox.ui.widget.Splitter;
+import com.metamatrix.toolbox.ui.widget.TableWidget;
+import com.metamatrix.toolbox.ui.widget.table.DefaultTableComparator;
+import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumn;
+import com.metamatrix.toolbox.ui.widget.table.EnhancedTableColumnModel;
+
+public class ServiceDefinitionPanel extends BasePanel implements
+ ConfigurationChangeListener,
+ WorkspacePanel,
+ Refreshable {
+
+ public final static int SVC_DEFN_COL_NUM = 0;
+ public final static int ESSENTIAL_COL_NUM = 1;
+ public final static int DESCRIPTION_COL_NUM = 2;
+
+ public final static int PROPERTIES_TAB_NUM = 1;
+
+
+ private ConnectionInfo connection;
+
+ private TableWidget table;
+ private com.metamatrix.toolbox.ui.widget.table.DefaultTableModel tableModel;
+ private ServiceDefinitionPropertiesPanel propertiesPanel;
+
+ /** List <ServiceComponentDefn> */
+ private List selectedSvc = new ArrayList();
+
+ private ListSelectionListener listSelectionListener;
+
+ private JTabbedPane tabbedPane;
+ private JSplitPane splitPane;
+ private java.util.List /* <Action> */currentActions = new ArrayList();
+ private HashMap nameServiceDefnMap = new HashMap();
+ private boolean canModify;
+
+ public ServiceDefinitionPanel(ConnectionInfo conn) {
+ super();
+ this.connection = conn;
+ init();
+ }
+
+
+ @Override
+ public void receiveUpdateNotification(RuntimeUpdateNotification notification) {
+ // TODO Auto-generated method stub
+
+ }
+
+ private ConfigurationManager getConfigurationManager() {
+ return ModelManager.getConfigurationManager(connection);
+ }
+
+
+ private void init() {
+
+ UserCapabilities cap = null;
+ try {
+ cap = UserCapabilities.getInstance();
+ canModify = cap.canModifyConnectorBindings(connection);
+
+ if (canModify) {
+ getConfigurationManager().addConfigurationChangeListener(this);
+ }
+ } catch (Exception ex) {
+ // Cannot occur
+ }
+
+
+ // NOTE-- columns must be in order by indices above
+ tableModel = new com.metamatrix.toolbox.ui.widget.table.DefaultTableModel(new Vector(Arrays.asList(new String[] {
+ "Service", "Is Essential", "Description"})), 0); //$NON-NLS-1$ //$NON-NLS-2$
+ table = new TableWidget(tableModel, true);
+ table.setEditable(false);
+ table.sizeColumnsToFitContainer(SVC_DEFN_COL_NUM);
+ table.sizeColumnsToFitContainer(ESSENTIAL_COL_NUM);
+ table.sizeColumnsToFitContainer(DESCRIPTION_COL_NUM);
+// table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
+ DefaultTableComparator dtcComparator = (DefaultTableComparator)table.getComparator();
+ dtcComparator.setIgnoresCase(true);
+
+ // set the binding name column to be sorted by default
+ EnhancedTableColumnModel columnModel = (EnhancedTableColumnModel)table.getColumnModel();
+ TableColumn firstColumn = columnModel.getColumn(SVC_DEFN_COL_NUM);
+ columnModel.setColumnSortedAscending((EnhancedTableColumn)firstColumn, true);
+
+ JScrollPane tableSP = new JScrollPane(table);
+
+ GridBagLayout layout = new GridBagLayout();
+ setLayout(layout);
+
+ JPanel buttonsPanel = new JPanel();
+ buttonsPanel.setLayout(new GridLayout(1, 4, 5, 5));
+
+ tabbedPane = new JTabbedPane();
+ propertiesPanel = new ServiceDefinitionPropertiesPanel(canModify, connection);
+
+ // NOTE-- tabs MUST be inserted in order by indices above
+ tabbedPane.addTab("Properties", propertiesPanel); //$NON-NLS-1$
+// tabbedPane.addChangeListener(new ChangeListener() {
+//
+// public void stateChanged(ChangeEvent ev) {
+// selectedTabChanged();
+// }
+// });
+ splitPane = new Splitter(JSplitPane.VERTICAL_SPLIT, true, tableSP, tabbedPane);
+
+ add(splitPane);
+ layout.setConstraints(splitPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
+ if (canModify) {
+ add(buttonsPanel);
+ layout.setConstraints(buttonsPanel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+ }
+
+ listSelectionListener = new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent ev) {
+ tableSelectionChanged();
+ }
+ };
+ table.getSelectionModel().addListSelectionListener(listSelectionListener);
+ refresh();
+ }
+
+
+
+// public void addActionToList(String sID,
+// Action act) {
+// currentActions.add(new MenuEntry(sID, act));
+// }
+
+// private void setup(AbstractButton theButton,
+// AbstractPanelAction theAction) {
+// theAction.addComponent(theButton);
+// }
+
+ private void populateTable() {
+ tableModel.setNumRows(0);
+ try {
+ nameServiceDefnMap.clear();
+
+ Configuration config = this.getConfigurationManager().getConfig(Configuration.NEXT_STARTUP_ID);
+ Collection<ServiceComponentDefn> bindings = config.getServiceComponentDefns();
+ for (Iterator<ServiceComponentDefn> it = bindings.iterator(); it.hasNext();) {
+ ServiceComponentDefn cb = it.next();
+
+ Vector vec = new Vector(Arrays.asList(new Object[] {
+ null, null, null
+ }));
+ vec.setElementAt(cb.getName(), SVC_DEFN_COL_NUM);
+ vec.setElementAt(cb.isEssential(), ESSENTIAL_COL_NUM);
+ vec.setElementAt(cb.getDescription(), DESCRIPTION_COL_NUM);
+ tableModel.addRow(vec);
+
+ nameServiceDefnMap.put(cb.getName(), cb);
+
+
+ }
+
+ } catch (Exception ex) {
+ ExceptionUtility.showMessage("Retrieve service definition info", ex); //$NON-NLS-1$
+ LogManager.logError(LogContexts.CONFIG, ex, "Error retrieving service definition info."); //$NON-NLS-1$
+ }
+
+ forceTableSelection(getSelectedService());
+ }
+
+ /**
+ * Set the widget to display as selected the specified list of bindings.
+ *
+ * @param binding
+ * List<ConnectorBinding>
+ * @since 4.2
+ */
+ private void forceTableSelection(List bindings) {
+ table.getSelectionModel().clearSelection();
+
+ Iterator iter = bindings.iterator();
+ while (iter.hasNext()) {
+ ServiceComponentDefn svc = (ServiceComponentDefn)iter.next();
+ int rowForSelected = rowForService(svc.getName());
+ if (rowForSelected >= 0) {
+ table.getSelectionModel().addSelectionInterval(rowForSelected, rowForSelected);
+ table.scrollRectToVisible(table.getCellRect(rowForSelected, 0, true));
+ }
+ }
+ }
+
+ public void postRealize() {
+ splitPane.setDividerLocation(0.4);
+ if (table.getRowCount() > 0) {
+ table.setRowSelectionInterval(0, 0);
+ }
+ }
+
+
+
+
+
+
+ private int rowForService(String svc) {
+ int matchRow = -1;
+ int numRows = table.getRowCount();
+ int row = 0;
+ while ((row < numRows) && (matchRow < 0)) {
+ String curRowSvc = table.getValueAt(row, SVC_DEFN_COL_NUM).toString();
+ if (curRowSvc.equals(svc)) {
+ matchRow = row;
+ } else {
+ row++;
+ }
+ }
+ return matchRow;
+ }
+
+ /**
+ * Set the list of selected connector bindings to contain just this specified binding.
+ *
+ * @param binding
+ * @since 4.2
+ */
+ private void setSelectedService(ServiceComponentDefn svc) {
+ selectedSvc.clear();
+ selectedSvc.add(svc);
+ }
+
+ /**
+ * Set the list of selected connector bindings to contain the specified bindings.
+ *
+ * @param bindings
+ * List<ConnectorBinding>
+ * @since 4.2
+ */
+ private void setSelectedServiceDefn(List svcs) {
+ selectedSvc.clear();
+ selectedSvc.addAll(svcs);
+ }
+
+ /**
+ * Clear the list of selected connector bindings.
+ *
+ * @param bindings
+ * List<ConnectorBinding>
+ * @since 4.2
+ */
+ private void clearSelectedService() {
+ selectedSvc.clear();
+ }
+
+ /**
+ * Get list of selected bindings.
+ *
+ * @return List<ConnectorBinding>
+ * @since 4.2
+ */
+ private List getSelectedService() {
+ return selectedSvc;
+ }
+
+ public void refresh() {
+ // save the currently selected bindings
+ List oldSelectedConnectedBindings = new ArrayList(getSelectedService());
+
+ try {
+ // refresh the connector bindings in the manager
+ // this.getConfigurationManager().refresh();
+ // constructServiceDefnXref();
+ populateTable();
+ } catch (Exception ex) {
+ ExceptionUtility.showMessage("Failed while refreshing the Services list", ex); //$NON-NLS-1$
+ LogManager.logError(LogContexts.CONFIG, ex, "Failed while refreshing the Services list"); //$NON-NLS-1$
+ }
+
+ // restore the binding and select it in the table:
+ setSelectedServiceDefn(oldSelectedConnectedBindings);
+ forceTableSelection(oldSelectedConnectedBindings);
+ }
+
+ private void tableSelectionChanged() {
+ boolean cancelled = false;
+
+ List svcs = getSelectedService();
+ if (svcs.size() == 1 && anyValueChanged()) {
+ ServiceComponentDefn svc = (ServiceComponentDefn) svcs.get(0);
+
+ String message = "Save changes to Service Definition " + svc + " ?"; //$NON-NLS-1$//$NON-NLS-2$
+ int response = DialogUtility.showPendingChangesDialog(message, getConnection().getURL(), getConnection().getUser());
+
+
+ switch (response) {
+ case DialogUtility.YES:
+ applyProperties();
+ break;
+
+ case DialogUtility.NO:
+ resetProperties();
+ break;
+
+ case DialogUtility.CANCEL:
+ cancelled = true;
+
+ //remove listener, to avoid an endless loop
+ table.getSelectionModel().removeListSelectionListener(listSelectionListener);
+
+ //revert to original selection
+ ArrayList newList = new ArrayList();
+ newList.add(svc);
+ forceTableSelection(newList);
+
+ //restore the listener
+ table.getSelectionModel().addListSelectionListener(listSelectionListener);
+
+ break;
+ }
+ }
+
+
+ if (! cancelled) {
+ StaticUtilities.startWait(ViewManager.getMainFrame());
+
+ int[] selectedRows = table.getSelectedRows();
+ int numSelected = selectedRows.length;
+
+ if (numSelected == 0) {
+ tableSelectionChangedNoneSelected();
+ } else if (numSelected == 1) {
+ tableSelectionChangedOneSelected(selectedRows[0]);
+ }
+
+ forceRepaint();
+ StaticUtilities.endWait(ViewManager.getMainFrame());
+ }
+ }
+
+ private void tableSelectionChangedNoneSelected() {
+ // clear list of selected bindings
+ clearSelectedService();
+
+ }
+
+ private void tableSelectionChangedOneSelected(int selectedRow) {
+ // set list of selected bindings
+ int convertedRow = table.convertRowIndexToModel(selectedRow);
+ String selectedName = (String)table.getModel().getValueAt(convertedRow, SVC_DEFN_COL_NUM);
+ ServiceComponentDefn svc = (ServiceComponentDefn)getServiceDefnXref().get(selectedName);
+ setSelectedService(svc);
+
+
+ }
+
+
+
+
+ public java.util.List /* <Action> */resume() {
+ return currentActions;
+ }
+
+ public String getTitle() {
+ return "Connector Bindings"; //$NON-NLS-1$
+ }
+
+ public ConnectionInfo getConnection() {
+ return connection;
+ }
+
+ private HashMap getServiceDefnXref() {
+// if (nameServiceDefnMap == null) {
+// constructServiceDefnXref();
+// }
+ return nameServiceDefnMap;
+ }
+
+// private void constructServiceDefnXref() {
+// nameServiceDefnMap = new HashMap();
+// ArrayList connectorsList = null;
+// try {
+// connectorsList = getConnectorManager().getConnectorBindings(false);
+// } catch (Exception e) {
+// ExceptionUtility.showMessage("Failed while loading data into Connector Binding Panel", e); //$NON-NLS-1$
+// }
+//
+// Iterator it = connectorsList.iterator();
+// ConnectorBinding tempDefn = null;
+//
+// while (it.hasNext()) {
+// ConnectorAndBinding cab = (ConnectorAndBinding)it.next();
+// tempDefn = (ConnectorBinding)cab.getBinding();
+// nameServiceDefnMap.put(tempDefn.toString(), tempDefn);
+// }
+//
+// }
+
+ private void forceRepaint() {
+ StaticUtilities.jiggleSplitter(splitPane);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.metamatrix.console.ui.views.deploy.event.ConfigurationChangeListener#configurationChanged(com.metamatrix.console.ui.views.deploy.event.ConfigurationChangeEvent)
+ */
+ public void configurationChanged(ConfigurationChangeEvent theEvent) {
+ if (theEvent.getType() == ConfigurationChangeEvent.REFRESH_END) {
+ this.refresh();
+ }
+ }
+
+
+
+ private void applyProperties() {
+ if (propertiesPanel != null) {
+ propertiesPanel.applyProperties();
+ }
+ }
+ private void resetProperties() {
+ if (propertiesPanel != null) {
+ propertiesPanel.resetProperties();
+ }
+ }
+
+ private boolean anyValueChanged() {
+ if (propertiesPanel == null) {
+ return false;
+ }
+ return propertiesPanel.anyValueChanged();
+ }
+
+
+}// end ConnectorBindingPanel
+
Property changes on: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java (rev 0)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -0,0 +1,264 @@
+/*
+ * 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.console.ui.views.deploy;
+
+import java.awt.*;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+import javax.swing.JPanel;
+
+import com.metamatrix.common.actions.ModificationActionQueue;
+import com.metamatrix.common.config.api.ComponentDefnID;
+import com.metamatrix.common.config.api.Configuration;
+import com.metamatrix.common.config.api.ConfigurationObjectEditor;
+import com.metamatrix.common.config.api.ConnectorBinding;
+import com.metamatrix.common.config.api.ServiceComponentDefn;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.object.PropertiedObject;
+import com.metamatrix.common.object.PropertiedObjectEditor;
+import com.metamatrix.console.connections.ConnectionInfo;
+import com.metamatrix.console.models.ConnectorManager;
+import com.metamatrix.console.models.ModelManager;
+import com.metamatrix.console.ui.layout.ConsoleMainFrame;
+import com.metamatrix.console.ui.util.*;
+import com.metamatrix.console.util.*;
+import com.metamatrix.toolbox.ui.widget.LabelWidget;
+import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
+import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
+
+
+
+public class ServiceDefinitionPropertiesPanel extends JPanel
+ implements POPWithButtonsController {
+ private PropertiedObjectPanel pop;
+ private PropertiedObjectPanelHolder popHolder;
+ private POPWithButtons popWithButtons = null;
+
+ private TextFieldWidget txfConnectorName = new TextFieldWidget();
+ private LabelWidget lblConnectorName = new LabelWidget();
+ private TextFieldWidget txfBindingName = new TextFieldWidget();
+ private LabelWidget lblBindingName = new LabelWidget();
+ private JPanel pnlOuter = new JPanel();
+ private JPanel pnlPOPShell = new JPanel(new GridLayout(1, 1));
+ private PropertiedObject poPropObject;
+ private PropertiedObjectEditor poe;
+ private ServiceComponentDefn serviceDefn;
+ private boolean canModify;
+ private ConnectionInfo connection;
+ private ModificationActionQueue maq = null;
+ private ConfigurationObjectEditor coe = null;
+
+
+ public ServiceDefinitionPropertiesPanel(boolean modifiable, ConnectionInfo connection) {
+ super();
+ canModify = modifiable;
+ this.connection = connection;
+ init();
+ try {
+ coe = getConnectorManager().getConnectorBindingEditor();
+ maq = coe.getDestination();
+ poe = getConnectorManager().getPropertiedObjectEditor(maq);
+ } catch (Exception ex) {
+ LogManager.logError(LogContexts.CONNECTOR_BINDINGS, ex,
+ "Error creating Connector Binding Properties Panel."); //$NON-NLS-1$
+ ExceptionUtility.showMessage(
+ "Error creating Connector Binding Properties Panel", ex); //$NON-NLS-1$
+ }
+ }
+
+ private ConnectorManager getConnectorManager() {
+ return ModelManager.getConnectorManager(connection);
+ }
+
+ private void init() {
+ pnlPOPShell.setPreferredSize(new Dimension(200, 300));
+
+ setLayout(new BorderLayout());
+
+ pnlOuter.setLayout(new GridBagLayout());
+
+ lblBindingName.setText("Binding Name:"); //$NON-NLS-1$
+ lblConnectorName.setText("Connector Type:"); //$NON-NLS-1$
+
+ txfBindingName.setEditable(false);
+ txfConnectorName.setEditable(false);
+ add(pnlPOPShell, BorderLayout.CENTER);
+ }
+
+
+ private PropertiedObjectEditor getPropertiedObjectEditor() {
+ if (poe == null) {
+ // 4. create a PropertiedObjectEditor
+ try {
+ poe = getConnectorManager().getPropertiedObjectEditor();
+ } catch (Exception e) {
+ ExceptionUtility.showMessage(
+ "Failed to get editor for Binding propd panel ", e); //$NON-NLS-1$
+ }
+ }
+ return poe;
+ }
+
+ private PropertiedObjectPanel getPropertiedObjectPanel() {
+ if (pop == null) {
+ try {
+ StaticUtilities.startWait(ConsoleMainFrame.getInstance());
+
+ // 4. create a PropertiedObjectEditor which contains the
+ // initial 'create' action
+ poe = getPropertiedObjectEditor();
+
+ // 5. Create the PropertiedObjectPanel
+ pop = new PropertiedObjectPanel(poe, getConnectorManager().getEncryptor());
+ } catch (RuntimeException ex) {
+ StaticUtilities.endWait(ConsoleMainFrame.getInstance());
+ throw ex;
+ }
+ StaticUtilities.endWait(ConsoleMainFrame.getInstance());
+ }
+ return pop;
+ }
+
+ private void populateTable() {
+ try {
+ StaticUtilities.startWait(ConsoleMainFrame.getInstance());
+ if (serviceDefn == null) {
+ pnlPOPShell.removeAll();
+ } else {
+ updatePropertiedObjectPanel();
+ }
+ } catch (RuntimeException ex) {
+ StaticUtilities.endWait(ConsoleMainFrame.getInstance());
+ //throw ex;
+ ExceptionUtility.showMessage("Failed in populateTable", ex); //$NON-NLS-1$
+ }
+ StaticUtilities.endWait(ConsoleMainFrame.getInstance());
+ }
+
+ public void setConnectorBinding(ServiceComponentDefn svcDefn) {
+ this.serviceDefn = svcDefn;
+ populateTable();
+ }
+
+ public ServiceComponentDefn getConnectorBinding() {
+ return serviceDefn;
+ }
+
+ public void updatePropertiedObjectPanel() {
+ ServiceComponentDefn connectorBindingDefn = getConnectorBinding();
+ try {
+ poPropObject = getConnectorManager().getPropertiedObject(connectorBindingDefn);
+ getPropertiedObjectPanel().setNameColumnHeaderWidth(0);
+ getPropertiedObjectPanel().setPropertiedObject(poPropObject, poe);
+ poe.setReadOnly(poPropObject, false);
+
+ getPropertiedObjectPanel().setShowRequiredProperties(true);
+ getPropertiedObjectPanel().setShowInvalidProperties(true);
+ getPropertiedObjectPanel().setShowHiddenProperties(false);
+ getPropertiedObjectPanel().setShowExpertProperties(true);
+ getPropertiedObjectPanel().setShowOptionalProperties(false);
+
+ if (!canModify) {
+ getPropertiedObjectPanel().setReadOnlyForced(true);
+ }
+
+ getPropertiedObjectPanel().createComponent();
+ getPropertiedObjectPanel().refreshDisplay();
+
+ boolean includeOptional = false;
+ if (popHolder != null) {
+ includeOptional = popHolder.isIncludingOptionalProperties();
+ }
+
+ pnlPOPShell.removeAll();
+ ItemListener includeOptionalListener = new ItemListener() {
+ public void itemStateChanged(ItemEvent ev) {
+ includeOptionalStateChanged();
+ }
+ };
+ popHolder = new PropertiedObjectPanelHolder(pop, includeOptionalListener);
+ popWithButtons = new POPWithButtons(popHolder, poe, this);
+
+ pnlPOPShell.add(popWithButtons);
+
+ popHolder.setIsIncludingOptionalProperties(includeOptional);
+
+ } catch(Exception e) {
+ ExceptionUtility.showMessage("Failed while creating Service Definition Panel", //$NON-NLS-1$
+ e);
+ }
+
+ }
+
+ private void includeOptionalStateChanged() {
+ getPropertiedObjectPanel().setShowOptionalProperties(
+ popHolder.isIncludingOptionalProperties());
+ getPropertiedObjectPanel().refreshDisplay();
+ }
+
+ public ServiceComponentDefn getNewConnectorBinding() {
+ return serviceDefn;
+ }
+
+ public boolean doApplyChanges(PropertiedObjectPanel pop) {
+ boolean proceeding = true;
+ try {
+ StaticUtilities.displayModalDialogWithOK("Modify Service Definition", //$NON-NLS-1$
+ "Note: Change will not take effect until connector is " + //$NON-NLS-1$
+ "restarted in the System State panel."); //$NON-NLS-1$
+ getConnectorManager().saveConnectorBinding(maq);
+
+
+ ConnectorBinding cb = (ConnectorBinding) getConnectorManager().getConfigurationAdminAPI().getComponentDefn(Configuration.NEXT_STARTUP_ID,
+ (ComponentDefnID) serviceDefn.getID());
+ setConnectorBinding(cb);
+
+ } catch (Exception ex) {
+ LogManager.logError(LogContexts.CONNECTOR_BINDINGS, ex,
+ "Error saving service definition changes."); //$NON-NLS-1$
+ ExceptionUtility.showMessage("Error saving service definition changes", //$NON-NLS-1$
+ ex);
+ }
+ return proceeding;
+ }
+
+
+
+ public void applyProperties() {
+ if (popWithButtons != null) {
+ popWithButtons.applyPressed();
+ }
+ }
+ public void resetProperties() {
+ if (popWithButtons != null) {
+ popWithButtons.resetPressed();
+ }
+ }
+ public boolean anyValueChanged() {
+ if (popWithButtons == null) {
+ return false;
+ }
+ return popWithButtons.anyValueChanged();
+ }
+}
Property changes on: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/UpdatePSCPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/UpdatePSCPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/UpdatePSCPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -1,219 +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.console.ui.views.deploy;
-
-import java.awt.BorderLayout;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.util.*;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.KeyStroke;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-
-import com.metamatrix.common.config.api.ComponentDefnID;
-import com.metamatrix.common.config.api.ProductServiceConfig;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.console.ui.views.deploy.util.DeployPkgUtils;
-import com.metamatrix.console.util.LogContexts;
-import com.metamatrix.toolbox.ui.widget.*;
-
-public final class UpdatePSCPanel
- extends ConfirmationPanel
- implements ActionListener,
- DocumentListener {
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
-
- private static final KeyStroke ENTER_RELEASED =
- KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true);
-
- ///////////////////////////////////////////////////////////////////////////
- // CONTROLS
- ///////////////////////////////////////////////////////////////////////////
-
- private TextFieldWidget txf;
- private ButtonWidget btnCreate;
-
- private AccumulatorPanel pnlAssignments;
-
- private ProductServiceConfig pscDef;
- private List serviceNames;
-
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
-
- public UpdatePSCPanel(
- String theMessageId,
- String theIconId,
- String theLabelId,
- String theNameTypeId,
- ProductServiceConfig psc,
- List serviceNames,
- boolean editPSC) {
- super(theMessageId, theIconId, (editPSC==false?"rp.btnCreate":"rp.btnApply"), "rp.btnCancel"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- init(theLabelId, theNameTypeId, psc, serviceNames);
-
- if (editPSC) {
- txf.setText(psc.getName());
- txf.setEditable(false);
-
- }
-
- }
-
-
- public UpdatePSCPanel(
- String theMessageId,
- String theIconId,
- String theLabelId,
- String theNameTypeId,
- ProductServiceConfig psc,
- List serviceNames) {
-
- super(theMessageId, theIconId, "rp.btnCreate", "rp.btnCancel"); //$NON-NLS-1$ //$NON-NLS-2$
- init(theLabelId, theNameTypeId, psc, serviceNames);
- }
-
- private void init(String theLabelId,
- String theNameTypeId,
- ProductServiceConfig psc,
- List serviceNames) {
- this.pscDef = psc;
- this.serviceNames = serviceNames;
- JPanel mainPanel = new JPanel(new BorderLayout());
-
- JPanel pnl = new JPanel();
- JLabel lbl = new LabelWidget(DeployPkgUtils.getString(theLabelId));
- pnl.add(lbl);
- txf = DeployPkgUtils.createTextField(theNameTypeId);
- txf.getDocument().addDocumentListener(this);
- txf.registerKeyboardAction(this, ENTER_RELEASED, WHEN_FOCUSED);
- pnl.add(txf);
- mainPanel.add(pnl, BorderLayout.NORTH);
- mainPanel.add(createAssignmentPanel(), BorderLayout.CENTER);
- addContent(mainPanel);
- btnCreate = getAcceptButton();
- btnCreate.setEnabled(false);
- }
-
-
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
-
- public void actionPerformed(ActionEvent theEvent) {
- btnCreate.doClick();
- }
-
- public void changedUpdate(DocumentEvent theEvent) {
- if ((txf.getText().length() > 0) && !btnCreate.isEnabled()) {
- btnCreate.setEnabled(true);
- }
- else if ((txf.getText().length() == 0) && btnCreate.isEnabled()) {
- btnCreate.setEnabled(false);
- }
- }
-
- public String getName() {
- return txf.getText();
- }
-
- public void insertUpdate(DocumentEvent theEvent) {
- changedUpdate(theEvent);
- }
-
- public void removeUpdate(DocumentEvent theEvent) {
- changedUpdate(theEvent);
- }
-
-
- private JPanel createAssignmentPanel() {
-
- JPanel pnl = new JPanel(new GridLayout(1, 1));
- List currNames = null;
- // if this is for an existing psc the present the existing
- // services in the psc
- if (pscDef != null) {
- Iterator itIds = pscDef.getServiceComponentDefnIDs().iterator();
-
- currNames = new ArrayList(pscDef.getServiceComponentDefnIDs().size());
-
- while(itIds.hasNext()){
- ComponentDefnID id = (ComponentDefnID) itIds.next();
- currNames.add(id);
- }
- } else {
- currNames = Collections.EMPTY_LIST;
- }
-
- if (serviceNames == null) {
- Exception theException = new Exception("Null ServiceNames"); //$NON-NLS-1$
- LogManager.logError(
- LogContexts.USERS,
- theException,
- "Error calling UserManager.getRoles()"); //$NON-NLS-1$
- return pnl;
- }
- Collections.sort(serviceNames);
- if (!currNames.isEmpty()) {
- Collections.sort(currNames);
- }
- pnlAssignments = new AccumulatorPanel(serviceNames, currNames);
- pnlAssignments.getAcceptButton().setVisible(false);
- pnlAssignments.getCancelButton().setVisible(true);
- pnlAssignments.setAllowsReorderingValues(false);
-
- pnlAssignments.setInitialValues(currNames);
- pnlAssignments.setMinimumValuesAllowed(
- DeployPkgUtils.getInt("rp.minselected", 0)); //$NON-NLS-1$
- pnlAssignments.remove(pnlAssignments.getNavigationBar());
- pnlAssignments.getAvailableValuesHeader()
- .setText(
- DeployPkgUtils.getString(
- "rp.avail.hdr")); //$NON-NLS-1$
- pnlAssignments.getValuesHeader()
- .setText(
- DeployPkgUtils.getString(
- "rp.select.hdr")); //$NON-NLS-1$
- pnl.add(pnlAssignments);
-
- return pnl;
- }
-
-
- public List getSelectedServices() {
- return pnlAssignments.getValues();
- }
-
-
-}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationChangeEvent.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationChangeEvent.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationChangeEvent.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -28,8 +28,6 @@
import com.metamatrix.common.config.api.Configuration;
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.ServiceComponentDefn;
import com.metamatrix.common.config.api.VMComponentDefn;
@@ -205,19 +203,19 @@
* or an ancestor.
* @return the deployed PSC or <code>null</code>
*/
- public ProductServiceConfig getDeployedPsc() {
- ProductServiceConfig psc = null;
- if (isDeployedPscChange()) {
- psc = (ProductServiceConfig)getSource();
- }
- else {
- int index = getAncestorIndex(DEPLOYED_PSC);
- if (index != -1) {
- psc = (ProductServiceConfig)ancestors[index];
- }
- }
- return psc;
- }
+// public ProductServiceConfig getDeployedPsc() {
+// ProductServiceConfig psc = null;
+// if (isDeployedPscChange()) {
+// psc = (ProductServiceConfig)getSource();
+// }
+// else {
+// int index = getAncestorIndex(DEPLOYED_PSC);
+// if (index != -1) {
+// psc = (ProductServiceConfig)ancestors[index];
+// }
+// }
+// return psc;
+// }
/**
* Gets the deployed service if either a deployed service was the event
@@ -272,38 +270,38 @@
* Gets the product if either a product was the event source or an ancestor.
* @return the product or <code>null</code>
*/
- public ProductType getProduct() {
- ProductType product = null;
- if (isProductChange()) {
- product = (ProductType)getSource();
- }
- else {
- int index = getAncestorIndex(PRODUCT);
- if (index != -1) {
- product = (ProductType)ancestors[index];
- }
- }
- return product;
- }
+// public ProductType getProduct() {
+// ProductType product = null;
+// if (isProductChange()) {
+// product = (ProductType)getSource();
+// }
+// else {
+// int index = getAncestorIndex(PRODUCT);
+// if (index != -1) {
+// product = (ProductType)ancestors[index];
+// }
+// }
+// return product;
+// }
/**
* Gets the PSC definition if either a PSC definition was the event source
* or an ancestor.
* @return the PSC definition or <code>null</code>
*/
- public ProductServiceConfig getPscDefinition() {
- ProductServiceConfig psc = null;
- if (isPscDefinitionChange()) {
- psc = (ProductServiceConfig)getSource();
- }
- else {
- int index = getAncestorIndex(PSC_DEFN);
- if (index != -1) {
- psc = (ProductServiceConfig)ancestors[index];
- }
- }
- return psc;
- }
+// public ProductServiceConfig getPscDefinition() {
+// ProductServiceConfig psc = null;
+// if (isPscDefinitionChange()) {
+// psc = (ProductServiceConfig)getSource();
+// }
+// else {
+// int index = getAncestorIndex(PSC_DEFN);
+// if (index != -1) {
+// psc = (ProductServiceConfig)ancestors[index];
+// }
+// }
+// return psc;
+// }
/**
* Gets the service definition if either a service definition was the event
@@ -534,15 +532,16 @@
ancestors = theAncestors;
Object source = getSource();
- if (source instanceof ProductServiceConfig) {
- if (ancestors[0] instanceof ProductType) {
- type |= PSC_DEFN;
- }
- else {
- type |= DEPLOYED_PSC;
- }
- }
- else if (source instanceof ServiceComponentDefn) {
+// if (source instanceof ProductServiceConfig) {
+// if (ancestors[0] instanceof ProductType) {
+// type |= PSC_DEFN;
+// }
+// else {
+// type |= DEPLOYED_PSC;
+// }
+// }
+// else
+ if (source instanceof ServiceComponentDefn) {
type |= SERVICE_DEFN;
}
else if (source instanceof VMComponentDefn) {
@@ -551,9 +550,9 @@
else if (source instanceof Host) {
type |= HOST;
}
- else if (source instanceof ProductType) {
- type |= PRODUCT;
- }
+// else if (source instanceof ProductType) {
+// type |= PRODUCT;
+// }
else if (source instanceof Configuration) {
type |= CONFIGURATION;
}
@@ -572,39 +571,42 @@
if (isProcessChange()) {
index = 0;
}
- else if (isDeployedPscChange()) {
+// else if (isDeployedPscChange()) {
+// index = 1;
+// }
+ else if (isDeployedServiceChange()) {
index = 1;
}
- else if (isDeployedServiceChange()) {
- index = 2;
- }
}
- else if (theAncestorType == DEPLOYED_PSC) {
+ else if (theAncestorType == DEPLOYED_SERVICE) {
if (isDeployedServiceChange()) {
index = 0;
}
}
else if (theAncestorType == PROCESS) {
- if (isDeployedPscChange()) {
+// if (isDeployedPscChange()) {
+// index = 0;
+// }
+// else
+
+ if (isDeployedServiceChange()) {
index = 0;
}
- else if (isDeployedServiceChange()) {
- index = 1;
- }
}
- else if (theAncestorType == PRODUCT) {
- if (isPscDefinitionChange()) {
- index = 0;
- }
- else if (isServiceDefinitionChange()) {
- index = 1;
- }
- }
- else if (theAncestorType == PSC_DEFN) {
- if (isServiceDefinitionChange()) {
- index = 0;
- }
- }
+ // else if (theAncestorType == PRODUCT) {
+// if (isPscDefinitionChange()) {
+// index = 0;
+// }
+// else
+// if (isServiceDefinitionChange()) {
+// index = 0;
+// }
+// }
+// else if (theAncestorType == PSC_DEFN) {
+// if (isServiceDefinitionChange()) {
+// index = 0;
+// }
+// }
return index;
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationTreeModelEvent.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationTreeModelEvent.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/event/ConfigurationTreeModelEvent.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -24,10 +24,7 @@
package com.metamatrix.console.ui.views.deploy.event;
import com.metamatrix.common.config.api.Configuration;
-import com.metamatrix.common.config.api.ProductType;
import com.metamatrix.console.ui.views.deploy.model.ConfigurationTreeModel.HostWrapper;
-import com.metamatrix.console.ui.views.deploy.model.ConfigurationTreeModel.PscWrapper;
-
import com.metamatrix.toolbox.ui.widget.tree.DefaultTreeNode;
/**
@@ -94,10 +91,11 @@
Object[] ancestors = new Object[theAncestorNodes.length];
for (int i=0; i<theAncestorNodes.length; i++) {
Object ancestor = theAncestorNodes[i].getContent();
- if (ancestor instanceof PscWrapper) {
- ancestor = ((PscWrapper)ancestor).getPsc();
- }
- else if (ancestor instanceof HostWrapper) {
+// if (ancestor instanceof PscWrapper) {
+// ancestor = ((PscWrapper)ancestor).getPsc();
+// }
+// else
+ if (ancestor instanceof HostWrapper) {
ancestor = ((HostWrapper)ancestor).getHost();
}
ancestors[i] = ancestor;
@@ -270,15 +268,16 @@
ancestors = theAncestors;
Object source = getSource();
- if (source instanceof PscWrapper) {
- if (ancestors[0] instanceof ProductType) {
- type |= PSC_DEFN;
- }
- else {
- type |= DEPLOYED_PSC;
- }
- }
- else if (source instanceof HostWrapper) {
+// if (source instanceof PscWrapper) {
+// if (ancestors[0] instanceof ProductType) {
+// type |= PSC_DEFN;
+// }
+// else {
+// type |= DEPLOYED_PSC;
+// }
+// }
+// else
+ if (source instanceof HostWrapper) {
type |= HOST;
}
else {
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/model/ConfigurationTreeModel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -24,16 +24,18 @@
package com.metamatrix.console.ui.views.deploy.model;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import javax.swing.SwingUtilities;
+import com.metamatrix.common.config.api.ComponentDefn;
import com.metamatrix.common.config.api.Configuration;
+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.HostID;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.log.LogManager;
@@ -70,8 +72,8 @@
DeployPkgUtils.getString("dtm.deploymentshdrnode"); //$NON-NLS-1$
/** The text of all the PSC definitions header nodes. */
- public static final String PSC_DEFS_HDR =
- DeployPkgUtils.getString("dtm.pscdefshdrnode"); //$NON-NLS-1$
+// public static final String PSC_DEFS_HDR =
+// DeployPkgUtils.getString("dtm.pscdefshdrnode"); //$NON-NLS-1$
///////////////////////////////////////////////////////////////////////////
// FIELDS
@@ -81,20 +83,20 @@
private HashMap objNodeMap = new HashMap();
//key=ConfigurationID, value=DefaultTreeNode for Deployments Header
- private HashMap configDeployHdrMap = new HashMap();
+// private HashMap configDeployHdrMap = new HashMap();
//key=ConfigurationID, value=DefaultTreeNode for PSC Definitions Header
- private HashMap configPscDefHdrMap = new HashMap();
+ // private HashMap configPscDefHdrMap = new HashMap();
//key=hostID, value=HashMap (key=ConfigurationID, value=node-HostWrapper as content)
private HashMap hostConfigMap = new HashMap();
//key=ComponentTypeID of product, value=HashMap (key=ConfigurationID, value=DefaultTreeNode)
- private HashMap prodConfigMap = new HashMap();
+// private HashMap prodConfigMap = new HashMap();
// deployed pscs
//key=VMComponentDefnID, value=(key=ProductServiceConfig ID,value=node-PscWrapper)
- private HashMap procPscMap = new HashMap();
+ // private HashMap procPscMap = new HashMap();
// psc defns
//key=ProductServiceConfigID, value=(key=ConfigurationID, value=node-PscWrapper)
@@ -119,7 +121,32 @@
super(new DefaultTreeNode());
root = (DefaultTreeNode)getRoot();
+ System.out.println("root");
}
+
+ public void init(Configuration theConfig) {
+ addConfig(theConfig, false);
+ Collection objs = theConfig.getHosts();
+ for (Iterator<Host> it=objs.iterator(); it.hasNext();) {
+ Host h = (Host)it.next();
+ addDeloyedHost(h, theConfig, false);
+ Collection vms = theConfig.getVMsForHost((HostID)h.getID()) ;
+ for (Iterator<VMComponentDefn> vmit=vms.iterator(); vmit.hasNext();) {
+ VMComponentDefn vm = vmit.next();
+ this.addDeployedProcess(vm, h, theConfig, false);
+
+ Collection svcs = theConfig.getDeployedServicesForVM(vm);
+ for (Iterator<DeployedComponent> svcit=svcs.iterator(); svcit.hasNext();) {
+ DeployedComponent dep = svcit.next();
+ this.addDeployedService(dep, vm, h, theConfig, false);
+
+ }
+
+ }
+
+ }
+
+ }
///////////////////////////////////////////////////////////////////////////
// METHODS
@@ -129,27 +156,29 @@
* Adds a configuration node to the model.
* @param theConfig the user object of the configuration node being created
*/
- private void addConfig(Configuration theConfig) {
+ private void addConfig(Configuration theConfig, boolean fireevent) {
// create configuration node
SortableChildrenNode configNode = createNode(theConfig, root);
// add deployments header
- SortableChildrenNode deployHdrNode = new SortableChildrenNode(DEPLOYMENTS_HDR, theConfig);
- configNode.addChild(deployHdrNode);
- configDeployHdrMap.put(theConfig.getID(), deployHdrNode);
+// SortableChildrenNode deployHdrNode = new SortableChildrenNode(DEPLOYMENTS_HDR, theConfig);
+// configNode.addChild(deployHdrNode);
+// configDeployHdrMap.put(theConfig.getID(), deployHdrNode);
// add psc defs header
- SortableChildrenNode pscDefsHdrNode = new SortableChildrenNode(PSC_DEFS_HDR, theConfig);
- configNode.addChild(pscDefsHdrNode);
- configPscDefHdrMap.put(theConfig.getID(), pscDefsHdrNode);
+// SortableChildrenNode pscDefsHdrNode = new SortableChildrenNode(PSC_DEFS_HDR, theConfig);
+// configNode.addChild(pscDefsHdrNode);
+// configPscDefHdrMap.put(theConfig.getID(), pscDefsHdrNode);
// notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- configNode,
- configNode,
- null);
- fireConfigurationChange(event);
+ if (fireevent) {
+ ConfigurationTreeModelEvent event =
+ new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+ configNode,
+ configNode,
+ null);
+ fireConfigurationChange(event);
+ }
}
/**
@@ -171,12 +200,18 @@
public void addDeployedHost(
Host theHost,
Configuration theConfig) {
+
+ addDeloyedHost(theHost, theConfig, true);
+
+ }
+
+ private void addDeloyedHost(Host theHost, Configuration theConfig, boolean fireevent) {
DefaultTreeNode configNode = getUserObjectNode(theConfig);
- DefaultTreeNode deployHdrNode =
- (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
+// DefaultTreeNode deployHdrNode =
+// (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
DefaultTreeNode hostNode =
- createHostNode(theHost, theConfig, deployHdrNode);
+ createHostNode(theHost, theConfig, configNode);
HashMap map = (HashMap)hostConfigMap.get(theHost.getID());
if (map == null) {
// has not been deployed
@@ -186,12 +221,14 @@
map.put(theConfig.getID(), hostNode);
// notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- hostNode,
- configNode,
- new DefaultTreeNode[] {configNode});
- fireConfigurationChange(event);
+ if (fireevent) {
+ ConfigurationTreeModelEvent event =
+ new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+ hostNode,
+ configNode,
+ new DefaultTreeNode[] {configNode});
+ fireConfigurationChange(event);
+ }
}
/**
@@ -206,18 +243,27 @@
VMComponentDefn theProcess,
Host theHost,
Configuration theConfig) {
+ addDeployedProcess(theProcess, theHost, theConfig, true);
+ }
+
+ private void addDeployedProcess(VMComponentDefn theProcess,
+ Host theHost,
+ Configuration theConfig,
+ boolean fireevent) {
DefaultTreeNode configNode = getUserObjectNode(theConfig);
DefaultTreeNode hostNode = getHostNode(theHost, theConfig);
if (hostNode != null) {
DefaultTreeNode processNode = createNode(theProcess, hostNode);
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- processNode,
- configNode,
- new DefaultTreeNode[] {hostNode, configNode});
- fireConfigurationChange(event);
+ if (fireevent) {
+ ConfigurationTreeModelEvent event =
+ new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+ processNode,
+ configNode,
+ new DefaultTreeNode[] {hostNode, configNode});
+ fireConfigurationChange(event);
+ }
}
}
@@ -230,16 +276,16 @@
* @param theConfig the user object of the new node's configuration ancestor
* node
*/
- public void addDeployedPsc(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess,
- Host theHost,
- Configuration theConfig) {
+// public void addDeployedPsc(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess,
+// Host theHost,
+// Configuration theConfig) {
+//
+// // event fired by the createPscNode method
+// createPscNode(thePsc, theProcess, theHost, theConfig);
+// }
- // event fired by the createPscNode method
- createPscNode(thePsc, theProcess, theHost, theConfig);
- }
-
/**
* Adds a deployed service node to the model.
* @param theService the user object of the deployed service node being
@@ -249,63 +295,62 @@
* @param theConfig the user object of the new node's configuration ancestor
* node
*/
-/* public void addDeployedService(
- DeployedComponent theService,
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess,
- Host theHost,
- Configuration theConfig) {
+// public void addDeployedService(
+// DeployedComponent theService,
+// VMComponentDefn theProcess,
+// Host theHost,
+// Configuration theConfig) {
+//
+// DefaultTreeNode pscNode = getPscNode(thePsc, theProcess);
+// DefaultTreeNode serviceNode = createNode(theService, pscNode);
+// DefaultTreeNode processNode = serviceNode.getParent();
+// DefaultTreeNode hostNode = processNode.getParent();
+// DefaultTreeNode configNode = getUserObjectNode(theConfig);
+//
+// // notify tree model listeners
+// ConfigurationTreeModelEvent event =
+// new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+// serviceNode,
+// configNode,
+// new DefaultTreeNode[] {pscNode,
+// processNode,
+// hostNode,
+// configNode});
+// fireConfigurationChange(event);
+// }
- DefaultTreeNode pscNode = getPscNode(thePsc, theProcess);
- DefaultTreeNode serviceNode = createNode(theService, pscNode);
- DefaultTreeNode processNode = serviceNode.getParent();
- DefaultTreeNode hostNode = processNode.getParent();
- DefaultTreeNode configNode = getUserObjectNode(theConfig);
-
- // notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- serviceNode,
- configNode,
- new DefaultTreeNode[] {pscNode,
- processNode,
- hostNode,
- configNode});
- fireConfigurationChange(event);
- }
-*/
/**
* Adds a product node to the model.
* @param theProduct the user object of the product node being created
* @param theConfig the user object of the new node's configuration
* ancestor node
*/
- private void addProduct(
- ProductType theProduct,
- Configuration theConfig) {
+// private void addProduct(
+// ProductType theProduct,
+// Configuration theConfig) {
+//
+// DefaultTreeNode configNode = getUserObjectNode(theConfig);
+// DefaultTreeNode pscDefHdrNode =
+// (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
+// DefaultTreeNode productNode = createNode(theProduct, pscDefHdrNode);
+//
+// HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
+// if (map == null) {
+// // has no PSCs for any config
+// map = new HashMap();
+// prodConfigMap.put(theProduct.getID(), map);
+// }
+// map.put(theConfig.getID(), productNode);
+//
+// // notify tree model listeners
+// ConfigurationTreeModelEvent event =
+// new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+// productNode,
+// configNode,
+// new DefaultTreeNode[] {configNode});
+// fireConfigurationChange(event);
+// }
- DefaultTreeNode configNode = getUserObjectNode(theConfig);
- DefaultTreeNode pscDefHdrNode =
- (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
- DefaultTreeNode productNode = createNode(theProduct, pscDefHdrNode);
-
- HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
- if (map == null) {
- // has no PSCs for any config
- map = new HashMap();
- prodConfigMap.put(theProduct.getID(), map);
- }
- map.put(theConfig.getID(), productNode);
-
- // notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- productNode,
- configNode,
- new DefaultTreeNode[] {configNode});
- fireConfigurationChange(event);
- }
-
/**
* Adds a PSC definition node to the model.
* @param thePsc the user object of the PSC definition node being created
@@ -313,45 +358,60 @@
* @param theConfig the user object of the new node's configuration
* ancestor node
*/
- public void addPscDefn(
- ProductServiceConfig thePsc,
- ProductType theProduct,
- Configuration theConfig) {
+// public void addPscDefn(
+// ProductServiceConfig thePsc,
+// ProductType theProduct,
+// Configuration theConfig) {
+//
+// // event fired by the createPscNode method
+// createPscNode(thePsc, theProduct, theConfig);
+// }
- // event fired by the createPscNode method
- createPscNode(thePsc, theProduct, theConfig);
- }
-
/**
* Adds a service definition node to the model.
- * @param theService the user object of the service definition node
+ * @param theService the user object of the deployed service definition node
* being created
- * @param thePsc the user object of the new node's PSC definition
+ * @param theProcess the user object of the new node's VMComponentDefn
* ancestor node
- * @param theProduct the users object of the new node's product ancestor node
+ * @param theHost the users object of the new node's Host ancestor node
* @param theConfig the user object of the new node's configuration
* ancestor node
*/
- public void addServiceDefinition(
- ServiceComponentDefn theService,
- ProductServiceConfig thePsc,
- ProductType theProduct,
+ public void addDeployedService(
+ DeployedComponent theService,
+ VMComponentDefn theProcess,
+ Host theHost,
Configuration theConfig) {
+ addDeployedService(theService, theProcess, theHost, theConfig, true);
+ }
+
+ private void addDeployedService(
+ DeployedComponent theService,
+ VMComponentDefn theProcess,
+ Host theHost,
+ Configuration theConfig,
+ boolean fireevent) {
- DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
- DefaultTreeNode serviceNode = createNode(theService, pscNode);
- DefaultTreeNode productNode = serviceNode.getParent();
+ // DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
+
+ DefaultTreeNode processNode = getUserObjectNode(theProcess);
+
+ DefaultTreeNode serviceNode = createNode(theService, processNode);
+ DefaultTreeNode hostNode = getHostNode(theHost, theConfig);
+// DefaultTreeNode productNode = serviceNode.getParent();
DefaultTreeNode configNode = getUserObjectNode(theConfig);
// notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- serviceNode,
- configNode,
- new DefaultTreeNode[] {pscNode,
- productNode,
- configNode});
- fireConfigurationChange(event);
+ if (fireevent) {
+ ConfigurationTreeModelEvent event =
+ new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+ serviceNode,
+ configNode,
+ new DefaultTreeNode[] {processNode,
+ hostNode,
+ configNode});
+ fireConfigurationChange(event);
+ }
}
/**
@@ -366,7 +426,7 @@
if (theEvent.isNew()) {
if (theEvent.isConfigurationChange()) {
- addConfig(config);
+ addConfig(config, true);
}
else if (theEvent.isHostChange()) {
addDeployedHost(theEvent.getHost(), config);
@@ -376,20 +436,20 @@
theEvent.getHost(),
config);
}
- else if (theEvent.isPscDefinitionChange()) {
- addPscDefn(theEvent.getPscDefinition(),
- theEvent.getProduct(),
- config);
- }
- else if (theEvent.isDeployedPscChange()) {
- addDeployedPsc(theEvent.getDeployedPsc(),
+// else if (theEvent.isPscDefinitionChange()) {
+// addPscDefn(theEvent.getPscDefinition(),
+// theEvent.getProduct(),
+// config);
+// }
+ else if (theEvent.isDeployedServiceChange()) {
+ addDeployedService(theEvent.getDeployedService(),
theEvent.getProcess(),
theEvent.getHost(),
config);
}
- else if (theEvent.isProductChange()) {
- addProduct(theEvent.getProduct(), config);
- }
+// else if (theEvent.isProductChange()) {
+// addProduct(theEvent.getProduct(), config);
+// }
}
else if (theEvent.isDeleted()) {
if (theEvent.isHostChange()) {
@@ -400,13 +460,13 @@
theEvent.getHost(),
config);
}
- else if (theEvent.isPscDefinitionChange()) {
- deletePscDefintion(theEvent.getPscDefinition(),
- theEvent.getProduct(),
- config);
- }
- else if (theEvent.isDeployedPscChange()) {
- deleteDeployedPsc(theEvent.getDeployedPsc(),
+// else if (theEvent.isPscDefinitionChange()) {
+// deletePscDefintion(theEvent.getPscDefinition(),
+// theEvent.getProduct(),
+// config);
+// }
+ else if (theEvent.isDeployedServiceChange()) {
+ deleteDeployedService(theEvent.getDeployedService(),
theEvent.getProcess(),
theEvent.getHost(),
theEvent.getConfiguration());
@@ -421,15 +481,14 @@
theEvent.getHost(),
theEvent.getConfiguration());
}
- else if (theEvent.isPscDefinitionChange()) {
- modifyPscDefinition(theEvent.getPscDefinition(),
- theEvent.getProduct(),
- config);
+ else if (theEvent.isDeployedServiceChange()) {
+ modifyDeployedService(theEvent.getDeployedService(),
+ theEvent.getProcess(),
+ theEvent.getHost(),
+ theEvent.getConfiguration());
}
else if (theEvent.isServiceDefinitionChange()) {
modifyServiceDefintion(theEvent.getServiceDefinition(),
- theEvent.getPscDefinition(),
- theEvent.getProduct(),
config);
}
}
@@ -475,37 +534,37 @@
* @param theProduct the user object of the new node's parent node
* @param theConfig the user object of the new node's configuration node
*/
- private void createPscNode(
- ProductServiceConfig thePsc,
- ProductType theProduct,
- Configuration theConfig) {
+// private void createPscNode(
+// ProductServiceConfig thePsc,
+// ProductType theProduct,
+// Configuration theConfig) {
+//
+// PscWrapper wrapper = new PscWrapper(thePsc, theConfig);
+//
+// HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
+// DefaultTreeNode productNode =
+// (DefaultTreeNode)map.get(theConfig.getID());
+// DefaultTreeNode pscNode = createNode(wrapper, productNode);
+// DefaultTreeNode configNode = getUserObjectNode(theConfig);
+//
+// map = (HashMap)pscConfigMap.get(thePsc.getID());
+// if (map == null) {
+// // new psc
+// map = new HashMap();
+// pscConfigMap.put(thePsc.getID(), map);
+// }
+// map.put(theConfig.getID(), pscNode);
+//
+// // notify tree model listeners
+// ConfigurationTreeModelEvent event =
+// new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+// pscNode,
+// configNode,
+// new DefaultTreeNode[] {productNode,
+// configNode});
+// fireConfigurationChange(event);
+// }
- PscWrapper wrapper = new PscWrapper(thePsc, theConfig);
-
- HashMap map = (HashMap)prodConfigMap.get(theProduct.getID());
- DefaultTreeNode productNode =
- (DefaultTreeNode)map.get(theConfig.getID());
- DefaultTreeNode pscNode = createNode(wrapper, productNode);
- DefaultTreeNode configNode = getUserObjectNode(theConfig);
-
- map = (HashMap)pscConfigMap.get(thePsc.getID());
- if (map == null) {
- // new psc
- map = new HashMap();
- pscConfigMap.put(thePsc.getID(), map);
- }
- map.put(theConfig.getID(), pscNode);
-
- // notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- pscNode,
- configNode,
- new DefaultTreeNode[] {productNode,
- configNode});
- fireConfigurationChange(event);
- }
-
/**
* Creates a PSC tree node used for deployed PSCs.
* @param thePsc the user object of the new node
@@ -514,41 +573,41 @@
* @param theConfig the user object of the new node's configuration ancestor
* node
*/
- private void createPscNode(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess,
- Host theHost,
- Configuration theConfig) {
+// private void createPscNode(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess,
+// Host theHost,
+// Configuration theConfig) {
+//
+// PscWrapper wrapper = new PscWrapper(thePsc, theProcess);
+// DefaultTreeNode processNode = getUserObjectNode(theProcess);
+// if (processNode == null) {
+// return;
+// }
+//
+// DefaultTreeNode pscNode = createNode(wrapper, processNode);
+// DefaultTreeNode hostNode = pscNode.getParent();
+// DefaultTreeNode configNode = getUserObjectNode(theConfig);
+//
+// HashMap map = (HashMap)procPscMap.get(theProcess.getID());
+// if (map == null) {
+// // process doesn't have any PSCs yet
+// map = new HashMap();
+// procPscMap.put(theProcess.getID(), map);
+// }
+// map.put(thePsc.getID(), pscNode);
+//
+// // notify tree model listeners
+// ConfigurationTreeModelEvent event =
+// new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
+// pscNode,
+// configNode,
+// new DefaultTreeNode[] {processNode,
+// hostNode,
+// configNode});
+// fireConfigurationChange(event);
+// }
- PscWrapper wrapper = new PscWrapper(thePsc, theProcess);
- DefaultTreeNode processNode = getUserObjectNode(theProcess);
- if (processNode == null) {
- return;
- }
-
- DefaultTreeNode pscNode = createNode(wrapper, processNode);
- DefaultTreeNode hostNode = pscNode.getParent();
- DefaultTreeNode configNode = getUserObjectNode(theConfig);
-
- HashMap map = (HashMap)procPscMap.get(theProcess.getID());
- if (map == null) {
- // process doesn't have any PSCs yet
- map = new HashMap();
- procPscMap.put(theProcess.getID(), map);
- }
- map.put(thePsc.getID(), pscNode);
-
- // notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.NEW,
- pscNode,
- configNode,
- new DefaultTreeNode[] {processNode,
- hostNode,
- configNode});
- fireConfigurationChange(event);
- }
-
/**
* Deletes a host node from the model.
* @param theHost the user object of the host node being deleted
@@ -606,7 +665,7 @@
}
/**
- * Deletes a deployed PSC node from the model.
+ * Deletes a deployed Deployed Service node from the model.
* @param thePsc the user object of the deployed PSC node being created
* @param theProcess the user object of the deleted node's process
* ancestor node
@@ -614,26 +673,23 @@
* @param theConfig the user object of the deleted node's configuration
* ancestor node
*/
- public void deleteDeployedPsc(
- ProductServiceConfig thePsc,
+ public void deleteDeployedService(
+ DeployedComponent theService,
VMComponentDefn theProcess,
Host theHost,
Configuration theConfig) {
- DefaultTreeNode pscNode = getPscNode(thePsc, theProcess);
- DefaultTreeNode processNode = pscNode.getParent();
+ DefaultTreeNode serviceNode = getUserObjectNode(theService);
+
+ DefaultTreeNode processNode = serviceNode.getParent();
DefaultTreeNode hostNode = processNode.getParent();
DefaultTreeNode configNode = getUserObjectNode(theConfig);
- // delete from model
- removeUserObject(pscNode.getContent());
- HashMap map = (HashMap)procPscMap.get(theProcess.getID());
- map.remove(thePsc.getID());
// notify tree model listeners
ConfigurationTreeModelEvent event =
new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.DELETED,
- pscNode,
+ serviceNode,
configNode,
new DefaultTreeNode[] {processNode,
hostNode,
@@ -649,28 +705,28 @@
* @param theConfig the user object of the deleted node's configuration
* ancestor node
*/
- public void deletePscDefintion(
- ProductServiceConfig thePsc,
- ProductType theProduct,
- Configuration theConfig) {
+// public void deletePscDefintion(
+// ProductServiceConfig thePsc,
+// ProductType theProduct,
+// Configuration theConfig) {
+//
+// DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
+// DefaultTreeNode productNode = pscNode.getParent();
+// DefaultTreeNode configNode = getUserObjectNode(theConfig);
+//
+// // delete from model
+// removeUserObject(pscNode.getContent());
+//
+// // notify tree model listeners
+// ConfigurationTreeModelEvent event =
+// new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.DELETED,
+// pscNode,
+// configNode,
+// new DefaultTreeNode[] {productNode,
+// configNode});
+// fireConfigurationChange(event);
+// }
- DefaultTreeNode pscNode = getPscNode(thePsc, theConfig);
- DefaultTreeNode productNode = pscNode.getParent();
- DefaultTreeNode configNode = getUserObjectNode(theConfig);
-
- // delete from model
- removeUserObject(pscNode.getContent());
-
- // notify tree model listeners
- ConfigurationTreeModelEvent event =
- new ConfigurationTreeModelEvent(ConfigurationTreeModelEvent.DELETED,
- pscNode,
- configNode,
- new DefaultTreeNode[] {productNode,
- configNode});
- fireConfigurationChange(event);
- }
-
/**
* Notifies all registered {@link ConfigurationChangeListener}s that the
* tree model has changed.
@@ -692,9 +748,9 @@
* @param theConfig the configuration whose header node is being requested
* @return the deployments header node
*/
- public DefaultTreeNode getDeploymentsHeaderNode(Configuration theConfig) {
- return (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
- }
+// public DefaultTreeNode getDeploymentsHeaderNode(Configuration theConfig) {
+// return (DefaultTreeNode)configDeployHdrMap.get(theConfig.getID());
+// }
/**
* Gets the host node of the given configuration.
@@ -720,9 +776,9 @@
* @param theConfig the configuration whose header node is being requested
* @return the PSC definitions header node
*/
- public DefaultTreeNode getPscDefinitionsHeaderNode(Configuration theConfig) {
- return (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
- }
+// public DefaultTreeNode getPscDefinitionsHeaderNode(Configuration theConfig) {
+// return (DefaultTreeNode)configPscDefHdrMap.get(theConfig.getID());
+// }
/**
* Gets the requested PSC definition node.
@@ -730,28 +786,28 @@
* @param theConfig the user object of the PSC definition node's configuration
* ancestor node
*/
- public DefaultTreeNode getPscNode(
- ProductServiceConfig thePsc,
- Configuration theConfig) {
+// public DefaultTreeNode getPscNode(
+// ProductServiceConfig thePsc,
+// Configuration theConfig) {
+//
+// HashMap map = (HashMap)pscConfigMap.get(thePsc.getID());
+// return (DefaultTreeNode)map.get(theConfig.getID());
+// }
- HashMap map = (HashMap)pscConfigMap.get(thePsc.getID());
- return (DefaultTreeNode)map.get(theConfig.getID());
- }
-
/**
* Gets the requested deployed PSC node.
* @param thePsc the user object of the deployed PSC node
* @param theProcess the user object of the deployed PSC node's process
* ancestor node
*/
- public DefaultTreeNode getPscNode(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess) {
+// public DefaultTreeNode getPscNode(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess) {
+//
+// HashMap map = (HashMap)procPscMap.get(theProcess.getID());
+// return (DefaultTreeNode)map.get(thePsc.getID());
+// }
- HashMap map = (HashMap)procPscMap.get(theProcess.getID());
- return (DefaultTreeNode)map.get(thePsc.getID());
- }
-
/**
* Gets the requested user object's node.
* @param theUserObject the user object whose node is being requested
@@ -769,8 +825,9 @@
* <code>false</code> otherwise.
*/
public boolean isHeaderNode(DefaultTreeNode theNode) {
- return (isDeploymentsHeaderNode(theNode) ||
- isPscDefinitionsHeaderNode(theNode));
+ return (theNode == root);
+ // return (isDeploymentsHeaderNode(theNode));
+// || isPscDefinitionsHeaderNode(theNode));
}
/**
@@ -779,9 +836,9 @@
* @return <code>true</code> if the node is a deployments header node;
* <code>false</code> otherwise.
*/
- public boolean isDeploymentsHeaderNode(DefaultTreeNode theNode) {
- return configDeployHdrMap.containsValue(theNode);
- }
+// public boolean isDeploymentsHeaderNode(DefaultTreeNode theNode) {
+// return configDeployHdrMap.containsValue(theNode);
+// }
/**
* Indicates if the given node is a PSC definitions header node.
@@ -789,9 +846,9 @@
* @return <code>true</code> if the node is a PSC definitions header node;
* <code>false</code> otherwise.
*/
- public boolean isPscDefinitionsHeaderNode(DefaultTreeNode theNode) {
- return configPscDefHdrMap.containsValue(theNode);
- }
+// public boolean isPscDefinitionsHeaderNode(DefaultTreeNode theNode) {
+// return configPscDefHdrMap.containsValue(theNode);
+// }
/**
* Modifies a deployed host node in the model.
@@ -845,14 +902,14 @@
* @param theConfig the user object of the modified node's configuration
* ancestor node
*/
- public void modifyPscDefinition(
- ProductServiceConfig thePsc,
- ProductType theProduct,
- Configuration theConfig) {
+// public void modifyPscDefinition(
+// ProductServiceConfig thePsc,
+// ProductType theProduct,
+// Configuration theConfig) {
+//
+// // not sure if anything needs to be done here
+// }
- // not sure if anything needs to be done here
- }
-
/**
* Modifies a service definitions node in the model.
* @param theService the user object of the node being modified
@@ -865,24 +922,42 @@
*/
public void modifyServiceDefintion(
ServiceComponentDefn theService,
- ProductServiceConfig thePsc,
- ProductType theProduct,
Configuration theConfig) {
// not sure if anything needs to be done here
}
+
+ /**
+ * Modifies a service definitions node in the model.
+ * @param theService the user object of the node being modified
+ * @param thePsc the user object of the modified node's PSC definition
+ * ancestor node
+ * @param theProduct the user object of the modified node's product
+ * ancestor node
+ * @param theConfig the user object of the modified node's configuration
+ * ancestor node
+ */
+ public void modifyDeployedService(
+ DeployedComponent theService,
+ VMComponentDefn theProcess,
+ Host theHost,
+ Configuration theConfig) {
+
+ // not sure if anything needs to be done here
+ }
+
/**
* Clears all nodes and all caches.
*/
public void refresh() {
root.removeAllChildren();
objNodeMap.clear();
- configDeployHdrMap.clear();
- configPscDefHdrMap.clear();
+ // configDeployHdrMap.clear();
+ // configPscDefHdrMap.clear();
hostConfigMap.clear();
- prodConfigMap.clear();
- procPscMap.clear();
+ // prodConfigMap.clear();
+ // procPscMap.clear();
pscConfigMap.clear();
fireModelChangedEvent(this, root);
}
@@ -923,139 +998,139 @@
* The <code>PscWrapper</code> class wraps a {@link ProductServiceConfig} so
* that PSC definitions and deployed PSCs can be distinguished.
*/
- public class PscWrapper {
+// public class PscWrapper {
+//
+// ///////////////////////////////////////////////////////////////////////
+// // FIELDS
+// ///////////////////////////////////////////////////////////////////////
+//
+// private ProductServiceConfig psc;
+// private VMComponentDefn proc;
+// private Configuration config;
+//
+// ///////////////////////////////////////////////////////////////////////
+// // CONSTRUCTORS
+// ///////////////////////////////////////////////////////////////////////
+//
+// /**
+// * Constructs a <code>PscWrapper</code> that wraps a deployed PSC.
+// * @param thePsc the user object of the deployed PSC
+// * @param theProcess the user object of the deployed PSC's process
+// */
+// public PscWrapper(
+// ProductServiceConfig thePsc,
+// VMComponentDefn theProcess) {
+//
+// psc = thePsc;
+// proc = theProcess;
+// }
+//
+// /**
+// * Constructs a <code>PscWrapper</code> that wraps a PSC definition.
+// * @param thePsc the user object of the deployed PSC
+// * @param theConfig the user object of the deployed PSC's configuration
+// */
+// public PscWrapper(
+// ProductServiceConfig thePsc,
+// Configuration theConfig) {
+//
+// psc = thePsc;
+// config = theConfig;
+// }
+//
+// ///////////////////////////////////////////////////////////////////////
+// // METHODS
+// ///////////////////////////////////////////////////////////////////////
+//
+// /**
+// * Indicates if the given input parameter is equal to this object.
+// * @param theObject the object being compared
+// * @return <code>true</code> if equal; <code>false</code> otherwise.
+// */
+// public boolean equals(Object theObject) {
+// if (theObject instanceof PscWrapper) {
+// PscWrapper otherObj = (PscWrapper)theObject;
+// if (psc.equals(otherObj.getPsc())) {
+// if (isDefinition() == otherObj.isDefinition()) {
+// if (isDefinition()) {
+// return (config.equals(otherObj.getConfig()));
+// }
+// return (proc.equals(otherObj.getProcess()));
+// }
+// }
+// return false;
+//
+// }
+// return false;
+// }
+//
+// /**
+// * Gets the associated configuration. Only used if wrapping a PSC
+// * definition.
+// * @return the associated configuration of the PSC definition or
+// * <code>null</code> if wrapping a deployed PSC.
+// */
+// public Configuration getConfig() {
+// return config;
+// }
+//
+// /**
+// * Gets the associated process. Only used if wrapping a deployed PSC.
+// * @return the associated process of the deployed PSC or
+// * <code>null</code> if wrapping a PSC definition.
+// */
+// public VMComponentDefn getProcess() {
+// return proc;
+// }
+//
+// /**
+// * Gets the wrapped PSC object.
+// * @return the wrapped PSC object
+// */
+// public ProductServiceConfig getPsc() {
+// return psc;
+// }
+//
+// /**
+// * Indicates if this object wraps a PSC definition.
+// * @return <code>true</code> if this object wraps a PSC definition;
+// * <code>false</code> otherwise.
+// */
+// public boolean isDefinition() {
+// return (config != null);
+// }
+//
+// /**
+// * Indicates if this object wraps a deployed PSC.
+// * @return <code>true</code> if this object wraps a deployed PSC;
+// * <code>false</code> otherwise.
+// */
+// public boolean isDeployed() {
+// return (proc != null);
+// }
+//
+// /**
+// * Gets a hash code value.
+// * @return a hash code value
+// */
+// public int hashCode() {
+// int result = psc.hashCode();
+// if (isDefinition()) {
+// return result + config.hashCode();
+// }
+// return result + proc.hashCode();
+// }
+//
+// /**
+// * Gets this object's string representation which is it's associated
+// * {@link ProductServiceConfig}'s <code>toString</code>.
+// * @return the string representation
+// */
+// public String toString() {
+// return psc.toString();
+// }
+// }
- ///////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////
-
- private ProductServiceConfig psc;
- private VMComponentDefn proc;
- private Configuration config;
-
- ///////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////
-
- /**
- * Constructs a <code>PscWrapper</code> that wraps a deployed PSC.
- * @param thePsc the user object of the deployed PSC
- * @param theProcess the user object of the deployed PSC's process
- */
- public PscWrapper(
- ProductServiceConfig thePsc,
- VMComponentDefn theProcess) {
-
- psc = thePsc;
- proc = theProcess;
- }
-
- /**
- * Constructs a <code>PscWrapper</code> that wraps a PSC definition.
- * @param thePsc the user object of the deployed PSC
- * @param theConfig the user object of the deployed PSC's configuration
- */
- public PscWrapper(
- ProductServiceConfig thePsc,
- Configuration theConfig) {
-
- psc = thePsc;
- config = theConfig;
- }
-
- ///////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////
-
- /**
- * Indicates if the given input parameter is equal to this object.
- * @param theObject the object being compared
- * @return <code>true</code> if equal; <code>false</code> otherwise.
- */
- public boolean equals(Object theObject) {
- if (theObject instanceof PscWrapper) {
- PscWrapper otherObj = (PscWrapper)theObject;
- if (psc.equals(otherObj.getPsc())) {
- if (isDefinition() == otherObj.isDefinition()) {
- if (isDefinition()) {
- return (config.equals(otherObj.getConfig()));
- }
- return (proc.equals(otherObj.getProcess()));
- }
- }
- return false;
-
- }
- return false;
- }
-
- /**
- * Gets the associated configuration. Only used if wrapping a PSC
- * definition.
- * @return the associated configuration of the PSC definition or
- * <code>null</code> if wrapping a deployed PSC.
- */
- public Configuration getConfig() {
- return config;
- }
-
- /**
- * Gets the associated process. Only used if wrapping a deployed PSC.
- * @return the associated process of the deployed PSC or
- * <code>null</code> if wrapping a PSC definition.
- */
- public VMComponentDefn getProcess() {
- return proc;
- }
-
- /**
- * Gets the wrapped PSC object.
- * @return the wrapped PSC object
- */
- public ProductServiceConfig getPsc() {
- return psc;
- }
-
- /**
- * Indicates if this object wraps a PSC definition.
- * @return <code>true</code> if this object wraps a PSC definition;
- * <code>false</code> otherwise.
- */
- public boolean isDefinition() {
- return (config != null);
- }
-
- /**
- * Indicates if this object wraps a deployed PSC.
- * @return <code>true</code> if this object wraps a deployed PSC;
- * <code>false</code> otherwise.
- */
- public boolean isDeployed() {
- return (proc != null);
- }
-
- /**
- * Gets a hash code value.
- * @return a hash code value
- */
- public int hashCode() {
- int result = psc.hashCode();
- if (isDefinition()) {
- return result + config.hashCode();
- }
- return result + proc.hashCode();
- }
-
- /**
- * Gets this object's string representation which is it's associated
- * {@link ProductServiceConfig}'s <code>toString</code>.
- * @return the string representation
- */
- public String toString() {
- return psc.toString();
- }
- }
-
///////////////////////////////////////////////////////////////////////////
// HostWrapper INNER CLASS
///////////////////////////////////////////////////////////////////////////
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/deploy/util/DeployPkgUtils.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -35,10 +35,9 @@
import javax.swing.border.EmptyBorder;
import com.metamatrix.common.config.api.Configuration;
+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.ProductType;
import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
import com.metamatrix.common.config.api.VMComponentDefn;
@@ -57,289 +56,241 @@
* @version 1.0
* @author Dan Florian
*/
-public final class DeployPkgUtils
- implements PropertyConstants {
+public final class DeployPkgUtils implements PropertyConstants {
- ///////////////////////////////////////////////////////////////////////////
- // CONSTANTS
- ///////////////////////////////////////////////////////////////////////////
+ // /////////////////////////////////////////////////////////////////////////
+ // CONSTANTS
+ // /////////////////////////////////////////////////////////////////////////
- public static final String PROPS =
- "com/metamatrix/console/ui/views/deploy/data/ui";
+ public static final String PROPS = "com/metamatrix/console/ui/views/deploy/data/ui";
- public static final EmptyBorder EMPTY_BORDER;
+ public static final EmptyBorder EMPTY_BORDER;
- public static final String[] DEPLOY_HDRS;
- public static final int HOST_COL = 0;
- public static final int PROCESS_COL = 1;
- public static final int DEPLOY_PROD_COL =2;
- public static final int DEPLOY_PSC_COL =3;
+ public static final String[] DEPLOY_HDRS;
+ public static final int HOST_COL = 0;
+ public static final int PROCESS_COL = 1;
+// public static final int DEPLOY_SVC_COL = 2;
- public static final String[] PSC_SERV_DEF_HDRS;
- public static final int PRODUCT_COL = 0;
- public static final int PSC_COL = 1;
- public static final int SERV_COL = 2;
- public static final int ENABLED_COL = 3;
- public static final int ESSENTIAL_COL = 4;
+ public static final String[] SERV_DEF_HDRS;
+// public static final int VM_COL = 0;
+ public static final int SERV_COL = 0;
+ public static final int ENABLED_COL = 1;
+ public static final int ESSENTIAL_COL = 2;
- /** Key for UserPreferences file for last import/export directory. */
-// public static final String LAST_DIR =
-// "metamatrix.console.lastconfigdirectory";
+ /** Key for UserPreferences file for last import/export directory. */
+ // public static final String LAST_DIR =
+ // "metamatrix.console.lastconfigdirectory";
+ // /////////////////////////////////////////////////////////////////////////
+ // FIELDS
+ // /////////////////////////////////////////////////////////////////////////
+ private static PropertyProvider propProvider;
- ///////////////////////////////////////////////////////////////////////////
- // FIELDS
- ///////////////////////////////////////////////////////////////////////////
+ // /////////////////////////////////////////////////////////////////////////
+ // INITIALIZER
+ // /////////////////////////////////////////////////////////////////////////
- private static PropertyProvider propProvider;
+ static {
+ // first setup property provider
+ ArrayList propFiles = new ArrayList();
+ propFiles.add(PROPS);
+ propFiles.add(PropertyProvider.COMMON_PROP);
+ propFiles.add(GuiComponentFactory.TYPE_DEFS_PROP);
+ propProvider = new PropertyProvider(propFiles);
- ///////////////////////////////////////////////////////////////////////////
- // INITIALIZER
- ///////////////////////////////////////////////////////////////////////////
+ int inset = getInt("emptyinsets", 10);
+ EMPTY_BORDER = new EmptyBorder(inset, inset, inset, inset);
- static {
- // first setup property provider
- ArrayList propFiles = new ArrayList();
- propFiles.add(PROPS);
- propFiles.add(PropertyProvider.COMMON_PROP);
- propFiles.add(GuiComponentFactory.TYPE_DEFS_PROP);
- propProvider = new PropertyProvider(propFiles);
+ DEPLOY_HDRS = new String[2];
+ DEPLOY_HDRS[HOST_COL] = getString("dpu.deployedhost.hdr");
+ DEPLOY_HDRS[PROCESS_COL] = getString("dpu.deployedprocess.hdr");
+ // DEPLOY_HDRS[DEPLOY_SVC_COL] = getString("dpu.deployedsvc.hdr");
- int inset = getInt("emptyinsets", 10);
- EMPTY_BORDER = new EmptyBorder(inset, inset, inset, inset);
+ SERV_DEF_HDRS = new String[3];
+// SERV_DEF_HDRS[VM_COL] = getString("dpu.vm.hdr");
+ SERV_DEF_HDRS[SERV_COL] = getString("dpu.service.hdr");
+ SERV_DEF_HDRS[ENABLED_COL] = getString("dpu.enabled.hdr");
+ SERV_DEF_HDRS[ESSENTIAL_COL] = getString("dpu.essential.hdr");
- DEPLOY_HDRS = new String[4];
- DEPLOY_HDRS[HOST_COL] = getString("dpu.deployedhost.hdr");
- DEPLOY_HDRS[PROCESS_COL] = getString("dpu.deployedprocess.hdr");
- DEPLOY_HDRS[DEPLOY_PROD_COL] = getString("dpu.deployedproduct.hdr");
- DEPLOY_HDRS[DEPLOY_PSC_COL] = getString("dpu.deployedpsc.hdr");
+ }
- PSC_SERV_DEF_HDRS = new String[5];
- PSC_SERV_DEF_HDRS[PRODUCT_COL] = getString("dpu.product.hdr");
- PSC_SERV_DEF_HDRS[PSC_COL] = getString("dpu.psc.hdr");
- PSC_SERV_DEF_HDRS[SERV_COL] = getString("dpu.service.hdr");
- PSC_SERV_DEF_HDRS[ENABLED_COL] = getString("dpu.enabled.hdr");
- PSC_SERV_DEF_HDRS[ESSENTIAL_COL] = getString("dpu.essential.hdr");
+ // /////////////////////////////////////////////////////////////////////////
+ // CONSTRUCTORS
+ // /////////////////////////////////////////////////////////////////////////
- }
+ /** Don't allow no arg construction. */
+ private DeployPkgUtils() {
+ }
- ///////////////////////////////////////////////////////////////////////////
- // CONSTRUCTORS
- ///////////////////////////////////////////////////////////////////////////
+ // /////////////////////////////////////////////////////////////////////////
+ // METHODS
+ // /////////////////////////////////////////////////////////////////////////
- /** Don't allow no arg construction.*/
- private DeployPkgUtils() {}
+ public static LabelWidget createLabel(String theStringId) {
+ String value = getString(theStringId);
+ return new LabelWidget(value);
+ }
- ///////////////////////////////////////////////////////////////////////////
- // METHODS
- ///////////////////////////////////////////////////////////////////////////
+ public static TextFieldWidget createTextField(String theType) {
+ return GuiComponentFactory.createTextField(theType);
+ }
+ public static boolean getBoolean(String theKey) {
+ return propProvider.getBoolean(theKey);
+ }
- public static LabelWidget createLabel(String theStringId) {
- String value = getString(theStringId);
- return new LabelWidget(value);
- }
+ public static Icon getIcon(String theKey) {
+ return propProvider.getIcon(theKey);
+ }
- public static TextFieldWidget createTextField(String theType) {
- return GuiComponentFactory.createTextField(theType);
- }
+ public static int getInt(String theKey, int theDefault) {
- public static boolean getBoolean(String theKey) {
- return propProvider.getBoolean(theKey);
- }
+ return propProvider.getInt(theKey, theDefault);
+ }
- public static Icon getIcon(String theKey) {
- return propProvider.getIcon(theKey);
- }
+ public static int getMnemonic(String theKey) {
+ String key = propProvider.getString(theKey, true);
+ return (key == null) ? 0 : (int) key.charAt(0);
+ }
- public static int getInt(
- String theKey,
- int theDefault) {
+ public static Object getObject(String theKey) {
+ return propProvider.getObject(theKey);
+ }
- return propProvider.getInt(theKey, theDefault);
- }
+ public static String getString(String theKey) {
+ return propProvider.getString(theKey);
+ }
- public static int getMnemonic(String theKey) {
- String key = propProvider.getString(theKey, true);
- return (key == null) ? 0 : (int)key.charAt(0);
- }
+ public static String getString(String theKey, boolean theReturnNullFlag) {
- public static Object getObject(String theKey) {
- return propProvider.getObject(theKey);
- }
+ return propProvider.getString(theKey, theReturnNullFlag);
+ }
- public static String getString(String theKey) {
- return propProvider.getString(theKey);
- }
+ public static String getString(String theKey, Object[] theArgs) {
- public static String getString(
- String theKey,
- boolean theReturnNullFlag) {
+ return propProvider.getString(theKey, theArgs);
+ }
- return propProvider.getString(theKey, theReturnNullFlag);
- }
+ /**
+ * Compares to strings with <code>null</code> and the empty string being
+ * equal.
+ *
+ * @param theOne
+ * the first string being compared
+ * @param theOther
+ * the second string being compared
+ * @return <code>true</code> if both strings are equivalent
+ */
+ public static boolean equivalent(String theOne, String theOther) {
- public static String getString(
- String theKey,
- Object[] theArgs) {
+ boolean result = true;
+ if ((theOne == null) || (theOne.length() == 0)) {
+ if ((theOther != null) && (theOther.length() > 0)) {
+ result = false;
+ }
+ } else {
+ if ((theOther == null) || (theOther.length() == 0)) {
+ result = false;
+ } else {
+ result = theOne.equals(theOther);
+ }
+ }
+ return result;
+ }
- return propProvider.getString(theKey, theArgs);
- }
+ public static void loadProcesses(Configuration theConfiguration,
+ DefaultTableModel theModel, ConnectionInfo connection)
+ throws ExternalException {
- /**
- * Compares to strings with <code>null</code> and the empty string
- * being equal.
- * @param theOne the first string being compared
- * @param theOther the second string being compared
- * @return <code>true</code> if both strings are equivalent
- */
- public static boolean equivalent(
- String theOne,
- String theOther) {
+ // populate deployments table
+ theModel.setNumRows(0);
+ ConfigurationManager configMgr = ModelManager
+ .getConfigurationManager(connection);
+ Collection hosts = theConfiguration.getHosts();
+ // configMgr.getHosts((ConfigurationID) theConfiguration.getID());
+ if (hosts != null) {
+ Iterator hostItr = hosts.iterator();
+ while (hostItr.hasNext()) {
+ Host host = (Host) hostItr.next();
+ Collection procs = theConfiguration.getVMsForHost((HostID) host
+ .getID());
+ if (procs != null) {
+ Iterator procItr = procs.iterator();
+ while (procItr.hasNext()) {
+ VMComponentDefn process = (VMComponentDefn) procItr
+ .next();
+ Vector row = new Vector(DEPLOY_HDRS.length);
+ row.setSize(DEPLOY_HDRS.length);
+ row.setElementAt(host, HOST_COL);
+ row.setElementAt(process, PROCESS_COL);
+ // row.setElementAt(product, DEPLOY_PROD_COL);
+ theModel.addRow(row);
- boolean result = true;
- if ((theOne == null) || (theOne.length() == 0)) {
- if ((theOther != null) && (theOther.length() > 0)) {
- result = false;
- }
- }
- else {
- if ((theOther == null) || (theOther.length() == 0)) {
- result = false;
- }
- else {
- result = theOne.equals(theOther);
- }
- }
- return result;
- }
+ }
+ }
+ }
+ }
+ }
- public static void loadDeployments(
- Configuration theConfiguration,
- DefaultTableModel theModel,
- ConnectionInfo connection)
- throws ExternalException {
+ public static void loadServiceDefintions(Configuration theConfiguration,
+ DefaultTableModel theModel, ConnectionInfo connection)
+ throws ExternalException {
- // populate deployments table
- theModel.setNumRows(0);
- ConfigurationManager configMgr =
- ModelManager.getConfigurationManager(connection);
- Collection hosts = theConfiguration.getHosts();
- //configMgr.getHosts((ConfigurationID) theConfiguration.getID());
- if (hosts != null) {
- Iterator hostItr = hosts.iterator();
- while (hostItr.hasNext()) {
- Host host = (Host)hostItr.next();
- Collection procs = theConfiguration.getVMsForHost((HostID)host.getID());
- if (procs != null) {
- Iterator procItr = procs.iterator();
- while (procItr.hasNext()) {
- VMComponentDefn process = (VMComponentDefn)procItr.next();
- Collection pscs = theConfiguration.getPSCsForVM(process);
- //configMgr.getDeployedPscs(process);
- if (pscs != null) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)pscItr.next();
- ProductType product = configMgr.getProduct(psc);
- Vector row = new Vector(DEPLOY_HDRS.length);
- row.setSize(DEPLOY_HDRS.length);
- row.setElementAt(host, HOST_COL);
- row.setElementAt(process, PROCESS_COL);
- row.setElementAt(product, DEPLOY_PROD_COL);
- row.setElementAt(psc, DEPLOY_PSC_COL);
- theModel.addRow(row);
- }
- }
+ theModel.setNumRows(0);
+ // ConfigurationManager configMgr =
+ // ModelManager.getConfigurationManager(connection);
- }
- }
- }
- }
- }
-
-
+ Collection depcomps = theConfiguration.getDeployedComponents();
+ if (depcomps != null) {
+ Iterator svcItr = depcomps.iterator();
+ while (svcItr.hasNext()) {
+ DeployedComponent dsvc = (DeployedComponent) svcItr.next();
+ if (dsvc.isDeployedConnector() || dsvc.isDeployedService()) {
+ Host host = theConfiguration.getHost(dsvc.getHostID()
+ .getName());
+ VMComponentDefn process = theConfiguration
+ .getVMComponentDefn(dsvc.getVMComponentDefnID());
- public static void loadPscServiceDefintions(
- Configuration theConfiguration,
- DefaultTableModel theModel,
- ConnectionInfo connection)
- throws ExternalException {
+ Vector row = new Vector(SERV_DEF_HDRS.length);
+ row.setSize(SERV_DEF_HDRS.length);
+ row.setElementAt(dsvc, SERV_COL);
- theModel.setNumRows(0);
- ConfigurationManager configMgr =
- ModelManager.getConfigurationManager(connection);
- Collection prods = configMgr.getProducts();
- if (prods != null) {
- Iterator prodItr = prods.iterator();
- while (prodItr.hasNext()) {
- ProductType prod = (ProductType)prodItr.next();
- Collection pscs =
- configMgr.getPscDefinitions(prod, theConfiguration);
- if (pscs != null) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- ProductServiceConfig psc =
- (ProductServiceConfig)pscItr.next();
- Collection services =
- configMgr.getServiceDefinitions(
- psc, theConfiguration);
- if (services != null) {
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- ServiceComponentDefn service =
- (ServiceComponentDefn)servItr.next();
- Vector row = new Vector(PSC_SERV_DEF_HDRS.length);
- row.setSize(PSC_SERV_DEF_HDRS.length);
- row.setElementAt(prod, PRODUCT_COL);
- row.setElementAt(psc, PSC_COL);
- row.setElementAt(service, SERV_COL);
-
- ServiceComponentDefnID svcID = (ServiceComponentDefnID) service.getID();
-
- if (!psc.containsService(svcID)) {
- throw new IllegalArgumentException("Service " + svcID + " not contained in PSC " + psc.getName());
- }
-
- Boolean enabled = new Boolean(psc.isServiceEnabled( (ServiceComponentDefnID) service.getID() ) );
+ ServiceComponentDefnID svcID = (ServiceComponentDefnID) dsvc.getServiceComponentDefnID();
-// Boolean enabled = new Boolean(service.isEnabled());
- row.setElementAt(enabled, ENABLED_COL);
- row.setElementAt(
- new Boolean(service.getProperty(ESSENTIAL_PROP)),
- ESSENTIAL_COL);
- theModel.addRow(row);
- }
- }
- }
- }
- }
- }
- }
+ ServiceComponentDefn svc = theConfiguration
+ .getServiceComponentDefn(dsvc
+ .getServiceComponentDefnID());
- public static DefaultTableModel setup(
- TableWidget theTable,
- String[] theHeaders,
- int theVisibleRows,
- final int[] theEditableColumns) {
+ row.setElementAt(new Boolean(dsvc.isEnabled()), ENABLED_COL);
+ row.setElementAt(new Boolean(svc.isEssential()),
+ ESSENTIAL_COL);
+ theModel.addRow(row);
- DefaultTableModel model = (DefaultTableModel)theTable.getModel();
- model.setColumnIdentifiers(theHeaders);
- theTable.setEditable(false);
- if (theEditableColumns != null) {
- for (int i=0;
- i<theEditableColumns.length;
- theTable.setColumnEditable(theEditableColumns[i++], true)) {
-
- }
- }
- theTable.setPreferredScrollableViewportSize(
- new Dimension(theTable.getPreferredSize().width,
- theVisibleRows*theTable.getRowHeight()));
- theTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- theTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
- theTable.setSortable(true);
- return model;
- }
+ }
+ }
+ }
+ }
+
+ public static DefaultTableModel setup(TableWidget theTable,
+ String[] theHeaders, int theVisibleRows,
+ final int[] theEditableColumns) {
+
+ DefaultTableModel model = (DefaultTableModel) theTable.getModel();
+ model.setColumnIdentifiers(theHeaders);
+ theTable.setEditable(false);
+ if (theEditableColumns != null) {
+ for (int i = 0; i < theEditableColumns.length; theTable
+ .setColumnEditable(theEditableColumns[i++], true)) {
+
+ }
+ }
+ theTable.setPreferredScrollableViewportSize(new Dimension(theTable
+ .getPreferredSize().width, theVisibleRows
+ * theTable.getRowHeight()));
+ theTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ theTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+ theTable.setSortable(true);
+ return model;
+ }
+
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/ProcessMgmtPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/ProcessMgmtPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/ProcessMgmtPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -63,8 +63,8 @@
private static final int PROC_COL = 0;
private static final int ID_COL = 1;
private static final int REGISTERED_COL = 2;
- private static final int NUM_REG_PSC_COL = 3;
- private static final int NUM_NOT_REG_PSC_COL = 4;
+ private static final int NUM_REG_SVC_COL = 3;
+ private static final int NUM_NOT_REG_SVC_COL = 4;
///////////////////////////////////////////////////////////////////////////
// INITIALIZER
@@ -75,8 +75,8 @@
HDRS[PROC_COL] = RuntimeMgmtUtils.getString("pm.proc.hdr"); //$NON-NLS-1$
HDRS[ID_COL] = RuntimeMgmtUtils.getString("pm.id.hdr"); //$NON-NLS-1$
HDRS[REGISTERED_COL] = RuntimeMgmtUtils.getString("pm.registered.hdr"); //$NON-NLS-1$
- HDRS[NUM_REG_PSC_COL] = RuntimeMgmtUtils.getString("pm.numregisteredpscs.hdr"); //$NON-NLS-1$
- HDRS[NUM_NOT_REG_PSC_COL] = RuntimeMgmtUtils.getString("pm.numnotregisteredpscs.hdr"); //$NON-NLS-1$
+ HDRS[NUM_REG_SVC_COL] = RuntimeMgmtUtils.getString("pm.numregisteredservices.hdr"); //$NON-NLS-1$
+ HDRS[NUM_NOT_REG_SVC_COL] = RuntimeMgmtUtils.getString("pm.numnotregisteredservices.hdr"); //$NON-NLS-1$
}
///////////////////////////////////////////////////////////////////////////
@@ -165,9 +165,9 @@
row.setElementAt(process, PROC_COL);
row.setElementAt(process.getName(), ID_COL);
row.setElementAt(new Boolean(process.isRegistered()), REGISTERED_COL);
- Integer[] counts = manager.getPscCounts(process);
- row.setElementAt(counts[0], NUM_REG_PSC_COL);
- row.setElementAt(counts[1], NUM_NOT_REG_PSC_COL);
+ Integer[] counts = manager.getServiceCounts(process);
+ row.setElementAt(counts[0], NUM_REG_SVC_COL);
+ row.setElementAt(counts[1], NUM_NOT_REG_SVC_COL);
tblModel.addRow(row);
}
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeMgmtPanel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeMgmtPanel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeMgmtPanel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -83,7 +83,6 @@
import com.metamatrix.console.util.StaticTreeUtilities;
import com.metamatrix.console.util.StaticUtilities;
import com.metamatrix.platform.admin.api.runtime.HostData;
-import com.metamatrix.platform.admin.api.runtime.PSCData;
import com.metamatrix.platform.admin.api.runtime.ProcessData;
import com.metamatrix.platform.admin.api.runtime.ServiceData;
import com.metamatrix.toolbox.ui.widget.DialogWindow;
@@ -613,8 +612,8 @@
getRuntimeMgmtManager().startService((ServiceData)userObj);
} else if (userObj instanceof ProcessData) {
getRuntimeMgmtManager().startProcess((ProcessData)userObj);
- } else if (userObj instanceof PSCData) {
- getRuntimeMgmtManager().startPsc((PSCData)userObj);
+// } else if (userObj instanceof PSCData) {
+// getRuntimeMgmtManager().startPsc((PSCData)userObj);
} else if (userObj instanceof HostData) {
getRuntimeMgmtManager().startHost((HostData)userObj);
}
@@ -640,9 +639,9 @@
}
}
titleId = "dlg.stopprocess.title"; //$NON-NLS-1$
- } else if (userObj instanceof PSCData) {
- msgId = "dlg.stoppsc.msg"; //$NON-NLS-1$
- titleId = "dlg.stoppsc.title"; //$NON-NLS-1$
+// } else if (userObj instanceof PSCData) {
+// msgId = "dlg.stoppsc.msg"; //$NON-NLS-1$
+// titleId = "dlg.stoppsc.title"; //$NON-NLS-1$
} else if (userObj instanceof HostData) {
if (procsTblModel.getRowCount() == 1) {
msgId = "dlg.stoponlyhost.msg"; //$NON-NLS-1$
@@ -663,8 +662,8 @@
getRuntimeMgmtManager().stopService((ServiceData)userObj);
} else if (userObj instanceof ProcessData) {
getRuntimeMgmtManager().stopProcess((ProcessData)userObj);
- } else if (userObj instanceof PSCData) {
- getRuntimeMgmtManager().stopPsc((PSCData)userObj);
+// } else if (userObj instanceof PSCData) {
+// getRuntimeMgmtManager().stopPsc((PSCData)userObj);
} else if (userObj instanceof HostData) {
getRuntimeMgmtManager().stopHost((HostData)userObj);
}
@@ -693,9 +692,9 @@
}
}
titleId = "dlg.stopnowprocess.title"; //$NON-NLS-1$
- } else if (userObj instanceof PSCData) {
- msgId = "dlg.stopnowpsc.msg"; //$NON-NLS-1$
- titleId = "dlg.stopnowpsc.title"; //$NON-NLS-1$
+// } else if (userObj instanceof PSCData) {
+// msgId = "dlg.stopnowpsc.msg"; //$NON-NLS-1$
+// titleId = "dlg.stopnowpsc.title"; //$NON-NLS-1$
} else if (userObj instanceof HostData) {
if (procsTblModel.getRowCount() == 1) {
msgId = "dlg.stopnowonlyhost.msg"; //$NON-NLS-1$
@@ -717,8 +716,8 @@
getRuntimeMgmtManager().stopServiceNow((ServiceData)userObj);
} else if (userObj instanceof ProcessData) {
getRuntimeMgmtManager().stopProcessNow((ProcessData)userObj);
- } else if (userObj instanceof PSCData) {
- getRuntimeMgmtManager().stopPscNow((PSCData)userObj);
+// } else if (userObj instanceof PSCData) {
+// getRuntimeMgmtManager().stopPscNow((PSCData)userObj);
} else if (userObj instanceof HostData) {
getRuntimeMgmtManager().stopHostNow((HostData)userObj);
}
@@ -901,9 +900,9 @@
boolean[] enablements = new boolean[TOTAL_OPERATIONS];
if (userObj instanceof ServiceData) {
enablements = nodeSelected((ServiceData)userObj);
- } else if (userObj instanceof PSCData) {
- ProcessData process = (ProcessData)node.getParent().getContent();
- enablements = nodeSelected((PSCData)userObj, process);
+// } else if (userObj instanceof PSCData) {
+// ProcessData process = (ProcessData)node.getParent().getContent();
+// enablements = nodeSelected((PSCData)userObj, process);
} else if (userObj instanceof ProcessData) {
enablements = nodeSelected((ProcessData)userObj);
} else if (userObj instanceof HostData) {
@@ -950,11 +949,11 @@
* @return
* @since 4.4
*/
- private boolean[] nodeSelected(PSCData pscData, ProcessData process) {
- pnlOps.setVisibleService(false, 0, false);
- tree.setPopupMenuFactory(popTree);
- return RuntimeMgmtUtils.getOperationsEnablements(pscData, process);
- }
+// private boolean[] nodeSelected(PSCData pscData, ProcessData process) {
+// pnlOps.setVisibleService(false, 0, false);
+// tree.setPopupMenuFactory(popTree);
+// return RuntimeMgmtUtils.getOperationsEnablements(pscData, process);
+// }
/**
* @param serviceData
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeStateCellRenderer.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeStateCellRenderer.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/RuntimeStateCellRenderer.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -31,7 +31,6 @@
import com.metamatrix.console.ui.views.runtime.util.RuntimeMgmtUtils;
import com.metamatrix.platform.admin.api.runtime.HostData;
-import com.metamatrix.platform.admin.api.runtime.PSCData;
import com.metamatrix.platform.admin.api.runtime.ProcessData;
import com.metamatrix.platform.admin.api.runtime.ServiceData;
import com.metamatrix.platform.service.api.ServiceState;
@@ -47,7 +46,7 @@
private static final Icon HOST_ICON;
private static final Icon PROCESS_ICON;
private static final Icon SERVICE_ICON;
- private static final Icon PSC_ICON;
+ // private static final Icon PSC_ICON;
///////////////////////////////////////////////////////////////////////////
// FIELDS
@@ -66,7 +65,7 @@
HOST_ICON = RuntimeMgmtUtils.getIcon("icon.host");
PROCESS_ICON = RuntimeMgmtUtils.getIcon("icon.process");
SERVICE_ICON = RuntimeMgmtUtils.getIcon("icon.service");
- PSC_ICON = RuntimeMgmtUtils.getIcon("icon.psc");
+ // PSC_ICON = RuntimeMgmtUtils.getIcon("icon.psc");
}
///////////////////////////////////////////////////////////////////////////
@@ -120,15 +119,16 @@
stateTxt = RuntimeMgmtUtils.getServiceStateText(state);
}
else {
- if (userObj instanceof PSCData) {
- icon = PSC_ICON;
- }
- else if (userObj instanceof ProcessData) {
+// if (userObj instanceof PSCData) {
+// icon = PSC_ICON;
+// }
+// else
+ if (userObj instanceof ProcessData) {
icon = PROCESS_ICON;
}
else if (userObj instanceof HostData) {
icon = HOST_ICON;
- }
+ }
}
// set background color
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/model/RuntimeMgmtModel.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/model/RuntimeMgmtModel.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/model/RuntimeMgmtModel.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -43,7 +43,6 @@
import com.metamatrix.console.util.ExternalException;
import com.metamatrix.console.util.LogContexts;
import com.metamatrix.platform.admin.api.runtime.HostData;
-import com.metamatrix.platform.admin.api.runtime.PSCData;
import com.metamatrix.platform.admin.api.runtime.ProcessData;
import com.metamatrix.platform.admin.api.runtime.ServiceData;
import com.metamatrix.platform.admin.api.runtime.SystemState;
@@ -117,33 +116,33 @@
theStats.addProcess(theProcess);
DefaultTreeNode procNode = createNode(theProcess, theHostNode);
- Collection pscs = theProcess.getPSCs();
- if (pscs != null) {
- Iterator pscItr = pscs.iterator();
- while (pscItr.hasNext()) {
- addPsc((PSCData)pscItr.next(), procNode, theStats);
+ Collection svcs = theProcess.getServices();
+ if (svcs != null) {
+ Iterator svcItr = svcs.iterator();
+ while (svcItr.hasNext()) {
+ addService((ServiceData)svcItr.next(), procNode, theStats);
}
}
}
- private void addPsc(
- PSCData thePsc,
- DefaultTreeNode theProcessNode,
- HostStatistics theStats) {
+// private void addPsc(
+// PSCData thePsc,
+// DefaultTreeNode theProcessNode,
+// HostStatistics theStats) {
+//
+// DefaultTreeNode pscNode = createNode(thePsc, theProcessNode);
+// Collection services = thePsc.getServices();
+// if (services != null) {
+// Iterator serviceItr = services.iterator();
+// while (serviceItr.hasNext()) {
+// addService((ServiceData)serviceItr.next(), pscNode, theStats);
+// }
+// }
+// }
- DefaultTreeNode pscNode = createNode(thePsc, theProcessNode);
- Collection services = thePsc.getServices();
- if (services != null) {
- Iterator serviceItr = services.iterator();
- while (serviceItr.hasNext()) {
- addService((ServiceData)serviceItr.next(), pscNode, theStats);
- }
- }
- }
-
private void addService(
ServiceData theService,
- DefaultTreeNode thePscNode,
+ DefaultTreeNode theProcessNode,
HostStatistics theStats) {
theStats.addService(theService);
serviceList.add(theService);
@@ -156,7 +155,7 @@
lastChangeDate = changeDate;
}
}
- createNode(theService, thePscNode);
+ createNode(theService, theProcessNode);
}
public ArrayList getServiceList(){
Modified: branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/util/RuntimeMgmtUtils.java
===================================================================
--- branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/util/RuntimeMgmtUtils.java 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/java/com/metamatrix/console/ui/views/runtime/util/RuntimeMgmtUtils.java 2009-04-16 12:46:52 UTC (rev 783)
@@ -37,7 +37,6 @@
import com.metamatrix.console.ui.util.property.PropertyProvider;
import com.metamatrix.console.ui.views.runtime.OperationsPanel;
import com.metamatrix.platform.admin.api.runtime.HostData;
-import com.metamatrix.platform.admin.api.runtime.PSCData;
import com.metamatrix.platform.admin.api.runtime.ProcessData;
import com.metamatrix.platform.admin.api.runtime.ServiceData;
import com.metamatrix.platform.service.api.ServiceState;
@@ -208,43 +207,43 @@
return enablements;
}
- public static boolean[] getOperationsEnablements(
- PSCData thePsc,
- ProcessData theProcess) {
-
- // booleans default to false so just set true operations
- boolean[] enablements = new boolean[OperationsPanel.TOTAL_OPERATIONS];
- if (thePsc.isRegistered()) {
- enablements[STOP_ORDINAL_POSITION] = true;
- enablements[STOP_NOW_ORDINAL_POSITION] = true;
- }
- else {
- if (theProcess.isRegistered()) {
- enablements[START_ORDINAL_POSITION] = true;
- }
- }
-
- // if has one suspended service then resume can be enabled
- // if has one open/running service then suspend can be enabled
- //if there is one that is not open and not suspended, enable start
- Collection services = thePsc.getServices();
- if ((services != null) && (!services.isEmpty())) {
- Iterator servItr = services.iterator();
- while (servItr.hasNext()) {
- ServiceData service = (ServiceData)servItr.next();
- int state = service.getCurrentState();
-
- if(state != ServiceState.STATE_OPEN){
- enablements[START_ORDINAL_POSITION] = true;
- } else if (state == ServiceState.STATE_INIT_FAILED ||
- state == ServiceState.STATE_FAILED ||
- state == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE) {
- enablements[SHOW_SERVICE_ERROR_ORDINAL_POSITION] = true;
- }
- }
- }
- return enablements;
- }
+// public static boolean[] getOperationsEnablements(
+// PSCData thePsc,
+// ProcessData theProcess) {
+//
+// // booleans default to false so just set true operations
+// boolean[] enablements = new boolean[OperationsPanel.TOTAL_OPERATIONS];
+// if (thePsc.isRegistered()) {
+// enablements[STOP_ORDINAL_POSITION] = true;
+// enablements[STOP_NOW_ORDINAL_POSITION] = true;
+// }
+// else {
+// if (theProcess.isRegistered()) {
+// enablements[START_ORDINAL_POSITION] = true;
+// }
+// }
+//
+// // if has one suspended service then resume can be enabled
+// // if has one open/running service then suspend can be enabled
+// //if there is one that is not open and not suspended, enable start
+// Collection services = thePsc.getServices();
+// if ((services != null) && (!services.isEmpty())) {
+// Iterator servItr = services.iterator();
+// while (servItr.hasNext()) {
+// ServiceData service = (ServiceData)servItr.next();
+// int state = service.getCurrentState();
+//
+// if(state != ServiceState.STATE_OPEN){
+// enablements[START_ORDINAL_POSITION] = true;
+// } else if (state == ServiceState.STATE_INIT_FAILED ||
+// state == ServiceState.STATE_FAILED ||
+// state == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE) {
+// enablements[SHOW_SERVICE_ERROR_ORDINAL_POSITION] = true;
+// }
+// }
+// }
+// return enablements;
+// }
public static boolean[] getOperationsEnablements(ServiceData theService) {
Modified: branches/remove_psc/console/src/main/resources/com/metamatrix/console/i18n.properties
===================================================================
--- branches/remove_psc/console/src/main/resources/com/metamatrix/console/i18n.properties 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/resources/com/metamatrix/console/i18n.properties 2009-04-16 12:46:52 UTC (rev 783)
@@ -344,21 +344,23 @@
PanelsTreeModel.queryPanel.tooltip=View and manage queries that are currently being executed in the MetaMatrix Server
PanelsTreeModel.configPanel.tooltip=Manage the configuration of the MetaMatrix system
PanelsTreeModel.systemPropsPanel.tooltip=View and manage MetaMatrix system properties
-PanelsTreeModel.pscDeployPanel.tooltip=View product service definitions and their deployments on hosts and processes
-PanelsTreeModel.poolsConfigPanel.tooltip=View and manage properties for connection pools
-PanelsTreeModel.resourcesPanel.tooltip=View and manage properties for resources; assign resources to connection pools
+#PanelsTreeModel.pscDeployPanel.tooltip=View product service definitions and their deployments on hosts and processes
+#PanelsTreeModel.poolsConfigPanel.tooltip=View and manage properties for connection pools
+PanelsTreeModel.resourcesPanel.tooltip=View and manage properties for resources
PanelsTreeModel.extSourcesPanel.tooltip=View and manage JAR and XML extension modules
PanelsTreeModel.sysLoggingPanel.tooltip=View and manage system log settings
PanelsTreeModel.vdbPanel.tooltip=View and manage virtual databases used to access enterprise information sources through the MetaMatrix Server
-PanelsTreeModel.bindingsPanel.tooltip=View and manage connector bindings to enterprise information sources
-PanelsTreeModel.connectorsPanel.tooltip=View and manage connectors used to define connector bindings
+PanelsTreeModel.bindingsPanel.tooltip=View and manage connector bindings that define enterprise information sources
+PanelsTreeModel.connectorsPanel.tooltip=View and manage connector types used to define connector bindings
PanelsTreeModel.securityPanel.tooltip=Manage the groups and their data access rights in the MetaMatrix system
PanelsTreeModel.authSummaryPanel.tooltip=Authorization Summary
PanelsTreeModel.domainProvidersPanel.tooltip=Define Membership Domain Providers
PanelsTreeModel.adminRolesPanel.tooltip=View the roles of groups and assign groups to those roles
PanelsTreeModel.dataRolesPanel.tooltip=View and manage the access rights of groups to MetaMatrix information sources
-PanelsTreeModel.metadataRolesPanel.tooltip=View and manage the access rights of groups to Metadata
+PanelsTreeModel.metadataRolesPanel.tooltip=View and manage the access rights of groups to Metadata
+PanelsTreeModel.servicesPanel.tooltip=View and manage services to enterprise information sources
+
#-------------------------------------------
# VDB panel properties
#-------------------------------------------
Modified: branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties
===================================================================
--- branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/deploy/data/ui.properties 2009-04-16 12:46:52 UTC (rev 783)
@@ -31,14 +31,11 @@
msg.persistproblem= "Problem when persistent"
lbl.host=Host Identifier:
lbl.process=Process:
-lbl.product=Product:
-lbl.psc=PSC:
lbl.service=Service:
btn.cancel=Cancel
btn.ok=OK
btn.reset=Reset
hdr.process=Process
-hdr.product=Product
hdr.service=Service
tree.pscnode="{0} : {1}"
pop.propertyname.hdr="Name"
@@ -57,7 +54,7 @@
csp.deploytblrows="8"
csp.pnlDeployments.title="Deployment"
-csp.pnlPscs.title="PSC Service Definitions"
+csp.pnlSvcs.title="Service or Connector Deployments"
csp.psctblrows="15"
csp.title="Configuration Summary:"
@@ -98,12 +95,10 @@
dhp.newhost="New Host"
dhp.newprocessdlg.title="Create Process"
dhp.pnlProcs.title="Processes"
-dhp.pnlPscs.title="PSCs"
dhp.portnum.default="15001"
dhp.process.hdr="Process"
dhp.procstblrows="5"
dhp.product.hdr="Product"
-dhp.psc.hdr="Product Service\\nConfiguration"
dhp.pscstblrows="5"
dhp.title="Host Identifier:"
@@ -181,29 +176,14 @@
dp.title="No Title"
dp.titlesuffix="Unknown"
-############################
-# DeployedPscPanel
-############################
-dpp.essential.hdr="Essential"
-dpp.lblHost="Host Identifier:"
-dpp.lblProcess="Process:"
-dpp.lblProduct="Product:"
-dpp.lblPsc="PSC:"
-dpp.pnlServices.title="Services"
-dpp.service.hdr="Service"
-dpp.servicestblrows="10"
-dpp.title.suffix="New Deployed PSC"
-dpp.title="PSC:"
-
############################
# DeployPkgUtils
############################
dpu.deployedhost.hdr="Host Identifier"
dpu.deployedprocess.hdr="Process"
-dpu.deployedproduct.hdr="Product"
-dpu.deployedpsc.hdr="PSC"
+dpu.deployedsvc.hdr="Service"
dpu.enabled.hdr="Enabled"
dpu.essential.hdr="Essential"
dpu.msg.initerror="DeployPkgUtils init"
@@ -211,7 +191,7 @@
dpu.msg.prodnameserror="Error getting product names."
dpu.product.hdr="Product"
dpu.productprefix.hdr="Product:\\n"
-dpu.psc.hdr="PSC"
+dpu.vm.hdr="VM"
dpu.service.hdr="Service"
############################
@@ -242,11 +222,16 @@
drp.newprocess="New Process"
drp.nodeployedpsc="None"
drp.pnlHeap.title="Heap Size (MB)"
-drp.pnlPscs.title="PSCs"
-drp.process="New Process"
-drp.product.hdr="Product"
-drp.psc.hdr="Product Service Configuration"
-drp.pscstblrows="10"
+drp.pnlSvcs.title="Services"
+drp.service.hdr="Service"
+drp.enabled.hdr="Enabled"
+drp.pnlSvcs.title="Services / Connectors"
+#drp.pnlPscs.title="PSCs"
+#drp.process="New Process"
+#drp.product.hdr="Product"
+#drp.psc.hdr="Product Service Configuration"
+#drp.pscstblrows="10"
+drp.svctblrows="10"
drp.unknownhost="** unknown **"
drp.title="Process:"
@@ -257,15 +242,11 @@
dtm.configshdrnode="Configurations"
dtm.deploymentshdrnode="Deployments"
dtm.hostshdrnode="Hosts"
-dtm.msg.adddeployedpscerror="Problem adding deployed PSC {0} to the tree model."
dtm.msg.addhosterror="Problem adding deployed host {0} to the tree model."
dtm.msg.addprocesserror="Problem adding deployed process {0} to the tree model."
-dtm.msg.addproducterror="Problem adding product {0} to the tree model."
-dtm.msg.addpscdefnerror="Problem adding PSC {0} in configuration {1} to the tree model."
dtm.msg.initerror="DeployTreeModel init"
dtm.msg.noconfigs="No configurations found."
dtm.msg.nohosts="No hosts found."
-dtm.pscdefshdrnode="PSC Definitions"
############################
# DeployedServicePanel
@@ -274,9 +255,7 @@
dvp.lblEssential="Essential:"
dvp.lblHost="Host Identifier:"
dvp.lblProc="Process:"
-dvp.lblPsc="PSC:"
dvp.lblService="Service:"
-dvp.lblProduct="Product:"
dvp.msg.invalidclass="Domain Object is not a DeployedService. Class="
dvp.pnlProps.title="Properties"
dvp.title="Service:"
@@ -326,75 +305,76 @@
# ProductDefinitionPanel
############################
-pdp.enabled.hdr="Enabled"
-pdp.essential.hdr="Essential"
-pdp.lblProduct="Product:"
-pdp.msg.invalidclass="Domain Object is not a Product. Class="
-pdp.pnlServices.title="Services"
-pdp.psc.hdr="PSC"
-pdp.service.hdr="Service"
-pdp.servicestblrows="10"
-pdp.title.suffix="Unknown Product"
-pdp.title="Product Definition:"
+#pdp.enabled.hdr="Enabled"
+#pdp.essential.hdr="Essential"
+#pdp.lblProduct="Product:"
+#pdp.msg.invalidclass="Domain Object is not a Product. Class="
+#pdp.pnlServices.title="Services"
+#pdp.psc.hdr="PSC"
+#pdp.service.hdr="Service"
+#pdp.servicestblrows="10"
+#pdp.title.suffix="Unknown Product"
+#pdp.title="Product Definition:"
############################
# PscDefinitionPanel
############################
-pfp.actionApply.mnemonic="A"
-pfp.actionApply.tip="Save changes"
-pfp.actionApply="Apply"
-pfp.actionCopy.mnemonic="C"
-pfp.actionCopy.tip="Use this PSC to create another"
-pfp.actionCopy="Copy PSC..."
+#pfp.actionApply.mnemonic="A"
+#pfp.actionApply.tip="Save changes"
+#pfp.actionApply="Apply"
+#pfp.actionCopy.mnemonic="C"
+#pfp.actionCopy.tip="Use this PSC to create another"
+#pfp.actionCopy="Copy PSC..."
-pfp.actionNew.mnemonic="N"
-pfp.actionNew.tip="Use this to create a new PSC"
-pfp.actionNew="New PSC..."
+#pfp.actionNew.mnemonic="N"
+#pfp.actionNew.tip="Use this to create a new PSC"
+#pfp.actionNew="New PSC..."
-pfp.actionEdit.mnemonic="E"
-pfp.actionEdit.tip="Use this to edit a PSC"
-pfp.actionEdit="Edit PSC"
+#pfp.actionEdit.mnemonic="E"
+#pfp.actionEdit.tip="Use this to edit a PSC"
+#pfp.actionEdit="Edit PSC"
-pfp.actionDelete.mnemonic="D"
-pfp.actionDelete.tip="Delete this PSC"
-pfp.actionDelete="Delete PSC"
-pfp.actionReset.mnemonic="R"
-pfp.actionReset.tip="Abort Changes"
-pfp.actionReset="Reset"
-pfp.confirmdelete.title="Delete PSC Definition {0}"
-pfp.enabled.hdr="Enabled"
-pfp.essential.hdr="Essential"
-pfp.lblCreated="Date Created:"
-pfp.lblCreatedBy="By:"
-pfp.lblModified="Date Modified:"
-pfp.lblModifiedBy="By:"
-pfp.lblProduct="Product:"
-pfp.lblPsc="Name:"
-pfp.lblnewpscdef="New PSC Definition Name:"
-pfp.msg.confirmdelete="Are you sure you want to delete this PSC Definition?"
-pfp.msg.createpscdef="Enter the name of the new PSC definition."
-pfp.msg.invalidclass="Domain Object is not a PscDefinition. Class="
-pfp.newpscdefdlg.title="Create PSC Definition"
-pfp.pnlServices.title="Services"
-pfp.service.hdr="Service"
-pfp.servicestblrows="10"
-pfp.title.suffix="New PSC"
-pfp.title="PSC Definition:"
-pfp.datepattern="MMM dd, yyyy hh:mm:ss"
+#pfp.actionDelete.mnemonic="D"
+#pfp.actionDelete.tip="Delete this PSC"
+#pfp.actionDelete="Delete PSC"
+#pfp.actionReset.mnemonic="R"
+#pfp.actionReset.tip="Abort Changes"
+#pfp.actionReset="Reset"
+#pfp.confirmdelete.title="Delete PSC Definition {0}"
+#pfp.enabled.hdr="Enabled"
+#pfp.essential.hdr="Essential"
+#pfp.lblCreated="Date Created:"
+#pfp.lblCreatedBy="By:"
+#pfp.lblModified="Date Modified:"
+#pfp.lblModifiedBy="By:"
+#pfp.lblProduct="Product:"
+##pfp.lblPsc="Name:"
+#pfp.lblnewpscdef="New PSC Definition Name:"
+#pfp.msg.confirmdelete="Are you sure you want to delete this PSC Definition?"
+#pfp.msg.createpscdef="Enter the name of the new PSC definition."
+#pfp.msg.invalidclass="Domain Object is not a PscDefinition. Class="
+#pfp.newpscdefdlg.title="Create PSC Definition"
+#pfp.pnlServices.title="Services"
+#pfp.service.hdr="Service"
+#pfp.servicestblrows="10"
+#pfp.title.suffix="New PSC"
+#pfp.title="PSC Definition:"
+#pfp.datepattern="MMM dd, yyyy hh:mm:ss"
-pfp.lbleditpscdef="PSC Definition:"
-pfp.msg.editpscdef="Edit PSC Definition"
-pfp.editpscdefdlg.title="Edit PSC Definition"
+#pfp.lbleditpscdef="PSC Definition:"
+#pfp.msg.editpscdef="Edit PSC Definition"
+#pfp.editpscdefdlg.title="Edit PSC Definition"
############################
-# PscSummaryPanel
+# Deployed ServiceSummaryPanel
############################
-psp.msg.invalidclass="Domain Object is not a Config. Class="
-psp.pnl.title="PSC Service Definitions"
-psp.psctblrows="15"
-psp.title="PSC Definition Summary:"
+#psp.msg.invalidclass="Domain Object is not a Config. Class="
+#psp.pnl.title="PSC Service Definitions"
+dssp.pnl.title="Deployed Service Definitions"
+dssp.svctblrows="15"
+dssp.title="Service Definitions Summary:"
############################
# CreatePanel
@@ -419,8 +399,9 @@
sdp.actionReset="Reset"
sdp.lblEnabled="Enabled:"
sdp.lblEssential="Essential:"
-sdp.lblProd="Product:"
-sdp.lblPsc="PSC:"
+sdp.lblVM="VM:"
+#sdp.lblProd="Product:"
+#sdp.lblPsc="PSC:"
sdp.lblService="Service:"
sdp.title.suffix="Unknown Service"
sdp.title="Service Definition:"
Modified: branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/runtime/data/ui.properties
===================================================================
--- branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/runtime/data/ui.properties 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/main/resources/com/metamatrix/console/ui/views/runtime/data/ui.properties 2009-04-16 12:46:52 UTC (rev 783)
@@ -115,8 +115,8 @@
pm.proc.hdr="Process"
pm.id.hdr="ID"
pm.registered.hdr="Registered"
-pm.numregisteredpscs.hdr="PSCs\\nRegistered"
-pm.numnotregisteredpscs.hdr="PSCs Not\\nRegistered"
+pm.numregisteredservices.hdr="Services\\nRegistered"
+pm.numnotregisteredservices.hdr="Services Not\\nRegistered"
pm.rows="10"
############################
Modified: branches/remove_psc/console/src/test/resources/console_config.properties
===================================================================
--- branches/remove_psc/console/src/test/resources/console_config.properties 2009-04-15 21:04:19 UTC (rev 782)
+++ branches/remove_psc/console/src/test/resources/console_config.properties 2009-04-16 12:46:52 UTC (rev 783)
@@ -35,15 +35,15 @@
# metamatrix.log.consoleFormat=com.metamatrix.common.log.format.ReadableLogMessageFormat
# Log to a file (the token "%VM_NAME% gets replaced with the name of the VM) ...
-metamatrix.log.file=..\\log\\console_%VM_NAME%.log
+metamatrix.log.file=console_%VM_NAME%.log
metamatrix.log.fileAppend=false
metamatrix.log.fileFormat=com.metamatrix.common.log.format.DelimitedLogMessageFormat
# Capture system out & err to log file
metamatrix.log.captureSystemOut=true
metamatrix.log.captureSystemErr=true
-metamatrix.log.systemOutFilename=../log/console.out
-metamatrix.log.systemErrFilename=../log/console.err
+metamatrix.log.systemOutFilename=console.out
+metamatrix.log.systemErrFilename=console.err
#
# The logging configuration parameters, however, may be
15 years, 8 months
teiid SVN: r782 - in trunk/connectors/salesforce-api/src/main: resources and 1 other directory.
by teiid-commits@lists.jboss.org
Author: jdoyle
Date: 2009-04-15 17:04:19 -0400 (Wed, 15 Apr 2009)
New Revision: 782
Added:
trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllowFieldTruncationHeader.java
trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl
Removed:
trunk/connectors/salesforce-api/src/main/resources/partner_v14.wsdl
Modified:
trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceServiceLocator.java
trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SoapBindingStub.java
Log:
Updating to API 15.
Added: trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllowFieldTruncationHeader.java
===================================================================
--- trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllowFieldTruncationHeader.java (rev 0)
+++ trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/AllowFieldTruncationHeader.java 2009-04-15 21:04:19 UTC (rev 782)
@@ -0,0 +1,115 @@
+/**
+ * AllowFieldTruncationHeader.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.sforce.soap.partner;
+
+public class AllowFieldTruncationHeader implements java.io.Serializable {
+ private boolean allowFieldTruncation;
+
+ public AllowFieldTruncationHeader() {
+ }
+
+ public AllowFieldTruncationHeader(
+ boolean allowFieldTruncation) {
+ this.allowFieldTruncation = allowFieldTruncation;
+ }
+
+
+ /**
+ * Gets the allowFieldTruncation value for this AllowFieldTruncationHeader.
+ *
+ * @return allowFieldTruncation
+ */
+ public boolean isAllowFieldTruncation() {
+ return allowFieldTruncation;
+ }
+
+
+ /**
+ * Sets the allowFieldTruncation value for this AllowFieldTruncationHeader.
+ *
+ * @param allowFieldTruncation
+ */
+ public void setAllowFieldTruncation(boolean allowFieldTruncation) {
+ this.allowFieldTruncation = allowFieldTruncation;
+ }
+
+ private java.lang.Object __equalsCalc = null;
+ public synchronized boolean equals(java.lang.Object obj) {
+ if (!(obj instanceof AllowFieldTruncationHeader)) return false;
+ AllowFieldTruncationHeader other = (AllowFieldTruncationHeader) obj;
+ if (obj == null) return false;
+ if (this == obj) return true;
+ if (__equalsCalc != null) {
+ return (__equalsCalc == obj);
+ }
+ __equalsCalc = obj;
+ boolean _equals;
+ _equals = true &&
+ this.allowFieldTruncation == other.isAllowFieldTruncation();
+ __equalsCalc = null;
+ return _equals;
+ }
+
+ private boolean __hashCodeCalc = false;
+ public synchronized int hashCode() {
+ if (__hashCodeCalc) {
+ return 0;
+ }
+ __hashCodeCalc = true;
+ int _hashCode = 1;
+ _hashCode += (isAllowFieldTruncation() ? Boolean.TRUE : Boolean.FALSE).hashCode();
+ __hashCodeCalc = false;
+ return _hashCode;
+ }
+
+ // Type metadata
+ private static org.apache.axis.description.TypeDesc typeDesc =
+ new org.apache.axis.description.TypeDesc(AllowFieldTruncationHeader.class, true);
+
+ static {
+ typeDesc.setXmlType(new javax.xml.namespace.QName("urn:partner.soap.sforce.com", ">AllowFieldTruncationHeader"));
+ org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+ elemField.setFieldName("allowFieldTruncation");
+ elemField.setXmlName(new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "allowFieldTruncation"));
+ elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+ elemField.setNillable(false);
+ typeDesc.addFieldDesc(elemField);
+ }
+
+ /**
+ * Return type metadata object
+ */
+ public static org.apache.axis.description.TypeDesc getTypeDesc() {
+ return typeDesc;
+ }
+
+ /**
+ * Get Custom Serializer
+ */
+ public static org.apache.axis.encoding.Serializer getSerializer(
+ java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType) {
+ return
+ new org.apache.axis.encoding.ser.BeanSerializer(
+ _javaType, _xmlType, typeDesc);
+ }
+
+ /**
+ * Get Custom Deserializer
+ */
+ public static org.apache.axis.encoding.Deserializer getDeserializer(
+ java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType) {
+ return
+ new org.apache.axis.encoding.ser.BeanDeserializer(
+ _javaType, _xmlType, typeDesc);
+ }
+
+}
Modified: trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceServiceLocator.java
===================================================================
--- trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceServiceLocator.java 2009-04-15 20:29:00 UTC (rev 781)
+++ trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceServiceLocator.java 2009-04-15 21:04:19 UTC (rev 782)
@@ -1,146 +1,146 @@
-/**
- * SforceServiceLocator.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
- */
-
-package com.sforce.soap.partner;
-
-public class SforceServiceLocator extends org.apache.axis.client.Service implements com.sforce.soap.partner.SforceService {
-
-/**
- * Sforce SOAP API
- */
-
- public SforceServiceLocator() {
- }
-
-
- public SforceServiceLocator(org.apache.axis.EngineConfiguration config) {
- super(config);
- }
-
- public SforceServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
- super(wsdlLoc, sName);
- }
-
- // Use to get a proxy class for Soap
- private java.lang.String Soap_address = "https://www.salesforce.com/services/Soap/u/14.0";
-
- public java.lang.String getSoapAddress() {
- return Soap_address;
- }
-
- // The WSDD service name defaults to the port name.
- private java.lang.String SoapWSDDServiceName = "Soap";
-
- public java.lang.String getSoapWSDDServiceName() {
- return SoapWSDDServiceName;
- }
-
- public void setSoapWSDDServiceName(java.lang.String name) {
- SoapWSDDServiceName = name;
- }
-
- public com.sforce.soap.partner.Soap getSoap() throws javax.xml.rpc.ServiceException {
- java.net.URL endpoint;
- try {
- endpoint = new java.net.URL(Soap_address);
- }
- catch (java.net.MalformedURLException e) {
- throw new javax.xml.rpc.ServiceException(e);
- }
- return getSoap(endpoint);
- }
-
- public com.sforce.soap.partner.Soap getSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
- try {
- com.sforce.soap.partner.SoapBindingStub _stub = new com.sforce.soap.partner.SoapBindingStub(portAddress, this);
- _stub.setPortName(getSoapWSDDServiceName());
- return _stub;
- }
- catch (org.apache.axis.AxisFault e) {
- return null;
- }
- }
-
- public void setSoapEndpointAddress(java.lang.String address) {
- Soap_address = address;
- }
-
- /**
- * For the given interface, get the stub implementation.
- * If this service has no port for the given interface,
- * then ServiceException is thrown.
- */
- public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
- try {
- if (com.sforce.soap.partner.Soap.class.isAssignableFrom(serviceEndpointInterface)) {
- com.sforce.soap.partner.SoapBindingStub _stub = new com.sforce.soap.partner.SoapBindingStub(new java.net.URL(Soap_address), this);
- _stub.setPortName(getSoapWSDDServiceName());
- return _stub;
- }
- }
- catch (java.lang.Throwable t) {
- throw new javax.xml.rpc.ServiceException(t);
- }
- throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
- }
-
- /**
- * For the given interface, get the stub implementation.
- * If this service has no port for the given interface,
- * then ServiceException is thrown.
- */
- public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
- if (portName == null) {
- return getPort(serviceEndpointInterface);
- }
- java.lang.String inputPortName = portName.getLocalPart();
- if ("Soap".equals(inputPortName)) {
- return getSoap();
- }
- else {
- java.rmi.Remote _stub = getPort(serviceEndpointInterface);
- ((org.apache.axis.client.Stub) _stub).setPortName(portName);
- return _stub;
- }
- }
-
- public javax.xml.namespace.QName getServiceName() {
- return new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "SforceService");
- }
-
- private java.util.HashSet ports = null;
-
- public java.util.Iterator getPorts() {
- if (ports == null) {
- ports = new java.util.HashSet();
- ports.add(new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "Soap"));
- }
- return ports.iterator();
- }
-
- /**
- * Set the endpoint address for the specified port name.
- */
- public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
-
-if ("Soap".equals(portName)) {
- setSoapEndpointAddress(address);
- }
- else
-{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
- }
- }
-
- /**
- * Set the endpoint address for the specified port name.
- */
- public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
- setEndpointAddress(portName.getLocalPart(), address);
- }
-
-}
+/**
+ * SforceServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.sforce.soap.partner;
+
+public class SforceServiceLocator extends org.apache.axis.client.Service implements com.sforce.soap.partner.SforceService {
+
+/**
+ * Sforce SOAP API
+ */
+
+ public SforceServiceLocator() {
+ }
+
+
+ public SforceServiceLocator(org.apache.axis.EngineConfiguration config) {
+ super(config);
+ }
+
+ public SforceServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+ super(wsdlLoc, sName);
+ }
+
+ // Use to get a proxy class for Soap
+ private java.lang.String Soap_address = "https://www.salesforce.com/services/Soap/u/15.0";
+
+ public java.lang.String getSoapAddress() {
+ return Soap_address;
+ }
+
+ // The WSDD service name defaults to the port name.
+ private java.lang.String SoapWSDDServiceName = "Soap";
+
+ public java.lang.String getSoapWSDDServiceName() {
+ return SoapWSDDServiceName;
+ }
+
+ public void setSoapWSDDServiceName(java.lang.String name) {
+ SoapWSDDServiceName = name;
+ }
+
+ public com.sforce.soap.partner.Soap getSoap() throws javax.xml.rpc.ServiceException {
+ java.net.URL endpoint;
+ try {
+ endpoint = new java.net.URL(Soap_address);
+ }
+ catch (java.net.MalformedURLException e) {
+ throw new javax.xml.rpc.ServiceException(e);
+ }
+ return getSoap(endpoint);
+ }
+
+ public com.sforce.soap.partner.Soap getSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+ try {
+ com.sforce.soap.partner.SoapBindingStub _stub = new com.sforce.soap.partner.SoapBindingStub(portAddress, this);
+ _stub.setPortName(getSoapWSDDServiceName());
+ return _stub;
+ }
+ catch (org.apache.axis.AxisFault e) {
+ return null;
+ }
+ }
+
+ public void setSoapEndpointAddress(java.lang.String address) {
+ Soap_address = address;
+ }
+
+ /**
+ * For the given interface, get the stub implementation.
+ * If this service has no port for the given interface,
+ * then ServiceException is thrown.
+ */
+ public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+ try {
+ if (com.sforce.soap.partner.Soap.class.isAssignableFrom(serviceEndpointInterface)) {
+ com.sforce.soap.partner.SoapBindingStub _stub = new com.sforce.soap.partner.SoapBindingStub(new java.net.URL(Soap_address), this);
+ _stub.setPortName(getSoapWSDDServiceName());
+ return _stub;
+ }
+ }
+ catch (java.lang.Throwable t) {
+ throw new javax.xml.rpc.ServiceException(t);
+ }
+ throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+ }
+
+ /**
+ * For the given interface, get the stub implementation.
+ * If this service has no port for the given interface,
+ * then ServiceException is thrown.
+ */
+ public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+ if (portName == null) {
+ return getPort(serviceEndpointInterface);
+ }
+ java.lang.String inputPortName = portName.getLocalPart();
+ if ("Soap".equals(inputPortName)) {
+ return getSoap();
+ }
+ else {
+ java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+ ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+ return _stub;
+ }
+ }
+
+ public javax.xml.namespace.QName getServiceName() {
+ return new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "SforceService");
+ }
+
+ private java.util.HashSet ports = null;
+
+ public java.util.Iterator getPorts() {
+ if (ports == null) {
+ ports = new java.util.HashSet();
+ ports.add(new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "Soap"));
+ }
+ return ports.iterator();
+ }
+
+ /**
+ * Set the endpoint address for the specified port name.
+ */
+ public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+
+if ("Soap".equals(portName)) {
+ setSoapEndpointAddress(address);
+ }
+ else
+{ // Unknown Port Name
+ throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+ }
+ }
+
+ /**
+ * Set the endpoint address for the specified port name.
+ */
+ public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+ setEndpointAddress(portName.getLocalPart(), address);
+ }
+
+}
Modified: trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SoapBindingStub.java
===================================================================
--- trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SoapBindingStub.java 2009-04-15 20:29:00 UTC (rev 781)
+++ trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SoapBindingStub.java 2009-04-15 21:04:19 UTC (rev 782)
@@ -961,6 +961,13 @@
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
+ qName = new javax.xml.namespace.QName("urn:partner.soap.sforce.com", ">AllowFieldTruncationHeader");
+ cachedSerQNames.add(qName);
+ cls = com.sforce.soap.partner.AllowFieldTruncationHeader.class;
+ cachedSerClasses.add(cls);
+ cachedSerFactories.add(beansf);
+ cachedDeserFactories.add(beandf);
+
qName = new javax.xml.namespace.QName("urn:partner.soap.sforce.com", ">AssignmentRuleHeader");
cachedSerQNames.add(qName);
cls = com.sforce.soap.partner.AssignmentRuleHeader.class;
@@ -1615,13 +1622,6 @@
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
- qName = new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "DescribeSoftphoneLayoutInfoField");
- cachedSerQNames.add(qName);
- cls = com.sforce.soap.partner.DescribeSoftphoneLayoutInfoField.class;
- cachedSerClasses.add(cls);
- cachedSerFactories.add(beansf);
- cachedDeserFactories.add(beandf);
-
}
private void addBindings1() {
java.lang.Class cls;
@@ -1637,6 +1637,13 @@
java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+ qName = new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "DescribeSoftphoneLayoutInfoField");
+ cachedSerQNames.add(qName);
+ cls = com.sforce.soap.partner.DescribeSoftphoneLayoutInfoField.class;
+ cachedSerClasses.add(cls);
+ cachedSerFactories.add(beansf);
+ cachedDeserFactories.add(beandf);
+
qName = new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "DescribeSoftphoneLayoutItem");
cachedSerQNames.add(qName);
cls = com.sforce.soap.partner.DescribeSoftphoneLayoutItem.class;
Deleted: trunk/connectors/salesforce-api/src/main/resources/partner_v14.wsdl
===================================================================
--- trunk/connectors/salesforce-api/src/main/resources/partner_v14.wsdl 2009-04-15 20:29:00 UTC (rev 781)
+++ trunk/connectors/salesforce-api/src/main/resources/partner_v14.wsdl 2009-04-15 21:04:19 UTC (rev 782)
@@ -1,2835 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<!--
-Salesforce.com Partner Web Services API Version 14.0
-Generated on 2008-11-12 15:51:21 +0000.
-
-Copyright 1999-2008 salesforce.com, inc.
-All Rights Reserved
--->
-
-<definitions targetNamespace="urn:partner.soap.sforce.com"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:fns="urn:fault.partner.soap.sforce.com"
- xmlns:tns="urn:partner.soap.sforce.com"
- xmlns:ens="urn:sobject.partner.soap.sforce.com">
- <types>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
-
- <import namespace="urn:partner.soap.sforce.com"/>
-
-
- <!-- Dynamic sObject -->
- <complexType name="sObject">
- <sequence>
- <element name="type" type="xsd:string"/>
- <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="Id" type="tns:ID" nillable="true" />
- <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </sequence>
- </complexType>
-
- </schema>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
-
- <import namespace="urn:sobject.partner.soap.sforce.com"/>
-
- <!-- Our simple ID Type -->
- <simpleType name="ID">
- <restriction base="xsd:string">
- <length value="18"/>
- <pattern value='[a-zA-Z0-9]{18}'/>
- </restriction>
- </simpleType>
-
- <simpleType name="QueryLocator">
- <restriction base="xsd:string"/>
- </simpleType>
-
- <!-- Shared Result Types -->
- <complexType name="QueryResult">
- <sequence>
- <element name="done" type="xsd:boolean"/>
- <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
- <element name="records" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="size" type="xsd:int"/>
- </sequence>
- </complexType>
-
-
-
- <!-- Search Result -->
- <complexType name="SearchResult">
- <sequence>
- <element name="searchRecords" minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="SearchRecord">
- <sequence>
- <element name="record" type="ens:sObject"/>
- </sequence>
- </complexType>
-
- <!-- GetUpdated Result -->
- <complexType name="GetUpdatedResult">
- <sequence>
- <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
- <element name="latestDateCovered" type="xsd:dateTime"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <!-- GetDeleted Result -->
- <complexType name="GetDeletedResult">
- <sequence>
- <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
- <element name="earliestDateAvailable" type="xsd:dateTime"/>
- <element name="latestDateCovered" type="xsd:dateTime"/>
- <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DeletedRecord">
- <sequence>
- <element name="deletedDate" type="xsd:dateTime"/>
- <element name="id" type="tns:ID"/>
- </sequence>
- </complexType>
-
-
- <complexType name="GetServerTimestampResult">
- <sequence>
- <element name="timestamp" type="xsd:dateTime"/>
- </sequence>
- </complexType>
-
-
- <!-- InvalidateSessions Result -->
- <complexType name="InvalidateSessionsResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="SetPasswordResult">
- </complexType>
-
- <complexType name="ResetPasswordResult">
- <sequence>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="GetUserInfoResult">
- <sequence>
- <element name="accessibilityMode" type="xsd:boolean"/>
- <element name="currencySymbol" type="xsd:string" nillable="true"/>
- <element name="orgDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
- <element name="orgHasPersonAccounts" type="xsd:boolean"/>
- <element name="organizationId" type="tns:ID"/>
- <element name="organizationMultiCurrency" type="xsd:boolean"/>
- <element name="organizationName" type="xsd:string"/>
- <element name="profileId" type="tns:ID"/>
- <element name="roleId" type="tns:ID" nillable="true"/>
- <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
- <element name="userEmail" type="xsd:string"/>
- <element name="userFullName" type="xsd:string"/>
- <element name="userId" type="tns:ID"/>
- <element name="userLanguage" type="xsd:string"/>
- <element name="userLocale" type="xsd:string"/>
- <element name="userName" type="xsd:string"/>
- <element name="userTimeZone" type="xsd:string"/>
- <element name="userType" type="xsd:string"/>
- <element name="userUiSkin" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="LoginResult">
- <sequence>
- <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
- <element name="passwordExpired" type="xsd:boolean" />
- <element name="sandbox" type="xsd:boolean"/>
- <element name="serverUrl" type="xsd:string" nillable="true"/>
- <element name="sessionId" type="xsd:string" nillable="true"/>
-
- <element name="userId" type="tns:ID" nillable="true"/>
- <element name="userInfo" type="tns:GetUserInfoResult" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <simpleType name="StatusCode">
- <restriction base="xsd:string">
- <enumeration value="ALREADY_IN_PROCESS"/>
- <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
- <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
- <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
- <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
- <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
- <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
- <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
- <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
- <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
- <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
- <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
- <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
- <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
- <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
- <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
- <enumeration value="CANNOT_REPARENT_RECORD"/>
- <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
- <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
- <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
- <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
- <enumeration value="CIRCULAR_DEPENDENCY"/>
- <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
- <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_INDEX_EXISTS"/>
- <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
- <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
- <enumeration value="DELETE_FAILED"/>
- <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
- <enumeration value="DEPENDENCY_EXISTS"/>
- <enumeration value="DUPLICATE_CASE_SOLUTION"/>
- <enumeration value="DUPLICATE_COMM_NICKNAME"/>
- <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
- <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
- <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
- <enumeration value="DUPLICATE_EXTERNAL_ID"/>
- <enumeration value="DUPLICATE_MASTER_LABEL"/>
- <enumeration value="DUPLICATE_USERNAME"/>
- <enumeration value="DUPLICATE_VALUE"/>
- <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
- <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
- <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
- <enumeration value="ENTITY_IS_ARCHIVED"/>
- <enumeration value="ENTITY_IS_DELETED"/>
- <enumeration value="ENTITY_IS_LOCKED"/>
- <enumeration value="ERROR_IN_MAILER"/>
- <enumeration value="FAILED_ACTIVATION"/>
- <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
- <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
- <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
- <enumeration value="IMAGE_TOO_LARGE"/>
- <enumeration value="INACTIVE_OWNER_OR_USER"/>
- <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
- <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
- <enumeration value="INVALID_ACCESS_LEVEL"/>
- <enumeration value="INVALID_ARGUMENT_TYPE"/>
- <enumeration value="INVALID_ASSIGNEE_TYPE"/>
- <enumeration value="INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="INVALID_BATCH_OPERATION"/>
- <enumeration value="INVALID_CREDIT_CARD_INFO"/>
- <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
- <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
- <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
- <enumeration value="INVALID_CURRENCY_ISO"/>
- <enumeration value="INVALID_EMAIL_ADDRESS"/>
- <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
- <enumeration value="INVALID_FIELD"/>
- <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
- <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
- <enumeration value="INVALID_FILTER_ACTION"/>
- <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
- <enumeration value="INVALID_ID_FIELD"/>
- <enumeration value="INVALID_INET_ADDRESS"/>
- <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
- <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
- <enumeration value="INVALID_OPERATION"/>
- <enumeration value="INVALID_OPERATOR"/>
- <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
- <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
- <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
- <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
- <enumeration value="INVALID_SESSION_ID"/>
- <enumeration value="INVALID_SETUP_OWNER"/>
- <enumeration value="INVALID_STATUS"/>
- <enumeration value="INVALID_TYPE"/>
- <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
- <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
- <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
- <enumeration value="LIMIT_EXCEEDED"/>
- <enumeration value="MALFORMED_ID"/>
- <enumeration value="MANAGER_NOT_DEFINED"/>
- <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
- <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
- <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
- <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
- <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
- <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
- <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
- <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
- <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
- <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
- <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
- <enumeration value="MAX_RULES_EXCEEDED"/>
- <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
- <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
- <enumeration value="MAX_TM_RULES_EXCEEDED"/>
- <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
- <enumeration value="MERGE_FAILED"/>
- <enumeration value="MISSING_ARGUMENT"/>
- <enumeration value="MIXED_DML_OPERATION"/>
- <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
- <enumeration value="NO_APPLICABLE_PROCESS"/>
- <enumeration value="NO_ATTACHMENT_PERMISSION"/>
- <enumeration value="NO_MASS_MAIL_PERMISSION"/>
- <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
- <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
- <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
- <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
- <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
- <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
- <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="REQUIRED_FIELD_MISSING"/>
- <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
- <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
- <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
- <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
- <enumeration value="STRING_TOO_LONG"/>
- <enumeration value="TABSET_LIMIT_EXCEEDED"/>
- <enumeration value="TEMPLATE_NOT_ACTIVE"/>
- <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
- <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
- <enumeration value="TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="TOO_MANY_ENUM_VALUE"/>
- <enumeration value="TRANSFER_REQUIRES_READ"/>
- <enumeration value="UNABLE_TO_LOCK_ROW"/>
- <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
- <enumeration value="UNDELETE_FAILED"/>
- <enumeration value="UNKNOWN_EXCEPTION"/>
- <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
- <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
- <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="WRONG_CONTROLLER_TYPE"/>
- </restriction>
- </simpleType>
-
-
- <complexType name="Error">
- <sequence>
- <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="message" type="xsd:string"/>
- <element name="statusCode" type="tns:StatusCode"/>
- </sequence>
- </complexType>
-
- <complexType name="SendEmailError">
- <sequence>
- <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="message" type="xsd:string"/>
- <element name="statusCode" type="tns:StatusCode"/>
- <element name="targetObjectId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="SaveResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="UpsertResult">
- <sequence>
- <element name="created" type="xsd:boolean"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="MergeRequest">
- <sequence>
- <element name="masterRecord" type="ens:sObject"/>
- <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="MergeResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="ProcessRequest">
- <sequence>
- <element name="comments" type="xsd:string" nillable="true"/>
- <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="ProcessSubmitRequest">
- <complexContent>
- <extension base="tns:ProcessRequest">
- <sequence>
- <element name="objectId" type="tns:ID"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="ProcessWorkitemRequest">
- <complexContent>
- <extension base="tns:ProcessRequest">
- <sequence>
- <element name="action" type="xsd:string"/>
- <element name="workitemId" type="tns:ID"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="ProcessResult">
- <sequence>
- <element name="actorIds" type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
- <element name="entityId" type="tns:ID" nillable="true"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="instanceId" type="tns:ID" nillable="true"/>
- <element name="instanceStatus" type="xsd:string" nillable="true"/>
- <element name="newWorkitemIds" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DeleteResult">
- <sequence>
- <element name="errors" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="UndeleteResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="EmptyRecycleBinResult">
- <sequence>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="LeadConvert">
- <sequence>
- <element name="accountId" type="tns:ID" nillable="true"/>
- <element name="contactId" type="tns:ID" nillable="true"/>
- <element name="convertedStatus" type="xsd:string"/>
- <element name="doNotCreateOpportunity" type="xsd:boolean"/>
- <element name="leadId" type="tns:ID"/>
- <element name="opportunityName" type="xsd:string" nillable="true"/>
- <element name="overwriteLeadSource" type="xsd:boolean"/>
- <element name="ownerId" type="tns:ID" nillable="true"/>
- <element name="sendNotificationEmail" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="LeadConvertResult">
- <sequence>
- <element name="accountId" type="tns:ID" nillable="true"/>
- <element name="contactId" type="tns:ID" nillable="true"/>
- <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
- <element name="leadId" type="tns:ID" nillable="true"/>
- <element name="opportunityId" type="tns:ID" nillable="true"/>
- <element name="success" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSObjectResult">
- <sequence>
- <element name="activateable" type="xsd:boolean"/>
- <element name="childRelationships" type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
- <element name="createable" type="xsd:boolean"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="deletable" type="xsd:boolean"/>
- <element name="fields" type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="keyPrefix" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="labelPlural" type="xsd:string"/>
- <element name="layoutable" type="xsd:boolean"/>
- <element name="mergeable" type="xsd:boolean"/>
- <element name="name" type="xsd:string"/>
- <element name="queryable" type="xsd:boolean"/>
- <element name="recordTypeInfos" type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
- <element name="replicateable" type="xsd:boolean"/>
- <element name="retrieveable" type="xsd:boolean"/>
- <element name="searchable" type="xsd:boolean" />
- <element name="triggerable" type="xsd:boolean" minOccurs="0"/>
- <element name="undeletable" type="xsd:boolean"/>
- <element name="updateable" type="xsd:boolean"/>
- <element name="urlDetail" type="xsd:string" nillable="true"/>
- <element name="urlEdit" type="xsd:string" nillable="true"/>
- <element name="urlNew" type="xsd:string" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="ChildRelationship">
- <sequence>
- <element name="cascadeDelete" type="xsd:boolean"/>
- <element name="childSObject" type="xsd:string"/>
- <element name="field" type="xsd:string"/>
- <element name="relationshipName" type="xsd:string" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeGlobalResult">
- <sequence>
- <element name="encoding" type="xsd:string" nillable="true"/>
- <element name="maxBatchSize" type="xsd:int"/>
- <element name="types" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <simpleType name="fieldType">
- <restriction base="xsd:string">
- <enumeration value="string"/>
- <enumeration value="picklist"/>
- <enumeration value="multipicklist"/>
- <enumeration value="combobox"/>
- <enumeration value="reference"/>
- <enumeration value="base64"/>
- <enumeration value="boolean"/>
- <enumeration value="currency"/>
- <enumeration value="textarea"/>
- <enumeration value="int"/>
- <enumeration value="double"/>
- <enumeration value="percent"/>
- <enumeration value="phone"/>
- <enumeration value="id"/>
- <enumeration value="date"/>
- <enumeration value="datetime"/>
- <enumeration value="time"/>
- <enumeration value="url"/>
- <enumeration value="email"/>
- <enumeration value="encryptedstring"/>
- <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
- </restriction>
- </simpleType>
-
- <simpleType name="soapType">
- <restriction base="xsd:string">
- <enumeration value="tns:ID"/>
- <enumeration value="xsd:base64Binary"/>
- <enumeration value="xsd:boolean"/>
- <enumeration value="xsd:double"/>
- <enumeration value="xsd:int"/>
- <enumeration value="xsd:string"/>
- <enumeration value="xsd:date"/>
- <enumeration value="xsd:dateTime"/>
- <enumeration value="xsd:time"/>
- <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
- </restriction>
- </simpleType>
-
- <complexType name="Field">
- <sequence>
- <element name="autoNumber" type="xsd:boolean"/>
- <element name="byteLength" type="xsd:int"/>
- <element name="calculated" type="xsd:boolean"/>
- <element name="calculatedFormula" type="xsd:string" minOccurs="0"/>
- <element name="caseSensitive" type="xsd:boolean"/>
- <element name="controllerName" type="xsd:string" minOccurs="0"/>
- <element name="createable" type="xsd:boolean"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
- <element name="defaultedOnCreate" type="xsd:boolean"/>
- <element name="dependentPicklist" type="xsd:boolean" minOccurs="0"/>
- <element name="digits" type="xsd:int"/>
- <element name="externalId" type="xsd:boolean" minOccurs="0"/>
- <element name="filterable" type="xsd:boolean"/>
- <element name="htmlFormatted" type="xsd:boolean" minOccurs="0"/>
- <element name="idLookup" type="xsd:boolean"/>
- <element name="inlineHelpText" type="xsd:string" minOccurs="0"/>
- <element name="label" type="xsd:string"/>
- <element name="length" type="xsd:int"/>
- <element name="name" type="xsd:string"/>
- <element name="nameField" type="xsd:boolean"/>
- <element name="namePointing" type="xsd:boolean" minOccurs="0"/>
- <element name="nillable" type="xsd:boolean"/>
- <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="precision" type="xsd:int"/>
- <element name="referenceTo" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="relationshipName" type="xsd:string" minOccurs="0"/>
- <element name="relationshipOrder" type="xsd:int" minOccurs="0"/>
- <element name="restrictedPicklist" type="xsd:boolean"/>
- <element name="scale" type="xsd:int"/>
- <element name="soapType" type="tns:soapType"/>
- <element name="sortable" type="xsd:boolean" minOccurs="0"/>
- <element name="type" type="tns:fieldType"/>
- <element name="unique" type="xsd:boolean"/>
- <element name="updateable" type="xsd:boolean"/>
- <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
- </sequence>
- </complexType>
-
- <complexType name="PicklistEntry">
- <sequence>
- <element name="active" type="xsd:boolean"/>
- <element name="defaultValue" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="validFor" type="xsd:base64Binary" minOccurs="0"/>
- <element name="value" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutResult">
- <sequence>
- <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID"/>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutCallType">
- <sequence>
- <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
- <element name="name" type="xsd:string"/>
- <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutInfoField">
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutSection">
- <sequence>
- <element name="entityApiName" type="xsd:string"/>
- <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeSoftphoneLayoutItem">
- <sequence>
- <element name="itemApiName" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutResult">
- <sequence>
- <element name="layouts" type="tns:DescribeLayout" maxOccurs="unbounded"/>
- <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
- <element name="recordTypeSelectorRequired" type="xsd:boolean" />
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayout">
- <sequence>
- <element name="buttonLayoutSection" type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
- <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- <element name="editLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
- <element name="id" type="tns:ID"/>
-
-
- <element name="relatedLists" type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutSection">
- <sequence>
- <element name="columns" type="xsd:int"/>
- <element name="heading" type="xsd:string"/>
- <element name="layoutRows" type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
- <element name="rows" type="xsd:int"/>
- <element name="useCollapsibleSection" type="xsd:boolean"/>
- <element name="useHeading" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutButtonSection">
- <sequence>
- <element name="detailButtons" type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutRow">
- <sequence>
- <element name="layoutItems" type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
- <element name="numItems" type="xsd:int"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutItem">
- <sequence>
- <element name="editable" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
- <element name="placeholder" type="xsd:boolean"/>
- <element name="required" type="xsd:boolean"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutButton">
- <sequence>
- <element name="custom" type="xsd:boolean"/>
- <element name="label" type="xsd:string" nillable="true"/>
- <element name="name" type="xsd:string" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeLayoutComponent">
- <sequence>
- <element name="displayLines" type="xsd:int"/>
- <element name="tabOrder" type="xsd:int"/>
- <element name="type" type="tns:layoutComponentType"/>
- <element name="value" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <simpleType name="layoutComponentType">
- <restriction base="xsd:string">
- <enumeration value="Field"/>
- <enumeration value="Separator"/>
- <enumeration value="SControl"/>
- <enumeration value="EmptySpace"/>
- </restriction>
- </simpleType>
-
- <complexType name="RecordTypeInfo">
- <sequence>
- <element name="available" type="xsd:boolean"/>
- <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
- <element name="name" type="xsd:string"/>
- <element name="recordTypeId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="RecordTypeMapping">
- <sequence>
- <element name="available" type="xsd:boolean"/>
- <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
- <element name="layoutId" type="tns:ID"/>
- <element name="name" type="xsd:string"/>
- <element name="picklistsForRecordType" type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="recordTypeId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="PicklistForRecordType">
- <sequence>
- <element name="picklistName" type="xsd:string"/>
- <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedList">
- <sequence>
- <element name="columns" type="tns:RelatedListColumn" maxOccurs="unbounded"/>
- <element name="custom" type="xsd:boolean"/>
- <element name="field" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="limitRows" type="xsd:int"/>
- <element name="name" type="xsd:string"/>
- <element name="sobject" type="xsd:string" nillable="true"/>
- <element name="sort" type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedListColumn">
- <sequence>
- <element name="field" type="xsd:string" nillable="true"/>
- <element name="format" type="xsd:string" nillable="true"/>
- <element name="label" type="xsd:string"/>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
-
- <complexType name="RelatedListSort">
- <sequence>
- <element name="ascending" type="xsd:boolean"/>
- <element name="column" type="xsd:string"/>
- </sequence>
- </complexType>
-
-
-
- <complexType name="EmailFileAttachment">
- <sequence>
- <element name="body" nillable="true" minOccurs="0" type="xsd:base64Binary"/>
- <element name="fileName" type="xsd:string" />
- </sequence>
- </complexType>
- <simpleType name="EmailPriority">
- <restriction base="xsd:string">
- <enumeration value="Highest"/>
- <enumeration value="High"/>
- <enumeration value="Normal"/>
- <enumeration value="Low"/>
- <enumeration value="Lowest"/>
- </restriction>
- </simpleType>
-
- <complexType name="Email">
- <sequence>
- <element name="bccSender" type="xsd:boolean" nillable="true"/>
- <element name="emailPriority" type="tns:EmailPriority" nillable="true"/>
- <element name="replyTo" type="xsd:string" nillable="true"/>
- <element name="saveAsActivity" type="xsd:boolean" nillable="true"/>
- <element name="senderDisplayName" type="xsd:string" nillable="true"/>
- <element name="subject" type="xsd:string" nillable="true"/>
- <element name="useSignature" type="xsd:boolean" nillable="true"/>
- </sequence>
- </complexType>
-
- <complexType name="MassEmailMessage">
- <complexContent>
- <extension base="tns:Email">
- <sequence>
- <element name="description" type="xsd:string" nillable="true"/>
- <element name="targetObjectIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
- <element name="templateId" type="tns:ID"/>
- <element name="whatIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="SingleEmailMessage">
- <complexContent>
- <extension base="tns:Email">
- <sequence>
- <element name="bccAddresses" minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
- <element name="ccAddresses" minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
- <element name="charset" type="xsd:string" nillable="true"/>
- <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID" />
- <element name="htmlBody" type="xsd:string" nillable="true"/>
- <element name="fileAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
- <element name="plainTextBody" type="xsd:string" nillable="true"/>
- <element name="targetObjectId" type="tns:ID" nillable="true"/>
- <element name="templateId" type="tns:ID" nillable="true"/>
- <element name="toAddresses" minOccurs="0" maxOccurs="10" type="xsd:string" nillable="true"/>
- <element name="whatId" type="tns:ID" nillable="true"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="SendEmailResult">
- <sequence>
- <element name="errors" minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError" />
- <element name="success" type="xsd:boolean" />
- </sequence>
- </complexType>
-
-
-
- <complexType name="DescribeTabSetResult">
- <sequence>
- <element name="label" type="xsd:string" />
- <element name="logoUrl" type="xsd:string" />
- <element name="namespace" type="xsd:string" minOccurs="0"/>
- <element name="selected" type="xsd:boolean" />
- <element name="tabs" type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <complexType name="DescribeTab">
- <sequence>
- <element name="custom" type="xsd:boolean" />
- <element name="iconUrl" type="xsd:string" />
- <element name="label" type="xsd:string" />
- <element name="miniIconUrl" type="xsd:string" />
- <element name="sobjectName" type="xsd:string" nillable="true" />
- <element name="url" type="xsd:string" />
- </sequence>
- </complexType>
-
-
-
-
-
- <!-- Login Message Types -->
- <element name="login">
- <complexType>
- <sequence>
- <element name="username" type="xsd:string"/>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="loginResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:LoginResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Describe Message Types -->
- <element name="describeSObject">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="describeSObjectResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- DescibeSObjects Message Types -->
- <element name="describeSObjects">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
- </sequence>
- </complexType>
- </element>
- <element name="describeSObjectsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs='0' maxOccurs='100'/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Describe Global Message Types -->
- <element name="describeGlobal">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeGlobalResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeGlobalResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="describeLayout">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="describeLayoutResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="describeSoftphoneLayout">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeSoftphoneLayoutResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
-
- <element name="describeTabs">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="describeTabsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Message Types -->
- <element name="create">
- <complexType>
- <sequence>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="createResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Send Email Types -->
- <element name="sendEmail">
- <complexType>
- <sequence>
- <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
- </sequence>
- </complexType>
- </element>
- <element name="sendEmailResponse">
- <complexType>
- <sequence>
- <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
- </sequence>
- </complexType>
- </element>
-
-
- <!-- Update Message Types -->
- <element name="update">
- <complexType>
- <sequence>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="updateResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Upsert Message Types -->
- <element name="upsert">
- <complexType>
- <sequence>
- <element name="externalIDFieldName" type="xsd:string"/>
- <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="upsertResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Merge Message Types -->
- <element name="merge">
- <complexType>
- <sequence>
- <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="mergeResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Delete Message Types -->
- <element name="delete">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="deleteResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Undelete Message Types -->
- <element name="undelete">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="undeleteResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- EmptyRecycleBin Message Types -->
- <element name="emptyRecycleBin">
- <complexType>
- <sequence>
- <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="emptyRecycleBinResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Process Message Types -->
- <element name="process">
- <complexType>
- <sequence>
- <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="processResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Retrieve (ID List) Message Types -->
- <element name="retrieve">
- <complexType>
- <sequence>
- <element name="fieldList" type="xsd:string"/>
- <element name="sObjectType" type="xsd:string"/>
- <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="retrieveResponse">
- <complexType>
- <sequence>
- <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Convert Lead Message Types -->
- <element name="convertLead">
- <complexType>
- <sequence>
- <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
- <element name="convertLeadResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Get Updated Message Types -->
- <element name="getUpdated">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="startDate" type="xsd:dateTime"/>
- <element name="endDate" type="xsd:dateTime"/>
- </sequence>
- </complexType>
- </element>
- <element name="getUpdatedResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetUpdatedResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Get Deleted Message Types -->
- <element name="getDeleted">
- <complexType>
- <sequence>
- <element name="sObjectType" type="xsd:string"/>
- <element name="startDate" type="xsd:dateTime"/>
- <element name="endDate" type="xsd:dateTime"/>
- </sequence>
- </complexType>
- </element>
- <element name="getDeletedResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetDeletedResult"/>
- </sequence>
- </complexType>
- </element>
-
-
- <!-- Logout current session -->
- <element name="logout">
- <complexType>
- </complexType>
- </element>
-
- <element name="logoutResponse">
- <complexType>
- </complexType>
- </element>
-
- <!-- Invalidate a list of session ids -->
- <element name="invalidateSessions">
- <complexType>
- <sequence>
- <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="invalidateSessionsResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Query -->
- <element name="query">
- <complexType>
- <sequence>
- <element name="queryString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Create Query All -->
- <element name="queryAll">
- <complexType>
- <sequence>
- <element name="queryString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryAllResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- Next Batch of sObjects from a query -->
- <element name="queryMore">
- <complexType>
- <sequence>
- <element name="queryLocator" type="tns:QueryLocator"/>
- </sequence>
- </complexType>
- </element>
- <element name="queryMoreResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:QueryResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Create Search -->
- <element name="search">
- <complexType>
- <sequence>
- <element name="searchString" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="searchResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SearchResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <element name="getServerTimestamp">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="getServerTimestampResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetServerTimestampResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="setPassword">
- <complexType>
- <sequence>
- <element name="userId" type="tns:ID"/>
- <element name="password" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- <element name="setPasswordResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:SetPasswordResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="resetPassword">
- <complexType>
- <sequence>
- <element name="userId" type="tns:ID"/>
- </sequence>
- </complexType>
- </element>
- <element name="resetPasswordResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:ResetPasswordResult"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getUserInfo">
- <complexType>
- <sequence/>
- </complexType>
- </element>
- <element name="getUserInfoResponse">
- <complexType>
- <sequence>
- <element name="result" type="tns:GetUserInfoResult"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <!-- Header Elements -->
- <element name="SessionHeader">
- <complexType>
- <sequence>
- <element name="sessionId" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="LoginScopeHeader">
- <complexType>
- <sequence>
- <element name="organizationId" type="tns:ID"/>
- <element name="portalId" type="tns:ID" minOccurs="0"/>
- </sequence>
- </complexType>
- </element>
-
-
- <element name="CallOptions">
- <complexType>
- <sequence>
- <element name="client" type="xsd:string" nillable="true"/>
- <element name="defaultNamespace" type="xsd:string" nillable="true"/>
-
- </sequence>
- </complexType>
- </element>
-
-
- <element name="QueryOptions">
- <complexType>
- <sequence>
- <element name="batchSize" type="xsd:int" minOccurs="0"/>
-
- </sequence>
- </complexType>
- </element>
-
-
- <simpleType name="DebugLevel">
- <restriction base="xsd:string">
- <enumeration value="None"/>
- <enumeration value="DebugOnly"/>
- <enumeration value="Db"/>
- </restriction>
- </simpleType>
- <element name="DebuggingHeader">
- <complexType>
- <sequence>
- <element name="debugLevel" type="tns:DebugLevel"/>
- </sequence>
- </complexType>
- </element>
- <element name="DebuggingInfo">
- <complexType>
- <sequence>
- <element name="debugLog" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <!-- ideally this could of just been elem name="..." type="xsd:boolean"
- but is required to be nested within a complexType for .NET 1.1 compatibility -->
- <element name="MruHeader">
- <complexType>
- <sequence>
- <element name="updateMru" type="xsd:boolean" />
- </sequence>
- </complexType>
- </element>
-
- <element name="EmailHeader">
- <complexType>
- <sequence>
- <element name="triggerAutoResponseEmail" type="xsd:boolean"/>
- <element name="triggerOtherEmail" type="xsd:boolean"/>
- <element name="triggerUserEmail" type="xsd:boolean"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="AssignmentRuleHeader">
- <complexType>
- <sequence>
- <element name="assignmentRuleId" type="tns:ID" nillable="true" />
- <element name="useDefaultRule" type="xsd:boolean" nillable="true" />
- </sequence>
- </complexType>
- </element>
-
- <element name="UserTerritoryDeleteHeader">
- <complexType>
- <sequence>
- <element name="transferToUserId" type="tns:ID" nillable="true"/>
- </sequence>
- </complexType>
- </element>
-
-
-
- <element name="LocaleOptions">
- <complexType>
- <sequence>
- <element name="language" type="xsd:string" minOccurs="0"/>
- </sequence>
- </complexType>
- </element>
- </schema>
-
- <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
-
- <simpleType name="ExceptionCode">
- <restriction base="xsd:string">
- <enumeration value="API_CURRENTLY_DISABLED"/>
- <enumeration value="API_DISABLED_FOR_ORG"/>
- <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
- <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
- <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
- <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
- <enumeration value="DUPLICATE_VALUE"/>
- <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
- <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
- <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
- <enumeration value="EXCEEDED_ID_LIMIT"/>
- <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
- <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
- <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
- <enumeration value="EXCEEDED_QUOTA"/>
- <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
- <enumeration value="INACTIVE_OWNER_OR_USER"/>
- <enumeration value="INACTIVE_PORTAL"/>
- <enumeration value="INSUFFICIENT_ACCESS"/>
- <enumeration value="INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="INVALID_BATCH_SIZE"/>
- <enumeration value="INVALID_CLIENT"/>
- <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="INVALID_FIELD"/>
- <enumeration value="INVALID_FILTER_LANGUAGE"/>
- <enumeration value="INVALID_FILTER_VALUE"/>
- <enumeration value="INVALID_ID_FIELD"/>
- <enumeration value="INVALID_LOCALE_LANGUAGE"/>
- <enumeration value="INVALID_LOCATOR"/>
- <enumeration value="INVALID_LOGIN"/>
- <enumeration value="INVALID_NEW_PASSWORD"/>
- <enumeration value="INVALID_OPERATION"/>
- <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
- <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
- <enumeration value="INVALID_QUERY_LOCATOR"/>
- <enumeration value="INVALID_QUERY_SCOPE"/>
- <enumeration value="INVALID_REPLICATION_DATE"/>
- <enumeration value="INVALID_SEARCH"/>
- <enumeration value="INVALID_SEARCH_SCOPE"/>
- <enumeration value="INVALID_SESSION_ID"/>
- <enumeration value="INVALID_SOAP_HEADER"/>
- <enumeration value="INVALID_SSO_GATEWAY_URL"/>
- <enumeration value="INVALID_TYPE"/>
- <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="LIMIT_EXCEEDED"/>
- <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
- <enumeration value="LOGIN_CHALLENGE_PENDING"/>
- <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
- <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
- <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
- <enumeration value="MALFORMED_ID"/>
- <enumeration value="MALFORMED_QUERY"/>
- <enumeration value="MALFORMED_SEARCH"/>
- <enumeration value="MISSING_ARGUMENT"/>
- <enumeration value="NOT_MODIFIED"/>
- <enumeration value="NO_SOFTPHONE_LAYOUT"/>
- <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="OPERATION_TOO_LARGE"/>
- <enumeration value="ORG_LOCKED"/>
- <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
- <enumeration value="PASSWORD_LOCKOUT"/>
- <enumeration value="PORTAL_NO_ACCESS"/>
- <enumeration value="QUERY_TIMEOUT"/>
- <enumeration value="QUERY_TOO_COMPLICATED"/>
- <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
- <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="SERVER_UNAVAILABLE"/>
- <enumeration value="SSO_SERVICE_DOWN"/>
- <enumeration value="TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="TRIAL_EXPIRED"/>
- <enumeration value="UNKNOWN_EXCEPTION"/>
- <enumeration value="UNSUPPORTED_API_VERSION"/>
- <enumeration value="UNSUPPORTED_CLIENT"/>
- </restriction>
- </simpleType>
- <!-- For convenience these QNames are returned in the standard soap faultcode element -->
- <simpleType name="FaultCode">
- <restriction base="xsd:QName">
- <enumeration value="fns:API_CURRENTLY_DISABLED"/>
- <enumeration value="fns:API_DISABLED_FOR_ORG"/>
- <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
- <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
- <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
- <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
- <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
- <enumeration value="fns:DUPLICATE_VALUE"/>
- <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
- <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
- <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
- <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
- <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
- <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
- <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
- <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
- <enumeration value="fns:EXCEEDED_QUOTA"/>
- <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
- <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
- <enumeration value="fns:INACTIVE_PORTAL"/>
- <enumeration value="fns:INSUFFICIENT_ACCESS"/>
- <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
- <enumeration value="fns:INVALID_BATCH_SIZE"/>
- <enumeration value="fns:INVALID_CLIENT"/>
- <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
- <enumeration value="fns:INVALID_FIELD"/>
- <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
- <enumeration value="fns:INVALID_FILTER_VALUE"/>
- <enumeration value="fns:INVALID_ID_FIELD"/>
- <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
- <enumeration value="fns:INVALID_LOCATOR"/>
- <enumeration value="fns:INVALID_LOGIN"/>
- <enumeration value="fns:INVALID_NEW_PASSWORD"/>
- <enumeration value="fns:INVALID_OPERATION"/>
- <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
- <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
- <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
- <enumeration value="fns:INVALID_QUERY_SCOPE"/>
- <enumeration value="fns:INVALID_REPLICATION_DATE"/>
- <enumeration value="fns:INVALID_SEARCH"/>
- <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
- <enumeration value="fns:INVALID_SESSION_ID"/>
- <enumeration value="fns:INVALID_SOAP_HEADER"/>
- <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
- <enumeration value="fns:INVALID_TYPE"/>
- <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
- <enumeration value="fns:LIMIT_EXCEEDED"/>
- <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
- <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
- <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
- <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
- <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
- <enumeration value="fns:MALFORMED_ID"/>
- <enumeration value="fns:MALFORMED_QUERY"/>
- <enumeration value="fns:MALFORMED_SEARCH"/>
- <enumeration value="fns:MISSING_ARGUMENT"/>
- <enumeration value="fns:NOT_MODIFIED"/>
- <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
- <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
- <enumeration value="fns:OPERATION_TOO_LARGE"/>
- <enumeration value="fns:ORG_LOCKED"/>
- <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
- <enumeration value="fns:PASSWORD_LOCKOUT"/>
- <enumeration value="fns:PORTAL_NO_ACCESS"/>
- <enumeration value="fns:QUERY_TIMEOUT"/>
- <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
- <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
- <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
- <enumeration value="fns:SERVER_UNAVAILABLE"/>
- <enumeration value="fns:SSO_SERVICE_DOWN"/>
- <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
- <enumeration value="fns:TRIAL_EXPIRED"/>
- <enumeration value="fns:UNKNOWN_EXCEPTION"/>
- <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
- <enumeration value="fns:UNSUPPORTED_CLIENT"/>
- </restriction>
- </simpleType>
-
-
- <!-- Fault -->
- <complexType name="ApiFault">
- <sequence>
- <element name="exceptionCode" type="fns:ExceptionCode"/>
- <element name="exceptionMessage" type="xsd:string"/>
-
- </sequence>
- </complexType>
-
- <element name="fault" type="fns:ApiFault" />
-
- <complexType name="ApiQueryFault">
- <complexContent>
- <extension base="fns:ApiFault">
- <sequence>
- <element name="row" type="xsd:int"/>
- <element name="column" type="xsd:int"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="LoginFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="LoginFault" type="fns:LoginFault"/>
-
- <complexType name="InvalidQueryLocatorFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
-
- <complexType name="InvalidNewPasswordFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
-
- <complexType name="InvalidIdFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
-
- <complexType name="UnexpectedErrorFault">
- <complexContent>
- <extension base="fns:ApiFault"/>
- </complexContent>
- </complexType>
- <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
-
- <complexType name="InvalidFieldFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
-
- <complexType name="InvalidSObjectFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
-
- <complexType name="MalformedQueryFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
-
- <complexType name="MalformedSearchFault">
- <complexContent>
- <extension base="fns:ApiQueryFault"/>
- </complexContent>
- </complexType>
- <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
-
-
- </schema>
- </types>
-
- <!-- Header Message -->
- <message name="Header">
- <part element="tns:LoginScopeHeader" name="LoginScopeHeader"/>
- <part element="tns:SessionHeader" name="SessionHeader"/>
-
- <part element="tns:CallOptions" name="CallOptions"/>
-
- <part element="tns:QueryOptions" name="QueryOptions"/>
- <part element="tns:AssignmentRuleHeader" name="AssignmentRuleHeader"/>
- <part element="tns:MruHeader" name="MruHeader"/>
- <part element="tns:EmailHeader" name="EmailHeader"/>
-
- <part element="tns:UserTerritoryDeleteHeader" name="UserTerritoryDeleteHeader"/>
-
- <part element="tns:DebuggingHeader" name="DebuggingHeader"/>
- <part element="tns:DebuggingInfo" name="DebuggingInfo"/>
- <part element="tns:LocaleOptions" name="LocaleOptions"/>
- </message>
-
- <!-- Fault Messages -->
-
- <message name="ApiFault">
- <part name="fault" element="fns:fault"/>
- </message>
-
- <message name="LoginFault">
- <part name="fault" element="fns:LoginFault"/>
- </message>
- <message name="InvalidQueryLocatorFault">
- <part name="fault" element="fns:InvalidQueryLocatorFault"/>
- </message>
- <message name="InvalidNewPasswordFault">
- <part name="fault" element="fns:InvalidNewPasswordFault"/>
- </message>
- <message name="InvalidIdFault">
- <part name="fault" element="fns:InvalidIdFault"/>
- </message>
- <message name="UnexpectedErrorFault">
- <part name="fault" element="fns:UnexpectedErrorFault"/>
- </message>
- <message name="InvalidFieldFault">
- <part name="fault" element="fns:InvalidFieldFault"/>
- </message>
- <message name="InvalidSObjectFault">
- <part name="fault" element="fns:InvalidSObjectFault"/>
- </message>
- <message name="MalformedQueryFault">
- <part name="fault" element="fns:MalformedQueryFault"/>
- </message>
- <message name="MalformedSearchFault">
- <part name="fault" element="fns:MalformedSearchFault"/>
- </message>
-
-
- <!-- Method Messages -->
- <message name="loginRequest">
- <part element="tns:login" name="parameters"/>
- </message>
- <message name="loginResponse">
- <part element="tns:loginResponse" name="parameters"/>
- </message>
-
- <message name="describeSObjectRequest">
- <part element="tns:describeSObject" name="parameters"/>
- </message>
- <message name="describeSObjectResponse">
- <part element="tns:describeSObjectResponse" name="parameters"/>
- </message>
-
- <message name="describeSObjectsRequest">
- <part element="tns:describeSObjects" name="parameters"/>
- </message>
- <message name="describeSObjectsResponse">
- <part element="tns:describeSObjectsResponse" name="parameters"/>
- </message>
-
- <message name="describeGlobalRequest">
- <part element="tns:describeGlobal" name="parameters"/>
- </message>
- <message name="describeGlobalResponse">
- <part element="tns:describeGlobalResponse" name="parameters"/>
- </message>
-
- <message name="describeLayoutRequest">
- <part element="tns:describeLayout" name="parameters"/>
- </message>
- <message name="describeLayoutResponse">
- <part element="tns:describeLayoutResponse" name="parameters"/>
- </message>
-
- <message name="describeSoftphoneLayoutRequest">
- <part element="tns:describeSoftphoneLayout" name="parameters"/>
- </message>
- <message name="describeSoftphoneLayoutResponse">
- <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
- </message>
-
- <message name="describeTabsRequest">
- <part element="tns:describeTabs" name="parameters"/>
- </message>
- <message name="describeTabsResponse">
- <part element="tns:describeTabsResponse" name="parameters"/>
- </message>
-
- <message name="createRequest">
- <part element="tns:create" name="parameters"/>
- </message>
- <message name="createResponse">
- <part element="tns:createResponse" name="parameters"/>
- </message>
-
- <message name="updateRequest">
- <part element="tns:update" name="parameters"/>
- </message>
- <message name="updateResponse">
- <part element="tns:updateResponse" name="parameters"/>
- </message>
-
- <message name="upsertRequest">
- <part element="tns:upsert" name="parameters"/>
- </message>
- <message name="upsertResponse">
- <part element="tns:upsertResponse" name="parameters"/>
- </message>
-
- <message name="mergeRequest">
- <part element="tns:merge" name="parameters"/>
- </message>
- <message name="mergeResponse">
- <part element="tns:mergeResponse" name="parameters"/>
- </message>
-
- <message name="deleteRequest">
- <part element="tns:delete" name="parameters"/>
- </message>
- <message name="deleteResponse">
- <part element="tns:deleteResponse" name="parameters"/>
- </message>
-
- <message name="undeleteRequest">
- <part element="tns:undelete" name="parameters"/>
- </message>
- <message name="undeleteResponse">
- <part element="tns:undeleteResponse" name="parameters"/>
- </message>
-
- <message name="emptyRecycleBinRequest">
- <part element="tns:emptyRecycleBin" name="parameters"/>
- </message>
- <message name="emptyRecycleBinResponse">
- <part element="tns:emptyRecycleBinResponse" name="parameters"/>
- </message>
-
- <message name="retrieveRequest">
- <part element="tns:retrieve" name="parameters"/>
- </message>
- <message name="retrieveResponse">
- <part element="tns:retrieveResponse" name="parameters"/>
- </message>
-
- <message name="processRequest">
- <part element="tns:process" name="parameters"/>
- </message>
- <message name="processResponse">
- <part element="tns:processResponse" name="parameters"/>
- </message>
-
- <message name="convertLeadRequest">
- <part element="tns:convertLead" name="parameters"/>
- </message>
- <message name="convertLeadResponse">
- <part element="tns:convertLeadResponse" name="parameters"/>
- </message>
-
- <message name="logoutRequest">
- <part element="tns:logout" name="parameters"/>
- </message>
- <message name="logoutResponse">
- <part element="tns:logoutResponse" name="parameters"/>
- </message>
-
- <message name="invalidateSessionsRequest">
- <part element="tns:invalidateSessions" name="parameters"/>
- </message>
- <message name="invalidateSessionsResponse">
- <part element="tns:invalidateSessionsResponse" name="parameters"/>
- </message>
-
- <message name="getDeletedRequest">
- <part element="tns:getDeleted" name="parameters"/>
- </message>
- <message name="getDeletedResponse">
- <part element="tns:getDeletedResponse" name="parameters"/>
- </message>
-
- <message name="getUpdatedRequest">
- <part element="tns:getUpdated" name="parameters"/>
- </message>
- <message name="getUpdatedResponse">
- <part element="tns:getUpdatedResponse" name="parameters"/>
- </message>
-
- <message name="queryRequest">
- <part element="tns:query" name="parameters"/>
- </message>
- <message name="queryResponse">
- <part element="tns:queryResponse" name="parameters"/>
- </message>
-
- <message name="queryAllRequest">
- <part element="tns:queryAll" name="parameters"/>
- </message>
- <message name="queryAllResponse">
- <part element="tns:queryAllResponse" name="parameters"/>
- </message>
-
- <message name="queryMoreRequest">
- <part element="tns:queryMore" name="parameters"/>
- </message>
- <message name="queryMoreResponse">
- <part element="tns:queryMoreResponse" name="parameters"/>
- </message>
-
- <message name="searchRequest">
- <part element="tns:search" name="parameters"/>
- </message>
- <message name="searchResponse">
- <part element="tns:searchResponse" name="parameters"/>
- </message>
-
- <message name="getServerTimestampRequest">
- <part element="tns:getServerTimestamp" name="parameters"/>
- </message>
- <message name="getServerTimestampResponse">
- <part element="tns:getServerTimestampResponse" name="parameters"/>
- </message>
-
- <message name="setPasswordRequest">
- <part element="tns:setPassword" name="parameters"/>
- </message>
- <message name="setPasswordResponse">
- <part element="tns:setPasswordResponse" name="parameters"/>
- </message>
-
- <message name="resetPasswordRequest">
- <part element="tns:resetPassword" name="parameters"/>
- </message>
- <message name="resetPasswordResponse">
- <part element="tns:resetPasswordResponse" name="parameters"/>
- </message>
-
- <message name="getUserInfoRequest">
- <part element="tns:getUserInfo" name="parameters"/>
- </message>
- <message name="getUserInfoResponse">
- <part element="tns:getUserInfoResponse" name="parameters"/>
- </message>
-
- <message name="sendEmailRequest">
- <part element="tns:sendEmail" name="parameters"/>
- </message>
- <message name="sendEmailResponse">
- <part element="tns:sendEmailResponse" name="parameters"/>
- </message>
-
-
-
- <!-- Soap PortType -->
- <portType name="Soap">
- <operation name="login">
- <documentation>Login to the Salesforce.com SOAP Api</documentation>
- <input message="tns:loginRequest"/>
- <output message="tns:loginResponse"/>
- <fault message="tns:LoginFault" name="LoginFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="describeSObject">
- <documentation>Describe an sObject</documentation>
- <input message="tns:describeSObjectRequest"/>
- <output message="tns:describeSObjectResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeSObjects">
- <documentation>Describe a number sObjects</documentation>
- <input message="tns:describeSObjectsRequest"/>
- <output message="tns:describeSObjectsResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeGlobal">
- <documentation>Describe the Global state</documentation>
- <input message="tns:describeGlobalRequest"/>
- <output message="tns:describeGlobalResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeLayout">
- <documentation>Describe the layout of an sObject</documentation>
- <input message="tns:describeLayoutRequest"/>
- <output message="tns:describeLayoutResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="describeSoftphoneLayout">
- <documentation>Describe the layout of the SoftPhone</documentation>
- <input message="tns:describeSoftphoneLayoutRequest"/>
- <output message="tns:describeSoftphoneLayoutResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="describeTabs">
- <documentation>Describe the tabs that appear on a users page</documentation>
- <input message="tns:describeTabsRequest"/>
- <output message="tns:describeTabsResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="create">
- <documentation>Create a set of new sObjects</documentation>
- <input message="tns:createRequest"/>
- <output message="tns:createResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="update">
- <documentation>Update a set of sObjects</documentation>
- <input message="tns:updateRequest"/>
- <output message="tns:updateResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="upsert">
- <documentation>Update or insert a set of sObjects based on object id</documentation>
- <input message="tns:upsertRequest"/>
- <output message="tns:upsertResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="merge">
- <documentation>Merge and update a set of sObjects based on object id</documentation>
- <input message="tns:mergeRequest"/>
- <output message="tns:mergeResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="delete">
- <documentation>Delete a set of sObjects</documentation>
- <input message="tns:deleteRequest"/>
- <output message="tns:deleteResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="undelete">
- <documentation>Undelete a set of sObjects</documentation>
- <input message="tns:undeleteRequest"/>
- <output message="tns:undeleteResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="emptyRecycleBin">
- <documentation>Empty a set of sObjects from the recycle bin</documentation>
- <input message="tns:emptyRecycleBinRequest"/>
- <output message="tns:emptyRecycleBinResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="retrieve">
- <documentation>Get a set of sObjects</documentation>
- <input message="tns:retrieveRequest"/>
- <output message="tns:retrieveResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="process">
- <documentation>Submit an entity to a workflow process or process a workitem</documentation>
- <input message="tns:processRequest"/>
- <output message="tns:processResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- </operation>
-
- <operation name="convertLead">
- <documentation>convert a set of leads</documentation>
- <input message="tns:convertLeadRequest"/>
- <output message="tns:convertLeadResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="logout">
- <documentation>Logout the current user, invalidating the current session.</documentation>
- <input message="tns:logoutRequest"/>
- <output message="tns:logoutResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="invalidateSessions">
- <documentation>Logs out and invalidates session ids</documentation>
- <input message="tns:invalidateSessionsRequest"/>
- <output message="tns:invalidateSessionsResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getDeleted">
- <documentation>Get the IDs for deleted sObjects</documentation>
- <input message="tns:getDeletedRequest"/>
- <output message="tns:getDeletedResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getUpdated">
- <documentation>Get the IDs for updated sObjects</documentation>
- <input message="tns:getUpdatedRequest"/>
- <output message="tns:getUpdatedResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="query">
- <documentation>Create a Query Cursor</documentation>
- <input message="tns:queryRequest"/>
- <output message="tns:queryResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- </operation>
-
- <operation name="queryAll">
- <documentation>Create a Query Cursor, including deleted sObjects</documentation>
- <input message="tns:queryAllRequest"/>
- <output message="tns:queryAllResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- </operation>
-
- <operation name="queryMore">
- <documentation>Gets the next batch of sObjects from a query</documentation>
- <input message="tns:queryMoreRequest"/>
- <output message="tns:queryMoreResponse"/>
- <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- </operation>
-
- <operation name="search">
- <documentation>Search for sObjects</documentation>
- <input message="tns:searchRequest"/>
- <output message="tns:searchResponse"/>
- <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
- <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
- <fault message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getServerTimestamp">
- <documentation>Gets server timestamp</documentation>
- <input message="tns:getServerTimestampRequest"/>
- <output message="tns:getServerTimestampResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="setPassword">
- <documentation>Set a user's password</documentation>
- <input message="tns:setPasswordRequest"/>
- <output message="tns:setPasswordResponse"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="resetPassword">
- <documentation>Reset a user's password</documentation>
- <input message="tns:resetPasswordRequest"/>
- <output message="tns:resetPasswordResponse"/>
- <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="getUserInfo">
- <documentation>Returns standard information relevant to the current user</documentation>
- <input message="tns:getUserInfoRequest"/>
- <output message="tns:getUserInfoResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- <operation name="sendEmail">
- <documentation>Send outbound email</documentation>
- <input message="tns:sendEmailRequest"/>
- <output message="tns:sendEmailResponse"/>
- <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
- </operation>
-
- </portType>
-
- <!-- Soap Binding -->
- <binding name="SoapBinding" type="tns:Soap">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="login">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="LoginFault">
- <soap:fault name="LoginFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSObject">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSObjects">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeGlobal">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeLayout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeSoftphoneLayout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="describeTabs">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="create">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="update">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="upsert">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="merge">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="delete">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="undelete">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="emptyRecycleBin">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="retrieve">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="process">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- </operation>
- <operation name="convertLead">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="logout">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="invalidateSessions">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getDeleted">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getUpdated">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="query">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:header use="literal" message="tns:Header" part="MruHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="queryAll">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedQueryFault">
- <soap:fault name="MalformedQueryFault" use="literal"/>
- </fault>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="queryMore">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidQueryLocatorFault">
- <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- </operation>
- <operation name="search">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidSObjectFault">
- <soap:fault name="InvalidSObjectFault" use="literal"/>
- </fault>
- <fault name="InvalidFieldFault">
- <soap:fault name="InvalidFieldFault" use="literal"/>
- </fault>
- <fault name="MalformedSearchFault">
- <soap:fault name="MalformedSearchFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getServerTimestamp">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="setPassword">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="InvalidNewPasswordFault">
- <soap:fault name="InvalidNewPasswordFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="resetPassword">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="InvalidIdFault">
- <soap:fault name="InvalidIdFault" use="literal"/>
- </fault>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="getUserInfo">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
- <operation name="sendEmail">
- <soap:operation soapAction=""/>
- <input>
- <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
- <soap:header use="literal" message="tns:Header" part="CallOptions"/>
- <soap:body parts="parameters" use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnexpectedErrorFault">
- <soap:fault name="UnexpectedErrorFault" use="literal"/>
- </fault>
- </operation>
-
- </binding>
-
- <!-- Soap Service Endpoint -->
- <service name="SforceService">
- <documentation>Sforce SOAP API</documentation>
- <port binding="tns:SoapBinding" name="Soap">
- <soap:address location="https://www.salesforce.com/services/Soap/u/14.0"/>
- </port>
- </service>
-</definitions>
-
Added: trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl
===================================================================
--- trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl (rev 0)
+++ trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl 2009-04-15 21:04:19 UTC (rev 782)
@@ -0,0 +1,2852 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--
+Salesforce.com Partner Web Services API Version 15.0
+Generated on 2009-04-15 20:55:33 +0000.
+
+Copyright 1999-2009 salesforce.com, inc.
+All Rights Reserved
+-->
+
+<definitions targetNamespace="urn:partner.soap.sforce.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:fns="urn:fault.partner.soap.sforce.com"
+ xmlns:tns="urn:partner.soap.sforce.com"
+ xmlns:ens="urn:sobject.partner.soap.sforce.com">
+ <types>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
+
+ <import namespace="urn:partner.soap.sforce.com"/>
+
+
+ <!-- Dynamic sObject -->
+ <complexType name="sObject">
+ <sequence>
+ <element name="type" type="xsd:string"/>
+ <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="Id" type="tns:ID" nillable="true" />
+ <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
+
+ <import namespace="urn:sobject.partner.soap.sforce.com"/>
+
+ <!-- Our simple ID Type -->
+ <simpleType name="ID">
+ <restriction base="xsd:string">
+ <length value="18"/>
+ <pattern value='[a-zA-Z0-9]{18}'/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="QueryLocator">
+ <restriction base="xsd:string"/>
+ </simpleType>
+
+ <!-- Shared Result Types -->
+ <complexType name="QueryResult">
+ <sequence>
+ <element name="done" type="xsd:boolean"/>
+ <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
+ <element name="records" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="size" type="xsd:int"/>
+ </sequence>
+ </complexType>
+
+
+
+ <!-- Search Result -->
+ <complexType name="SearchResult">
+ <sequence>
+ <element name="searchRecords" minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SearchRecord">
+ <sequence>
+ <element name="record" type="ens:sObject"/>
+ </sequence>
+ </complexType>
+
+ <!-- GetUpdated Result -->
+ <complexType name="GetUpdatedResult">
+ <sequence>
+ <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
+ <element name="latestDateCovered" type="xsd:dateTime"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <!-- GetDeleted Result -->
+ <complexType name="GetDeletedResult">
+ <sequence>
+ <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
+ <element name="earliestDateAvailable" type="xsd:dateTime"/>
+ <element name="latestDateCovered" type="xsd:dateTime"/>
+ <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DeletedRecord">
+ <sequence>
+ <element name="deletedDate" type="xsd:dateTime"/>
+ <element name="id" type="tns:ID"/>
+ </sequence>
+ </complexType>
+
+
+ <complexType name="GetServerTimestampResult">
+ <sequence>
+ <element name="timestamp" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+
+
+ <!-- InvalidateSessions Result -->
+ <complexType name="InvalidateSessionsResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SetPasswordResult">
+ </complexType>
+
+ <complexType name="ResetPasswordResult">
+ <sequence>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="GetUserInfoResult">
+ <sequence>
+ <element name="accessibilityMode" type="xsd:boolean"/>
+ <element name="currencySymbol" type="xsd:string" nillable="true"/>
+ <element name="orgDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+ <element name="orgHasPersonAccounts" type="xsd:boolean"/>
+ <element name="organizationId" type="tns:ID"/>
+ <element name="organizationMultiCurrency" type="xsd:boolean"/>
+ <element name="organizationName" type="xsd:string"/>
+ <element name="profileId" type="tns:ID"/>
+ <element name="roleId" type="tns:ID" nillable="true"/>
+ <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+ <element name="userEmail" type="xsd:string"/>
+ <element name="userFullName" type="xsd:string"/>
+ <element name="userId" type="tns:ID"/>
+ <element name="userLanguage" type="xsd:string"/>
+ <element name="userLocale" type="xsd:string"/>
+ <element name="userName" type="xsd:string"/>
+ <element name="userTimeZone" type="xsd:string"/>
+ <element name="userType" type="xsd:string"/>
+ <element name="userUiSkin" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LoginResult">
+ <sequence>
+ <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
+ <element name="passwordExpired" type="xsd:boolean" />
+ <element name="sandbox" type="xsd:boolean"/>
+ <element name="serverUrl" type="xsd:string" nillable="true"/>
+ <element name="sessionId" type="xsd:string" nillable="true"/>
+
+ <element name="userId" type="tns:ID" nillable="true"/>
+ <element name="userInfo" type="tns:GetUserInfoResult" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="StatusCode">
+ <restriction base="xsd:string">
+ <enumeration value="ALREADY_IN_PROCESS"/>
+ <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
+ <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
+ <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
+ <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
+ <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
+ <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
+ <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
+ <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
+ <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
+ <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
+ <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
+ <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
+ <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
+ <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
+ <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
+ <enumeration value="CANNOT_REPARENT_RECORD"/>
+ <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
+ <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
+ <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
+ <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
+ <enumeration value="CIRCULAR_DEPENDENCY"/>
+ <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
+ <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_INDEX_EXISTS"/>
+ <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
+ <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
+ <enumeration value="DELETE_FAILED"/>
+ <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
+ <enumeration value="DEPENDENCY_EXISTS"/>
+ <enumeration value="DUPLICATE_CASE_SOLUTION"/>
+ <enumeration value="DUPLICATE_COMM_NICKNAME"/>
+ <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
+ <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
+ <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
+ <enumeration value="DUPLICATE_EXTERNAL_ID"/>
+ <enumeration value="DUPLICATE_MASTER_LABEL"/>
+ <enumeration value="DUPLICATE_USERNAME"/>
+ <enumeration value="DUPLICATE_VALUE"/>
+ <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
+ <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
+ <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
+ <enumeration value="ENTITY_IS_ARCHIVED"/>
+ <enumeration value="ENTITY_IS_DELETED"/>
+ <enumeration value="ENTITY_IS_LOCKED"/>
+ <enumeration value="ERROR_IN_MAILER"/>
+ <enumeration value="FAILED_ACTIVATION"/>
+ <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
+ <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
+ <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
+ <enumeration value="IMAGE_TOO_LARGE"/>
+ <enumeration value="INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
+ <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
+ <enumeration value="INVALID_ACCESS_LEVEL"/>
+ <enumeration value="INVALID_ARGUMENT_TYPE"/>
+ <enumeration value="INVALID_ASSIGNEE_TYPE"/>
+ <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="INVALID_BATCH_OPERATION"/>
+ <enumeration value="INVALID_CREDIT_CARD_INFO"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
+ <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
+ <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
+ <enumeration value="INVALID_CURRENCY_ISO"/>
+ <enumeration value="INVALID_EMAIL_ADDRESS"/>
+ <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
+ <enumeration value="INVALID_FIELD"/>
+ <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
+ <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
+ <enumeration value="INVALID_FILTER_ACTION"/>
+ <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
+ <enumeration value="INVALID_ID_FIELD"/>
+ <enumeration value="INVALID_INET_ADDRESS"/>
+ <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
+ <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
+ <enumeration value="INVALID_OPERATION"/>
+ <enumeration value="INVALID_OPERATOR"/>
+ <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
+ <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
+ <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
+ <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
+ <enumeration value="INVALID_SESSION_ID"/>
+ <enumeration value="INVALID_SETUP_OWNER"/>
+ <enumeration value="INVALID_STATUS"/>
+ <enumeration value="INVALID_TYPE"/>
+ <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
+ <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
+ <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
+ <enumeration value="LIMIT_EXCEEDED"/>
+ <enumeration value="MALFORMED_ID"/>
+ <enumeration value="MANAGER_NOT_DEFINED"/>
+ <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
+ <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
+ <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
+ <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
+ <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
+ <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
+ <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
+ <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
+ <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
+ <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
+ <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
+ <enumeration value="MAX_RULES_EXCEEDED"/>
+ <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
+ <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
+ <enumeration value="MAX_TM_RULES_EXCEEDED"/>
+ <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
+ <enumeration value="MERGE_FAILED"/>
+ <enumeration value="MISSING_ARGUMENT"/>
+ <enumeration value="MIXED_DML_OPERATION"/>
+ <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
+ <enumeration value="NO_APPLICABLE_PROCESS"/>
+ <enumeration value="NO_ATTACHMENT_PERMISSION"/>
+ <enumeration value="NO_MASS_MAIL_PERMISSION"/>
+ <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
+ <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
+ <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
+ <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
+ <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
+ <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
+ <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="REQUIRED_FIELD_MISSING"/>
+ <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
+ <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
+ <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
+ <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
+ <enumeration value="STRING_TOO_LONG"/>
+ <enumeration value="TABSET_LIMIT_EXCEEDED"/>
+ <enumeration value="TEMPLATE_NOT_ACTIVE"/>
+ <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
+ <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
+ <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="TOO_MANY_ENUM_VALUE"/>
+ <enumeration value="TRANSFER_REQUIRES_READ"/>
+ <enumeration value="UNABLE_TO_LOCK_ROW"/>
+ <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
+ <enumeration value="UNDELETE_FAILED"/>
+ <enumeration value="UNKNOWN_EXCEPTION"/>
+ <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
+ <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
+ <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="WRONG_CONTROLLER_TYPE"/>
+ </restriction>
+ </simpleType>
+
+
+ <complexType name="Error">
+ <sequence>
+ <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="message" type="xsd:string"/>
+ <element name="statusCode" type="tns:StatusCode"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SendEmailError">
+ <sequence>
+ <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="message" type="xsd:string"/>
+ <element name="statusCode" type="tns:StatusCode"/>
+ <element name="targetObjectId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="SaveResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UpsertResult">
+ <sequence>
+ <element name="created" type="xsd:boolean"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MergeRequest">
+ <sequence>
+ <element name="masterRecord" type="ens:sObject"/>
+ <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MergeResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ProcessRequest">
+ <sequence>
+ <element name="comments" type="xsd:string" nillable="true"/>
+ <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ProcessSubmitRequest">
+ <complexContent>
+ <extension base="tns:ProcessRequest">
+ <sequence>
+ <element name="objectId" type="tns:ID"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ProcessWorkitemRequest">
+ <complexContent>
+ <extension base="tns:ProcessRequest">
+ <sequence>
+ <element name="action" type="xsd:string"/>
+ <element name="workitemId" type="tns:ID"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ProcessResult">
+ <sequence>
+ <element name="actorIds" type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="entityId" type="tns:ID" nillable="true"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="instanceId" type="tns:ID" nillable="true"/>
+ <element name="instanceStatus" type="xsd:string" nillable="true"/>
+ <element name="newWorkitemIds" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DeleteResult">
+ <sequence>
+ <element name="errors" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UndeleteResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="EmptyRecycleBinResult">
+ <sequence>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LeadConvert">
+ <sequence>
+ <element name="accountId" type="tns:ID" nillable="true"/>
+ <element name="contactId" type="tns:ID" nillable="true"/>
+ <element name="convertedStatus" type="xsd:string"/>
+ <element name="doNotCreateOpportunity" type="xsd:boolean"/>
+ <element name="leadId" type="tns:ID"/>
+ <element name="opportunityName" type="xsd:string" nillable="true"/>
+ <element name="overwriteLeadSource" type="xsd:boolean"/>
+ <element name="ownerId" type="tns:ID" nillable="true"/>
+ <element name="sendNotificationEmail" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LeadConvertResult">
+ <sequence>
+ <element name="accountId" type="tns:ID" nillable="true"/>
+ <element name="contactId" type="tns:ID" nillable="true"/>
+ <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="leadId" type="tns:ID" nillable="true"/>
+ <element name="opportunityId" type="tns:ID" nillable="true"/>
+ <element name="success" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSObjectResult">
+ <sequence>
+ <element name="activateable" type="xsd:boolean"/>
+ <element name="childRelationships" type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="createable" type="xsd:boolean"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="deletable" type="xsd:boolean"/>
+ <element name="fields" type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="keyPrefix" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="labelPlural" type="xsd:string"/>
+ <element name="layoutable" type="xsd:boolean"/>
+ <element name="mergeable" type="xsd:boolean"/>
+ <element name="name" type="xsd:string"/>
+ <element name="queryable" type="xsd:boolean"/>
+ <element name="recordTypeInfos" type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="replicateable" type="xsd:boolean"/>
+ <element name="retrieveable" type="xsd:boolean"/>
+ <element name="searchable" type="xsd:boolean" />
+ <element name="triggerable" type="xsd:boolean" minOccurs="0"/>
+ <element name="undeletable" type="xsd:boolean"/>
+ <element name="updateable" type="xsd:boolean"/>
+ <element name="urlDetail" type="xsd:string" nillable="true"/>
+ <element name="urlEdit" type="xsd:string" nillable="true"/>
+ <element name="urlNew" type="xsd:string" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ChildRelationship">
+ <sequence>
+ <element name="cascadeDelete" type="xsd:boolean"/>
+ <element name="childSObject" type="xsd:string"/>
+ <element name="field" type="xsd:string"/>
+ <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeGlobalResult">
+ <sequence>
+ <element name="encoding" type="xsd:string" nillable="true"/>
+ <element name="maxBatchSize" type="xsd:int"/>
+ <element name="types" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="fieldType">
+ <restriction base="xsd:string">
+ <enumeration value="string"/>
+ <enumeration value="picklist"/>
+ <enumeration value="multipicklist"/>
+ <enumeration value="combobox"/>
+ <enumeration value="reference"/>
+ <enumeration value="base64"/>
+ <enumeration value="boolean"/>
+ <enumeration value="currency"/>
+ <enumeration value="textarea"/>
+ <enumeration value="int"/>
+ <enumeration value="double"/>
+ <enumeration value="percent"/>
+ <enumeration value="phone"/>
+ <enumeration value="id"/>
+ <enumeration value="date"/>
+ <enumeration value="datetime"/>
+ <enumeration value="time"/>
+ <enumeration value="url"/>
+ <enumeration value="email"/>
+ <enumeration value="encryptedstring"/>
+ <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
+ </restriction>
+ </simpleType>
+
+ <simpleType name="soapType">
+ <restriction base="xsd:string">
+ <enumeration value="tns:ID"/>
+ <enumeration value="xsd:base64Binary"/>
+ <enumeration value="xsd:boolean"/>
+ <enumeration value="xsd:double"/>
+ <enumeration value="xsd:int"/>
+ <enumeration value="xsd:string"/>
+ <enumeration value="xsd:date"/>
+ <enumeration value="xsd:dateTime"/>
+ <enumeration value="xsd:time"/>
+ <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
+ </restriction>
+ </simpleType>
+
+ <complexType name="Field">
+ <sequence>
+ <element name="autoNumber" type="xsd:boolean"/>
+ <element name="byteLength" type="xsd:int"/>
+ <element name="calculated" type="xsd:boolean"/>
+ <element name="calculatedFormula" type="xsd:string" minOccurs="0"/>
+ <element name="caseSensitive" type="xsd:boolean"/>
+ <element name="controllerName" type="xsd:string" minOccurs="0"/>
+ <element name="createable" type="xsd:boolean"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
+ <element name="defaultedOnCreate" type="xsd:boolean"/>
+ <element name="dependentPicklist" type="xsd:boolean" minOccurs="0"/>
+ <element name="digits" type="xsd:int"/>
+ <element name="externalId" type="xsd:boolean" minOccurs="0"/>
+ <element name="filterable" type="xsd:boolean"/>
+ <element name="htmlFormatted" type="xsd:boolean" minOccurs="0"/>
+ <element name="idLookup" type="xsd:boolean"/>
+ <element name="inlineHelpText" type="xsd:string" minOccurs="0"/>
+ <element name="label" type="xsd:string"/>
+ <element name="length" type="xsd:int"/>
+ <element name="name" type="xsd:string"/>
+ <element name="nameField" type="xsd:boolean"/>
+ <element name="namePointing" type="xsd:boolean" minOccurs="0"/>
+ <element name="nillable" type="xsd:boolean"/>
+ <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="precision" type="xsd:int"/>
+ <element name="referenceTo" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+ <element name="relationshipOrder" type="xsd:int" minOccurs="0"/>
+ <element name="restrictedPicklist" type="xsd:boolean"/>
+ <element name="scale" type="xsd:int"/>
+ <element name="soapType" type="tns:soapType"/>
+ <element name="sortable" type="xsd:boolean" minOccurs="0"/>
+ <element name="type" type="tns:fieldType"/>
+ <element name="unique" type="xsd:boolean"/>
+ <element name="updateable" type="xsd:boolean"/>
+ <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PicklistEntry">
+ <sequence>
+ <element name="active" type="xsd:boolean"/>
+ <element name="defaultValue" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="validFor" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutResult">
+ <sequence>
+ <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID"/>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutCallType">
+ <sequence>
+ <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
+ <element name="name" type="xsd:string"/>
+ <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutInfoField">
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutSection">
+ <sequence>
+ <element name="entityApiName" type="xsd:string"/>
+ <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeSoftphoneLayoutItem">
+ <sequence>
+ <element name="itemApiName" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutResult">
+ <sequence>
+ <element name="layouts" type="tns:DescribeLayout" maxOccurs="unbounded"/>
+ <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="recordTypeSelectorRequired" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayout">
+ <sequence>
+ <element name="buttonLayoutSection" type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
+ <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="editLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="id" type="tns:ID"/>
+
+
+ <element name="relatedLists" type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutSection">
+ <sequence>
+ <element name="columns" type="xsd:int"/>
+ <element name="heading" type="xsd:string"/>
+ <element name="layoutRows" type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
+ <element name="rows" type="xsd:int"/>
+ <element name="useCollapsibleSection" type="xsd:boolean"/>
+ <element name="useHeading" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutButtonSection">
+ <sequence>
+ <element name="detailButtons" type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutRow">
+ <sequence>
+ <element name="layoutItems" type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
+ <element name="numItems" type="xsd:int"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutItem">
+ <sequence>
+ <element name="editable" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="placeholder" type="xsd:boolean"/>
+ <element name="required" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutButton">
+ <sequence>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="label" type="xsd:string" nillable="true"/>
+ <element name="name" type="xsd:string" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeLayoutComponent">
+ <sequence>
+ <element name="displayLines" type="xsd:int"/>
+ <element name="tabOrder" type="xsd:int"/>
+ <element name="type" type="tns:layoutComponentType"/>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="layoutComponentType">
+ <restriction base="xsd:string">
+ <enumeration value="Field"/>
+ <enumeration value="Separator"/>
+ <enumeration value="SControl"/>
+ <enumeration value="EmptySpace"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="RecordTypeInfo">
+ <sequence>
+ <element name="available" type="xsd:boolean"/>
+ <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+ <element name="name" type="xsd:string"/>
+ <element name="recordTypeId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RecordTypeMapping">
+ <sequence>
+ <element name="available" type="xsd:boolean"/>
+ <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+ <element name="layoutId" type="tns:ID"/>
+ <element name="name" type="xsd:string"/>
+ <element name="picklistsForRecordType" type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="recordTypeId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PicklistForRecordType">
+ <sequence>
+ <element name="picklistName" type="xsd:string"/>
+ <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedList">
+ <sequence>
+ <element name="columns" type="tns:RelatedListColumn" maxOccurs="unbounded"/>
+ <element name="custom" type="xsd:boolean"/>
+ <element name="field" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="limitRows" type="xsd:int"/>
+ <element name="name" type="xsd:string"/>
+ <element name="sobject" type="xsd:string" nillable="true"/>
+ <element name="sort" type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedListColumn">
+ <sequence>
+ <element name="field" type="xsd:string" nillable="true"/>
+ <element name="format" type="xsd:string" nillable="true"/>
+ <element name="label" type="xsd:string"/>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="RelatedListSort">
+ <sequence>
+ <element name="ascending" type="xsd:boolean"/>
+ <element name="column" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+
+
+ <complexType name="EmailFileAttachment">
+ <sequence>
+ <element name="body" nillable="true" minOccurs="0" type="xsd:base64Binary"/>
+ <element name="fileName" type="xsd:string" />
+ </sequence>
+ </complexType>
+ <simpleType name="EmailPriority">
+ <restriction base="xsd:string">
+ <enumeration value="Highest"/>
+ <enumeration value="High"/>
+ <enumeration value="Normal"/>
+ <enumeration value="Low"/>
+ <enumeration value="Lowest"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="Email">
+ <sequence>
+ <element name="bccSender" type="xsd:boolean" nillable="true"/>
+ <element name="emailPriority" type="tns:EmailPriority" nillable="true"/>
+ <element name="replyTo" type="xsd:string" nillable="true"/>
+ <element name="saveAsActivity" type="xsd:boolean" nillable="true"/>
+ <element name="senderDisplayName" type="xsd:string" nillable="true"/>
+ <element name="subject" type="xsd:string" nillable="true"/>
+ <element name="useSignature" type="xsd:boolean" nillable="true"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MassEmailMessage">
+ <complexContent>
+ <extension base="tns:Email">
+ <sequence>
+ <element name="description" type="xsd:string" nillable="true"/>
+ <element name="targetObjectIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
+ <element name="templateId" type="tns:ID"/>
+ <element name="whatIds" minOccurs="0" maxOccurs="250" type="tns:ID" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="SingleEmailMessage">
+ <complexContent>
+ <extension base="tns:Email">
+ <sequence>
+ <element name="bccAddresses" minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
+ <element name="ccAddresses" minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
+ <element name="charset" type="xsd:string" nillable="true"/>
+ <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID" />
+ <element name="htmlBody" type="xsd:string" nillable="true"/>
+ <element name="fileAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
+ <element name="plainTextBody" type="xsd:string" nillable="true"/>
+ <element name="targetObjectId" type="tns:ID" nillable="true"/>
+ <element name="templateId" type="tns:ID" nillable="true"/>
+ <element name="toAddresses" minOccurs="0" maxOccurs="10" type="xsd:string" nillable="true"/>
+ <element name="whatId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="SendEmailResult">
+ <sequence>
+ <element name="errors" minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError" />
+ <element name="success" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+
+
+
+ <complexType name="DescribeTabSetResult">
+ <sequence>
+ <element name="label" type="xsd:string" />
+ <element name="logoUrl" type="xsd:string" />
+ <element name="namespace" type="xsd:string" minOccurs="0"/>
+ <element name="selected" type="xsd:boolean" />
+ <element name="tabs" type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="DescribeTab">
+ <sequence>
+ <element name="custom" type="xsd:boolean" />
+ <element name="iconUrl" type="xsd:string" />
+ <element name="label" type="xsd:string" />
+ <element name="miniIconUrl" type="xsd:string" />
+ <element name="sobjectName" type="xsd:string" nillable="true" />
+ <element name="url" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+
+
+
+
+ <!-- Login Message Types -->
+ <element name="login">
+ <complexType>
+ <sequence>
+ <element name="username" type="xsd:string"/>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="loginResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:LoginResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Describe Message Types -->
+ <element name="describeSObject">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeSObjectResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- DescibeSObjects Message Types -->
+ <element name="describeSObjects">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeSObjectsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs='0' maxOccurs='100'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Describe Global Message Types -->
+ <element name="describeGlobal">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeGlobalResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeGlobalResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="describeLayout">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="describeLayoutResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="describeSoftphoneLayout">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeSoftphoneLayoutResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="describeTabs">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="describeTabsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Message Types -->
+ <element name="create">
+ <complexType>
+ <sequence>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="createResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Send Email Types -->
+ <element name="sendEmail">
+ <complexType>
+ <sequence>
+ <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sendEmailResponse">
+ <complexType>
+ <sequence>
+ <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <!-- Update Message Types -->
+ <element name="update">
+ <complexType>
+ <sequence>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="updateResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Upsert Message Types -->
+ <element name="upsert">
+ <complexType>
+ <sequence>
+ <element name="externalIDFieldName" type="xsd:string"/>
+ <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="upsertResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Merge Message Types -->
+ <element name="merge">
+ <complexType>
+ <sequence>
+ <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="mergeResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Delete Message Types -->
+ <element name="delete">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="deleteResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Undelete Message Types -->
+ <element name="undelete">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="undeleteResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- EmptyRecycleBin Message Types -->
+ <element name="emptyRecycleBin">
+ <complexType>
+ <sequence>
+ <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="emptyRecycleBinResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Process Message Types -->
+ <element name="process">
+ <complexType>
+ <sequence>
+ <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="processResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Retrieve (ID List) Message Types -->
+ <element name="retrieve">
+ <complexType>
+ <sequence>
+ <element name="fieldList" type="xsd:string"/>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="retrieveResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Convert Lead Message Types -->
+ <element name="convertLead">
+ <complexType>
+ <sequence>
+ <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="convertLeadResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Get Updated Message Types -->
+ <element name="getUpdated">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="startDate" type="xsd:dateTime"/>
+ <element name="endDate" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getUpdatedResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetUpdatedResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Get Deleted Message Types -->
+ <element name="getDeleted">
+ <complexType>
+ <sequence>
+ <element name="sObjectType" type="xsd:string"/>
+ <element name="startDate" type="xsd:dateTime"/>
+ <element name="endDate" type="xsd:dateTime"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getDeletedResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetDeletedResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <!-- Logout current session -->
+ <element name="logout">
+ <complexType>
+ </complexType>
+ </element>
+
+ <element name="logoutResponse">
+ <complexType>
+ </complexType>
+ </element>
+
+ <!-- Invalidate a list of session ids -->
+ <element name="invalidateSessions">
+ <complexType>
+ <sequence>
+ <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="invalidateSessionsResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Query -->
+ <element name="query">
+ <complexType>
+ <sequence>
+ <element name="queryString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Create Query All -->
+ <element name="queryAll">
+ <complexType>
+ <sequence>
+ <element name="queryString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryAllResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- Next Batch of sObjects from a query -->
+ <element name="queryMore">
+ <complexType>
+ <sequence>
+ <element name="queryLocator" type="tns:QueryLocator"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="queryMoreResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:QueryResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Create Search -->
+ <element name="search">
+ <complexType>
+ <sequence>
+ <element name="searchString" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="searchResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SearchResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <element name="getServerTimestamp">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="getServerTimestampResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetServerTimestampResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="setPassword">
+ <complexType>
+ <sequence>
+ <element name="userId" type="tns:ID"/>
+ <element name="password" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="setPasswordResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:SetPasswordResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="resetPassword">
+ <complexType>
+ <sequence>
+ <element name="userId" type="tns:ID"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="resetPasswordResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:ResetPasswordResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getUserInfo">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+ <element name="getUserInfoResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="tns:GetUserInfoResult"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <!-- Header Elements -->
+ <element name="SessionHeader">
+ <complexType>
+ <sequence>
+ <element name="sessionId" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="LoginScopeHeader">
+ <complexType>
+ <sequence>
+ <element name="organizationId" type="tns:ID"/>
+ <element name="portalId" type="tns:ID" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="CallOptions">
+ <complexType>
+ <sequence>
+ <element name="client" type="xsd:string" nillable="true"/>
+ <element name="defaultNamespace" type="xsd:string" nillable="true"/>
+
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <element name="QueryOptions">
+ <complexType>
+ <sequence>
+ <element name="batchSize" type="xsd:int" minOccurs="0"/>
+
+ </sequence>
+ </complexType>
+ </element>
+
+
+ <simpleType name="DebugLevel">
+ <restriction base="xsd:string">
+ <enumeration value="None"/>
+ <enumeration value="DebugOnly"/>
+ <enumeration value="Db"/>
+ </restriction>
+ </simpleType>
+ <element name="DebuggingHeader">
+ <complexType>
+ <sequence>
+ <element name="debugLevel" type="tns:DebugLevel"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="DebuggingInfo">
+ <complexType>
+ <sequence>
+ <element name="debugLog" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="AllowFieldTruncationHeader">
+ <complexType>
+ <sequence>
+ <element name="allowFieldTruncation" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <!-- ideally this could of just been elem name="..." type="xsd:boolean"
+ but is required to be nested within a complexType for .NET 1.1 compatibility -->
+ <element name="MruHeader">
+ <complexType>
+ <sequence>
+ <element name="updateMru" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="EmailHeader">
+ <complexType>
+ <sequence>
+ <element name="triggerAutoResponseEmail" type="xsd:boolean"/>
+ <element name="triggerOtherEmail" type="xsd:boolean"/>
+ <element name="triggerUserEmail" type="xsd:boolean"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="AssignmentRuleHeader">
+ <complexType>
+ <sequence>
+ <element name="assignmentRuleId" type="tns:ID" nillable="true" />
+ <element name="useDefaultRule" type="xsd:boolean" nillable="true" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="UserTerritoryDeleteHeader">
+ <complexType>
+ <sequence>
+ <element name="transferToUserId" type="tns:ID" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+
+
+ <element name="LocaleOptions">
+ <complexType>
+ <sequence>
+ <element name="language" type="xsd:string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+
+ <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
+
+ <simpleType name="ExceptionCode">
+ <restriction base="xsd:string">
+ <enumeration value="API_CURRENTLY_DISABLED"/>
+ <enumeration value="API_DISABLED_FOR_ORG"/>
+ <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
+ <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+ <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+ <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+ <enumeration value="DUPLICATE_VALUE"/>
+ <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
+ <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+ <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
+ <enumeration value="EXCEEDED_ID_LIMIT"/>
+ <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
+ <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
+ <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
+ <enumeration value="EXCEEDED_QUOTA"/>
+ <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
+ <enumeration value="INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="INACTIVE_PORTAL"/>
+ <enumeration value="INSUFFICIENT_ACCESS"/>
+ <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="INVALID_BATCH_SIZE"/>
+ <enumeration value="INVALID_CLIENT"/>
+ <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="INVALID_FIELD"/>
+ <enumeration value="INVALID_FILTER_LANGUAGE"/>
+ <enumeration value="INVALID_FILTER_VALUE"/>
+ <enumeration value="INVALID_ID_FIELD"/>
+ <enumeration value="INVALID_LOCALE_LANGUAGE"/>
+ <enumeration value="INVALID_LOCATOR"/>
+ <enumeration value="INVALID_LOGIN"/>
+ <enumeration value="INVALID_NEW_PASSWORD"/>
+ <enumeration value="INVALID_OPERATION"/>
+ <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+ <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
+ <enumeration value="INVALID_QUERY_LOCATOR"/>
+ <enumeration value="INVALID_QUERY_SCOPE"/>
+ <enumeration value="INVALID_REPLICATION_DATE"/>
+ <enumeration value="INVALID_SEARCH"/>
+ <enumeration value="INVALID_SEARCH_SCOPE"/>
+ <enumeration value="INVALID_SESSION_ID"/>
+ <enumeration value="INVALID_SOAP_HEADER"/>
+ <enumeration value="INVALID_SSO_GATEWAY_URL"/>
+ <enumeration value="INVALID_TYPE"/>
+ <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="LIMIT_EXCEEDED"/>
+ <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
+ <enumeration value="LOGIN_CHALLENGE_PENDING"/>
+ <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
+ <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
+ <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
+ <enumeration value="MALFORMED_ID"/>
+ <enumeration value="MALFORMED_QUERY"/>
+ <enumeration value="MALFORMED_SEARCH"/>
+ <enumeration value="MISSING_ARGUMENT"/>
+ <enumeration value="NOT_MODIFIED"/>
+ <enumeration value="NO_SOFTPHONE_LAYOUT"/>
+ <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="OPERATION_TOO_LARGE"/>
+ <enumeration value="ORG_LOCKED"/>
+ <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
+ <enumeration value="PASSWORD_LOCKOUT"/>
+ <enumeration value="PORTAL_NO_ACCESS"/>
+ <enumeration value="QUERY_TIMEOUT"/>
+ <enumeration value="QUERY_TOO_COMPLICATED"/>
+ <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
+ <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="SERVER_UNAVAILABLE"/>
+ <enumeration value="SSO_SERVICE_DOWN"/>
+ <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="TRIAL_EXPIRED"/>
+ <enumeration value="UNKNOWN_EXCEPTION"/>
+ <enumeration value="UNSUPPORTED_API_VERSION"/>
+ <enumeration value="UNSUPPORTED_CLIENT"/>
+ </restriction>
+ </simpleType>
+ <!-- For convenience these QNames are returned in the standard soap faultcode element -->
+ <simpleType name="FaultCode">
+ <restriction base="xsd:QName">
+ <enumeration value="fns:API_CURRENTLY_DISABLED"/>
+ <enumeration value="fns:API_DISABLED_FOR_ORG"/>
+ <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+ <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
+ <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+ <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+ <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:DUPLICATE_VALUE"/>
+ <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
+ <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
+ <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
+ <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
+ <enumeration value="fns:EXCEEDED_QUOTA"/>
+ <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
+ <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
+ <enumeration value="fns:INACTIVE_PORTAL"/>
+ <enumeration value="fns:INSUFFICIENT_ACCESS"/>
+ <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
+ <enumeration value="fns:INVALID_BATCH_SIZE"/>
+ <enumeration value="fns:INVALID_CLIENT"/>
+ <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
+ <enumeration value="fns:INVALID_FIELD"/>
+ <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
+ <enumeration value="fns:INVALID_FILTER_VALUE"/>
+ <enumeration value="fns:INVALID_ID_FIELD"/>
+ <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
+ <enumeration value="fns:INVALID_LOCATOR"/>
+ <enumeration value="fns:INVALID_LOGIN"/>
+ <enumeration value="fns:INVALID_NEW_PASSWORD"/>
+ <enumeration value="fns:INVALID_OPERATION"/>
+ <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+ <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
+ <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
+ <enumeration value="fns:INVALID_QUERY_SCOPE"/>
+ <enumeration value="fns:INVALID_REPLICATION_DATE"/>
+ <enumeration value="fns:INVALID_SEARCH"/>
+ <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
+ <enumeration value="fns:INVALID_SESSION_ID"/>
+ <enumeration value="fns:INVALID_SOAP_HEADER"/>
+ <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
+ <enumeration value="fns:INVALID_TYPE"/>
+ <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
+ <enumeration value="fns:LIMIT_EXCEEDED"/>
+ <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
+ <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
+ <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
+ <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
+ <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
+ <enumeration value="fns:MALFORMED_ID"/>
+ <enumeration value="fns:MALFORMED_QUERY"/>
+ <enumeration value="fns:MALFORMED_SEARCH"/>
+ <enumeration value="fns:MISSING_ARGUMENT"/>
+ <enumeration value="fns:NOT_MODIFIED"/>
+ <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
+ <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
+ <enumeration value="fns:OPERATION_TOO_LARGE"/>
+ <enumeration value="fns:ORG_LOCKED"/>
+ <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
+ <enumeration value="fns:PASSWORD_LOCKOUT"/>
+ <enumeration value="fns:PORTAL_NO_ACCESS"/>
+ <enumeration value="fns:QUERY_TIMEOUT"/>
+ <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
+ <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
+ <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
+ <enumeration value="fns:SERVER_UNAVAILABLE"/>
+ <enumeration value="fns:SSO_SERVICE_DOWN"/>
+ <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
+ <enumeration value="fns:TRIAL_EXPIRED"/>
+ <enumeration value="fns:UNKNOWN_EXCEPTION"/>
+ <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
+ <enumeration value="fns:UNSUPPORTED_CLIENT"/>
+ </restriction>
+ </simpleType>
+
+
+ <!-- Fault -->
+ <complexType name="ApiFault">
+ <sequence>
+ <element name="exceptionCode" type="fns:ExceptionCode"/>
+ <element name="exceptionMessage" type="xsd:string"/>
+
+ </sequence>
+ </complexType>
+
+ <element name="fault" type="fns:ApiFault" />
+
+ <complexType name="ApiQueryFault">
+ <complexContent>
+ <extension base="fns:ApiFault">
+ <sequence>
+ <element name="row" type="xsd:int"/>
+ <element name="column" type="xsd:int"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="LoginFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="LoginFault" type="fns:LoginFault"/>
+
+ <complexType name="InvalidQueryLocatorFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
+
+ <complexType name="InvalidNewPasswordFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
+
+ <complexType name="InvalidIdFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
+
+ <complexType name="UnexpectedErrorFault">
+ <complexContent>
+ <extension base="fns:ApiFault"/>
+ </complexContent>
+ </complexType>
+ <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
+
+ <complexType name="InvalidFieldFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
+
+ <complexType name="InvalidSObjectFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
+
+ <complexType name="MalformedQueryFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
+
+ <complexType name="MalformedSearchFault">
+ <complexContent>
+ <extension base="fns:ApiQueryFault"/>
+ </complexContent>
+ </complexType>
+ <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
+
+
+ </schema>
+ </types>
+
+ <!-- Header Message -->
+ <message name="Header">
+ <part element="tns:LoginScopeHeader" name="LoginScopeHeader"/>
+ <part element="tns:SessionHeader" name="SessionHeader"/>
+
+ <part element="tns:CallOptions" name="CallOptions"/>
+
+ <part element="tns:QueryOptions" name="QueryOptions"/>
+ <part element="tns:AssignmentRuleHeader" name="AssignmentRuleHeader"/>
+ <part element="tns:AllowFieldTruncationHeader" name="AllowFieldTruncationHeader"/>
+ <part element="tns:MruHeader" name="MruHeader"/>
+ <part element="tns:EmailHeader" name="EmailHeader"/>
+
+ <part element="tns:UserTerritoryDeleteHeader" name="UserTerritoryDeleteHeader"/>
+
+ <part element="tns:DebuggingHeader" name="DebuggingHeader"/>
+ <part element="tns:DebuggingInfo" name="DebuggingInfo"/>
+ <part element="tns:LocaleOptions" name="LocaleOptions"/>
+ </message>
+
+ <!-- Fault Messages -->
+
+ <message name="ApiFault">
+ <part name="fault" element="fns:fault"/>
+ </message>
+
+ <message name="LoginFault">
+ <part name="fault" element="fns:LoginFault"/>
+ </message>
+ <message name="InvalidQueryLocatorFault">
+ <part name="fault" element="fns:InvalidQueryLocatorFault"/>
+ </message>
+ <message name="InvalidNewPasswordFault">
+ <part name="fault" element="fns:InvalidNewPasswordFault"/>
+ </message>
+ <message name="InvalidIdFault">
+ <part name="fault" element="fns:InvalidIdFault"/>
+ </message>
+ <message name="UnexpectedErrorFault">
+ <part name="fault" element="fns:UnexpectedErrorFault"/>
+ </message>
+ <message name="InvalidFieldFault">
+ <part name="fault" element="fns:InvalidFieldFault"/>
+ </message>
+ <message name="InvalidSObjectFault">
+ <part name="fault" element="fns:InvalidSObjectFault"/>
+ </message>
+ <message name="MalformedQueryFault">
+ <part name="fault" element="fns:MalformedQueryFault"/>
+ </message>
+ <message name="MalformedSearchFault">
+ <part name="fault" element="fns:MalformedSearchFault"/>
+ </message>
+
+
+ <!-- Method Messages -->
+ <message name="loginRequest">
+ <part element="tns:login" name="parameters"/>
+ </message>
+ <message name="loginResponse">
+ <part element="tns:loginResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSObjectRequest">
+ <part element="tns:describeSObject" name="parameters"/>
+ </message>
+ <message name="describeSObjectResponse">
+ <part element="tns:describeSObjectResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSObjectsRequest">
+ <part element="tns:describeSObjects" name="parameters"/>
+ </message>
+ <message name="describeSObjectsResponse">
+ <part element="tns:describeSObjectsResponse" name="parameters"/>
+ </message>
+
+ <message name="describeGlobalRequest">
+ <part element="tns:describeGlobal" name="parameters"/>
+ </message>
+ <message name="describeGlobalResponse">
+ <part element="tns:describeGlobalResponse" name="parameters"/>
+ </message>
+
+ <message name="describeLayoutRequest">
+ <part element="tns:describeLayout" name="parameters"/>
+ </message>
+ <message name="describeLayoutResponse">
+ <part element="tns:describeLayoutResponse" name="parameters"/>
+ </message>
+
+ <message name="describeSoftphoneLayoutRequest">
+ <part element="tns:describeSoftphoneLayout" name="parameters"/>
+ </message>
+ <message name="describeSoftphoneLayoutResponse">
+ <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
+ </message>
+
+ <message name="describeTabsRequest">
+ <part element="tns:describeTabs" name="parameters"/>
+ </message>
+ <message name="describeTabsResponse">
+ <part element="tns:describeTabsResponse" name="parameters"/>
+ </message>
+
+ <message name="createRequest">
+ <part element="tns:create" name="parameters"/>
+ </message>
+ <message name="createResponse">
+ <part element="tns:createResponse" name="parameters"/>
+ </message>
+
+ <message name="updateRequest">
+ <part element="tns:update" name="parameters"/>
+ </message>
+ <message name="updateResponse">
+ <part element="tns:updateResponse" name="parameters"/>
+ </message>
+
+ <message name="upsertRequest">
+ <part element="tns:upsert" name="parameters"/>
+ </message>
+ <message name="upsertResponse">
+ <part element="tns:upsertResponse" name="parameters"/>
+ </message>
+
+ <message name="mergeRequest">
+ <part element="tns:merge" name="parameters"/>
+ </message>
+ <message name="mergeResponse">
+ <part element="tns:mergeResponse" name="parameters"/>
+ </message>
+
+ <message name="deleteRequest">
+ <part element="tns:delete" name="parameters"/>
+ </message>
+ <message name="deleteResponse">
+ <part element="tns:deleteResponse" name="parameters"/>
+ </message>
+
+ <message name="undeleteRequest">
+ <part element="tns:undelete" name="parameters"/>
+ </message>
+ <message name="undeleteResponse">
+ <part element="tns:undeleteResponse" name="parameters"/>
+ </message>
+
+ <message name="emptyRecycleBinRequest">
+ <part element="tns:emptyRecycleBin" name="parameters"/>
+ </message>
+ <message name="emptyRecycleBinResponse">
+ <part element="tns:emptyRecycleBinResponse" name="parameters"/>
+ </message>
+
+ <message name="retrieveRequest">
+ <part element="tns:retrieve" name="parameters"/>
+ </message>
+ <message name="retrieveResponse">
+ <part element="tns:retrieveResponse" name="parameters"/>
+ </message>
+
+ <message name="processRequest">
+ <part element="tns:process" name="parameters"/>
+ </message>
+ <message name="processResponse">
+ <part element="tns:processResponse" name="parameters"/>
+ </message>
+
+ <message name="convertLeadRequest">
+ <part element="tns:convertLead" name="parameters"/>
+ </message>
+ <message name="convertLeadResponse">
+ <part element="tns:convertLeadResponse" name="parameters"/>
+ </message>
+
+ <message name="logoutRequest">
+ <part element="tns:logout" name="parameters"/>
+ </message>
+ <message name="logoutResponse">
+ <part element="tns:logoutResponse" name="parameters"/>
+ </message>
+
+ <message name="invalidateSessionsRequest">
+ <part element="tns:invalidateSessions" name="parameters"/>
+ </message>
+ <message name="invalidateSessionsResponse">
+ <part element="tns:invalidateSessionsResponse" name="parameters"/>
+ </message>
+
+ <message name="getDeletedRequest">
+ <part element="tns:getDeleted" name="parameters"/>
+ </message>
+ <message name="getDeletedResponse">
+ <part element="tns:getDeletedResponse" name="parameters"/>
+ </message>
+
+ <message name="getUpdatedRequest">
+ <part element="tns:getUpdated" name="parameters"/>
+ </message>
+ <message name="getUpdatedResponse">
+ <part element="tns:getUpdatedResponse" name="parameters"/>
+ </message>
+
+ <message name="queryRequest">
+ <part element="tns:query" name="parameters"/>
+ </message>
+ <message name="queryResponse">
+ <part element="tns:queryResponse" name="parameters"/>
+ </message>
+
+ <message name="queryAllRequest">
+ <part element="tns:queryAll" name="parameters"/>
+ </message>
+ <message name="queryAllResponse">
+ <part element="tns:queryAllResponse" name="parameters"/>
+ </message>
+
+ <message name="queryMoreRequest">
+ <part element="tns:queryMore" name="parameters"/>
+ </message>
+ <message name="queryMoreResponse">
+ <part element="tns:queryMoreResponse" name="parameters"/>
+ </message>
+
+ <message name="searchRequest">
+ <part element="tns:search" name="parameters"/>
+ </message>
+ <message name="searchResponse">
+ <part element="tns:searchResponse" name="parameters"/>
+ </message>
+
+ <message name="getServerTimestampRequest">
+ <part element="tns:getServerTimestamp" name="parameters"/>
+ </message>
+ <message name="getServerTimestampResponse">
+ <part element="tns:getServerTimestampResponse" name="parameters"/>
+ </message>
+
+ <message name="setPasswordRequest">
+ <part element="tns:setPassword" name="parameters"/>
+ </message>
+ <message name="setPasswordResponse">
+ <part element="tns:setPasswordResponse" name="parameters"/>
+ </message>
+
+ <message name="resetPasswordRequest">
+ <part element="tns:resetPassword" name="parameters"/>
+ </message>
+ <message name="resetPasswordResponse">
+ <part element="tns:resetPasswordResponse" name="parameters"/>
+ </message>
+
+ <message name="getUserInfoRequest">
+ <part element="tns:getUserInfo" name="parameters"/>
+ </message>
+ <message name="getUserInfoResponse">
+ <part element="tns:getUserInfoResponse" name="parameters"/>
+ </message>
+
+ <message name="sendEmailRequest">
+ <part element="tns:sendEmail" name="parameters"/>
+ </message>
+ <message name="sendEmailResponse">
+ <part element="tns:sendEmailResponse" name="parameters"/>
+ </message>
+
+
+
+ <!-- Soap PortType -->
+ <portType name="Soap">
+ <operation name="login">
+ <documentation>Login to the Salesforce.com SOAP Api</documentation>
+ <input message="tns:loginRequest"/>
+ <output message="tns:loginResponse"/>
+ <fault message="tns:LoginFault" name="LoginFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="describeSObject">
+ <documentation>Describe an sObject</documentation>
+ <input message="tns:describeSObjectRequest"/>
+ <output message="tns:describeSObjectResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeSObjects">
+ <documentation>Describe a number sObjects</documentation>
+ <input message="tns:describeSObjectsRequest"/>
+ <output message="tns:describeSObjectsResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeGlobal">
+ <documentation>Describe the Global state</documentation>
+ <input message="tns:describeGlobalRequest"/>
+ <output message="tns:describeGlobalResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeLayout">
+ <documentation>Describe the layout of an sObject</documentation>
+ <input message="tns:describeLayoutRequest"/>
+ <output message="tns:describeLayoutResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="describeSoftphoneLayout">
+ <documentation>Describe the layout of the SoftPhone</documentation>
+ <input message="tns:describeSoftphoneLayoutRequest"/>
+ <output message="tns:describeSoftphoneLayoutResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="describeTabs">
+ <documentation>Describe the tabs that appear on a users page</documentation>
+ <input message="tns:describeTabsRequest"/>
+ <output message="tns:describeTabsResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="create">
+ <documentation>Create a set of new sObjects</documentation>
+ <input message="tns:createRequest"/>
+ <output message="tns:createResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="update">
+ <documentation>Update a set of sObjects</documentation>
+ <input message="tns:updateRequest"/>
+ <output message="tns:updateResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="upsert">
+ <documentation>Update or insert a set of sObjects based on object id</documentation>
+ <input message="tns:upsertRequest"/>
+ <output message="tns:upsertResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="merge">
+ <documentation>Merge and update a set of sObjects based on object id</documentation>
+ <input message="tns:mergeRequest"/>
+ <output message="tns:mergeResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="delete">
+ <documentation>Delete a set of sObjects</documentation>
+ <input message="tns:deleteRequest"/>
+ <output message="tns:deleteResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="undelete">
+ <documentation>Undelete a set of sObjects</documentation>
+ <input message="tns:undeleteRequest"/>
+ <output message="tns:undeleteResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="emptyRecycleBin">
+ <documentation>Empty a set of sObjects from the recycle bin</documentation>
+ <input message="tns:emptyRecycleBinRequest"/>
+ <output message="tns:emptyRecycleBinResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="retrieve">
+ <documentation>Get a set of sObjects</documentation>
+ <input message="tns:retrieveRequest"/>
+ <output message="tns:retrieveResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="process">
+ <documentation>Submit an entity to a workflow process or process a workitem</documentation>
+ <input message="tns:processRequest"/>
+ <output message="tns:processResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ </operation>
+
+ <operation name="convertLead">
+ <documentation>convert a set of leads</documentation>
+ <input message="tns:convertLeadRequest"/>
+ <output message="tns:convertLeadResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="logout">
+ <documentation>Logout the current user, invalidating the current session.</documentation>
+ <input message="tns:logoutRequest"/>
+ <output message="tns:logoutResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="invalidateSessions">
+ <documentation>Logs out and invalidates session ids</documentation>
+ <input message="tns:invalidateSessionsRequest"/>
+ <output message="tns:invalidateSessionsResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getDeleted">
+ <documentation>Get the IDs for deleted sObjects</documentation>
+ <input message="tns:getDeletedRequest"/>
+ <output message="tns:getDeletedResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getUpdated">
+ <documentation>Get the IDs for updated sObjects</documentation>
+ <input message="tns:getUpdatedRequest"/>
+ <output message="tns:getUpdatedResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="query">
+ <documentation>Create a Query Cursor</documentation>
+ <input message="tns:queryRequest"/>
+ <output message="tns:queryResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ </operation>
+
+ <operation name="queryAll">
+ <documentation>Create a Query Cursor, including deleted sObjects</documentation>
+ <input message="tns:queryAllRequest"/>
+ <output message="tns:queryAllResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ </operation>
+
+ <operation name="queryMore">
+ <documentation>Gets the next batch of sObjects from a query</documentation>
+ <input message="tns:queryMoreRequest"/>
+ <output message="tns:queryMoreResponse"/>
+ <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ </operation>
+
+ <operation name="search">
+ <documentation>Search for sObjects</documentation>
+ <input message="tns:searchRequest"/>
+ <output message="tns:searchResponse"/>
+ <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+ <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+ <fault message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getServerTimestamp">
+ <documentation>Gets server timestamp</documentation>
+ <input message="tns:getServerTimestampRequest"/>
+ <output message="tns:getServerTimestampResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="setPassword">
+ <documentation>Set a user's password</documentation>
+ <input message="tns:setPasswordRequest"/>
+ <output message="tns:setPasswordResponse"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="resetPassword">
+ <documentation>Reset a user's password</documentation>
+ <input message="tns:resetPasswordRequest"/>
+ <output message="tns:resetPasswordResponse"/>
+ <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="getUserInfo">
+ <documentation>Returns standard information relevant to the current user</documentation>
+ <input message="tns:getUserInfoRequest"/>
+ <output message="tns:getUserInfoResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ <operation name="sendEmail">
+ <documentation>Send outbound email</documentation>
+ <input message="tns:sendEmailRequest"/>
+ <output message="tns:sendEmailResponse"/>
+ <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+ </operation>
+
+ </portType>
+
+ <!-- Soap Binding -->
+ <binding name="SoapBinding" type="tns:Soap">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="login">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="LoginFault">
+ <soap:fault name="LoginFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSObject">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSObjects">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeGlobal">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeLayout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeSoftphoneLayout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="describeTabs">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="create">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="update">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="upsert">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="merge">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="delete">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="undelete">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="emptyRecycleBin">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="retrieve">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="process">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="convertLead">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+ <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="logout">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="invalidateSessions">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getDeleted">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getUpdated">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="query">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="queryAll">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedQueryFault">
+ <soap:fault name="MalformedQueryFault" use="literal"/>
+ </fault>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="queryMore">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidQueryLocatorFault">
+ <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="search">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidSObjectFault">
+ <soap:fault name="InvalidSObjectFault" use="literal"/>
+ </fault>
+ <fault name="InvalidFieldFault">
+ <soap:fault name="InvalidFieldFault" use="literal"/>
+ </fault>
+ <fault name="MalformedSearchFault">
+ <soap:fault name="MalformedSearchFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getServerTimestamp">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="setPassword">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="InvalidNewPasswordFault">
+ <soap:fault name="InvalidNewPasswordFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="resetPassword">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="InvalidIdFault">
+ <soap:fault name="InvalidIdFault" use="literal"/>
+ </fault>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getUserInfo">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="sendEmail">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+ <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+ <soap:body parts="parameters" use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="UnexpectedErrorFault">
+ <soap:fault name="UnexpectedErrorFault" use="literal"/>
+ </fault>
+ </operation>
+
+ </binding>
+
+ <!-- Soap Service Endpoint -->
+ <service name="SforceService">
+ <documentation>Sforce SOAP API</documentation>
+ <port binding="tns:SoapBinding" name="Soap">
+ <soap:address location="https://www.salesforce.com/services/Soap/u/15.0"/>
+ </port>
+ </service>
+</definitions>
+
15 years, 8 months