Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravera2010-05-11 15:26:00 +0000
committeravera2010-05-11 15:26:00 +0000
commit4523a01b834838f4e87743424e077fa16cd5e001 (patch)
tree68d4c6e6f3568ca932ae355446c3f3f473076fca /plugins/org.eclipse.wst.server.core/servercore/org/eclipse
parent37043329ab28d7dcbe19e6c587bf7403fa3c5237 (diff)
downloadwebtools.servertools-4523a01b834838f4e87743424e077fa16cd5e001.tar.gz
webtools.servertools-4523a01b834838f4e87743424e077fa16cd5e001.tar.xz
webtools.servertools-4523a01b834838f4e87743424e077fa16cd5e001.zip
[311794] PublisherDelegate do not provide delta kind information on execute()
Diffstat (limited to 'plugins/org.eclipse.wst.server.core/servercore/org/eclipse')
-rw-r--r--plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/TaskModel.java11
-rw-r--r--plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java28
2 files changed, 37 insertions, 2 deletions
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/TaskModel.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/TaskModel.java
index beab5c36a..2b7504e25 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/TaskModel.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/TaskModel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,6 +51,15 @@ public class TaskModel {
public static final String TASK_MODULES = "modules";
/**
+ * Task model id for an array of delta kinds that maps to the modules in the TASK_MODULES.
+ * The value is a List containing Integer for the delta kind id.
+ *
+ * @see #getObject(String)
+ * @see TaskModel#putObject(String, Object)
+ */
+ public static final String TASK_DELTA_KINDS = "deltaKinds";
+
+ /**
* Task model id for a launch mode.
*
* @see #getObject(String)
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
index b3fbff894..e1cf40af2 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
@@ -914,7 +914,7 @@ public abstract class ServerBehaviourDelegate {
tempMulti.addAll(taskStatus);
// execute publishers
- taskStatus = executePublishers(kind, moduleList, monitor, info2);
+ taskStatus = executePublishers(kind, moduleList, deltaKindList, monitor, info2);
if (taskStatus != null && !taskStatus.isOK())
tempMulti.addAll(taskStatus);
@@ -1118,6 +1118,7 @@ public abstract class ServerBehaviourDelegate {
* Execute publishers.
*
* @param kind the publish kind
+ * @param modules the list of modules
* @param monitor a progress monitor, or <code>null</code> if progress
* reporting and cancellation are not desired
* @param info the IAdaptable (or <code>null</code>) provided by the
@@ -1127,8 +1128,30 @@ public abstract class ServerBehaviourDelegate {
* org.eclipse.swt.widgets.Shell.class
* @throws CoreException
* @since 1.1
+ * @deprecated Replaced by
+ * {@link #executePublishers(int, List, List, IProgressMonitor, IAdaptable)}
*/
protected MultiStatus executePublishers(int kind, List<IModule[]> modules, IProgressMonitor monitor, IAdaptable info) throws CoreException {
+ return executePublishers(kind, modules, null, monitor, info);
+ }
+
+ /**
+ * Execute publishers.
+ *
+ * @param kind the publish kind
+ * @param modules the list of modules
+ * @param deltaKinds the list of delta kind that maps to the list of modules
+ * @param monitor a progress monitor, or <code>null</code> if progress
+ * reporting and cancellation are not desired
+ * @param info the IAdaptable (or <code>null</code>) provided by the
+ * caller in order to supply UI information for prompting the
+ * user if necessary. When this parameter is not <code>null</code>,
+ * it should minimally contain an adapter for the
+ * org.eclipse.swt.widgets.Shell.class
+ * @throws CoreException
+ * @since 1.1
+ */
+ protected MultiStatus executePublishers(int kind, List<IModule[]> modules, List<Integer> deltaKinds, IProgressMonitor monitor, IAdaptable info) throws CoreException {
Publisher[] publishers = ((Server)getServer()).getEnabledPublishers();
int size = publishers.length;
Trace.trace(Trace.FINEST, "Executing publishers: " + size);
@@ -1141,6 +1164,9 @@ public abstract class ServerBehaviourDelegate {
TaskModel taskModel = new TaskModel();
taskModel.putObject(TaskModel.TASK_SERVER, getServer());
taskModel.putObject(TaskModel.TASK_MODULES, modules);
+ if (deltaKinds != null) {
+ taskModel.putObject(TaskModel.TASK_DELTA_KINDS, deltaKinds);
+ }
for (int i = 0; i < size; i++) {
Publisher pub = publishers[i];

Back to the top