Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Coulon2015-11-27 15:02:18 +0000
committerRoland Grunberg2015-11-27 15:03:43 +0000
commit2a62f691c4e789966751ce0a01475616c2ca4a1b (patch)
tree33108d6d178aa9ad2d296229fef633b1ec69ad7d /containers/org.eclipse.linuxtools.docker.core/src/org/eclipse
parentfd21fefe291b356704127a81ba5df73e6fcd600f (diff)
downloadorg.eclipse.linuxtools-2a62f691c4e789966751ce0a01475616c2ca4a1b.tar.gz
org.eclipse.linuxtools-2a62f691c4e789966751ce0a01475616c2ca4a1b.tar.xz
org.eclipse.linuxtools-2a62f691c4e789966751ce0a01475616c2ca4a1b.zip
Restored removed API methods
Change-Id: I637d175ff32950d3d0edfee4129b86b316132123 Signed-off-by: Xavier Coulon <xcoulon@redhat.com> Reviewed-on: https://git.eclipse.org/r/61308 Reviewed-by: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'containers/org.eclipse.linuxtools.docker.core/src/org/eclipse')
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/DockerConnectionManager.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/DockerConnectionManager.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/DockerConnectionManager.java
index 99c8bca7a1..1c1d7cb07d 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/DockerConnectionManager.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/DockerConnectionManager.java
@@ -23,6 +23,12 @@ import org.eclipse.linuxtools.internal.docker.core.DockerContainerRefreshManager
public class DockerConnectionManager {
+ /**
+ * @deprecated see the {@link IDockerConnectionStorageManager} implementation instead.
+ */
+ @Deprecated
+ public final static String CONNECTIONS_FILE_NAME = "dockerconnections.xml"; //$NON-NLS-1$
+
private static DockerConnectionManager instance;
private List<IDockerConnection> connections;
@@ -114,6 +120,14 @@ public class DockerConnectionManager {
.removeContainerRefreshThread(connection);
}
+ /**
+ * Notifies that a connection was renamed.
+ */
+ public void notifyConnectionRename() {
+ saveConnections();
+ notifyListeners(IDockerConnectionManagerListener.RENAME_EVENT);
+ }
+
public void addConnectionManagerListener(
IDockerConnectionManagerListener listener) {
if (connectionManagerListeners == null)
@@ -127,6 +141,35 @@ public class DockerConnectionManager {
connectionManagerListeners.remove(listener);
}
+ /**
+ * Notifies all listeners that a change occurred on a connection
+ *
+ * @param type
+ * the type of change
+ * @deprecated use
+ * {@link DockerConnectionManager#notifyListeners(IDockerConnection, int)}
+ * instead
+ */
+ @Deprecated
+ @SuppressWarnings("deprecation")
+ public void notifyListeners(int type) {
+ if (connectionManagerListeners != null) {
+ Object[] listeners = connectionManagerListeners.getListeners();
+ for (int i = 0; i < listeners.length; ++i) {
+ ((IDockerConnectionManagerListener) listeners[i])
+ .changeEvent(type);
+ }
+ }
+ }
+
+ /**
+ * Notifies all listeners that a change occurred on the given connection
+ *
+ * @param connection
+ * the connection that changed
+ * @param type
+ * the type of change
+ */
@SuppressWarnings("deprecation")
public void notifyListeners(final IDockerConnection connection,
final int type) {

Back to the top