JBoss Tools SVN: r35311 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-04 02:09:58 -0400 (Tue, 04 Oct 2011)
New Revision: 35311
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
Log:
remove 'Import-Package: org.jboss.tools.common.ui.preferencevalue' from manifest
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-04 05:57:55 UTC (rev 35310)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-04 06:09:58 UTC (rev 35311)
@@ -12,4 +12,3 @@
org.junit;bundle-version="[4.8.0,5.0.0)",
org.junit.source;bundle-version="4.8.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.jboss.tools.common.ui.preferencevalue
14 years, 6 months
JBoss Tools SVN: r35310 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-04 01:57:55 -0400 (Tue, 04 Oct 2011)
New Revision: 35310
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
Log:
maybe the org.jboss.tools.deltacloud.test plugin should use org.jboss.tools.deltacloud.test 1.0.1.qualifier instead of org.jboss.tools.common.ui.test 3.3.0.qualifier? Yes, I think that would be best.
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-04 05:27:12 UTC (rev 35309)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-04 05:57:55 UTC (rev 35310)
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.jboss.tools.common.ui.test
-Bundle-Version: 3.3.0.qualifier
+Bundle-SymbolicName: org.jboss.tools.deltacloud.test
+Bundle-Version: 1.0.1.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
14 years, 6 months
JBoss Tools SVN: r35309 - in trunk/as: tests/org.jboss.ide.eclipse.as.archives.integration.test/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-04 01:27:12 -0400 (Tue, 04 Oct 2011)
New Revision: 35309
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/JSTEarWithNestedWebProjectIncrementalPublish.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java
Log:
JBIDE-9824 with test case
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-10-04 01:21:53 UTC (rev 35308)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-10-04 05:27:12 UTC (rev 35309)
@@ -76,6 +76,8 @@
monitor.setTaskName("Publishing to remote server " + server.getName()); //$NON-NLS-1$
+
+
// set up needed vars
IDeployableServer server2 = ServerConverter.getDeployableServer(server);
String remoteTempDeployRoot = getDeployRoot(module, ServerConverter.getDeployableServer(server));
@@ -88,7 +90,9 @@
if(publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
result = removeRemoteDeployment(sourcePath, destination.removeLastSegments(1), name, monitor);
- } else if (publishType != IJBossServerPublisher.NO_PUBLISH) {
+ } else if( publishType != IJBossServerPublisher.NO_PUBLISH
+ || new LocalZippedPublisherUtil().anyChangesRecurse(server, module)){
+
/*
* remove prior exploded deployment (prior deployfailed marker, deployed folder etc.)
* and redeploy
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-10-04 01:21:53 UTC (rev 35308)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-10-04 05:27:12 UTC (rev 35309)
@@ -131,7 +131,32 @@
protected List<IModule[]> getRemovedModules(IServer s) {
return getBehaviour(s).getRemovedModules();
}
-
+
+ public boolean anyChangesRecurse(IServer server, IModule[] module) {
+ // Since for zipped, incremental and full are identical, just return a result other than 'no publish'
+ if( !getBehaviour(server).hasBeenPublished(module))
+ return true;
+
+ if( isRemoved(server, module))
+ return true;
+
+ int modulePublishState = server.getModulePublishState(module);
+ if( modulePublishState != IServer.PUBLISH_STATE_NONE)
+ return true;
+
+ IModuleResourceDelta[] deltas = ((Server)server).getPublishedResourceDelta(module);
+ if( deltas.length > 0)
+ return true;
+
+ IModule[] children = server.getChildModules(module, new NullProgressMonitor());
+ for( int i = 0; i < children.length; i++ ) {
+ IModule[] tmp = combine(module, children[i]);
+ if(anyChangesRecurse(server, tmp))
+ return true;
+ }
+ return false;
+ }
+
protected IStatus[] handleChildrenDeltas(IServer server, String deployRoot, IModule[] module, IModule[] children) {
// For each child:
ArrayList<IStatus> results = new ArrayList<IStatus>();
@@ -327,7 +352,7 @@
return root;
}
- private IModule[] combine(IModule[] module, IModule newMod) {
+ public static IModule[] combine(IModule[] module, IModule newMod) {
IModule[] retval = new IModule[module.length + 1];
for( int i = 0; i < module.length; i++ )
retval[i]=module[i];
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/META-INF/MANIFEST.MF 2011-10-04 01:21:53 UTC (rev 35308)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/META-INF/MANIFEST.MF 2011-10-04 05:27:12 UTC (rev 35309)
@@ -21,6 +21,9 @@
org.eclipse.jface;bundle-version="3.4.2",
org.jboss.tools.tests;bundle-version="2.0.0",
org.junit;bundle-version="3.8.2",
- org.jboss.ide.eclipse.as.test;bundle-version="2.2.0"
+ org.jboss.ide.eclipse.as.test;bundle-version="2.2.0",
+ org.eclipse.wst.common.frameworks;bundle-version="1.2.100",
+ org.eclipse.jst.common.project.facet.core;bundle-version="1.4.200",
+ org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jboss.ide.eclipse.as.archives.integration.test
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java 2011-10-04 01:21:53 UTC (rev 35308)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java 2011-10-04 05:27:12 UTC (rev 35309)
@@ -30,6 +30,7 @@
TestSuite suite = new TestSuite("AS Archives Integration Test Suite");
suite.addTestSuite(BuildDeployTest.class);
suite.addTestSuite(SingleFileZippedDeploymentIntegrationTest.class);
+ suite.addTestSuite(JSTEarWithNestedWebProjectIncrementalPublish.class);
return suite;
}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/JSTEarWithNestedWebProjectIncrementalPublish.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/JSTEarWithNestedWebProjectIncrementalPublish.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/JSTEarWithNestedWebProjectIncrementalPublish.java 2011-10-04 05:27:12 UTC (rev 35309)
@@ -0,0 +1,87 @@
+package org.jboss.ide.eclipse.as.archives.integration.test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.test.ASTest;
+import org.jboss.ide.eclipse.as.test.publishing.v2.MockPublishMethod;
+import org.jboss.ide.eclipse.as.test.util.IOUtil;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
+import org.jboss.ide.eclipse.as.test.util.wtp.JavaEEFacetConstants;
+import org.jboss.ide.eclipse.as.test.util.wtp.OperationTestCase;
+import org.jboss.ide.eclipse.as.test.util.wtp.ProjectCreationUtil;
+import org.jboss.ide.eclipse.as.test.util.wtp.ProjectUtility;
+
+public class JSTEarWithNestedWebProjectIncrementalPublish extends
+ TestCase {
+ public void setUp() throws Exception {
+ }
+ public void tearDown() throws Exception {
+ ServerRuntimeUtils.deleteAllServers();
+ ServerRuntimeUtils.deleteAllRuntimes();
+ ProjectUtility.deleteAllProjects();
+ ASTest.clearStateLocation();
+ }
+
+ private IServer server;
+ private IProject earProj, webProj;
+ public void testZippedPublish() throws CoreException, IOException, Exception {
+ server = ServerRuntimeUtils.createMockDeployOnlyServer();
+ server = ServerRuntimeUtils.useMockPublishMethod(server);
+ setZipFlag();
+ MockPublishMethod.reset();
+
+
+ IDataModel dm = ProjectCreationUtil.getEARDataModel("EAR", "EarContent", null, null, JavaEEFacetConstants.EAR_5, false);
+ OperationTestCase.runAndVerify(dm);
+ earProj = ResourcesPlugin.getWorkspace().getRoot().getProject("EAR");
+ assertTrue(earProj.exists());
+
+ IDataModel dm2 = ProjectCreationUtil.getWebDataModel("Web", "EAR", null, null, null, JavaEEFacetConstants.WEB_24, false);
+ OperationTestCase.runAndVerify(dm2);
+ webProj = ResourcesPlugin.getWorkspace().getRoot().getProject("Web");
+ assertTrue(webProj.exists());
+
+ IModule mod = ServerUtil.getModule(earProj);
+ server = ServerRuntimeUtils.addModule(server, mod);
+ ServerRuntimeUtils.publish(server);
+
+ ArrayList<IPath> changed = MockPublishMethod.changed;
+ assertTrue(changed.size() == 1);
+ MockPublishMethod.reset();
+
+ IFile textFile = webProj.getFile(new Path("WebContent").append("out.html"));
+ IOUtil.setContents(textFile, 0);
+
+ ServerRuntimeUtils.publish(server);
+ changed = MockPublishMethod.changed;
+ assertTrue(changed.size() == 1);
+ MockPublishMethod.reset();
+ }
+
+ private void setZipFlag() throws IOException, CoreException {
+ IServerWorkingCopy wc = server.createWorkingCopy();
+ ServerAttributeHelper helper = new ServerAttributeHelper(server, wc);
+ helper.setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, true);
+ server = wc.save(true, new NullProgressMonitor());
+ }
+
+
+
+}
14 years, 6 months
JBoss Tools SVN: r35308 - trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 21:21:53 -0400 (Mon, 03 Oct 2011)
New Revision: 35308
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/NewDomainWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] ServerWizardPage now requires the user to validate the credentials if he changes username/pw that were previously validated.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/NewDomainWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/NewDomainWizardPage.java 2011-10-04 01:20:36 UTC (rev 35307)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/NewDomainWizardPage.java 2011-10-04 01:21:53 UTC (rev 35308)
@@ -24,6 +24,8 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -172,8 +174,10 @@
protected IStatus run(IProgressMonitor monitor) {
try {
model.loadDomain();
+ IWizardPage page = getNextPage();
+ ((WizardDialog) getWizard().getContainer()).showPage(page);
} catch(NotFoundOpenshiftException e) {
- e.printStackTrace();
+ // valid user without domain
} catch (OpenshiftException e) {
return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
"Could not get domain name", e);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java 2011-10-04 01:20:36 UTC (rev 35307)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.ui/src/org/jboss/ide/eclipse/as/openshift/ui/internal/wizard/ServerAdapterWizardModel.java 2011-10-04 01:21:53 UTC (rev 35308)
@@ -52,6 +52,7 @@
this.serverUrl = IOpenshiftService.BASE_URL;
this.rhLoginPreferenceValue = new StringPreferenceValue(RHLOGIN_PREFS_KEY, OpenshiftUIActivator.PLUGIN_ID);
this.rhLogin = initRhLogin();
+ resetCredentialsStatus();
}
protected String initRhLogin() {
@@ -86,8 +87,12 @@
}
public void setRhLogin(String rhLogin) {
- rhLoginPreferenceValue.store(rhLogin);
- firePropertyChange(PROPERTY_RHLOGIN, this.rhLogin, this.rhLogin = rhLogin);
+ if (rhLogin != null
+ && !rhLogin.equals(this.rhLogin)) {
+ rhLoginPreferenceValue.store(rhLogin);
+ firePropertyChange(PROPERTY_RHLOGIN, this.rhLogin, this.rhLogin = rhLogin);
+ resetCredentialsStatus();
+ }
}
public String getPassword() {
@@ -95,9 +100,17 @@
}
public void setPassword(String password) {
- firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
+ if (password != null
+ && !password.equals(this.password)) {
+ firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
+ resetCredentialsStatus();
+ }
}
+ private void resetCredentialsStatus() {
+ setCredentialsStatus(null);
+ }
+
private void setCredentialsStatus(IStatus status) {
firePropertyChange(PROPERTY_CREDENTIALS_VALIDITY, this.credentialsValidity,
this.credentialsValidity = status);
@@ -117,7 +130,7 @@
} catch (NotFoundOpenshiftException e) {
// valid user without domain
status = Status.OK_STATUS;
- } catch(OpenshiftException e) {
+ } catch (OpenshiftException e) {
this.user = null;
}
setCredentialsStatus(status);
@@ -147,7 +160,7 @@
// TODO Auto-generated method stub
return null;
}
-
+
public void renameDomain() throws OpenshiftException {
IDomain domain = getUser().getDomain();
domain.setNamespace(namespace);
@@ -161,5 +174,4 @@
this.domain = getUser().getDomain();
setNamespace(domain.getNamespace());
}
-
}
14 years, 6 months
JBoss Tools SVN: r35307 - in trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 21:20:36 -0400 (Mon, 03 Oct 2011)
New Revision: 35307
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
Log:
[JBIDE-9793] implemented IUser#hasDomain and changed API so that IUser#getDomain returns null if no domain was created
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-10-04 01:20:20 UTC (rev 35306)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-10-04 01:20:36 UTC (rev 35307)
@@ -12,7 +12,6 @@
import java.util.Collection;
-
/**
* @author André Dietisheim
*/
@@ -23,23 +22,34 @@
public String getPassword();
public boolean isValid() throws OpenshiftException;
-
+
public String getUUID() throws OpenshiftException;
-
+
public IDomain createDomain(String name, ISSHPublicKey key) throws OpenshiftException;
+ /**
+ * Returns the domain that this user created previously. Returns
+ * <code>null</code> if no domain was created.
+ *
+ * @return the domain that this user created
+ * @throws OpenshiftException
+ *
+ * @see #createDomain
+ */
public IDomain getDomain() throws OpenshiftException;
+ public boolean hasDomain() throws OpenshiftException;
+
public ISSHPublicKey getSshKey() throws OpenshiftException;
public Collection<ICartridge> getCartridges() throws OpenshiftException;
public IApplication createApplication(String name, ICartridge cartridge) throws OpenshiftException;
-
+
public Collection<IApplication> getApplications() throws OpenshiftException;
public IApplication getApplicationByName(String name) throws OpenshiftException;
-
+
public void refresh() throws OpenshiftException;
}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-10-04 01:20:20 UTC (rev 35306)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-10-04 01:20:36 UTC (rev 35307)
@@ -23,6 +23,7 @@
import org.jboss.ide.eclipse.as.openshift.core.ISSHPublicKey;
import org.jboss.ide.eclipse.as.openshift.core.IUser;
import org.jboss.ide.eclipse.as.openshift.core.InvalidCredentialsOpenshiftException;
+import org.jboss.ide.eclipse.as.openshift.core.NotFoundOpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.UserConfiguration;
@@ -68,12 +69,12 @@
this.sshKey = sshKey;
this.service = service;
}
-
+
@Override
public boolean isValid() throws OpenshiftException {
try {
return service.isValid(this);
- } catch(InvalidCredentialsOpenshiftException e) {
+ } catch (InvalidCredentialsOpenshiftException e) {
return false;
}
}
@@ -84,23 +85,31 @@
this.domain = getService().createDomain(name, key, this);
return domain;
}
-
+
@Override
public IDomain getDomain() throws OpenshiftException {
if (domain == null) {
- this.domain = new Domain(
- getUserInfo().getNamespace()
- , getUserInfo().getRhcDomain()
- , this
- , service);
+ try {
+ this.domain = new Domain(
+ getUserInfo().getNamespace()
+ , getUserInfo().getRhcDomain()
+ , this
+ , service);
+ } catch (NotFoundOpenshiftException e) {
+ return null;
+ }
}
return domain;
}
+ public boolean hasDomain() throws OpenshiftException {
+ return getDomain() != null;
+ }
+
private void setSshKey(ISSHPublicKey key) {
this.sshKey = key;
}
-
+
@Override
public ISSHPublicKey getSshKey() throws OpenshiftException {
if (sshKey == null) {
@@ -187,7 +196,7 @@
this.sshKey = null;
getUserInfo();
}
-
+
private void update(List<ApplicationInfo> applicationInfos) {
for (ApplicationInfo applicationInfo : applicationInfos) {
IApplication application = getApplicationByName(applicationInfo.getName(), applications);
14 years, 6 months
JBoss Tools SVN: r35306 - in trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core: fakes and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 21:20:20 -0400 (Mon, 03 Oct 2011)
New Revision: 35306
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserInfoIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/TestUser.java
Log:
[JBIDE-9793] implemented IUser#hasDomain and changed API so that IUser#getDomain returns null if no domain was created
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserInfoIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserInfoIntegrationTest.java 2011-10-04 00:05:42 UTC (rev 35305)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserInfoIntegrationTest.java 2011-10-04 01:20:20 UTC (rev 35306)
@@ -35,9 +35,6 @@
*/
public class UserInfoIntegrationTest {
- private static final String PASSWORD_USER_WITHOUT_DOMAIN = "1q2w3e";
- private static final String RHLOGIN_USER_WITHOUT_DOMAIN = "toolsjboss.no.domain(a)gmail.com";
-
private OpenshiftService openshiftService;
private TestUser user;
@@ -67,7 +64,7 @@
*/
@Test(expected = NotFoundOpenshiftException.class)
public void canGetUserInfoForUserWithoutDomain() throws Exception {
- TestUser inexistantUser = new TestUser(RHLOGIN_USER_WITHOUT_DOMAIN, PASSWORD_USER_WITHOUT_DOMAIN);
+ TestUser inexistantUser = new TestUser(TestUser.RHLOGIN_USER_WITHOUT_DOMAIN, TestUser.PASSWORD_USER_WITHOUT_DOMAIN);
openshiftService.getUserInfo(inexistantUser);
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserIntegrationTest.java 2011-10-04 00:05:42 UTC (rev 35305)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserIntegrationTest.java 2011-10-04 01:20:20 UTC (rev 35306)
@@ -14,6 +14,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.Collection;
@@ -42,25 +43,27 @@
private User user;
private TestUser invalidUser;
private TestUser badUrlUser;
+ private TestUser userWithoutDomain;
@Before
public void setUp() throws OpenshiftException, DatatypeConfigurationException {
this.user = new TestUser();
this.invalidUser = new TestUser("bogusPassword");
this.badUrlUser = new TestUser(TestUser.RHLOGIN, TestUser.PASSWORD, "http://www.redhat.com");
+ this.userWithoutDomain = new TestUser(TestUser.RHLOGIN_USER_WITHOUT_DOMAIN, TestUser.PASSWORD_USER_WITHOUT_DOMAIN);
}
- @Test
+ @Test
public void canCheckIfUserIsValid() throws OpenshiftException {
assertTrue(user.isValid());
}
-
+
@Test
public void throwsExceptionIfInvalidCredentials() throws OpenshiftException {
assertFalse(invalidUser.isValid());
}
- @Test(expected=NotFoundOpenshiftException.class)
+ @Test(expected = NotFoundOpenshiftException.class)
public void throwsExceptionIfBadUrl() throws OpenshiftException {
badUrlUser.isValid();
}
@@ -90,7 +93,7 @@
assertTrue(domain.getNamespace().length() > 0);
}
- @Test(expected=OpenshiftEndpointException.class)
+ @Test(expected = OpenshiftEndpointException.class)
public void cannotCreateDomainIfAlreadyExists() throws OpenshiftException {
IDomain domain = user.getDomain();
assertNotNull(domain);
@@ -100,6 +103,12 @@
}
@Test
+ public void getNullIfNoDomainPresent() throws OpenshiftException {
+ IDomain domain = userWithoutDomain.getDomain();
+ assertNull(domain);
+ }
+
+ @Test
public void canGetCartridges() throws OpenshiftException {
Collection<ICartridge> cartridges = user.getCartridges();
assertNotNull(cartridges);
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/TestUser.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/TestUser.java 2011-10-04 00:05:42 UTC (rev 35305)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/TestUser.java 2011-10-04 01:20:20 UTC (rev 35306)
@@ -21,6 +21,9 @@
*/
public class TestUser extends User {
+ public static final String RHLOGIN_USER_WITHOUT_DOMAIN = "toolsjboss.no.domain2(a)gmail.com";
+ public static final String PASSWORD_USER_WITHOUT_DOMAIN = "1q2w3e";
+
public static final String RHLOGIN = "toolsjboss(a)gmail.com";
public static final String PASSWORD = "1q2w3e";
14 years, 6 months
JBoss Tools SVN: r35305 - trunk/esb.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-03 20:05:42 -0400 (Mon, 03 Oct 2011)
New Revision: 35305
Modified:
trunk/esb/pom.xml
Log:
add note about relative paths
Modified: trunk/esb/pom.xml
===================================================================
--- trunk/esb/pom.xml 2011-10-03 23:42:25 UTC (rev 35304)
+++ trunk/esb/pom.xml 2011-10-04 00:05:42 UTC (rev 35305)
@@ -14,6 +14,7 @@
<version>1.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
<!--
+ NOTE: if you don't have build/ checked out into a folder parallel to this one, the relativePath resolution above will fail. .
build parent pom (run `mvn install` in ~/33x/build/parent/ folder), then after building upstream components locally (eg., ~/33x/tests, ~/33x/common, ~/33x/as):
cd ~/33x/esb; mvn3 clean install
or use the bootstrap profile which will build upstream and this component in a single build:
14 years, 6 months
JBoss Tools SVN: r35304 - trunk/esb.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-03 19:42:25 -0400 (Mon, 03 Oct 2011)
New Revision: 35304
Modified:
trunk/esb/pom.xml
Log:
add instructions for building esb component locally for bfitzpat
Modified: trunk/esb/pom.xml
===================================================================
--- trunk/esb/pom.xml 2011-10-03 23:42:19 UTC (rev 35303)
+++ trunk/esb/pom.xml 2011-10-03 23:42:25 UTC (rev 35304)
@@ -10,15 +10,19 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>esb</artifactId>
+ <name>esb.all</name>
<version>1.5.0-SNAPSHOT</version>
- <name>esb.all</name>
<packaging>pom</packaging>
<!--
- build parent pom (and if necessary, update the relativePath above so this pom can find it), then if building upstream components locally (eg., ~/trunk/as):
- mvn3 clean install
- or, if not building upstream locally, use (see parent/pom.xml for other profiles you can use too):
- mvn3 clean install -P jbosstools-nightly
- -->
+ build parent pom (run `mvn install` in ~/33x/build/parent/ folder), then after building upstream components locally (eg., ~/33x/tests, ~/33x/common, ~/33x/as):
+ cd ~/33x/esb; mvn3 clean install
+ or use the bootstrap profile which will build upstream and this component in a single build:
+ cd ~/33x/build; mvn clean install -Pesb-bootstrap
+ or, if not building upstream locally, use (see ~/33x/build/parent/pom.xml for other profiles you can use too):
+ cd ~/33x/esb; mvn3 clean install -P jbosstools-nightly
+ to skip running tests (compile only) use -Dmaven.test.skip
+ cd ~/33x/esb; mvn3 clean install -Dmaven.test.skip
+ -->
<modules>
<module>features</module>
<module>plugins</module>
14 years, 6 months
JBoss Tools SVN: r35303 - trunk/esb.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-03 19:42:19 -0400 (Mon, 03 Oct 2011)
New Revision: 35303
Modified:
trunk/esb/pom.xml
Log:
add instructions for building esb component locally for bfitzpat
Modified: trunk/esb/pom.xml
===================================================================
--- trunk/esb/pom.xml 2011-10-03 23:42:11 UTC (rev 35302)
+++ trunk/esb/pom.xml 2011-10-03 23:42:19 UTC (rev 35303)
@@ -13,6 +13,12 @@
<version>1.5.0-SNAPSHOT</version>
<name>esb.all</name>
<packaging>pom</packaging>
+ <!--
+ build parent pom (and if necessary, update the relativePath above so this pom can find it), then if building upstream components locally (eg., ~/trunk/as):
+ mvn3 clean install
+ or, if not building upstream locally, use (see parent/pom.xml for other profiles you can use too):
+ mvn3 clean install -P jbosstools-nightly
+ -->
<modules>
<module>features</module>
<module>plugins</module>
14 years, 6 months
JBoss Tools SVN: r35302 - branches/jbosstools-3.2.x/esb.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-03 19:42:11 -0400 (Mon, 03 Oct 2011)
New Revision: 35302
Modified:
branches/jbosstools-3.2.x/esb/pom.xml
Log:
add instructions for building esb component locally for bfitzpat
Modified: branches/jbosstools-3.2.x/esb/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/pom.xml 2011-10-03 22:56:48 UTC (rev 35301)
+++ branches/jbosstools-3.2.x/esb/pom.xml 2011-10-03 23:42:11 UTC (rev 35302)
@@ -6,6 +6,16 @@
<name>esb.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
+ <!--
+ build parent pom (run `mvn install` in ~/32x/build/parent/ folder), then after building upstream components locally (eg., ~/32x/tests, ~/32x/common, ~/32x/as):
+ cd ~/32x/esb; mvn3 clean install
+ or use the bootstrap profile which will build upstream and this component in a single build:
+ cd ~/32x/build; mvn clean install -Pesb-bootstrap
+ or, if not building upstream locally, use (see ~/32x/build/parent/pom.xml for other profiles you can use too):
+ cd ~/32x/esb; mvn3 clean install -P jbosstools-nightly-trunk
+ to skip running tests (compile only) use -Dmaven.test.skip
+ cd ~/32x/esb; mvn3 clean install -Dmaven.test.skip
+ -->
<modules>
<module>features</module>
<module>plugins</module>
14 years, 6 months