[jbosstools-commits] JBoss Tools SVN: r43743 - in trunk: as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server and 1 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Sep 17 03:34:46 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-17 03:34:46 -0400 (Mon, 17 Sep 2012)
New Revision: 43743
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-12613 publish method interface is using concrete classes
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2012-09-17 06:58:50 UTC (rev 43742)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2012-09-17 07:34:46 UTC (rev 43743)
@@ -20,19 +20,19 @@
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
public abstract class AbstractPublishMethod implements IJBossServerPublishMethod {
public abstract String getPublishMethodId();
- public void publishStart(DeployableServerBehavior behaviour,
+ public void publishStart(IDeployableServerBehaviour behaviour,
IProgressMonitor monitor) throws CoreException {
Trace.trace(Trace.STRING_FINER, "Publish start in " + getClass().getName()); //$NON-NLS-1$
}
- public int publishFinish(DeployableServerBehavior behaviour,
+ public int publishFinish(IDeployableServerBehaviour behaviour,
IProgressMonitor monitor) throws CoreException {
Trace.trace(Trace.STRING_FINER, "Beginning publishFinish in " + getClass().getName()); //$NON-NLS-1$
int result = getServerPublishState(behaviour);
@@ -40,7 +40,7 @@
return result;
}
- public int getServerPublishState(DeployableServerBehavior behaviour) {
+ public int getServerPublishState(IDeployableServerBehaviour behaviour) {
IModule[] modules = behaviour.getServer().getModules();
boolean allpublished= true;
for (int i = 0; i < modules.length; i++) {
@@ -52,7 +52,7 @@
return IServer.PUBLISH_STATE_INCREMENTAL;
}
- public int publishModule(DeployableServerBehavior behaviour, int kind,
+ public int publishModule(IDeployableServerBehaviour behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
throws CoreException {
Trace.trace(Trace.STRING_FINER, "Beginning to publish module " + module[module.length-1].getName()); //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java 2012-09-17 06:58:50 UTC (rev 43742)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java 2012-09-17 07:34:46 UTC (rev 43743)
@@ -3,9 +3,12 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
public interface IDeployableServerBehaviour {
public IServer getServer();
public boolean changedFileRequiresModuleRestart(IModuleFile mf);
public IModulePathFilter getPathFilter(IModule[] moduleTree);
+ public IModuleResourceDelta[] getPublishedResourceDelta(IModule[] module);
+ public int getPublishType(int kind, int deltaKind, int modulePublishState);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublishMethod.java 2012-09-17 06:58:50 UTC (rev 43742)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublishMethod.java 2012-09-17 07:34:46 UTC (rev 43743)
@@ -15,12 +15,11 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
public interface IJBossServerPublishMethod {
// public IJBossServerPublishMethodType getPublishMethodType();
- public void publishStart(DeployableServerBehavior behaviour, IProgressMonitor monitor) throws CoreException;
- public int publishFinish(DeployableServerBehavior behaviour, IProgressMonitor monitor) throws CoreException;
+ public void publishStart(IDeployableServerBehaviour behaviour, IProgressMonitor monitor) throws CoreException;
+ public int publishFinish(IDeployableServerBehaviour behaviour, IProgressMonitor monitor) throws CoreException;
/**
* Publish this module
@@ -32,7 +31,7 @@
* @return An IServer.STATE_XXX constant, or -1 if the behaviour should not change server state
* @throws CoreException
*/
- public int publishModule(DeployableServerBehavior behaviour, int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException;
+ public int publishModule(IDeployableServerBehaviour behaviour, int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException;
/**
* Create a callback handler with the given deploy path and server.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java 2012-09-17 06:58:50 UTC (rev 43742)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java 2012-09-17 07:34:46 UTC (rev 43743)
@@ -24,13 +24,13 @@
import org.jboss.ide.eclipse.archives.webtools.modules.LocalZippedPublisherUtil;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class ExpressBinaryPublishMethod extends ExpressPublishMethod {
@Override
- public int publishFinish(DeployableServerBehavior behaviour,
+ public int publishFinish(IDeployableServerBehaviour behaviour,
IProgressMonitor monitor) throws CoreException {
String outProject = ExpressServerUtils.getExpressDeployProject(behaviour.getServer());
@@ -46,7 +46,7 @@
}
@Override
- public int publishModule(DeployableServerBehavior behaviour, int kind,
+ public int publishModule(IDeployableServerBehaviour behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
throws CoreException {
if( module.length > 1 )
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-09-17 06:58:50 UTC (rev 43742)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-09-17 07:34:46 UTC (rev 43743)
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
-import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -26,6 +24,7 @@
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.PushOperationResult;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.osgi.util.NLS;
@@ -39,9 +38,9 @@
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.archives.webtools.modules.LocalZippedPublisherUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -54,7 +53,7 @@
}
@Override
- public void publishStart(DeployableServerBehavior behaviour,
+ public void publishStart(IDeployableServerBehaviour behaviour,
IProgressMonitor monitor) throws CoreException {
String destProjName = ExpressServerUtils.getExpressDeployProject(behaviour.getServer());
IProject magicProject = destProjName == null ? null : ResourcesPlugin.getWorkspace().getRoot().getProject(destProjName);
@@ -66,7 +65,7 @@
}
@Override
- public int publishFinish(DeployableServerBehavior behaviour,
+ public int publishFinish(IDeployableServerBehaviour behaviour,
IProgressMonitor monitor) throws CoreException {
String destProjName = ExpressServerUtils.getExpressDeployProject(behaviour.getServer());
@@ -85,7 +84,7 @@
return allSubModulesPublished ? IServer.PUBLISH_STATE_NONE : IServer.PUBLISH_STATE_INCREMENTAL;
}
- protected boolean areAllPublished(DeployableServerBehavior behaviour) {
+ protected boolean areAllPublished(IDeployableServerBehaviour behaviour) {
IModule[] modules = behaviour.getServer().getModules();
boolean allpublished= true;
for (int i = 0; i < modules.length; i++) {
@@ -96,7 +95,7 @@
}
@Override
- public int publishModule(DeployableServerBehavior behaviour, int kind,
+ public int publishModule(IDeployableServerBehaviour behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
throws CoreException {
@@ -180,7 +179,7 @@
}
protected PushOperationResult commitAndPushProject(IProject p,
- DeployableServerBehavior behaviour, IProgressMonitor monitor) throws CoreException {
+ IDeployableServerBehaviour behaviour, IProgressMonitor monitor) throws CoreException {
int changed = 0;
try {
More information about the jbosstools-commits
mailing list