Author: adietish
Date: 2012-02-06 08:16:42 -0500 (Mon, 06 Feb 2012)
New Revision: 38443
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
Log:
extracted interface for openshift wizard model
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs 2012-02-06
13:16:42 UTC (rev 38443)
@@ -0,0 +1,4 @@
+#Tue Jan 31 17:15:49 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] extended
+formatter_settings_version=12
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -45,8 +45,8 @@
import org.jboss.ide.eclipse.as.ui.editor.ServerWorkingCopyPropertyCommand;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-import
org.jboss.tools.openshift.express.internal.ui.wizard.AbstractOpenShiftApplicationWizardModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPageModel;
+import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -129,7 +129,7 @@
userLabel.setText("Username: ");
passLabel.setText("Password: ");
remoteLabel.setText("Remote: ");
- remoteText.setText(AbstractOpenShiftApplicationWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
+ remoteText.setText(IOpenShiftWizardModel.NEW_PROJECT_REMOTE_NAME_DEFAULT);
String n = ExpressServerUtils.getExpressUsername(server);
String p = ExpressServerUtils.getExpressPassword(server.getOriginal());
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizard.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
import java.io.IOException;
@@ -21,7 +31,11 @@
import com.openshift.express.client.OpenShiftException;
-public abstract class AbstractOpenShiftApplicationWizard<T extends
AbstractOpenShiftApplicationWizardModel> extends Wizard {
+/**
+ * @author Andre Dietisheim
+ *
+ */
+public abstract class AbstractOpenShiftApplicationWizard<T extends
IOpenShiftWizardModel> extends Wizard {
private T wizardModel;
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenShiftApplicationWizardModel.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -17,8 +17,6 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
-import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import
org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureGitSharedProject;
import
org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ConfigureUnsharedProject;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject;
@@ -29,28 +27,9 @@
import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
-public class AbstractOpenShiftApplicationWizardModel extends ObservableUIPojo {
+public class AbstractOpenShiftApplicationWizardModel extends ObservableUIPojo implements
IOpenShiftWizardModel {
protected HashMap<String, Object> dataModel = new HashMap<String,
Object>();
- public static final String NEW_PROJECT = "enableProject";
- public static final String USER = "user";
- public static final String APPLICATION = "application";
- public static final String REMOTE_NAME = "remoteName";
- public static final String REPOSITORY_PATH = "repositoryPath";
- public static final String PROJECT_NAME = "projectName";
- public static final String MERGE_URI = "mergeUri";
- public static final String RUNTIME_DELEGATE = "runtimeDelegate";
-
- public static final String CREATE_SERVER_ADAPTER = "createServerAdapter";
- public static final String PUBLICATION_MODE = "serverMode";
- public static final String PUBLISH_SOURCE = ExpressServerUtils.EXPRESS_SOURCE_MODE;
- public static final String PUBLISH_BINARY = ExpressServerUtils.EXPRESS_BINARY_MODE;
- public static final String SERVER_TYPE = "serverType";
-
- public static final String NEW_PROJECT_REMOTE_NAME_DEFAULT = "origin";
- public static final String EXISTING_PROJECT_REMOTE_NAME_DEFAULT =
"openshift";
- public static final String DEFAULT_REPOSITORY_PATH =
EGitUIUtils.getEGitDefaultRepositoryPath();
-
public AbstractOpenShiftApplicationWizardModel() {
super();
// default value(s)
@@ -74,6 +53,7 @@
* @throws URISyntaxException
* @throws InvocationTargetException
*/
+ @Override
public void importProject(IProgressMonitor monitor) throws OpenShiftException,
CoreException, InterruptedException,
URISyntaxException, InvocationTargetException {
List<IProject> importedProjects = new ImportNewProject(getProjectName(),
getApplication(), getRemoteName(),
@@ -106,6 +86,7 @@
* @throws CoreException
* The user project could not be shared with the git
*/
+ @Override
public void configureUnsharedProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
URISyntaxException {
@@ -143,6 +124,7 @@
* @throws CoreException
* The user project could not be shared with the git
*/
+ @Override
public void configureGitSharedProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
URISyntaxException {
@@ -162,6 +144,7 @@
new ServerAdapterFactory().create(project, this, monitor);
}
+ @Override
public File getRepositoryFile() {
String repositoryPath = getRepositoryPath();
if (repositoryPath == null || repositoryPath.length() == 0) {
@@ -170,6 +153,7 @@
return new File(repositoryPath, getApplicationName());
}
+ @Override
public Object setProperty(String key, Object value) {
Object oldVal = dataModel.get(key);
dataModel.put(key, value);
@@ -177,22 +161,27 @@
return value;
}
+ @Override
public Object getProperty(String key) {
return dataModel.get(key);
}
+ @Override
public void setUser(IUser user) {
setProperty(USER, user);
}
+ @Override
public IUser getUser() {
return (IUser) getProperty(USER);
}
+ @Override
public IApplication getApplication() {
return (IApplication) getProperty(APPLICATION);
}
+ @Override
public String getApplicationName() {
String applicationName = null;
IApplication application = getApplication();
@@ -202,6 +191,7 @@
return applicationName;
}
+ @Override
public ICartridge getApplicationCartridge() {
ICartridge cartridge = null;
IApplication application = getApplication();
@@ -211,6 +201,7 @@
return cartridge;
}
+ @Override
public String getApplicationCartridgeName() {
String cartridgeName = null;
ICartridge cartridge = getApplicationCartridge();
@@ -220,47 +211,58 @@
return cartridgeName;
}
+ @Override
public void setApplication(IApplication application) {
setProperty(APPLICATION, application);
}
+ @Override
public String setRemoteName(String remoteName) {
setProperty(REMOTE_NAME, remoteName);
return remoteName;
}
+ @Override
public String getRemoteName() {
return (String) getProperty(REMOTE_NAME);
}
+ @Override
public String setRepositoryPath(String repositoryPath) {
return (String) setProperty(REPOSITORY_PATH, repositoryPath);
}
+ @Override
public String getRepositoryPath() {
return (String) getProperty(REPOSITORY_PATH);
}
+ @Override
public boolean isNewProject() {
return (Boolean) getProperty(NEW_PROJECT);
}
+ @Override
public boolean isExistingProject() {
return !((Boolean) getProperty(NEW_PROJECT));
}
+ @Override
public Boolean setNewProject(boolean newProject) {
return (Boolean) setProperty(NEW_PROJECT, newProject);
}
+ @Override
public Boolean setExistingProject(boolean existingProject) {
return (Boolean) setProperty(NEW_PROJECT, !existingProject);
}
+ @Override
public String setProjectName(String projectName) {
return (String) setProperty(PROJECT_NAME, projectName);
}
+ @Override
public boolean isGitSharedProject() {
return EGitUtils.isSharedWithGit(getProject());
}
@@ -268,39 +270,48 @@
private IProject getProject() {
return ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName());
}
+ @Override
public Boolean setCreateServerAdapter(Boolean createServerAdapter) {
return (Boolean) setProperty(CREATE_SERVER_ADAPTER, createServerAdapter);
}
+ @Override
public String getProjectName() {
return (String) getProperty(PROJECT_NAME);
}
+ @Override
public String setMergeUri(String mergeUri) {
return (String) setProperty(MERGE_URI, mergeUri);
}
+ @Override
public String getMergeUri() {
return (String) getProperty(MERGE_URI);
}
+ @Override
public IRuntime getRuntime() {
return (IRuntime) getProperty(RUNTIME_DELEGATE);
}
+ @Override
public String getMode() {
return (String) getProperty(PUBLICATION_MODE);
}
+ @Override
public boolean isCreateServerAdapter() {
Boolean isCreateServer = (Boolean) getProperty(CREATE_SERVER_ADAPTER);
return isCreateServer != null && isCreateServer.booleanValue();
}
+ @Override
public IServerType getServerType() {
return (IServerType) getProperty(SERVER_TYPE);
}
+ @Override
public void setServerType(IServerType serverType) {
setProperty(SERVER_TYPE, serverType);
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPage.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -53,7 +53,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*/
public class ApplicationSelectionWizardPage extends AbstractOpenShiftWizardPage {
@@ -61,7 +61,7 @@
private TableViewer tableViewer;
private final ApplicationSelectionWizardPageModel pageModel;
- public ApplicationSelectionWizardPage(IWizard wizard,
AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ApplicationSelectionWizardPage(IWizard wizard, IOpenShiftWizardModel wizardModel)
{
super("Application selection", "Click 'next' or select another
application to import.",
"Application selection", wizard);
this.pageModel = new ApplicationSelectionWizardPageModel(wizardModel);
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationSelectionWizardPageModel.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -20,7 +20,7 @@
import com.openshift.express.client.OpenShiftException;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*
*/
@@ -31,9 +31,9 @@
public static final String PROPERTY_SELECTED_APPLICATION =
"selectedApplication";
private IApplication selectedApplication;
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
- public ApplicationSelectionWizardPageModel(AbstractOpenShiftApplicationWizardModel
wizardModel) {
+ public ApplicationSelectionWizardPageModel(IOpenShiftWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -51,7 +51,7 @@
private Button useDefaultRepoPathButton;
private Text remoteNameText;
- public GitCloningSettingsWizardPage(AbstractOpenShiftApplicationWizard<?> wizard,
AbstractOpenShiftApplicationWizardModel model) {
+ public GitCloningSettingsWizardPage(AbstractOpenShiftApplicationWizard<?> wizard,
IOpenShiftWizardModel model) {
super(
"Import an existing OpenShift application",
"Configure the cloning settings by specifying the clone destination if you
create a new project, and the git remote name if you're using an existing
project.",
@@ -60,7 +60,7 @@
setPageComplete(false);
}
- public GitCloningSettingsWizardPage(ImportExistingApplicationWizard wizard,
AbstractOpenShiftApplicationWizardModel model) {
+ public GitCloningSettingsWizardPage(ImportExistingApplicationWizard wizard,
IOpenShiftWizardModel model) {
super(
"Import an existing OpenShift application",
"Configure the cloning settings by specifying the clone destination if you
create a new project, and the git remote name if you're using an existing
project.",
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPageModel.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -53,7 +53,7 @@
public static final String PROPERTY_CUSTOM_REMOTE_NAME_VALIDITY =
"customRemoteNameValidity";
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
private boolean loading;
private boolean useDefaultRepoPath = true;
@@ -64,7 +64,7 @@
private boolean useDefaultRemoteName = true;
- public GitCloningSettingsWizardPageModel(AbstractOpenShiftApplicationWizardModel
wizardModel) {
+ public GitCloningSettingsWizardPageModel(IOpenShiftWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
(rev 0)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServerType;
+import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenShiftWizardModel {
+
+ public static final String NEW_PROJECT = "enableProject";
+ public static final String USER = "user";
+ public static final String APPLICATION = "application";
+ public static final String REMOTE_NAME = "remoteName";
+ public static final String REPOSITORY_PATH = "repositoryPath";
+ public static final String PROJECT_NAME = "projectName";
+ public static final String MERGE_URI = "mergeUri";
+ public static final String RUNTIME_DELEGATE = "runtimeDelegate";
+ public static final String CREATE_SERVER_ADAPTER = "createServerAdapter";
+ public static final String PUBLICATION_MODE = "serverMode";
+ public static final String PUBLISH_SOURCE = ExpressServerUtils.EXPRESS_SOURCE_MODE;
+ public static final String PUBLISH_BINARY = ExpressServerUtils.EXPRESS_BINARY_MODE;
+ public static final String SERVER_TYPE = "serverType";
+ public static final String NEW_PROJECT_REMOTE_NAME_DEFAULT = "origin";
+ public static final String EXISTING_PROJECT_REMOTE_NAME_DEFAULT =
"openshift";
+ public static final String DEFAULT_REPOSITORY_PATH =
EGitUIUtils.getEGitDefaultRepositoryPath();
+
+ /**
+ * Imports the project that the user has chosen into the workspace.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws OpenShiftException
+ * @throws CoreException
+ * @throws InterruptedException
+ * @throws URISyntaxException
+ * @throws InvocationTargetException
+ */
+ public void importProject(IProgressMonitor monitor) throws OpenShiftException,
CoreException, InterruptedException,
+ URISyntaxException, InvocationTargetException;
+
+ /**
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
+ * configuration files to the user project (in the workspace), shares the
+ * user project with git and creates the server adapter.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws URISyntaxException
+ * The OpenShift application repository could not be cloned,
+ * because the uri it is located at is not a valid git uri
+ * @throws OpenShiftException
+ *
+ * @throws InvocationTargetException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation failed.
+ * @throws InterruptedException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation was interrupted.
+ * @throws IOException
+ * The configuration files could not be copied from the git
+ * clone to the user project
+ * @throws CoreException
+ * The user project could not be shared with the git
+ */
+ public void configureUnsharedProject(IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
+ URISyntaxException;
+
+ /**
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
+ * configuration files to the user project (in the workspace), adds the
+ * appication git repo as remote and creates the server adapter.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws URISyntaxException
+ * The OpenShift application repository could not be cloned,
+ * because the uri it is located at is not a valid git uri
+ * @throws OpenShiftException
+ *
+ * @throws InvocationTargetException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation failed.
+ * @throws InterruptedException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation was interrupted.
+ * @throws IOException
+ * The configuration files could not be copied from the git
+ * clone to the user project
+ * @throws CoreException
+ * The user project could not be shared with the git
+ */
+ public void configureGitSharedProject(IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException,
IOException, CoreException,
+ URISyntaxException;
+
+ public File getRepositoryFile();
+
+ public Object setProperty(String key, Object value);
+
+ public Object getProperty(String key);
+
+ public void setUser(IUser user);
+
+ public IUser getUser();
+
+ public IApplication getApplication();
+
+ public String getApplicationName();
+
+ public ICartridge getApplicationCartridge();
+
+ public String getApplicationCartridgeName();
+
+ public void setApplication(IApplication application);
+
+ public String setRemoteName(String remoteName);
+
+ public String getRemoteName();
+
+ public String setRepositoryPath(String repositoryPath);
+
+ public String getRepositoryPath();
+
+ public boolean isNewProject();
+
+ public boolean isExistingProject();
+
+ public Boolean setNewProject(boolean newProject);
+
+ public Boolean setExistingProject(boolean existingProject);
+
+ public String setProjectName(String projectName);
+
+ public boolean isGitSharedProject();
+
+ public Boolean setCreateServerAdapter(Boolean createServerAdapter);
+
+ public String getProjectName();
+
+ public String setMergeUri(String mergeUri);
+
+ public String getMergeUri();
+
+ public IRuntime getRuntime();
+
+ public String getMode();
+
+ public boolean isCreateServerAdapter();
+
+ public IServerType getServerType();
+
+ public void setServerType(IServerType serverType);
+
+}
\ No newline at end of file
Property changes on:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/IOpenShiftWizardModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -46,7 +46,7 @@
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Xavier Coulon
*/
public class ProjectAndServerAdapterSettingsWizardPage extends
AbstractOpenShiftWizardPage {
@@ -57,7 +57,7 @@
private Text existingProjectNameText = null;
- public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard,
AbstractOpenShiftApplicationWizardModel wizardModel) {
+ public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard, IOpenShiftWizardModel
wizardModel) {
super("Project configuration",
"Configure your project and server adapter settings, then click 'next'
or 'finish'.",
"Project configuration", wizard);
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPageModel.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -18,7 +18,7 @@
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
- * @author Andr� Dietisheim
+ * @author Andr� Dietisheim
* @author Xavier Coulon
*
*/
@@ -36,11 +36,11 @@
/** Whether the existing project is a valid one or not. */
public static final String PROPERTY_EXISTING_PROJECT_VALIDITY =
"existingProjectValidity";
- private AbstractOpenShiftApplicationWizardModel wizardModel;
+ private IOpenShiftWizardModel wizardModel;
private IStatus existingProjectValidity;
- public
ProjectAndServerAdapterSettingsWizardPageModel(AbstractOpenShiftApplicationWizardModel
wizardModel) {
+ public ProjectAndServerAdapterSettingsWizardPageModel(IOpenShiftWizardModel wizardModel)
{
this.wizardModel = wizardModel;
setNewProject(true);
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-06
10:50:32 UTC (rev 38442)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-02-06
13:16:42 UTC (rev 38443)
@@ -34,7 +34,7 @@
import org.eclipse.wst.server.core.internal.Server;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-import
org.jboss.tools.openshift.express.internal.ui.wizard.AbstractOpenShiftApplicationWizardModel;
+import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -42,13 +42,14 @@
/**
* @author André Dietisheim <adietish(a)redhat.com>
+ * @author Rob Stryker
*/
public class ServerAdapterFactory {
public ServerAdapterFactory() {
}
- public void create(IProject project, AbstractOpenShiftApplicationWizardModel
wizardModel, IProgressMonitor monitor) throws OpenShiftException {
+ public void create(IProject project, IOpenShiftWizardModel wizardModel, IProgressMonitor
monitor) throws OpenShiftException {
createServerAdapter(project, wizardModel.getServerType(), wizardModel.getRuntime(),
wizardModel.getMode(),
wizardModel.getApplication(), wizardModel.getUser(), wizardModel.getRemoteName(),
monitor);
}