JBoss Tools SVN: r29066 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-08 11:55:21 -0500 (Tue, 08 Feb 2011)
New Revision: 29066
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringsPreferenceValue.java
Log:
[JBIDE-8357]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringsPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringsPreferenceValue.java 2011-02-08 15:52:00 UTC (rev 29065)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringsPreferenceValue.java 2011-02-08 16:55:21 UTC (rev 29066)
@@ -25,7 +25,7 @@
public StringsPreferenceValue(char delimiter, String prefsKey, String pluginId) {
super(prefsKey, pluginId);
- this.delimiter = new StringBuilder(delimiter).append("|||").toString();
+ this.delimiter = String.valueOf(delimiter);
}
public String[] get() {
13 years, 11 months
JBoss Tools SVN: r29065 - branches/jbosstools-3.2.x.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-08 10:52:00 -0500 (Tue, 08 Feb 2011)
New Revision: 29065
Added:
branches/jbosstools-3.2.x/.gitignore
Log:
add .gitignore
Added: branches/jbosstools-3.2.x/.gitignore
===================================================================
--- branches/jbosstools-3.2.x/.gitignore (rev 0)
+++ branches/jbosstools-3.2.x/.gitignore 2011-02-08 15:52:00 UTC (rev 29065)
@@ -0,0 +1 @@
+.project
13 years, 11 months
JBoss Tools SVN: r29064 - branches/jbosstools-3.2.x/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-08 10:49:57 -0500 (Tue, 08 Feb 2011)
New Revision: 29064
Modified:
branches/jbosstools-3.2.x/build/parent/pom.xml
Log:
bump from CR2 to CR3 in parent pom
Modified: branches/jbosstools-3.2.x/build/parent/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/build/parent/pom.xml 2011-02-08 15:23:38 UTC (rev 29063)
+++ branches/jbosstools-3.2.x/build/parent/pom.xml 2011-02-08 15:49:57 UTC (rev 29064)
@@ -15,7 +15,7 @@
<!--tychoVersion>0.10.0-SNAPSHOT</tychoVersion -->
<tychoVersion>0.10.0</tychoVersion>
<scmBranch>branches/jbosstools-3.2.x</scmBranch>
- <BUILD_ALIAS>CR2</BUILD_ALIAS>
+ <BUILD_ALIAS>CR3</BUILD_ALIAS>
<memoryOptions1>-Xms512m -Xmx1024m -XX:PermSize=256m</memoryOptions1>
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
13 years, 11 months
JBoss Tools SVN: r29063 - trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-08 10:23:38 -0500 (Tue, 08 Feb 2011)
New Revision: 29063
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties
Log:
[JBDS-1529] renamed component and version labels so that they dont mention "JBoss Tools"
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties 2011-02-08 15:19:45 UTC (rev 29062)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties 2011-02-08 15:23:38 UTC (rev 29063)
@@ -1,8 +1,8 @@
UsageReportPreferencePage_ReportedValues=Reported Values
UsageReportPreferencePage_CurrentUsageHit=Current usage reported on\:
UsageReportPreferencePage_FirstUsageHit=First usage reported on\:
-UsageReportPreferencePage_JBossToolsComponents=JBoss Tools Components\:
-UsageReportPreferencePage_JBossToolsVersion=JBoss Tools Version\:
+UsageReportPreferencePage_JBossToolsComponents=Components\:
+UsageReportPreferencePage_JBossToolsVersion=Version\:
UsageReportPreferencePage_LastUsageHit=Last usage reported on\:
UsageReportPreferencePage_Locale=Locale\:
UsageReportPreferencePage_NumberOfUsageHits=Number of usage-hits\:
13 years, 11 months
JBoss Tools SVN: r29062 - branches/jbosstools-3.2.x/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-08 10:19:45 -0500 (Tue, 08 Feb 2011)
New Revision: 29062
Modified:
branches/jbosstools-3.2.x/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties
Log:
[JBDS-1529] renamed component and version keys so that they dont mention "JBoss Tools"
Modified: branches/jbosstools-3.2.x/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties 2011-02-08 15:19:40 UTC (rev 29061)
+++ branches/jbosstools-3.2.x/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/preferences/messages.properties 2011-02-08 15:19:45 UTC (rev 29062)
@@ -1,8 +1,8 @@
UsageReportPreferencePage_ReportedValues=Reported Values
UsageReportPreferencePage_CurrentUsageHit=Current usage reported on\:
UsageReportPreferencePage_FirstUsageHit=First usage reported on\:
-UsageReportPreferencePage_JBossToolsComponents=JBoss Tools Components\:
-UsageReportPreferencePage_JBossToolsVersion=JBoss Tools Version\:
+UsageReportPreferencePage_JBossToolsComponents=Components\:
+UsageReportPreferencePage_JBossToolsVersion=Version\:
UsageReportPreferencePage_LastUsageHit=Last usage reported on\:
UsageReportPreferencePage_Locale=Locale\:
UsageReportPreferencePage_NumberOfUsageHits=Number of usage-hits\:
13 years, 11 months
JBoss Tools SVN: r29061 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: src/org/hibernate/eclipse and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-02-08 10:19:40 -0500 (Tue, 08 Feb 2011)
New Revision: 29061
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizardPage.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
Log:
https://issues.jboss.org/browse/JBIDE-6098 - fixed - add import hibernate jars wizard
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties 2011-02-08 11:18:18 UTC (rev 29060)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties 2011-02-08 15:19:40 UTC (rev 29061)
@@ -11,3 +11,5 @@
#NavigatorContent_HibernateKnownConfigs=Hibernate Known Configurations
exportHibernateAntCodeGenerationWizardName=Ant Code Generation
exportHibernateAntCodeGenerationWizardDescription=Export Hibernate Code Generation Configuration to Ant Code Generation script
+importHibernateLibsWizardName=Hibernate Jars
+importHibernateLibsWizardDescription=Import Hibernate Jars into project
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2011-02-08 11:18:18 UTC (rev 29060)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2011-02-08 15:19:40 UTC (rev 29061)
@@ -787,6 +787,23 @@
name="Hibernate">
</category>
</extension>
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <wizard
+ category="org.hibernate.eclipse.console.HibernateToolsImport"
+ class="org.hibernate.eclipse.libsimport.ImportHibernateJarsWizard"
+ icon="icons/images/ant_codegen_export.gif"
+ id="org.hibernate.eclipse.libsimport.ImportHibernateJarsWizard"
+ name="%importHibernateLibsWizardName">
+ <description>
+ %importHibernateLibsWizardDescription
+ </description>
+ </wizard>
+ <category
+ id="org.hibernate.eclipse.console.HibernateToolsImport"
+ name="Hibernate">
+ </category>
+ </extension>
<!-- <extension
point="org.eclipse.ui.themes">
<themeElementCategory
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2011-02-08 11:18:18 UTC (rev 29060)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2011-02-08 15:19:40 UTC (rev 29061)
@@ -528,6 +528,11 @@
public static String ExportAntCodeGenWizardPage_error_in_hibernate_code_generation_configuration;
public static String ExportAntCodeGenWizardPage_warning;
+ public static String ImportHibernateJarsWizard_title;
+ public static String ImportHibernateJarsWizardPage_title;
+ public static String ImportHibernateJarsWizardPage_description;
+ public static String ImportHibernateJarsWizardPage_error_message;
+
public static String QueryParametersPage_add_query_parameter_tooltip;
public static String QueryParametersPage_remove_query_parameter_tooltip;
public static String QueryParametersPage_enable_disable_parameters_tooltip;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2011-02-08 11:18:18 UTC (rev 29060)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2011-02-08 15:19:40 UTC (rev 29061)
@@ -528,6 +528,11 @@
ExportAntCodeGenWizardPage_error_in_hibernate_code_generation_configuration=Error in Hibernate Code Generation Configuration: ''{0}''
ExportAntCodeGenWizardPage_warning=Warning: ''{0}'' already exists.
+ImportHibernateJarsWizard_title=Import Hibernate Jars
+ImportHibernateJarsWizardPage_title=Hibernate Jars
+ImportHibernateJarsWizardPage_description=Import Hibernate Jars from Hibernate Tools plugin.
+ImportHibernateJarsWizardPage_error_message=Hibernate Jars folder does not exist.
+
QueryParametersPage_add_query_parameter_tooltip=Add Query Parameter
QueryParametersPage_remove_query_parameter_tooltip=Remove Query Parameter
QueryParametersPage_enable_disable_parameters_tooltip=Enable/Disable Parameters
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizard.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizard.java 2011-02-08 15:19:40 UTC (rev 29061)
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.libsimport;
+
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.ide.IDE;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+
+/**
+ * Import Hibernate jars wizard responsible to import Hibernate jars
+ * from Hibernate Tools internal libs into user specified place.
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ImportHibernateJarsWizard extends Wizard implements IImportWizard {
+ private IWorkbench workbench;
+
+ private IStructuredSelection selection;
+
+ private ImportHibernateJarsWizardPage mainPage;
+
+ /**
+ * Creates a wizard for importing Hibernate jars into the workspace from
+ * the file system.
+ */
+ public ImportHibernateJarsWizard() {
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IWizard.
+ */
+ public void addPages() {
+ super.addPages();
+ mainPage = new ImportHibernateJarsWizardPage(workbench, selection);
+ addPage(mainPage);
+ }
+
+
+ /* (non-Javadoc)
+ * Method declared on IWorkbenchWizard.
+ */
+ @SuppressWarnings("rawtypes")
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ this.workbench = workbench;
+ this.selection = currentSelection;
+
+ List selectedResources = IDE.computeSelectedResources(currentSelection);
+ if (!selectedResources.isEmpty()) {
+ this.selection = new StructuredSelection(selectedResources);
+ }
+
+ setWindowTitle(HibernateConsoleMessages.ImportHibernateJarsWizard_title);
+ ImageDescriptor descriptor = HibernateConsolePlugin.getImageDescriptor("icons/images/newhibernate_wiz.gif"); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(descriptor);
+ setNeedsProgressMonitor(true);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IWizard.
+ */
+ @SuppressWarnings("restriction")
+ public boolean performFinish() {
+ return mainPage.finish();
+ }
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizardPage.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/libsimport/ImportHibernateJarsWizardPage.java 2011-02-08 15:19:40 UTC (rev 29061)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.libsimport;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage1;
+import org.hibernate.eclipse.HibernatePlugin;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+
+/**
+ * @author Vitali Yemialyanchyk
+ */
+@SuppressWarnings("restriction")
+public class ImportHibernateJarsWizardPage extends WizardFileSystemResourceImportPage1 {
+
+ public static final String HIBERNATE_PLUGIN_LIB_PATH = "lib"; //$NON-NLS-1$
+
+ protected String errorMessage = null;
+
+ public ImportHibernateJarsWizardPage(IWorkbench aWorkbench, IStructuredSelection selection) {
+ super(aWorkbench, selection);
+ setTitle(HibernateConsoleMessages.ImportHibernateJarsWizardPage_title);
+ setDescription(HibernateConsoleMessages.ImportHibernateJarsWizardPage_description);
+ }
+
+ protected void createRootDirectoryGroup(Composite parent) {
+ super.createRootDirectoryGroup(parent);
+ //
+ sourceBrowseButton.setEnabled(false);
+ String libsPath = ""; //$NON-NLS-1$
+ errorMessage = null;
+ try {
+ File libFolderHibernatePlugin = getHibernatePluginFolder(HIBERNATE_PLUGIN_LIB_PATH);
+ if (libFolderHibernatePlugin.exists()) {
+ libsPath = libFolderHibernatePlugin.getAbsolutePath();
+ } else {
+ errorMessage = HibernateConsoleMessages.ImportHibernateJarsWizardPage_error_message;
+ }
+ } catch (IOException e) {
+ errorMessage = "IOException: " + e.getMessage(); //$NON-NLS-1$
+ }
+ if (libsPath.length() > 0 && !libsPath.endsWith(File.separator)) {
+ libsPath += File.separator;
+ }
+ sourceNameField.setText(libsPath);
+ sourceNameField.setEnabled(false);
+ }
+
+ protected File getHibernatePluginFolder(String path) throws IOException {
+ URL entry = HibernatePlugin.getDefault().getBundle().getEntry(path);
+ URL resProject = FileLocator.resolve(entry);
+ String resolvePath = FileLocator.resolve(resProject).getFile();
+ File folder = new File(resolvePath);
+ return folder;
+ }
+
+ protected boolean ensureSourceIsValid() {
+ boolean res = true;
+ if (errorMessage != null) {
+ setErrorMessage(errorMessage);
+ res = false;
+ }
+ if (res) {
+ res = super.ensureSourceIsValid();
+ }
+ return res;
+ }
+
+}
13 years, 11 months
JBoss Tools SVN: r29060 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-08 06:18:18 -0500 (Tue, 08 Feb 2011)
New Revision: 29060
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
[JBIDE-8343] increased wait delay for refreshing instance, waiting before refreshing (was: refreshed first and waited afterwards)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-08 11:16:58 UTC (rev 29059)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-08 11:18:18 UTC (rev 29060)
@@ -37,7 +37,7 @@
*/
public class DeltaCloud extends ObservablePojo {
- private static final int WAIT_FOR_STATE_DELAY = 2000;
+ private static final int WAIT_FOR_STATE_DELAY = 4000;
public static final String PROP_INSTANCES = "instances";
public static final String PROP_INSTANCES_REMOVED = "instancesRemoved";
13 years, 11 months
JBoss Tools SVN: r29059 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-08 06:16:58 -0500 (Tue, 08 Feb 2011)
New Revision: 29059
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Action.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ActionAware.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IdAware.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ResourceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/StateAware.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformActionRequest.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/ActionUnmarshaller.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudActionAwareObject.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudObject.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudResourceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IDeltaCloudResourceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IInstanceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InstanceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InternalDeltaCloudClient.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/KeyAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/DeleteKeyRequest.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformInstanceActionRequest.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceActionUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyActionUnmarshaller.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/API.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Image.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Key.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Property.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionAwareUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/DestroyCloudInstanceJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceActionJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceDomUnmarshallingTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
Log:
[JBIDE-8003]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -17,15 +17,16 @@
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance.State;
import org.jboss.tools.deltacloud.core.client.API.Driver;
import org.jboss.tools.deltacloud.core.client.DeltaCloudAuthClientException;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl;
import org.jboss.tools.deltacloud.core.client.DeltaCloudNotFoundClientException;
import org.jboss.tools.deltacloud.core.client.HardwareProfile;
import org.jboss.tools.deltacloud.core.client.Image;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.InternalDeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.Key;
import org.jboss.tools.deltacloud.core.client.Realm;
import org.jboss.tools.internal.deltacloud.core.observable.ObservablePojo;
@@ -37,7 +38,7 @@
public class DeltaCloud extends ObservablePojo {
private static final int WAIT_FOR_STATE_DELAY = 2000;
-
+
public static final String PROP_INSTANCES = "instances";
public static final String PROP_INSTANCES_REMOVED = "instancesRemoved";
public static final String PROP_IMAGES = "images";
@@ -50,7 +51,7 @@
private String lastKeyname = "";
private String lastImageId = "";
- private InternalDeltaCloudClient client;
+ private DeltaCloudClient client;
private DeltaCloudImagesRepository imagesRepo;
private DeltaCloudInstancesRepository instanceRepo;
@@ -61,10 +62,6 @@
private SecurePasswordStore passwordStore;
private Collection<IInstanceAliasMapping> instanceAliasMappings;
- public static interface IInstanceStateMatcher {
- public boolean matchesState(DeltaCloudInstance instance, DeltaCloudInstance.State instanceState);
- }
-
public DeltaCloud(String name, String url, String username, String passwd) throws DeltaCloudException {
this(name, url, username, passwd, null);
}
@@ -150,7 +147,7 @@
return new SecurePasswordStore(new DeltaCloudPasswordStorageKey(name, username), password);
}
- protected InternalDeltaCloudClient createClient(String url, String username, String password)
+ protected DeltaCloudClient createClient(String url, String username, String password)
throws DeltaCloudException {
try {
return new DeltaCloudClientImpl(url, username, password);
@@ -263,29 +260,17 @@
}
}
- public DeltaCloudInstance waitForState(String instanceId, final DeltaCloudInstance.State expectedState,
+ public DeltaCloudInstance waitForState(String instanceId, DeltaCloudInstance.State expectedState,
IProgressMonitor pm)
throws InterruptedException, DeltaCloudException {
- IInstanceStateMatcher stateMatcher = new IInstanceStateMatcher() {
-
- @Override
- public boolean matchesState(DeltaCloudInstance instance, DeltaCloudInstance.State instanceState) {
- return expectedState != null
- && expectedState.equals(instanceState);
- }
- };
- return waitForState(instanceId, stateMatcher, pm);
- }
-
- public DeltaCloudInstance waitForState(String instanceId, IInstanceStateMatcher stateMatcher, IProgressMonitor pm)
- throws InterruptedException, DeltaCloudException {
DeltaCloudInstance instance = getInstancesRepository().getById(instanceId);
if (instance != null) {
while (!pm.isCanceled()) {
Thread.sleep(WAIT_FOR_STATE_DELAY);
instance = refreshInstance(instance);
- if (stateMatcher.matchesState(instance, instance.getState())
- || instance.getState().equals(DeltaCloudInstance.State.TERMINATED)) {
+ State state = instance.getState();
+ if (state == expectedState
+ || instance.isInState(DeltaCloudInstance.State.TERMINATED)) {
return instance;
}
}
@@ -436,11 +421,12 @@
}
}
- public void deleteKey(String keyname) throws DeltaCloudException {
+ public boolean delete(DeltaCloudKey deltaCloudKey) throws DeltaCloudException {
+ Key key = deltaCloudKey.getKey();
try {
- client.deleteKey(keyname);
+ return key.destroy(client);
} catch (DeltaCloudClientException e) {
- throw new DeltaCloudException(e);
+ throw new DeltaCloudException(MessageFormat.format("Could not delete key \"{0}\"", key.getId()), e);
}
}
@@ -458,12 +444,12 @@
}
}
- public boolean performInstanceAction(String instanceId, DeltaCloudInstance.Action action)
+ public boolean performInstanceAction(String instanceId, DeltaCloudResourceAction action)
throws DeltaCloudException {
- return performInstanceAction(getInstancesRepository().getById(instanceId), action);
+ return performAction(getInstancesRepository().getById(instanceId), action);
}
- protected boolean performInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action)
+ protected boolean performAction(DeltaCloudInstance instance, DeltaCloudResourceAction action)
throws DeltaCloudException {
try {
if (instance == null) {
@@ -471,9 +457,9 @@
}
DeltaCloudInstancesRepository repo = getInstancesRepository();
DeltaCloudInstance[] instances = repo.get();
- boolean result = instance.performInstanceAction(action, client);
+ boolean result = instance.performAction(action, client);
if (result) {
- if (DeltaCloudInstance.Action.DESTROY.equals(action)) {
+ if (DeltaCloudResourceAction.DESTROY.equals(action)) {
repo.remove(instance);
firePropertyChange(PROP_INSTANCES_REMOVED, null, instance);
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -13,12 +13,10 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.deltacloud.core.client.Action;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.IInstanceAction;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.Instance.InstanceState;
-import org.jboss.tools.deltacloud.core.client.InstanceAction;
-import org.jboss.tools.deltacloud.core.client.InternalDeltaCloudClient;
/**
* An instance that may be reached on a DeltaCloud instance. Wraps Instance from
@@ -34,14 +32,14 @@
public enum State {
- PENDING(Instance.InstanceState.PENDING.name()),
- RUNNING(Instance.InstanceState.RUNNING.name()),
- STOPPED(Instance.InstanceState.STOPPED.name()),
- TERMINATED(Instance.InstanceState.TERMINATED.name()),
- BOGUS(Instance.InstanceState.BOGUS.name());
+ PENDING(Instance.State.PENDING.name()),
+ RUNNING(Instance.State.RUNNING.name()),
+ STOPPED(Instance.State.STOPPED.name()),
+ TERMINATED(Instance.State.TERMINATED.name()),
+ BOGUS(Instance.State.BOGUS.name());
private String name;
-
+
private State(String name) {
this.name = name;
}
@@ -55,24 +53,6 @@
}
}
- public enum Action {
-
- START(IInstanceAction.START),
- STOP(IInstanceAction.STOP),
- REBOOT(IInstanceAction.REBOOT),
- DESTROY(InstanceAction.DESTROY);
-
- private String name;
-
- private Action(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
- }
-
private Instance instance;
private String alias;
@@ -115,10 +95,10 @@
return instance.getKeyId();
}
- public List<Action> getActions() {
- List<Action> actions = new ArrayList<Action>();
- for (InstanceAction action : instance.getActions()) {
- actions.add(Action.valueOf(action.getName()));
+ public List<DeltaCloudResourceAction> getActions() {
+ List<DeltaCloudResourceAction> actions = new ArrayList<DeltaCloudResourceAction>();
+ for (Action<Instance> action : instance.getActions()) {
+ actions.add(DeltaCloudResourceAction.valueOf(action.getName()));
}
return actions;
}
@@ -140,7 +120,7 @@
}
public boolean isStopped() {
- return instance.getState() == InstanceState.STOPPED;
+ return instance.isStopped();
}
public boolean canStart() {
@@ -176,13 +156,13 @@
return hostName;
}
- protected boolean performInstanceAction(Action action, InternalDeltaCloudClient client)
+ protected boolean performAction(DeltaCloudResourceAction action, DeltaCloudClient client)
throws DeltaCloudClientException {
- InstanceAction instanceAction = instance.getAction(action.getName());
+ Action<Instance> instanceAction = instance.getAction(action.getName());
if (instanceAction == null) {
return false;
}
- return client.performInstanceAction(instanceAction);
+ return client.performAction(instanceAction);
}
@Override
@@ -206,11 +186,15 @@
private StringBuilder appendActions(StringBuilder builder) {
builder.append(" actions: [");
- for (Action action : getActions()) {
+ for (DeltaCloudResourceAction action : getActions()) {
builder.append("action: ")
.append(action.getName());
}
builder.append("] ");
return builder;
}
+
+ public boolean isInState(State state) {
+ return getState() == state;
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -17,6 +17,7 @@
*/
public class DeltaCloudKey extends AbstractDeltaCloudElement {
+
private Key key;
public DeltaCloudKey(Key key, DeltaCloud cloud) {
@@ -41,10 +42,13 @@
public String getPem() {
return key.getPem();
}
-
+
@Override
public String toString() {
return "DeltaCloudKey [key=" + key + "]";
}
+ protected Key getKey() {
+ return key;
+ }
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core;
+
+import org.jboss.tools.deltacloud.core.client.Action;
+
+
+/**
+ * @author Jeff Johnston
+ * @author André Dietisheim
+ */
+public enum DeltaCloudResourceAction {
+
+ START(Action.START_NAME),
+ STOP(Action.STOP_NAME),
+ REBOOT(Action.REBOOT_NAME),
+ DESTROY(Action.DESTROY_NAME);
+
+ private String name;
+
+ private DeltaCloudResourceAction(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/API.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/API.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/API.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -13,7 +13,7 @@
/**
* @author Andre Dietisheim
*/
-public class API extends AbstractDeltaCloudActionAwareObject<KeyAction> {
+public class API extends IdAware {
private static final long serialVersionUID = 1L;
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudActionAwareObject.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudActionAwareObject.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudActionAwareObject.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-import java.util.List;
-
-/**
- * @author Martyn Taylor
- * @author André Dietisheim
- */
-public abstract class AbstractDeltaCloudActionAwareObject<ACTION> extends AbstractDeltaCloudObject {
-
- private List<ACTION> actions;
-
- public void setActions(List<ACTION> actions) {
- this.actions = actions;
- }
-
- public List<ACTION> getActions() {
- return actions;
- }
-
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudObject.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudObject.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudObject.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-/**
- * @author Martyn Taylor
- * @author André Dietisheim
- */
-public abstract class AbstractDeltaCloudObject {
-
- protected String id;
-
- public void setId(String id) {
- this.id = id;
- }
-
- @XmlAttribute
- public String getId() {
- return id;
- }
-
- @Override
- public String toString() {
- return "AbstractDeltaCloudObject [id=" + id + "]";
- }
-
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudResourceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudResourceAction.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudResourceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-
-/**
- * An action that is executable on a deltacloud resource
- *
- * @author André Dietisheim
- */
-public abstract class AbstractDeltaCloudResourceAction<OWNER> implements IDeltaCloudResourceAction<OWNER> {
-
- private String name;
- private String url;
- private HttpMethod method;
- private OWNER owner;
-
- protected AbstractDeltaCloudResourceAction() {
- }
-
- @Override
- public HttpMethod getMethod() {
- return method;
- }
-
- public void setMethodString(String method) {
- this.method = HttpMethod.valueOf(method.toUpperCase());
- }
-
- public void setMethod(HttpMethod method) {
- this.method = method;
- }
-
- public void setMethod(String method) {
- this.method = HttpMethod.valueOf(method.toUpperCase());
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- @Override
- public String getUrl() {
- return url;
- }
-
- public void setOwner(OWNER owner) {
- this.owner = owner;
- }
-
- public OWNER getOwner() {
- return owner;
- }
-}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Action.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Action.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Action.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+/**
+ * An action that may be performed on a resource
+ *
+ * @author André Dietisheim
+ */
+public class Action<OWNER> {
+
+ public static final String START_NAME = "start";
+ public static final String STOP_NAME = "stop";
+ public static final String REBOOT_NAME = "reboot";
+ public static final String DESTROY_NAME = "destroy";
+
+ private String name;
+ private String url;
+ private HttpMethod method;
+ private OWNER owner;
+
+ public HttpMethod getMethod() {
+ return method;
+ }
+
+ public void setMethodString(String method) {
+ this.method = HttpMethod.valueOf(method.toUpperCase());
+ }
+
+ public void setMethod(HttpMethod method) {
+ this.method = method;
+ }
+
+ public void setMethod(String method) {
+ this.method = HttpMethod.valueOf(method.toUpperCase());
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setOwner(OWNER owner) {
+ this.owner = owner;
+ }
+
+ public OWNER getOwner() {
+ return owner;
+ }
+
+ public boolean isStart() {
+ return START_NAME.equals(getName());
+ }
+
+ public boolean isStop() {
+ return STOP_NAME.equals(getName());
+ }
+
+ public boolean isReboot() {
+ return REBOOT_NAME.equals(getName());
+ }
+
+ public boolean isDestroy() {
+ return DESTROY_NAME.equals(getName());
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Action.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ActionAware.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudActionAwareObject.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ActionAware.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ActionAware.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Martyn Taylor
+ * @author André Dietisheim
+ */
+public abstract class ActionAware<OWNER> extends IdAware {
+
+ private List<Action<OWNER>> actions;
+
+ public Action<OWNER> getAction(String name) {
+ if (name == null) {
+ return null;
+ }
+
+ for (Action<OWNER> action : getActions()) {
+ if (name.equals(action.getName())) {
+ return action;
+ }
+ }
+ return null;
+ }
+
+ public List<String> getActionNames() {
+ ArrayList<String> names = new ArrayList<String>();
+ for (Action<OWNER> action : getActions()) {
+ names.add(action.getName());
+ }
+ return names;
+ }
+
+ public boolean start(DeltaCloudClient client) throws DeltaCloudClientException {
+ return client.performAction(getAction(Action.START_NAME));
+ }
+
+ public boolean stop(DeltaCloudClient client) throws DeltaCloudClientException {
+ return client.performAction(getAction(Action.STOP_NAME));
+ }
+
+ public boolean destroy(DeltaCloudClient client) throws DeltaCloudClientException {
+ return client.performAction(getAction(Action.DESTROY_NAME));
+ }
+
+ public boolean reboot(DeltaCloudClient client) throws DeltaCloudClientException {
+ return client.performAction(getAction(Action.REBOOT_NAME));
+ }
+
+ public boolean canStart() {
+ return getAction(Action.START_NAME) != null;
+ }
+
+ public boolean canStop() {
+ return getAction(Action.STOP_NAME) != null;
+ }
+
+ public boolean canReboot() {
+ return getAction(Action.REBOOT_NAME) != null;
+ }
+
+ public boolean canDestroy() {
+ return getAction(Action.DESTROY_NAME) != null;
+ }
+
+ public void setActions(List<Action<OWNER>> actions) {
+ this.actions = actions;
+ }
+
+ public List<Action<OWNER>> getActions() {
+ return actions;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ActionAware.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -134,14 +134,6 @@
public Key createKey(String keyname) throws DeltaCloudClientException;
/**
- * Deletes the key with the given name on the deltacloud server
- *
- * @param keyname
- * @throws DeltaCloudClientException
- */
- public void deleteKey(String keyname) throws DeltaCloudClientException;
-
- /**
* Lists all keys available on the deltacloud server this client is
* connected to.
*
@@ -156,4 +148,14 @@
* Throws a DeltaCloudException if it is not available.
*/
public Key listKey(String id) throws DeltaCloudClientException;
+
+ /**
+ * Performs the given action.
+ *
+ * @param action the action to execute
+ * @return true, if successful
+ *
+ * @see Action
+ */
+ public boolean performAction(Action<?> action) throws DeltaCloudClientException;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -30,7 +30,6 @@
import org.jboss.tools.deltacloud.core.client.API.Driver;
import org.jboss.tools.deltacloud.core.client.request.CreateInstanceRequest;
import org.jboss.tools.deltacloud.core.client.request.CreateKeyRequest;
-import org.jboss.tools.deltacloud.core.client.request.DeleteKeyRequest;
import org.jboss.tools.deltacloud.core.client.request.DeltaCloudRequest;
import org.jboss.tools.deltacloud.core.client.request.ListHardwareProfileRequest;
import org.jboss.tools.deltacloud.core.client.request.ListHardwareProfilesRequest;
@@ -42,7 +41,7 @@
import org.jboss.tools.deltacloud.core.client.request.ListKeysRequest;
import org.jboss.tools.deltacloud.core.client.request.ListRealmRequest;
import org.jboss.tools.deltacloud.core.client.request.ListRealmsRequest;
-import org.jboss.tools.deltacloud.core.client.request.PerformInstanceActionRequest;
+import org.jboss.tools.deltacloud.core.client.request.PerformActionRequest;
import org.jboss.tools.deltacloud.core.client.request.TypeRequest;
import org.jboss.tools.deltacloud.core.client.unmarshal.APIUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.HardwareProfileUnmarshaller;
@@ -59,7 +58,7 @@
/**
* @author Andre Dietisheim (based on prior implementation by Martyn Taylor)
*/
-public class DeltaCloudClientImpl implements InternalDeltaCloudClient {
+public class DeltaCloudClientImpl implements DeltaCloudClient {
private String baseUrl;
private String username;
@@ -184,6 +183,7 @@
return Driver.UNKNOWN;
}
}
+
@Override
public Instance createInstance(String imageId) throws DeltaCloudClientException {
try {
@@ -319,10 +319,6 @@
}
}
- public void deleteKey(String keyname) throws DeltaCloudClientException {
- request(new DeleteKeyRequest(baseUrl, keyname));
- }
-
public List<Key> listKeys() throws DeltaCloudClientException {
InputStream inputStream = request(new ListKeysRequest(baseUrl));
List<Key> keys = new ArrayList<Key>();
@@ -336,14 +332,10 @@
return key;
}
- public boolean performInstanceAction(InstanceAction action) throws DeltaCloudClientException {
+ public boolean performAction(Action<?> action) throws DeltaCloudClientException {
if (action != null) {
try {
- InputStream inputStream = request(
- new PerformInstanceActionRequest(action.getUrl(), action.getMethod()));
- if (!InstanceAction.DESTROY.equals(action.getName())) {
- new InstanceUnmarshaller().unmarshall(inputStream, action.getOwner());
- }
+ request(new PerformActionRequest(action.getUrl(), action.getMethod()));
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -19,7 +19,7 @@
* @author Martyn Taylor
* @author André Dietisheim
*/
-public class HardwareProfile extends AbstractDeltaCloudObject {
+public class HardwareProfile extends IdAware {
private static final long serialVersionUID = 1L;
private List<Property> properties;
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IDeltaCloudResourceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IDeltaCloudResourceAction.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IDeltaCloudResourceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-
-/**
- * @author André Dietisheim
- */
-public interface IDeltaCloudResourceAction<OWNER> {
-
- public static final String DESTROY = "destroy";
-
- public String getName();
-
- public String getUrl();
-
- public HttpMethod getMethod();
-
- public OWNER getOwner();
-
-}
\ No newline at end of file
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IInstanceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IInstanceAction.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IInstanceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-public interface IInstanceAction extends IDeltaCloudResourceAction<Instance> {
-
- public static final String START = "start";
- public static final String STOP = "stop";
- public static final String REBOOT = "reboot";
-
-}
\ No newline at end of file
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IdAware.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AbstractDeltaCloudObject.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IdAware.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IdAware.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * @author Martyn Taylor
+ * @author André Dietisheim
+ */
+public abstract class IdAware {
+
+ protected String id;
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @XmlAttribute
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public String toString() {
+ return "IdAware [id=" + id + "]";
+ }
+
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Image.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Image.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Image.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -14,7 +14,7 @@
/**
* @author Martyn Taylor
*/
-public class Image extends AbstractDeltaCloudObject
+public class Image extends IdAware
{
private static final long serialVersionUID = 1L;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -10,21 +10,16 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.core.client;
-import java.util.ArrayList;
import java.util.List;
/**
* @author Martyn Taylor
* @author Andre Dietisheim
*/
-public class Instance extends AbstractDeltaCloudActionAwareObject<InstanceAction> {
+public class Instance extends StateAware<Instance> {
private static final long serialVersionUID = 1L;
- public static enum InstanceState {
- RUNNING, STOPPED, PENDING, TERMINATED, BOGUS
- };
-
private String ownerId;
private String name;
@@ -43,8 +38,6 @@
private String keyId;
- private InstanceState state;
-
private AddressList publicAddresses;
private AddressList privateAddresses;
@@ -84,14 +77,6 @@
this.realmId = realmId;
}
- public void setState(String state) {
- try {
- this.state = InstanceState.valueOf(state);
- } catch (Exception e) {
- this.state = InstanceState.BOGUS;
- }
- }
-
public void setKeyId(String keyId) {
this.keyId = keyId;
}
@@ -140,51 +125,6 @@
return realmId;
}
- public InstanceState getState() {
- return state;
- }
-
- public List<String> getActionNames() {
- ArrayList<String> names = new ArrayList<String>();
- for (InstanceAction action : getActions()) {
- names.add(action.getName());
- }
- return names;
- }
-
- public InstanceAction getAction(String name) {
- if (name == null) {
- return null;
- }
-
- for (InstanceAction action : getActions()) {
- if (name.equals(action.getName())) {
- return action;
- }
- }
- return null;
- }
-
- public boolean canStart() {
- return getAction(IInstanceAction.START) != null;
- }
-
- public boolean canStop() {
- return getAction(IInstanceAction.STOP) != null;
- }
-
- public boolean canReboot() {
- return getAction(IInstanceAction.REBOOT) != null;
- }
-
- public boolean canDestroy() {
- return getAction(InstanceAction.DESTROY) != null;
- }
-
- public boolean isRunning() {
- return getState() == InstanceState.RUNNING;
- }
-
public List<String> getPublicAddresses() {
return publicAddresses.getAddress();
}
@@ -193,22 +133,6 @@
return privateAddresses.getAddress();
}
- public boolean start(DeltaCloudClient client) throws DeltaCloudClientException {
- return ((InternalDeltaCloudClient) client).performInstanceAction(getAction(IInstanceAction.START));
- }
-
- public boolean stop(DeltaCloudClient client) throws DeltaCloudClientException {
- return ((InternalDeltaCloudClient) client).performInstanceAction(getAction(IInstanceAction.STOP));
- }
-
- public boolean destroy(DeltaCloudClient client) throws DeltaCloudClientException {
- return ((InternalDeltaCloudClient) client).performInstanceAction(getAction(InstanceAction.DESTROY));
- }
-
- public boolean reboot(DeltaCloudClient client) throws DeltaCloudClientException {
- return ((InternalDeltaCloudClient) client).performInstanceAction(getAction(IInstanceAction.REBOOT));
- }
-
@Override
public String toString() {
String s = "";
@@ -227,7 +151,7 @@
}
s += "State:\t\t" + getState() + "\n";
- List<InstanceAction> actions = getActions();
+ List<Action<Instance>> actions = getActions();
if (actions != null) {
for (int i = 0; i < actions.size(); i++) {
if (i == 0) {
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InstanceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InstanceAction.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InstanceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-
-/**
- * An action that is executable on an instance
- *
- * @author Martin Taylor
- * @author André Dietisheim
- * @see Instance
- * @see DeltaCloudClient#performInstanceAction(String, String);
- *
- */
-public class InstanceAction extends AbstractDeltaCloudResourceAction<Instance> implements IInstanceAction {
-
- public InstanceAction() {
- }
-
- @Override
- public String toString() {
- return "InstanceAction [name=" + getName() + ", url=" + getUrl() + ", method=" + getMethod() + "]";
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InternalDeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InternalDeltaCloudClient.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/InternalDeltaCloudClient.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-/**
- * @author Andre Dietisheim
- */
-public interface InternalDeltaCloudClient extends DeltaCloudClient {
-
- /**
- * Performs the given action on the given instance *.
- *
- * @param action
- * the action to perform
- * @param instance
- * the instance to perform on
- * @return true, if the action was performed successfully
- * @throws DeltaCloudClientException
- * indicates that an error occured while performing the action
- * @see InstanceAction
- * @see Instance
- */
- public boolean performInstanceAction(InstanceAction action) throws DeltaCloudClientException;
-
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Key.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Key.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Key.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -16,7 +16,7 @@
/**
* @author Andre Dietisheim
*/
-public class Key extends AbstractDeltaCloudActionAwareObject<KeyAction> {
+public class Key extends StateAware<Key> {
private static final long serialVersionUID = 1L;
@@ -44,10 +44,6 @@
this.fingerprint = fingerprint;
}
- public void setState(String state) {
- this.state = state;
- }
-
public URL getUrl() {
return url;
}
@@ -60,10 +56,6 @@
return pem;
}
- public String getState() {
- return state;
- }
-
@Override
public String toString() {
return "Key [url=" + url + ", pem=" + pem + ", fingerprint=" + fingerprint + ", state=" + state + ", actions="
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/KeyAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/KeyAction.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/KeyAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client;
-
-
-
-/**
- * An action that is executable on a deltacloud key
- *
- * @author André Dietisheim
- */
-public class KeyAction extends AbstractDeltaCloudResourceAction<Key> {
-
- public KeyAction() {
- super();
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Property.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Property.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Property.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -15,7 +15,7 @@
/**
* @author Martyn Taylor
*/
-public class Property extends AbstractDeltaCloudObject {
+public class Property extends IdAware {
private static final long serialVersionUID = 1L;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -14,7 +14,7 @@
* @author Martyn Taylor
* @author André Dietisheim
*/
-public class Realm extends AbstractDeltaCloudObject {
+public class Realm extends IdAware {
private static final long serialVersionUID = 1L;
public static final int LIMIT_DEFAULT = -1;
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ResourceAction.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/IDeltaCloudResourceAction.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ResourceAction.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ResourceAction.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+
+/**
+ * @author André Dietisheim
+ */
+public interface ResourceAction<OWNER> {
+
+ public static final String DESTROY = "destroy";
+
+ public String getName();
+
+ public String getUrl();
+
+ public HttpMethod getMethod();
+
+ public OWNER getOwner();
+
+ public boolean isDestroy();
+}
\ No newline at end of file
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/ResourceAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/StateAware.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/StateAware.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/StateAware.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+
+/**
+ * @author André Dietisheim
+ *
+ * @param <OWNER>
+ */
+public class StateAware<OWNER> extends ActionAware<OWNER> {
+
+ public static enum State {
+ RUNNING, STOPPED, PENDING, TERMINATED, BOGUS
+ };
+
+ private State state;
+
+ public void setState(String state) {
+ try {
+ this.state = State.valueOf(state);
+ } catch (Exception e) {
+ this.state = State.BOGUS;
+ }
+ }
+
+ public State getState() {
+ return state;
+ }
+
+ public boolean isRunning() {
+ return getState() == State.RUNNING;
+ }
+
+ public boolean isStopped() {
+ return getState() == State.STOPPED;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/StateAware.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/DeleteKeyRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/DeleteKeyRequest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/DeleteKeyRequest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client.request;
-
-import org.jboss.tools.deltacloud.core.client.HttpMethod;
-import org.jboss.tools.deltacloud.core.client.utils.UrlBuilder;
-
-/**
- * Deletes a key on the deltacloud server
- *
- * @author André Dietisheim
- */
-public class DeleteKeyRequest extends AbstractDeltaCloudRequest {
-
- private String keyName;
-
- public DeleteKeyRequest(String baseUrl, String keyName) {
- super(baseUrl, HttpMethod.DELETE);
- this.keyName = keyName;
- }
-
- @Override
- protected String doCreateUrl(UrlBuilder urlBuilder) {
- return urlBuilder.path("keys").path(keyName).toString();
- }
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformActionRequest.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformInstanceActionRequest.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformActionRequest.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformActionRequest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client.request;
+
+import org.jboss.tools.deltacloud.core.client.Action;
+import org.jboss.tools.deltacloud.core.client.HttpMethod;
+import org.jboss.tools.deltacloud.core.client.utils.UrlBuilder;
+
+/**
+ * Performs an action on a resource of the deltacloud server. The typical
+ * actions are
+ * <ul>
+ * <li>START</li>
+ * <li>STOP</li>
+ * <li>DESTROY</li>
+ * <li>REBOOT</li>
+ * </ul>
+ *
+ * @author André Dietisheim
+ *
+ * @see Action
+ */
+public class PerformActionRequest extends AbstractDeltaCloudRequest {
+
+ public PerformActionRequest(String url, HttpMethod httpMethod) {
+ super(url, httpMethod);
+ }
+
+ @Override
+ protected String doCreateUrl(UrlBuilder urlBuilder) {
+ return urlBuilder.toString();
+ }
+
+ @Override
+ protected UrlBuilder createUrlBuilder(String baseURL) {
+ return new UrlBuilder(baseURL);
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformActionRequest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformInstanceActionRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformInstanceActionRequest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/PerformInstanceActionRequest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client.request;
-
-import org.jboss.tools.deltacloud.core.client.HttpMethod;
-import org.jboss.tools.deltacloud.core.client.utils.UrlBuilder;
-
-/**
- * Performs an action on a instance on the deltacloud server
- *
- * @author André Dietisheim
- */
-public class PerformInstanceActionRequest extends AbstractDeltaCloudRequest {
-
- public PerformInstanceActionRequest(String url, HttpMethod httpMethod) {
- super(url, httpMethod);
- }
-
- @Override
- protected String doCreateUrl(UrlBuilder urlBuilder) {
- return urlBuilder.toString();
- }
-
- @Override
- protected UrlBuilder createUrlBuilder(String baseURL) {
- return new UrlBuilder(baseURL);
- }
-
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionAwareUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionAwareUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionAwareUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -14,7 +14,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.deltacloud.core.client.AbstractDeltaCloudResourceAction;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -25,7 +25,7 @@
*
* @param <DELTACLOUDOBJECT>
*/
-public abstract class AbstractActionAwareUnmarshaller<DELTACLOUDOBJECT, ACTION extends AbstractDeltaCloudResourceAction<DELTACLOUDOBJECT>> extends AbstractDOMUnmarshaller<DELTACLOUDOBJECT>{
+public abstract class AbstractActionAwareUnmarshaller<DELTACLOUDOBJECT> extends AbstractDOMUnmarshaller<DELTACLOUDOBJECT>{
private String actionElementName;
public AbstractActionAwareUnmarshaller(String tagName, Class<DELTACLOUDOBJECT> type, String actionElementName) {
@@ -33,15 +33,15 @@
this.actionElementName = actionElementName;
}
- protected List<ACTION> getActions(Element element, DELTACLOUDOBJECT owner) throws DeltaCloudClientException {
+ protected List<Action<DELTACLOUDOBJECT>> getActions(Element element, DELTACLOUDOBJECT owner) throws DeltaCloudClientException {
if (element == null) {
return null;
}
- List<ACTION> actions = new ArrayList<ACTION>();
+ List<Action<DELTACLOUDOBJECT>> actions = new ArrayList<Action<DELTACLOUDOBJECT>>();
NodeList nodeList = element.getElementsByTagName(actionElementName);
for (int i = 0; i < nodeList.getLength(); i++) {
Node linkNode = nodeList.item(i);
- ACTION action = createAction(linkNode);
+ Action<DELTACLOUDOBJECT> action = createAction(linkNode);
if (action != null) {
action.setOwner(owner);
actions.add(action);
@@ -50,12 +50,12 @@
return actions;
}
- protected ACTION createAction(Node node) throws DeltaCloudClientException {
+ protected Action<DELTACLOUDOBJECT> createAction(Node node) throws DeltaCloudClientException {
if (!(node instanceof Element)) {
return null;
}
return unmarshallAction((Element) node);
}
- protected abstract ACTION unmarshallAction(Element element) throws DeltaCloudClientException;
+ protected abstract Action<DELTACLOUDOBJECT> unmarshallAction(Element element) throws DeltaCloudClientException;
}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client.unmarshal;
-
-import org.jboss.tools.deltacloud.core.client.AbstractDeltaCloudResourceAction;
-import org.w3c.dom.Element;
-
-/**
- * @author André Dietisheim
- */
-public class AbstractActionUnmarshaller <ACTION extends AbstractDeltaCloudResourceAction<OWNER>, OWNER> extends AbstractDOMUnmarshaller<ACTION> {
-
- public AbstractActionUnmarshaller(Class<ACTION> actionClass) {
- super("link", actionClass);
- }
-
- @Override
- protected ACTION doUnmarshall(Element element, ACTION action) throws Exception {
- if (element != null) {
- action.setMethod(getAttributeText("method", element));
- action.setName(getAttributeText("rel", element));
- action.setUrl(getAttributeText("href", element));
- }
- return action;
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractDOMUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -19,6 +19,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/ActionUnmarshaller.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/AbstractActionUnmarshaller.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/ActionUnmarshaller.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/ActionUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client.unmarshal;
+
+import org.jboss.tools.deltacloud.core.client.Action;
+import org.w3c.dom.Element;
+
+/**
+ * @author André Dietisheim
+ */
+public class ActionUnmarshaller<OWNER> extends AbstractDOMUnmarshaller<Action<OWNER>> {
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public ActionUnmarshaller() {
+ super("link", (Class) Action.class);
+ }
+
+ @Override
+ protected Action<OWNER> doUnmarshall(Element element, Action<OWNER> action) throws Exception {
+ if (element != null) {
+ action.setMethod(getAttributeText("method", element));
+ action.setName(getAttributeText("rel", element));
+ action.setUrl(getAttributeText("href", element));
+ }
+ return action;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/ActionUnmarshaller.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceActionUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceActionUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceActionUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client.unmarshal;
-
-import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.InstanceAction;
-
-/**
- * @author André Dietisheim
- */
-public class InstanceActionUnmarshaller extends AbstractActionUnmarshaller<InstanceAction, Instance> {
-
- public InstanceActionUnmarshaller() {
- super(InstanceAction.class);
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/InstanceUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -13,10 +13,10 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.AddressList;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.InstanceAction;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -24,7 +24,7 @@
/**
* @author André Dietisheim
*/
-public class InstanceUnmarshaller extends AbstractActionAwareUnmarshaller<Instance, InstanceAction> {
+public class InstanceUnmarshaller extends AbstractActionAwareUnmarshaller<Instance> {
public InstanceUnmarshaller() {
super("instance", Instance.class, "link");
@@ -79,9 +79,9 @@
}
@Override
- protected InstanceAction unmarshallAction(Element element) throws DeltaCloudClientException {
- InstanceAction action = new InstanceAction();
- new InstanceActionUnmarshaller().unmarshall(element, action);
+ protected Action<Instance> unmarshallAction(Element element) throws DeltaCloudClientException {
+ Action<Instance> action = new Action<Instance>();
+ new ActionUnmarshaller<Instance>().unmarshall(element, action);
return action;
}
}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyActionUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyActionUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyActionUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.deltacloud.core.client.unmarshal;
-
-import org.jboss.tools.deltacloud.core.client.Key;
-import org.jboss.tools.deltacloud.core.client.KeyAction;
-
-/**
- * @author André Dietisheim
- */
-public class KeyActionUnmarshaller extends AbstractActionUnmarshaller<KeyAction, Key> {
-
- public KeyActionUnmarshaller() {
- super(KeyAction.class);
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -14,15 +14,15 @@
import java.io.IOException;
import java.io.StringReader;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.Key;
-import org.jboss.tools.deltacloud.core.client.KeyAction;
import org.w3c.dom.Element;
/**
* @author André Dietisheim
*/
-public class KeyUnmarshaller extends AbstractActionAwareUnmarshaller<Key, KeyAction> {
+public class KeyUnmarshaller extends AbstractActionAwareUnmarshaller<Key> {
public KeyUnmarshaller() {
super("key", Key.class, "link");
@@ -68,9 +68,9 @@
}
@Override
- protected KeyAction unmarshallAction(Element element) throws DeltaCloudClientException {
- KeyAction keyAction = new KeyAction();
- new KeyActionUnmarshaller().unmarshall(element, keyAction);
+ protected Action<Key> unmarshallAction(Element element) throws DeltaCloudClientException {
+ Action<Key> keyAction = new Action<Key>();
+ new ActionUnmarshaller<Key>().unmarshall(element, keyAction);
return keyAction;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/DestroyCloudInstanceJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/DestroyCloudInstanceJob.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/DestroyCloudInstanceJob.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
/**
* @author André Dietisheim
@@ -22,7 +23,7 @@
public class DestroyCloudInstanceJob extends InstanceActionJob {
public DestroyCloudInstanceJob(String name, DeltaCloudInstance instance) {
- super(name, instance, DeltaCloudInstance.Action.DESTROY, DeltaCloudInstance.State.TERMINATED);
+ super(name, instance, DeltaCloudResourceAction.DESTROY, DeltaCloudInstance.State.TERMINATED);
}
@Override
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceActionJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceActionJob.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceActionJob.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -14,18 +14,18 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.core.DeltaCloudInstance.Action;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance.State;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
/**
* @author André Dietisheim
*/
public class InstanceActionJob extends InstanceStateJob {
- private Action action;
+ private DeltaCloudResourceAction action;
public InstanceActionJob(String name, DeltaCloudInstance instance,
- Action action, State expectedState) {
+ DeltaCloudResourceAction action, State expectedState) {
super(name, instance, expectedState);
this.action = action;
}
@@ -38,7 +38,7 @@
return Status.OK_STATUS;
}
- protected Action getAction() {
+ protected DeltaCloudResourceAction getAction() {
return action;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -15,6 +15,7 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.core.client.utils.StringUtils;
import org.jboss.tools.deltacloud.core.client.utils.StringUtils.IElementFormatter;
import org.jboss.tools.deltacloud.core.job.InstanceActionJob;
@@ -27,7 +28,7 @@
*/
public abstract class AbstractInstanceHandler extends AbstractHandler implements IHandler {
- protected void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action,
+ protected void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudResourceAction action,
DeltaCloudInstance.State expectedState, String title, String message) {
if (instance != null) {
new InstanceActionJob(message, instance, action, expectedState)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -23,6 +23,7 @@
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
@@ -93,7 +94,7 @@
if (instance != null) {
executeInstanceAction(
instance
- , DeltaCloudInstance.Action.REBOOT
+ , DeltaCloudResourceAction.REBOOT
, DeltaCloudInstance.State.RUNNING
, CVMessages.getString(REBOOTING_INSTANCE_TITLE)
, CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[] { instance.getName() }));
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -24,6 +24,7 @@
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
@@ -95,7 +96,7 @@
if (instance != null) {
executeInstanceAction(
instance
- , DeltaCloudInstance.Action.START
+ , DeltaCloudResourceAction.START
, DeltaCloudInstance.State.RUNNING
, CVMessages.getString(STARTING_INSTANCE_TITLE)
, CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instance.getName() }));
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -23,6 +23,7 @@
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
@@ -107,7 +108,7 @@
if (instance != null) {
executeInstanceAction(
instance
- , DeltaCloudInstance.Action.STOP
+ , DeltaCloudResourceAction.STOP
, DeltaCloudInstance.State.STOPPED
, CVMessages.getString(STOPPING_INSTANCE_TITLE)
, CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[] { instance.getName() }));
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -56,6 +56,7 @@
this.cloud = dc;
}
public DeltaCloud getCloud(){ return cloud; }
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
if( adapter == DeltaCloud.class )
return cloud;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudLabelProvider.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -16,7 +16,6 @@
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.views.cloud.ImageItem;
import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.CategoryContent;
import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.DelayObject;
import org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider.ImagesPager;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -21,6 +21,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.core.job.InstanceActionJob;
import org.jboss.tools.deltacloud.core.job.RefreshCloudJob;
import org.jboss.tools.deltacloud.ui.commands.DeleteCloudHandler.DeleteCloudsDialog;
@@ -51,7 +52,7 @@
handleInstanceAction(
instances,
START_INSTANCES_DIALOG_TITLE_VAL, START_INSTANCES_DIALOG_MSG_VAL,
- DeltaCloudInstance.Action.START, DeltaCloudInstance.State.RUNNING,
+ DeltaCloudResourceAction.START, DeltaCloudInstance.State.RUNNING,
STARTING_INSTANCE_MSG_KEY);
}
@@ -60,7 +61,7 @@
handleInstanceAction(
instances,
STOP_INSTANCES_DIALOG_TITLE_VAL, STOP_INSTANCES_DIALOG_MSG_VAL,
- DeltaCloudInstance.Action.STOP, DeltaCloudInstance.State.STOPPED,
+ DeltaCloudResourceAction.STOP, DeltaCloudInstance.State.STOPPED,
STOPPING_INSTANCE_MSG_KEY);
}
@@ -69,7 +70,7 @@
handleInstanceAction(
instances,
REBOOT_INSTANCE_TITLE_VAL, REBOOT_INSTANCE_MSG_VAL,
- DeltaCloudInstance.Action.REBOOT, DeltaCloudInstance.State.RUNNING,
+ DeltaCloudResourceAction.REBOOT, DeltaCloudInstance.State.RUNNING,
REBOOTING_INSTANCE_MSG_KEY);
}
public static void destroyInstances(ISelection selection) {
@@ -77,12 +78,12 @@
handleInstanceAction(
instances,
DESTROY_INSTANCE_TITLE_VAL, DESTROY_INSTANCE_MSG_VAL,
- DeltaCloudInstance.Action.DESTROY, DeltaCloudInstance.State.TERMINATED,
+ DeltaCloudResourceAction.DESTROY, DeltaCloudInstance.State.TERMINATED,
DESTROYING_INSTANCE_MSG_KEY);
}
protected static void handleInstanceAction(DeltaCloudInstance[] instances,
- String dialogTitle, String dialogMsg, DeltaCloudInstance.Action action,
+ String dialogTitle, String dialogMsg, DeltaCloudResourceAction action,
DeltaCloudInstance.State expectedState, String unformattedJobName) {
if(instances.length > 1 ) {
List<DeltaCloudInstance> list = Arrays.asList(instances);
@@ -105,7 +106,7 @@
}
- protected static void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action,
+ protected static void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudResourceAction action,
DeltaCloudInstance.State expectedState, String jobName) {
if (instance != null) {
new InstanceActionJob(jobName, instance, action, expectedState).schedule();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -55,7 +55,7 @@
return null;
}
DeltaCloudKey keyToDelete = selectedKey;
- cloud.deleteKey(keyToDelete.getId());
+ cloud.delete(keyToDelete);
int index = keys.indexOf(keyToDelete);
keys.remove(keyToDelete);
fireIndexedPropertyChange(PROP_KEYS, index, keyToDelete, null);
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch 2011-02-08 11:16:58 UTC (rev 29059)
@@ -12,7 +12,7 @@
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.gwt.ui,org.eclipse.epp.usagedata.recording,org.jboss.tools.deltacloud.integration,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.usage,org.jboss.tools.usage.test,com.jboss.jbds.usage.branding,org.jboss.tools.gwt.core,org.eclipse.epp.usagedata.ui,org.jboss.tools.deltacloud.ui,org.jboss.tools.tests"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.co!
mmon.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.tools.common.verification.ui.test,org.jboss.ide.eclipse.as.rse.ui,com.jboss.jbds.usage.branding,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.gwt.core,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.as.doc.user,org.jboss.ide.eclipse.archives.ui.test,org.jboss.tools.common.model.ui,org.jboss.tools.jmx.core,org.jboss.tools.common.model.test"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -22,8 +22,8 @@
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
@@ -37,8 +37,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ant.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jem.util@default:default,org.eclipse.ui.console@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.concurrent@default:default,org.apache.xml.serializer@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.jdt.debug@default:default,!
org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.core.jobs@default:default,org.eclipse.wst.validation@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.equinox.common@default:default,org.eclipse.core.net@default:default,org.apache.xerces@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.search@default:default,javax.servlet@default:default,org.eclipse.osgi.util@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.debug.core@default:default,org.eclipse.core.databinding@default:default,org.eclipse.osgi,org.eclipse.core.fi!
lesystem.linux.x86_64@default:false,org.eclipse.ui.navigator.r!
esources
@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.jdt.compiler.tool@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.jdt.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.core.databinding.observable@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jface@default:default,org.eclipse.emf.edit@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime@default:true,org.eclipse.emf.ecore.change@default:default,javax.xml@!
default:default,org.eclipse.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.swt@default:default,org.eclipse.help@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.jdt.launching@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.apache.xml.resolver@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.equinox.app@default:default,org.eclipse.jface.text@default:default,org.eclipse.team.ui@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ltk.core.refactoring@default:default,org.hamcrest.core@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.ecf.ssl@default:false,com.instantiations.designer.jdt.fragme!
nt@default:false,org.eclipse.core.net.linux.x86_64@default:fal!
se,org.e
clipse.compare.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.text@default:default,org.eclipse.core.expressions@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ui.workbench.texteditor@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.common@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.apache.xerces@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,com.instantiations.assist.eclipse.fragment.ui.ide@default:false,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.core@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ant.core@default:default,org.eclipse.team.core@def!
ault:default,org.eclipse.help@default:default,org.eclipse.swt@default:default,org.eclipse.ui.console@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.debug.ui@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,com.instantiations.assist.eclipse.fragment.swt@default:false,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.observable@default:default,com.instantiations.assist.eclipse.fragment.jdt@default:false,com.instantiations.assist.eclipse.fragment.ui.workbench@default:false,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.text@defa!
ult:default,org.eclipse.equinox.preferences@default:default,or!
g.eclips
e.ltk.core.refactoring@default:default,org.eclipse.emf.edit@default:default,com.instantiations.assist.eclipse.fragment.ui.workbench.texteditor@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.forms@default:default,org.apache.xml.resolver@default:default,org.eclipse.jface@default:default,javax.xml@default:default,com.ibm.icu@default:default,org.eclipse.rse.core@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.jdt.ui@default:default,org.hamcrest.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,com.instantiations.assist.eclipse.fragment.jdt.core@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.provider.filetransfer@default:def!
ault,org.eclipse.wst.common.environment@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.debug.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.search@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.emf.common@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.resources@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.ide@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.compare@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.!
eclipse.equinox.app@default:default,com.jcraft.jsch@default:de!
fault,or
g.eclipse.ui.navigator@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.osgi,org.eclipse.ui@default:default,org.eclipse.jem.util@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ecf@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.team.ui@default:default,org.eclipse.jsch.core@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.emf.ecore@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.common@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-02-08 11:16:58 UTC (rev 29059)
@@ -18,7 +18,7 @@
</listAttribute>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.co!
mmon.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.jboss.tools.common.verification.ui.test,com.jboss.jbds.usage.branding,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.eclipse.jsch.ui,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.gwt.core,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.jmx.core,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.co!
mmon.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.tools.common.verification.ui.test,org.jboss.ide.eclipse.as.rse.ui,com.jboss.jbds.usage.branding,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.gwt.core,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.as.doc.user,org.jboss.ide.eclipse.archives.ui.test,org.jboss.tools.common.model.ui,org.jboss.tools.jmx.core,org.jboss.tools.common.model.test"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -44,7 +44,7 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.console@default:default,com.jcraft.jsch@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jsch.core@default:default,org.eclipse.ui.editors@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.core.variables@default:default,org.eclipse.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.osgi@-1:true,org.eclipse.equinox.p2.repository@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jem.util@default:default,org.eclipse.swt@default:default,javax.xml@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.apache.xml.serializer@default:defa!
ult,org.eclipse.equinox.preferences@default:default,org.eclipse.core.databinding@default:default,org.eclipse.debug.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.ui.ide@default:default,org.eclipse.rse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.search@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.rse.services@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.util@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.text@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.p2.metadata@default:default,javax.servlet@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.navigator@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.registr!
y@default:default,org.eclipse.core.jobs@default:default,org.ec!
lipse.ui
.views.properties.tabbed@default:default,org.eclipse.ecf@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.emf.common@default:default,org.eclipse.equinox.p2.core@default:default,org.apache.xml.resolver@default:default,org.eclipse.core.net@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.environment@default:default,org.eclipse.help@default:default,org.eclipse.core.resources@default:default,org.eclipse.jdt.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.net.linux.x86_64@d!
efault:false,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.osgi.services@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui.views@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jface.text@d!
efault:default,org.eclipse.wst.common.project.facet.core@defau!
lt:defau
lt,org.eclipse.emf.edit@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.databinding.observable@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.debug.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.ecf.filetransfer@default:default,com.ibm.icu@default:default,org.eclipse.compare@default:default,org.eclipse.wst.common.core@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.common@2:true,org.eclipse.jdt.launching@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.apache.xerces@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.core@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ant.core@default:default,org.eclipse.team.core@default:default,org.eclipse.help@default:default,org.eclipse.swt@default:def!
ault,org.eclipse.ui.console@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.debug.ui@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.text@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.emf.edit@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.forms@default:default,org.apache.xml.resolver@defa!
ult:default,org.eclipse.jface@default:default,javax.xml@defaul!
t:defaul
t,com.ibm.icu@default:default,org.eclipse.rse.core@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.jdt.ui@default:default,org.hamcrest.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.debug.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.search@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.emf.common@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.r!
esources@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.ide@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.compare@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.app@default:default,com.jcraft.jsch@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.osgi@-1:true,org.eclipse.ui@default:default,org.eclipse.jem.util@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.security@default:default,org.eclipse!
.ui.workbench.texteditor@default:default,org.eclipse.ecf@defau!
lt:defau
lt,org.eclipse.core.contenttype@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.team.ui@default:default,org.eclipse.jsch.core@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.emf.ecore@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.common@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -24,12 +24,12 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.Image;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.Instance.InstanceState;
+import org.jboss.tools.deltacloud.core.client.StateAware.State;
/**
* A class that holds the integration test context
@@ -103,7 +103,7 @@
public void quietlyDestroyInstance(Instance instance) {
if (instance != null) {
try {
- if (instance.getState() == Instance.InstanceState.RUNNING) {
+ if (instance.getState() == Instance.State.RUNNING) {
instance.stop(client);
}
instance.destroy(client);
@@ -127,7 +127,7 @@
* @throws ExecutionException
* @throws InterruptedException
*/
- public boolean waitForInstanceState(final String instanceId, final InstanceState state, final long timeout)
+ public boolean waitForInstanceState(final String instanceId, final State state, final long timeout)
throws InterruptedException, ExecutionException {
final long startTime = System.currentTimeMillis();
Callable<Boolean> waitingCallable = new Callable<Boolean>() {
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -51,7 +51,7 @@
@Test
public void testConnectionReportsFalseOnAuthFailure() throws MalformedURLException, DeltaCloudClientException,
DeltaCloudException {
- ServerFake serverFake = setupServerFake("HTTP/1.1 403 Forbidden\n\n\n");
+ ServerFake serverFake = setupServerFake("HTTP/1.1 401 Forbidden\n\n\n");
try {
DeltaCloud deltaCloud = new DeltaCloudFake(
"http://localhost:" + ServerFake.DEFAULT_PORT,
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceDomUnmarshallingTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceDomUnmarshallingTest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceDomUnmarshallingTest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -20,10 +20,10 @@
import javax.xml.bind.JAXBException;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.InstanceAction;
-import org.jboss.tools.deltacloud.core.client.unmarshal.InstanceActionUnmarshaller;
+import org.jboss.tools.deltacloud.core.client.unmarshal.ActionUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.InstanceUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.InstancesUnmarshaller;
import org.jboss.tools.internal.deltacloud.test.fakes.InstanceResponseFakes.InstanceActionResponse;
@@ -38,9 +38,9 @@
@Test
public void instanceActionMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
- InstanceAction instanceAction = new InstanceAction();
+ Action<Instance> instanceAction = new Action<Instance>();
ByteArrayInputStream inputStream = new ByteArrayInputStream(InstanceActionResponse.response.getBytes());
- new InstanceActionUnmarshaller().unmarshall(inputStream, instanceAction);
+ new ActionUnmarshaller<Instance>().unmarshall(inputStream, instanceAction);
assertNotNull(instanceAction);
assertEquals(InstanceActionResponse.name, instanceAction.getName());
assertEquals(InstanceActionResponse.url, instanceAction.getUrl().toString());
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.concurrent.ExecutionException;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl;
@@ -31,9 +32,7 @@
import org.jboss.tools.deltacloud.core.client.HttpMethod;
import org.jboss.tools.deltacloud.core.client.Image;
import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.Instance.InstanceState;
-import org.jboss.tools.deltacloud.core.client.InstanceAction;
-import org.jboss.tools.deltacloud.core.client.InternalDeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.StateAware.State;
import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
import org.junit.After;
import org.junit.Before;
@@ -136,7 +135,7 @@
instance = testSetup.getClient().createInstance(image.getId());
assertTrue(instance != null);
assertEquals(image.getId(), instance.getImageId());
- assertEquals(InstanceState.RUNNING, instance.getState());
+ assertEquals(State.RUNNING, instance.getState());
} finally {
testSetup.quietlyDestroyInstance(instance);
}
@@ -161,19 +160,17 @@
public void destroyThrowsExceptionOnUnknowInstanceId() throws DeltaCloudClientException, IllegalArgumentException,
InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException,
NoSuchMethodException {
- InternalDeltaCloudClient client = (InternalDeltaCloudClient) testSetup.getClient();
- client.performInstanceAction(
+ DeltaCloudClient client = testSetup.getClient();
+ client.performAction(
createInstanceAction(
- InstanceAction.DESTROY,
+ "destroy",
MockIntegrationTestContext.DELTACLOUD_URL,
HttpMethod.POST,
new Instance()));
}
- private InstanceAction createInstanceAction(String name, String url, HttpMethod method, Instance instance)
- throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException,
- SecurityException, NoSuchMethodException {
- InstanceAction action = new InstanceAction();
+ private Action<Instance> createInstanceAction(String name, String url, HttpMethod method, Instance instance) {
+ Action<Instance> action = new Action<Instance>();
action.setName(name);
action.setMethod(method);
action.setOwner(instance);
@@ -202,31 +199,31 @@
DeltaCloudClient client = testSetup.getClient();
testInstance.stop(client);
testInstance = client.listInstances(testInstance.getId()); // reload!
- assertEquals(InstanceState.STOPPED, testInstance.getState());
+ assertEquals(State.STOPPED, testInstance.getState());
}
@Test
public void canStartInstance() throws DeltaCloudClientException {
Instance testInstance = testSetup.getTestInstance();
DeltaCloudClient client = testSetup.getClient();
- if (testInstance.getState() == InstanceState.RUNNING) {
+ if (testInstance.getState() == State.RUNNING) {
testInstance.stop(client);
}
testInstance.start(client);
testInstance = client.listInstances(testInstance.getId()); // reload!
- assertEquals(InstanceState.RUNNING, testInstance.getState());
+ assertEquals(State.RUNNING, testInstance.getState());
}
@Test
public void canStartInstanceByAction() throws DeltaCloudClientException {
Instance testInstance = testSetup.getTestInstance();
DeltaCloudClient client = testSetup.getClient();
- if (testInstance.getState() == InstanceState.RUNNING) {
+ if (testInstance.getState() == State.RUNNING) {
testInstance.stop(client);
}
assertTrue(testInstance.start(client));
testInstance = client.listInstances(testInstance.getId()); // reload!
- assertEquals(InstanceState.RUNNING, testInstance.getState());
+ assertEquals(State.RUNNING, testInstance.getState());
}
@Test
@@ -254,7 +251,7 @@
Instance testInstance = testSetup.getTestInstance();
DeltaCloudClient client = testSetup.getClient();
testInstance = client.listInstances(testInstance.getId()); // reload
- assertTrue(testInstance.getState() == InstanceState.RUNNING);
+ assertTrue(testInstance.getState() == State.RUNNING);
assertFalse(testInstance.destroy(client));
}
@@ -266,7 +263,7 @@
try {
testInstance.stop(client);
testInstance = client.listInstances(testInstance.getId()); // reload
- assertTrue(testInstance.getState() == InstanceState.STOPPED);
+ assertTrue(testInstance.getState() == State.STOPPED);
assertFalse(testInstance.reboot(client));
} finally {
testInstance.start(client);
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -21,11 +21,11 @@
import javax.xml.bind.JAXBException;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.HttpMethod;
import org.jboss.tools.deltacloud.core.client.Key;
-import org.jboss.tools.deltacloud.core.client.KeyAction;
-import org.jboss.tools.deltacloud.core.client.unmarshal.KeyActionUnmarshaller;
+import org.jboss.tools.deltacloud.core.client.unmarshal.ActionUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.KeyUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.KeysUnmarshaller;
import org.jboss.tools.internal.deltacloud.test.fakes.KeyResponseFakes;
@@ -41,9 +41,9 @@
@Test
public void keyActionMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
- KeyAction keyAction = new KeyAction();
+ Action<Key> keyAction = new Action<Key>();
ByteArrayInputStream inputStream = new ByteArrayInputStream(KeyActionResponse.keyActionResponse.getBytes());
- new KeyActionUnmarshaller().unmarshall(inputStream, keyAction);
+ new ActionUnmarshaller<Key>().unmarshall(inputStream, keyAction);
assertNotNull(keyAction);
assertEquals(KeyActionResponse.name, keyAction.getName());
assertEquals(KeyActionResponse.url, keyAction.getUrl().toString());
@@ -61,7 +61,7 @@
assertEquals(new URL(KeyResponse.url), key.getUrl());
assertEquals(KeyResponse.pem, key.getPem());
assertEquals(1, key.getActions().size());
- KeyAction action = key.getActions().get(0);
+ Action<Key> action = key.getActions().get(0);
assertNotNull(action);
assertEquals(KeyResponse.url, action.getUrl().toString());
assertEquals(KeyResponse.name, action.getName());
@@ -80,7 +80,7 @@
assertEquals(new URL(KeysResponse.url1), key.getUrl());
assertEquals(KeysResponse.pem1, key.getPem());
assertEquals(1, key.getActions().size());
- KeyAction action = key.getActions().get(0);
+ Action<Key> action = key.getActions().get(0);
assertNotNull(action);
assertEquals(KeysResponse.url1, action.getUrl().toString());
assertEquals(KeysResponse.name1, action.getName());
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.test.core.client;
+import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
@@ -20,6 +21,7 @@
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
+import org.jboss.tools.deltacloud.core.client.Action;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl;
@@ -89,8 +91,8 @@
Key key = client.createKey(id);
assertNotNull(key);
assertEquals(id, key.getId());
- client.deleteKey(id);
- client.listKey(id);
+ key.destroy(client);
+ client.listKey(key.getId());
}
/**
@@ -155,7 +157,9 @@
private void quietlyDeleteKey(String id) {
try {
- testSetup.getClient().deleteKey(id);
+ DeltaCloudClient client = testSetup.getClient();
+ Key key = client.listKey(id);
+ key.destroy(client);
} catch (Exception e) {
// ignore
}
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/InstanceResponseFakes.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.test.fakes;
-import org.jboss.tools.deltacloud.core.client.Instance.InstanceState;
+import org.jboss.tools.deltacloud.core.client.StateAware.State;
/**
* @author André Dietisheim
@@ -33,7 +33,7 @@
public static final String image1Id = "ami-7d07ec14";
public static final String realm1Url = "http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
public static final String realm1Id = "us-east-1a";
- public static final InstanceState state = InstanceState.RUNNING;
+ public static final State state = State.RUNNING;
public static final String hardwareProfile1Url = "http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.small";
public static final String hardwareProfile1Id = "m1.small";
public static final String keyname1 = "ad10";
@@ -57,7 +57,7 @@
public static final String image1Id = "ami-7d07ec14";
public static final String realm1Url = "http://try.steamcannon.org/deltacloud/api/realms/us-east-1a";
public static final String realm1Id = "us-east-1a";
- public static final InstanceState state = InstanceState.RUNNING;
+ public static final State state = State.RUNNING;
public static final String hardwareProfile1Url = "http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.small";
public static final String hardwareProfile1Id = "m1.small";
public static final String keyname1 = "ad10";
@@ -74,7 +74,7 @@
public static final String image2Id = "ami-7d07ec14";
public static final String realm2Url = "http://try.steamcannon.org/deltacloud/api/realms/us-east-2a";
public static final String realm2Id = "us-east-2a";
- public static final InstanceState state2 = InstanceState.STOPPED;
+ public static final State state2 = State.STOPPED;
public static final String hardwareProfile2Url = "http://try.steamcannon.org/deltacloud/api/hardware_profiles/m1.large";
public static final String hardwareProfile2Id = "m1.large";
public static final String keyname2 = "ad11";
@@ -96,7 +96,7 @@
}
private static final String getInstanceResponseXML(String url, String id, String name, String owner,
- String imageUrl, String imageId, String realmUrl, String realmId, InstanceState state,
+ String imageUrl, String imageId, String realmUrl, String realmId, State state,
String hardwareProfileUrl, String hardwareProfileId, String keyname, String actionName1,
String actionName2, String publicAddress, String privateAddress) {
return "<instance href=\""
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2011-02-08 10:21:51 UTC (rev 29058)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2011-02-08 11:16:58 UTC (rev 29059)
@@ -19,7 +19,7 @@
public class ServerFake {
- public static final int DEFAULT_PORT = 3002;
+ public static final int DEFAULT_PORT = 3003;
private ExecutorService executor;
private int port;
private String response;
13 years, 11 months
JBoss Tools SVN: r29058 - trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-02-08 05:21:51 -0500 (Tue, 08 Feb 2011)
New Revision: 29058
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/Console.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsoleInputStream.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartition.java
Log:
cleanup
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/Console.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/Console.java 2011-02-07 22:23:02 UTC (rev 29057)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/Console.java 2011-02-08 10:21:51 UTC (rev 29058)
@@ -46,7 +46,7 @@
}
partitioner = new ConsolePartitioner(inputStream, this);
partitioner.connect(getDocument());
- inputStream.setColor(ColorManager.getInstance().getColor(INPUT_STREAM_RGB));
+// inputStream.setColor(ColorManager.getInstance().getColor(INPUT_STREAM_RGB));
connect();
}
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsoleInputStream.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsoleInputStream.java 2011-02-07 22:23:02 UTC (rev 29057)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsoleInputStream.java 2011-02-08 10:21:51 UTC (rev 29058)
@@ -2,25 +2,15 @@
import java.io.IOException;
import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.ui.console.IConsoleConstants;
-
public class ConsoleInputStream extends InputStream {
- private byte[] input = new byte[100];
- private int inPointer = 0;
+ private byte[] input = new byte[0];
private int outPointer = 0;
private int size = 0;
private boolean eofSent = false;
private boolean closed = false;
private Console console;
- private Color color;
- private int fontStyle = SWT.NORMAL;
-
- private char c = (char)-1;
ConsoleInputStream(Console console) {
this.console = console;
@@ -43,7 +33,6 @@
private void waitForData() {
while (size == 0 && !closed) {
-// while (c != -1 && !closed) {
try {
wait();
} catch (InterruptedException e) {}
@@ -51,90 +40,21 @@
}
public synchronized void appendData(String text) {
- String encoding = console.getEncoding();
- byte[] newData;
- if (encoding!=null)
- try {
- newData = text.getBytes(encoding);
- } catch (UnsupportedEncodingException e) {
- newData = text.getBytes();
- }
- else
- newData = text.getBytes();
-
- while(input.length-size < newData.length) {
- growArray();
- }
-
- if (size == 0) { //inPointer == outPointer
- System.arraycopy(newData, 0, input, 0, newData.length);
- inPointer = newData.length;
- size = newData.length;
- outPointer = 0;
- } else if (inPointer < outPointer || input.length - inPointer > newData.length) {
- System.arraycopy(newData, 0, input, inPointer, newData.length);
- inPointer += newData.length;
- size += newData.length;
- } else {
- System.arraycopy(newData, 0, input, inPointer, input.length-inPointer);
- System.arraycopy(newData, input.length-inPointer, input, 0, newData.length-(input.length-inPointer));
- inPointer = newData.length-(input.length-inPointer);
- size += newData.length;
- }
-
- if (inPointer == input.length) {
- inPointer = 0;
- }
+ input = text.getBytes();
+ size = text.length();
+ outPointer = 0;
notifyAll();
}
- private void growArray() {
- byte[] newInput = new byte[input.length+1024];
- if (outPointer < inPointer) {
- System.arraycopy(input, outPointer, newInput, 0, size);
- } else {
- System.arraycopy(input, outPointer, newInput, 0, input.length-outPointer);
- System.arraycopy(input, 0, newInput, input.length-outPointer, inPointer);
- }
- outPointer = 0;
- inPointer = size;
- input = newInput;
- newInput = null;
- }
-
- public int getFontStyle() {
- return fontStyle;
- }
-
- public void setFontStyle(int newFontStyle) {
- if (newFontStyle != fontStyle) {
- int old = fontStyle;
- fontStyle = newFontStyle;
- console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, new Integer(old), new Integer(fontStyle));
- }
- }
-
- public void setColor(Color newColor) {
- Color old = color;
- if (old == null || !old.equals(newColor)) {
- color = newColor;
- console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor);
- }
- }
-
- public Color getColor() {
- return color;
- }
-
public int available() throws IOException {
if (closed && eofSent) {
- throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ throw new IOException("Input Stream Closed");
} else if (size == 0) {
if (!eofSent) {
eofSent = true;
return -1;
}
- throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ throw new IOException("Input Stream Closed");
}
return size;
@@ -142,7 +62,7 @@
public synchronized void close() throws IOException {
if(closed) {
- throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ throw new IOException("Input Stream Closed");
}
closed = true;
notifyAll();
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartition.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartition.java 2011-02-07 22:23:02 UTC (rev 29057)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/ConsolePartition.java 2011-02-08 10:21:51 UTC (rev 29058)
@@ -129,7 +129,7 @@
* of this partition in a viewer.
*/
public StyleRange getStyleRange(int rangeOffset, int rangeLength) {
- return new StyleRange(rangeOffset, rangeLength, getColor(), null, getFontStyle());
+ return new StyleRange(rangeOffset, rangeLength, null, null);
}
/**
@@ -139,12 +139,12 @@
*
* @return the font of one of the backing streams
*/
- private int getFontStyle() {
- if (type.equals(INPUT_PARTITION_TYPE)) {
- return inputStream.getFontStyle();
- }
- return outputStream.getFontStyle();
- }
+// private int getFontStyle() {
+// if (type.equals(INPUT_PARTITION_TYPE)) {
+// return inputStream.getFontStyle();
+// }
+// return outputStream.getFontStyle();
+// }
/**
* Returns the colour of the input stream if the type of the partition
@@ -153,12 +153,12 @@
*
* @return the colour of one of the backing streams
*/
- public Color getColor() {
- if (type.equals(INPUT_PARTITION_TYPE)) {
- return inputStream.getColor();
- }
- return outputStream.getColor();
- }
+// public Color getColor() {
+// if (type.equals(INPUT_PARTITION_TYPE)) {
+// return inputStream.getColor();
+// }
+// return outputStream.getColor();
+// }
/**
* Returns if this partition is read-only.
13 years, 11 months
JBoss Tools SVN: r29057 - trunk/runtime/plugins/org.jboss.tools.runtime.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-02-07 17:23:02 -0500 (Mon, 07 Feb 2011)
New Revision: 29057
Added:
trunk/runtime/plugins/org.jboss.tools.runtime/jboss_about.png
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/plugin.properties
Log:
JBIDE-8346 JBoss Runtime item has wrong label and description within dialog File > Export > General > Preferences
Added: trunk/runtime/plugins/org.jboss.tools.runtime/jboss_about.png
===================================================================
(Binary files differ)
Property changes on: trunk/runtime/plugins/org.jboss.tools.runtime/jboss_about.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/runtime/plugins/org.jboss.tools.runtime/plugin.properties
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime/plugin.properties 2011-02-07 21:20:28 UTC (rev 29056)
+++ trunk/runtime/plugins/org.jboss.tools.runtime/plugin.properties 2011-02-07 22:23:02 UTC (rev 29057)
@@ -1,3 +1,5 @@
#Properties file for org.jboss.tools.runtime
BundleVendor = JBoss by Red Hat
-BundleName = JBoss Runtime Initializer
\ No newline at end of file
+BundleName = JBoss Runtime Initializer
+JBoss_Runtimes = JBoss Runtimes
+ImportExportJBossRuntimes = JBoss Runtimes preferences
\ No newline at end of file
13 years, 11 months