Author: adietish
Date: 2011-09-27 11:52:59 -0400 (Tue, 27 Sep 2011)
New Revision: 35068
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Application.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/UserInfoAware.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/ApplicationResponseUnmarshaller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/utils/UrlBuilder.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/CartridgesIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java
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/utils/ApplicationAsserts.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java
Log:
[JBIDE-9773] hiding User implementation from user programmer
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/ApplicationLogReader.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -32,12 +32,12 @@
private IOpenshiftService service;
private StringReader logReader;
private Application application;
- private InternalUser internalUser;
+ private InternalUser user;
private String currentStatus;
- public ApplicationLogReader(Application application, InternalUser internalUser,
IOpenshiftService service) {
+ public ApplicationLogReader(Application application, InternalUser user,
IOpenshiftService service) {
this.application = application;
- this.internalUser = internalUser;
+ this.user = user;
this.service = service;
}
@@ -91,7 +91,7 @@
protected String requestStatus() throws IOException {
try {
- String status = service.getStatus(application.getName(), application.getCartridge(),
internalUser);
+ String status = service.getStatus(application.getName(), application.getCartridge(),
user);
if (isSameStatus(status, currentStatus)) {
status = null;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Application.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Application.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Application.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -32,13 +32,13 @@
private ApplicationLogReader logReader;
private ApplicationInfo applicationInfo;
- public Application(String name, ICartridge cartridge, InternalUser internalUser,
IOpenshiftService service) {
- this(name, cartridge, null, internalUser, service);
+ public Application(String name, ICartridge cartridge, InternalUser user,
IOpenshiftService service) {
+ this(name, cartridge, null, user, service);
}
- public Application(String name, ICartridge cartridge, ApplicationInfo applicationInfo,
InternalUser internalUser,
+ public Application(String name, ICartridge cartridge, ApplicationInfo applicationInfo,
InternalUser user,
IOpenshiftService service) {
- super(internalUser);
+ super(user);
this.name = name;
this.cartridge = cartridge;
this.service = service;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -20,12 +20,12 @@
private String namespace;
- public Domain(String namespace, InternalUser internalUser) {
- this(namespace, null, internalUser);
+ public Domain(String namespace, InternalUser user) {
+ this(namespace, null, user);
}
- public Domain(String namespace, String rhcDomain, InternalUser internalUser) {
- super(internalUser);
+ public Domain(String namespace, String rhcDomain, InternalUser user) {
+ super(user);
this.namespace = namespace;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -22,23 +22,23 @@
*/
public interface IOpenshiftService {
- public List<ICartridge> getCartridges(InternalUser internalUser) throws
OpenshiftException;
+ public List<ICartridge> getCartridges(InternalUser user) throws
OpenshiftException;
- public Application createApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException;
+ public Application createApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException;
- public void destroyApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException;
+ public void destroyApplication(String name, ICartridge cartridge, InternalUser user)
throws OpenshiftException;
- public IApplication startApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException;
+ public IApplication startApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException;
- public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException;
+ public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException;
- public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException;
+ public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException;
- public String getStatus(String name, ICartridge cartridge, InternalUser internalUser)
throws OpenshiftException;
+ public String getStatus(String name, ICartridge cartridge, InternalUser user) throws
OpenshiftException;
- public IDomain changeDomain(String name, ISSHPublicKey sshKey, InternalUser
internalUser) throws OpenshiftException;
+ public IDomain changeDomain(String name, ISSHPublicKey sshKey, InternalUser user) throws
OpenshiftException;
- public IDomain createDomain(String name, ISSHPublicKey sshKey, InternalUser
internalUser) throws OpenshiftException;
+ public IDomain createDomain(String name, ISSHPublicKey sshKey, InternalUser user) throws
OpenshiftException;
- public UserInfo getUserInfo(InternalUser internalUser) throws OpenshiftException;
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -52,12 +52,12 @@
private static final String BASE_URL = "https://openshift.redhat.com/broker";
@Override
- public UserInfo getUserInfo(InternalUser internalUser) throws OpenshiftException {
- UserInfoRequest request = new UserInfoRequest(internalUser.getRhlogin(), true);
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
+ UserInfoRequest request = new UserInfoRequest(user.getRhlogin(), true);
String url = request.getUrlString(BASE_URL);
try {
String requestString = new UserInfoRequestJsonMarshaller().marshall(request);
- String openShiftRequestString = new
OpenshiftEnvelopeFactory(internalUser.getPassword(), requestString)
+ String openShiftRequestString = new OpenshiftEnvelopeFactory(user.getPassword(),
requestString)
.createString();
String responseString = createHttpClient(url).post(openShiftRequestString);
responseString = JsonSanitizer.sanitize(responseString);
@@ -66,21 +66,21 @@
return response.getOpenshiftObject();
} catch (MalformedURLException e) {
throw new OpenshiftEndpointException(
- url, e, "Could not get user info for user \"{0}\" at
\"{1}\"", internalUser.getRhlogin(), url, e);
+ url, e, "Could not get InternalUser info for InternalUser \"{0}\" at
\"{1}\"", user.getRhlogin(), url, e);
} catch (HttpClientException e) {
throw new OpenshiftEndpointException(
- url, e, "Could not get user info for user \"{0}\" at
\"{1}\"", internalUser.getRhlogin(), url, e);
+ url, e, "Could not get InternalUser info for InternalUser \"{0}\" at
\"{1}\"", user.getRhlogin(), url, e);
}
}
@Override
- public List<ICartridge> getCartridges(InternalUser internalUser) throws
OpenshiftException {
- ListCartridgesRequest listCartridgesRequest = new
ListCartridgesRequest(internalUser.getRhlogin(), true);
+ public List<ICartridge> getCartridges(InternalUser user) throws OpenshiftException
{
+ ListCartridgesRequest listCartridgesRequest = new
ListCartridgesRequest(user.getRhlogin(), true);
String url = listCartridgesRequest.getUrlString(BASE_URL);
try {
String listCartridgesRequestString =
new ListCartridgesRequestJsonMarshaller().marshall(listCartridgesRequest);
- String request = new OpenshiftEnvelopeFactory(internalUser.getPassword(),
listCartridgesRequestString)
+ String request = new OpenshiftEnvelopeFactory(user.getPassword(),
listCartridgesRequestString)
.createString();
String listCatridgesReponse = createHttpClient(url).post(request);
listCatridgesReponse = JsonSanitizer.sanitize(listCatridgesReponse);
@@ -95,27 +95,27 @@
}
@Override
- public IDomain createDomain(String name, ISSHPublicKey sshKey, InternalUser
internalUser) throws OpenshiftException {
- return requestDomainAction(new CreateDomainRequest(name, sshKey,
internalUser.getRhlogin(), true), internalUser);
+ public IDomain createDomain(String name, ISSHPublicKey sshKey, InternalUser user) throws
OpenshiftException {
+ return requestDomainAction(new CreateDomainRequest(name, sshKey, user.getRhlogin(),
true), user);
}
@Override
- public IDomain changeDomain(String newName, ISSHPublicKey sshKey, InternalUser
internalUser) throws OpenshiftException {
- return requestDomainAction(new ChangeDomainRequest(newName, sshKey,
internalUser.getRhlogin(), true), internalUser);
+ public IDomain changeDomain(String newName, ISSHPublicKey sshKey, InternalUser user)
throws OpenshiftException {
+ return requestDomainAction(new ChangeDomainRequest(newName, sshKey, user.getRhlogin(),
true), user);
}
- protected IDomain requestDomainAction(AbstractDomainRequest request, InternalUser
internalUser) throws OpenshiftException {
+ protected IDomain requestDomainAction(AbstractDomainRequest request, InternalUser user)
throws OpenshiftException {
String url = request.getUrlString(BASE_URL);
try {
String requestString =
new OpenshiftEnvelopeFactory(
- internalUser.getPassword(),
+ user.getPassword(),
new DomainRequestJsonMarshaller().marshall(request))
.createString();
String responseString = createHttpClient(url).post(requestString);
responseString = JsonSanitizer.sanitize(responseString);
OpenshiftResponse<IDomain> response =
- new DomainResponseUnmarshaller(request.getName(),
internalUser).unmarshall(responseString);
+ new DomainResponseUnmarshaller(request.getName(), user).unmarshall(responseString);
return response.getOpenshiftObject();
} catch (MalformedURLException e) {
throw new OpenshiftEndpointException(url, e, "Could not list available cartridges
at \"{0}\"", url);
@@ -125,57 +125,46 @@
}
@Override
- public Application createApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public Application createApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
Application application = requestApplicationAction(new ApplicationRequest(name,
cartridge, ApplicationAction.CONFIGURE,
- internalUser.getRhlogin(), true), internalUser);
+ user.getRhlogin(), true), user);
return application;
}
@Override
- public void destroyApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public void destroyApplication(String name, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
IApplication application = requestApplicationAction(new ApplicationRequest(name,
cartridge, ApplicationAction.DECONFIGURE,
- internalUser.getRhlogin(), true), internalUser);
- internalUser.remove(application);
+ user.getRhlogin(), true), user);
+ user.remove(application);
}
@Override
- public IApplication startApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication startApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.START,
- internalUser.getRhlogin(), true), internalUser);
+ user.getRhlogin(), true), user);
}
@Override
- public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.RESTART,
- internalUser.getRhlogin(), true), internalUser);
+ user.getRhlogin(), true), user);
}
@Override
- public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.STOP,
- internalUser.getRhlogin(), true), internalUser);
+ user.getRhlogin(), true), user);
}
- /**
- * This seems not implemented yet on the server. The service simply returns
- * a <code>null</code> data object. example response:
- * <p>
- *
{"messages":"","debug":"","data":null,"api":"1.1.1","api_c":[
- * "placeholder"
- *
],"result":"Success","broker":"1.1.1","broker_c":["namespace"
- * ,"rhlogin","ssh"
- *
,"app_uuid","debug","alter","cartridge","cart_type","action"
- * ,"app_name","api"],"exit_code":0}
- */
@Override
- public String getStatus(String applicationName, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public String getStatus(String applicationName, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
ApplicationRequest applicationRequest =
- new ApplicationRequest(applicationName, cartridge, ApplicationAction.STATUS,
internalUser.getRhlogin(), true);
+ new ApplicationRequest(applicationName, cartridge, ApplicationAction.STATUS,
user.getRhlogin(), true);
String url = applicationRequest.getUrlString(BASE_URL);
try {
String applicationRequestString =
new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
- String request = new OpenshiftEnvelopeFactory(internalUser.getPassword(),
applicationRequestString).createString();
+ String request = new OpenshiftEnvelopeFactory(user.getPassword(),
applicationRequestString).createString();
String response = createHttpClient(url).post(request);
response = JsonSanitizer.sanitize(response);
@@ -189,9 +178,9 @@
} catch (UnauthorizedException e) {
throw new InvalidCredentialsOpenshiftException(
url, e,
- "Could not {0} application \"{1}\" at \"{2}\": Invalid
credentials user \"{3}\", password \"{4}\"",
+ "Could not {0} application \"{1}\" at \"{2}\": Invalid
credentials InternalUser \"{3}\", password \"{4}\"",
applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url,
- internalUser.getRhlogin(), internalUser.getPassword());
+ user.getRhlogin(), user.getPassword());
} catch (HttpClientException e) {
throw new OpenshiftEndpointException(
url, e, "Could not {0} application \"{1}\" at
\"{2}\"",
@@ -199,19 +188,19 @@
}
}
- protected Application requestApplicationAction(ApplicationRequest applicationRequest,
InternalUser internalUser)
+ protected Application requestApplicationAction(ApplicationRequest applicationRequest,
InternalUser user)
throws OpenshiftException {
String url = applicationRequest.getUrlString(BASE_URL);
try {
String applicationRequestString =
new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
- String request = new OpenshiftEnvelopeFactory(internalUser.getPassword(),
applicationRequestString).createString();
+ String request = new OpenshiftEnvelopeFactory(user.getPassword(),
applicationRequestString).createString();
String response = createHttpClient(url).post(request);
response = JsonSanitizer.sanitize(response);
OpenshiftResponse<Application> openshiftResponse =
new ApplicationResponseUnmarshaller(applicationRequest.getName(),
- applicationRequest.getCartridge(), internalUser, this).unmarshall(response);
+ applicationRequest.getCartridge(), user, this).unmarshall(response);
return openshiftResponse.getOpenshiftObject();
} catch (MalformedURLException e) {
throw new OpenshiftException(
@@ -220,10 +209,10 @@
} catch (UnauthorizedException e) {
throw new InvalidCredentialsOpenshiftException(
url, e,
- "Could not {0} application \"{1}\" at \"{2}\": Invalid
credentials user \"{3}\", password \"{4}\"",
+ "Could not {0} application \"{1}\" at \"{2}\": Invalid
credentials InternalUser \"{3}\", password \"{4}\"",
applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url,
- internalUser.getRhlogin(),
- internalUser.getPassword());
+ user.getRhlogin(),
+ user.getPassword());
} catch (HttpClientException e) {
throw new OpenshiftEndpointException(
url, e, "Could not {0} application \"{1}\" at
\"{2}\"",
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/UserInfoAware.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/UserInfoAware.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/UserInfoAware.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -15,21 +15,21 @@
public class UserInfoAware {
private UserInfo userInfo;
- private InternalUser internalUser;
+ private InternalUser user;
- protected UserInfoAware(InternalUser internalUser) {
- this.internalUser = internalUser;
+ protected UserInfoAware(InternalUser user) {
+ this.user = user;
}
protected UserInfo getUserInfo() throws OpenshiftException {
if (userInfo == null) {
- this.userInfo = internalUser.getUserInfo();
+ this.userInfo = user.getUserInfo();
}
return userInfo;
}
protected InternalUser getUser() {
- return internalUser;
+ return user;
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/ApplicationResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/ApplicationResponseUnmarshaller.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/ApplicationResponseUnmarshaller.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -21,20 +21,20 @@
*/
public class ApplicationResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<Application> {
- private InternalUser internalUser;
+ private InternalUser user;
private String applicationName;
private ICartridge cartridge;
private OpenshiftService service;
- public ApplicationResponseUnmarshaller(String applicationName, ICartridge cartridge,
InternalUser internalUser, OpenshiftService service) {
+ public ApplicationResponseUnmarshaller(String applicationName, ICartridge cartridge,
InternalUser user, OpenshiftService service) {
this.applicationName = applicationName;
this.cartridge = cartridge;
- this.internalUser = internalUser;
+ this.user = user;
this.service = service;
}
@Override
protected Application createOpenshiftObject(ModelNode node) {
- return new Application(applicationName, cartridge, internalUser, service);
+ return new Application(applicationName, cartridge, user, service);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -21,15 +21,15 @@
public class DomainResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<IDomain> {
private String domainName;
- private InternalUser internalUser;
+ private InternalUser user;
- public DomainResponseUnmarshaller(String domainName, InternalUser internalUser) {
+ public DomainResponseUnmarshaller(String domainName, InternalUser user) {
this.domainName = domainName;
- this.internalUser = internalUser;
+ this.user = user;
}
@Override
protected IDomain createOpenshiftObject(ModelNode node) {
- return new Domain(domainName, internalUser);
+ return new Domain(domainName, user);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/utils/UrlBuilder.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/utils/UrlBuilder.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/utils/UrlBuilder.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -7,7 +7,7 @@
import java.util.Collection;
/**
- * A builder for an url. Currently no state checking is done, the user is
+ * A builder for an url. Currently no state checking is done, the InternalUser is
* responsible to build something that makes sense.
*
* @author André Dietisheim
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -19,10 +19,10 @@
import org.jboss.ide.eclipse.as.openshift.core.ICartridge;
import org.jboss.ide.eclipse.as.openshift.core.InvalidCredentialsOpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
+import org.jboss.ide.eclipse.as.openshift.core.User;
import org.jboss.ide.eclipse.as.openshift.core.internal.Application;
import org.jboss.ide.eclipse.as.openshift.core.internal.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.internal.OpenshiftService;
-import org.jboss.ide.eclipse.as.openshift.core.internal.InternalUser;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.fakes.TestUser;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.utils.ApplicationUtils;
import org.junit.Before;
@@ -35,13 +35,13 @@
private IOpenshiftService service;
- private InternalUser internalUser;
- private InternalUser invalidUser;
+ private User user;
+ private User invalidUser;
@Before
public void setUp() {
this.service = new OpenshiftService();
- this.internalUser = new TestUser();
+ this.user = new TestUser();
this.invalidUser = new TestUser("bogusPassword");
}
@@ -55,30 +55,30 @@
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
ICartridge cartridge = ICartridge.JBOSSAS_7;
- Application application = service.createApplication(applicationName, cartridge,
internalUser);
+ Application application = service.createApplication(applicationName, cartridge,
user);
assertNotNull(application);
assertEquals(applicationName, application.getName());
assertEquals(cartridge, application.getCartridge());
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@Test
public void canDestroyApplication() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.destroyApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.destroyApplication(applicationName, ICartridge.JBOSSAS_7, user);
}
@Test(expected = OpenshiftException.class)
public void createDuplicateApplicationThrowsException() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -86,10 +86,10 @@
public void canStopApplication() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.stopApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.stopApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -97,11 +97,11 @@
public void canStartStoppedApplication() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.stopApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.startApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.stopApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.startApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -116,10 +116,10 @@
*
https://github.com/openshift/os-client-tools/blob/master/express
* /doc/API
*/
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.startApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.startApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -134,11 +134,11 @@
*
https://github.com/openshift/os-client-tools/blob/master/express
* /doc/API
*/
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.stopApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.stopApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.stopApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.stopApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -153,10 +153,10 @@
*
https://github.com/openshift/os-client-tools/blob/master/express
* /doc/API
*/
- service.createApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
- service.restartApplication(applicationName, ICartridge.JBOSSAS_7, internalUser);
+ service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ service.restartApplication(applicationName, ICartridge.JBOSSAS_7, user);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -164,11 +164,11 @@
public void canGetStatus() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- Application application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, internalUser);
- String applicationStatus = service.getStatus(application.getName(),
application.getCartridge(), internalUser);
+ Application application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, user);
+ String applicationStatus = service.getStatus(application.getName(),
application.getCartridge(), user);
assertNotNull(applicationStatus);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -176,12 +176,12 @@
public void returnsValidGitUri() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- IApplication application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, internalUser);
+ IApplication application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, user);
String gitUri = application.getGitUri();
assertNotNull(gitUri);
assertGitUri(applicationName, gitUri);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
@@ -189,12 +189,12 @@
public void returnsValidApplicationUrl() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- IApplication application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, internalUser);
+ IApplication application = service.createApplication(applicationName,
ICartridge.JBOSSAS_7, user);
String applicationUrl = application.getApplicationUrl();
assertNotNull(applicationUrl);
assertAppliactionUrl(applicationName, applicationUrl);
} finally {
- ApplicationUtils.silentlyDestroyAS7Application(applicationName, internalUser,
service);
+ ApplicationUtils.silentlyDestroyAS7Application(applicationName, user, service);
}
}
}
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationTest.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationTest.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -46,7 +46,7 @@
*/
public class ApplicationTest {
- private InternalUser internalUser = new InternalUser(ApplicationResponseFake.RHLOGIN,
ApplicationResponseFake.PASSWORD,
+ private InternalUser user = new InternalUser(ApplicationResponseFake.RHLOGIN,
ApplicationResponseFake.PASSWORD,
new NoopOpenshiftServiceFake());
@Test
@@ -106,7 +106,7 @@
OpenshiftResponse<Application> openshiftResponse =
new ApplicationResponseUnmarshaller(
ApplicationResponseFake.APPLICATION_NAME,
ApplicationResponseFake.APPLICATION_CARTRIDGE,
- internalUser, new NoopOpenshiftServiceFake())
+ user, new NoopOpenshiftServiceFake())
.unmarshall(response);
Application application = openshiftResponse.getOpenshiftObject();
assertNotNull(application);
@@ -117,8 +117,8 @@
@Test
public void returnsValidGitUri() throws OpenshiftException {
OpenshiftService userInfoService = createUserInfoService();
- InternalUser internalUser = createUser(userInfoService);
- IApplication application = createApplication(userInfoService, internalUser);
+ InternalUser user = createUser(userInfoService);
+ IApplication application = createApplication(userInfoService, user);
String gitUri = application.getGitUri();
assertNotNull(gitUri);
@@ -133,8 +133,8 @@
@Test
public void returnsValidApplicationUrl() throws OpenshiftException {
OpenshiftService userInfoService = createUserInfoService();
- InternalUser internalUser = createUser(userInfoService);
- IApplication application = createApplication(userInfoService, internalUser);
+ InternalUser user = createUser(userInfoService);
+ IApplication application = createApplication(userInfoService, user);
String applicationUrl = application.getApplicationUrl();
assertNotNull(applicationUrl);
@@ -160,15 +160,15 @@
OpenshiftService service = new NoopOpenshiftServiceFake() {
@Override
- public String getStatus(String applicationName, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public String getStatus(String applicationName, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
return ApplicationResponseFake.tail;
}
};
Application application =
new Application(ApplicationResponseFake.APPLICATION_NAME,
- ApplicationResponseFake.APPLICATION_CARTRIDGE, internalUser, service);
- ApplicationLogReader reader = new ApplicationLogReader(application, internalUser,
service);
+ ApplicationResponseFake.APPLICATION_CARTRIDGE, user, service);
+ ApplicationLogReader reader = new ApplicationLogReader(application, user, service);
int charactersRead = 0;
int character = -1;
@@ -183,7 +183,7 @@
}
}
- private IApplication createApplication(OpenshiftService userInfoService, InternalUser
internalUser) {
+ private IApplication createApplication(OpenshiftService userInfoService, InternalUser
user) {
Application application = new Application(
ApplicationResponseFake.APPLICATION_NAME
, ApplicationResponseFake.APPLICATION_CARTRIDGE
@@ -193,27 +193,26 @@
, ApplicationResponseFake.APPLICATION_EMBEDDED
, ApplicationResponseFake.APPLICATION_CARTRIDGE
, ApplicationResponseFake.APPLICATION_CREATIONTIME)
- , internalUser
+ , user
, userInfoService);
/**
* we have to add it manually since we dont create the application with
- * the internalUser class
+ * the user class
*
- * @see InternalUser#createApplication
+ * @see user#createApplication
*/
- internalUser.add(application);
+ user.add(application);
return application;
}
private InternalUser createUser(OpenshiftService userInfoService) {
- InternalUser internalUser = new InternalUser(ApplicationResponseFake.RHLOGIN,
ApplicationResponseFake.PASSWORD, userInfoService);
- return internalUser;
+ return new InternalUser(ApplicationResponseFake.RHLOGIN,
ApplicationResponseFake.PASSWORD, userInfoService);
}
private OpenshiftService createUserInfoService() {
OpenshiftService userInfoService = new NoopOpenshiftServiceFake() {
@Override
- public UserInfo getUserInfo(InternalUser internalUser) throws OpenshiftException {
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
ApplicationInfo applicationInfo = new ApplicationInfo(
ApplicationResponseFake.APPLICATION_NAME,
ApplicationResponseFake.APPLICATION_UUID,
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/CartridgesIntegrationTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/CartridgesIntegrationTest.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/CartridgesIntegrationTest.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -30,18 +30,18 @@
private OpenshiftService openshiftService;
- private InternalUser internalUser;
+ private InternalUser user;
@Before
public void setUp() {
this.openshiftService = new OpenshiftService();
- this.internalUser = new TestUser();
+ this.user = new TestUser();
}
@Ignore
@Test
public void canRequestListCartridges() throws Exception {
- List<ICartridge> cartridges = openshiftService.getCartridges(internalUser);
+ List<ICartridge> cartridges = openshiftService.getCartridges(user);
assertNotNull(cartridges);
assertTrue(cartridges.size() > 0);
}
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -62,8 +62,8 @@
String responseString = createDomainResponseString(RHLOGIN, UUID);
responseString = JsonSanitizer.sanitize(responseString);
- InternalUser internalUser = new InternalUser(RHLOGIN, PASSWORD, new
NoopOpenshiftServiceFake());
- OpenshiftResponse<IDomain> response = new DomainResponseUnmarshaller(domainName,
internalUser).unmarshall(responseString);
+ InternalUser user = new InternalUser(RHLOGIN, PASSWORD, new
NoopOpenshiftServiceFake());
+ OpenshiftResponse<IDomain> response = new DomainResponseUnmarshaller(domainName,
user).unmarshall(responseString);
assertNotNull(response);
IDomain domain = response.getOpenshiftObject();
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserTest.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/UserTest.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -45,30 +45,30 @@
public class UserTest {
private OpenshiftService userInfoservice;
- private InternalUser internalUser;
+ private InternalUser user;
@Before
public void setUp() throws OpenshiftException, DatatypeConfigurationException {
UserInfo userInfo = createUserInfo();
this.userInfoservice = createUserInfoService(userInfo);
- this.internalUser = new InternalUser(UserInfoResponseFake.RHLOGIN,
UserInfoResponseFake.PASSWORD, userInfoservice);
+ this.user = new InternalUser(UserInfoResponseFake.RHLOGIN,
UserInfoResponseFake.PASSWORD, userInfoservice);
}
@Test
public void canGetUserUUID() throws OpenshiftException {
- assertEquals(UserInfoResponseFake.UUID, internalUser.getUUID());
+ assertEquals(UserInfoResponseFake.UUID, user.getUUID());
}
@Test
public void canGetPublicKey() throws OpenshiftException {
- ISSHPublicKey key = internalUser.getSshKey();
+ ISSHPublicKey key = user.getSshKey();
assertNotNull(key);
assertEquals(UserInfoResponseFake.SSH_KEY, key.getPublicKey());
}
@Test
public void canGetDomain() throws OpenshiftException {
- IDomain domain = internalUser.getDomain();
+ IDomain domain = user.getDomain();
assertNotNull(domain);
assertEquals(UserInfoResponseFake.RHC_DOMAIN, domain.getRhcDomain());
assertEquals(UserInfoResponseFake.NAMESPACE, domain.getNamespace());
@@ -79,7 +79,7 @@
OpenshiftService cartridgeListService = new NoopOpenshiftServiceFake() {
@Override
- public List<ICartridge> getCartridges(InternalUser internalUser) throws
OpenshiftException {
+ public List<ICartridge> getCartridges(InternalUser user) throws
OpenshiftException {
ArrayList<ICartridge> cartridges = new ArrayList<ICartridge>();
cartridges.add(new Cartridge(CartridgeResponseFake.CARTRIDGE_JBOSSAS70));
cartridges.add(new Cartridge(CartridgeResponseFake.CARTRIDGE_PERL5));
@@ -89,8 +89,8 @@
return cartridges;
}
};
- InternalUser internalUser = new InternalUser(UserInfoResponseFake.RHLOGIN,
UserInfoResponseFake.PASSWORD, cartridgeListService);
- Collection<ICartridge> cartridges = internalUser.getCartridges();
+ InternalUser user = new InternalUser(UserInfoResponseFake.RHLOGIN,
UserInfoResponseFake.PASSWORD, cartridgeListService);
+ Collection<ICartridge> cartridges = user.getCartridges();
assertNotNull(cartridges);
assertEquals(5, cartridges.size());
assertThatContainsCartridge(CartridgeResponseFake.CARTRIDGE_JBOSSAS70, cartridges);
@@ -103,14 +103,14 @@
@Test
public void canGetApplications() throws OpenshiftException {
/** response is UserInfoResponseFake */
- Collection<IApplication> applications = internalUser.getApplications();
+ Collection<IApplication> applications = user.getApplications();
assertNotNull(applications);
assertEquals(2, applications.size());
}
@Test
public void canGetApplicationByName() throws OpenshiftException,
DatatypeConfigurationException {
- IApplication application =
internalUser.getApplicationByName(UserInfoResponseFake.APP2_NAME);
+ IApplication application = user.getApplicationByName(UserInfoResponseFake.APP2_NAME);
assertApplication(
UserInfoResponseFake.APP2_NAME
, UserInfoResponseFake.APP2_UUID
@@ -146,7 +146,7 @@
return new NoopOpenshiftServiceFake() {
@Override
- public UserInfo getUserInfo(InternalUser internalUser) throws OpenshiftException {
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
return userInfo;
}
};
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -28,52 +28,52 @@
public class NoopOpenshiftServiceFake extends OpenshiftService {
@Override
- public UserInfo getUserInfo(InternalUser internalUser) throws OpenshiftException {
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public List<ICartridge> getCartridges(InternalUser internalUser) throws
OpenshiftException {
+ public List<ICartridge> getCartridges(InternalUser user) throws OpenshiftException
{
throw new UnsupportedOperationException();
}
@Override
- public Application createApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public Application createApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public void destroyApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public void destroyApplication(String name, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public IApplication startApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication startApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public String getStatus(String applicationName, ICartridge cartridge, InternalUser
internalUser) throws OpenshiftException {
+ public String getStatus(String applicationName, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public IDomain changeDomain(String domainName, ISSHPublicKey sshKey, InternalUser
internalUser) throws OpenshiftException {
+ public IDomain changeDomain(String domainName, ISSHPublicKey sshKey, InternalUser user)
throws OpenshiftException {
throw new UnsupportedOperationException();
}
@Override
- public IDomain createDomain(String name, ISSHPublicKey keyPair, InternalUser
internalUser) throws OpenshiftException {
+ public IDomain createDomain(String name, ISSHPublicKey keyPair, InternalUser user)
throws OpenshiftException {
throw new UnsupportedOperationException();
}
}
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-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/TestUser.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -13,13 +13,13 @@
import org.jboss.ide.eclipse.as.openshift.core.Cartridge;
import org.jboss.ide.eclipse.as.openshift.core.IApplication;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
-import org.jboss.ide.eclipse.as.openshift.core.internal.InternalUser;
+import org.jboss.ide.eclipse.as.openshift.core.User;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.utils.ApplicationUtils;
/**
* @author André Dietisheim
*/
-public class TestUser extends InternalUser {
+public class TestUser extends User {
private static final String RHLOGIN = "toolsjboss(a)gmail.com";
private static final String PASSWORD = "1q2w3e";
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationAsserts.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationAsserts.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationAsserts.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -35,7 +35,7 @@
/**
* $1 = application uuid
* $2 = application name
- * $3 = user uuid
+ * $3 = InternalUser uuid
* $4 = rhc cloud domain (
rhcloud.com)
* $5 = application name
*/
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java 2011-09-27
15:42:35 UTC (rev 35067)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java 2011-09-27
15:52:59 UTC (rev 35068)
@@ -26,13 +26,13 @@
return String.valueOf(System.currentTimeMillis());
}
- public static Application createApplication(InternalUser internalUser, IOpenshiftService
service) throws OpenshiftException {
- return service.createApplication(createRandomApplicationName(), Cartridge.JBOSSAS_7,
internalUser);
+ public static Application createApplication(InternalUser user, IOpenshiftService
service) throws OpenshiftException {
+ return service.createApplication(createRandomApplicationName(), Cartridge.JBOSSAS_7,
user);
}
- public static void silentlyDestroyAS7Application(String name, InternalUser internalUser,
IOpenshiftService service) {
+ public static void silentlyDestroyAS7Application(String name, InternalUser user,
IOpenshiftService service) {
try {
- service.destroyApplication(name, ICartridge.JBOSSAS_7, internalUser);
+ service.destroyApplication(name, ICartridge.JBOSSAS_7, user);
} catch (OpenshiftException e) {
e.printStackTrace();
}