Author: adietish
Date: 2011-10-05 07:00:47 -0400 (Wed, 05 Oct 2011)
New Revision: 35354
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/.classpath
trunk/as/plugins/org.jboss.tools.openshift.express.client/.gitignore
trunk/as/plugins/org.jboss.tools.openshift.express.client/.project
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/org.eclipse.jdt.core.prefs
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.client/build.properties
trunk/as/plugins/org.jboss.tools.openshift.express.client/jboss-dmr-1.0.0.Final.jar
trunk/as/plugins/org.jboss.tools.openshift.express.client/pom.xml
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ApplicationLogReader.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/Cartridge.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IApplication.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ICartridge.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IDomain.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IHttpClient.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IOpenshiftService.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ISSHPublicKey.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IUser.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftService.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHPublicKey.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/User.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/UserConfiguration.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Application.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Domain.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/InternalUser.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfo.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfoAware.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Assert.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.java
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ApplicationLogReader.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/Cartridge.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IApplication.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ICartridge.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IDomain.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IHttpClient.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IOpenshiftService.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ISSHPublicKey.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IUser.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftService.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHKeyPair.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHPublicKey.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/User.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/UserConfiguration.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Application.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Domain.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/InternalUser.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfo.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfoAware.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert$AssertionFailedException.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.class
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/local-artifacts.properties
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/pom.properties
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT-sources.jar
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml
Log:
[JBIDE-9841] renamed org.jboss.ide.eclipse.as.openshift.core to
org.jboss.tools.openshift.express.client
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/.classpath
(rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/.classpath 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib"
path="jboss-dmr-1.0.0.Final.jar"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.client/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/.gitignore
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/.gitignore
(rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/.gitignore 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,2 @@
+target
+*.class
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/.project
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/.project
(rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/.project 2011-10-05 11:00:47
UTC (rev 35354)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.openshift.express.client</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.client/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/org.eclipse.jdt.core.prefs 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,8 @@
+#Thu Aug 25 15:26:22 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Openshift Core Plugin
+Bundle-SymbolicName: org.jboss.tools.openshift.express.client
+Bundle-Version: 2.3.0.qualifier
+Bundle-Activator:
org.jboss.tools.openshift.express.internal.client.OpenshiftCoreActivator
+Bundle-Vendor: JBoss by Red Hat
+Require-Bundle: org.eclipse.core.runtime,
+ com.jcraft.jsch;bundle-version="[0.1.41,2.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: jboss-dmr-1.0.0.Final.jar,
+ .
+Export-Package:
org.jboss.dmr;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+ org.jboss.tools.openshift.express.client,
+
org.jboss.tools.openshift.express.internal.client;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+
org.jboss.tools.openshift.express.internal.client.request;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+
org.jboss.tools.openshift.express.internal.client.request.marshalling;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+
org.jboss.tools.openshift.express.internal.client.response;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+
org.jboss.tools.openshift.express.internal.client.response.unmarshalling;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
+
org.jboss.tools.openshift.express.internal.client.utils;x-friends:="org.jboss.ide.eclipse.as.openshift.test"
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/build.properties
(rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/build.properties 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ jboss-dmr-1.0.0.Final.jar
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/jboss-dmr-1.0.0.Final.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/jboss-dmr-1.0.0.Final.jar
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/pom.xml
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/pom.xml
(rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/pom.xml 2011-10-05 11:00:47
UTC (rev 35354)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.as</groupId>
+ <artifactId>plugins</artifactId>
+ <version>2.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.as.plugins</groupId>
+ <artifactId>org.jboss.tools.openshift.express.client</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.client/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ApplicationLogReader.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ApplicationLogReader.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ApplicationLogReader.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.client;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.jboss.tools.openshift.express.internal.client.Application;
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationLogReader extends Reader {
+
+ private static final Pattern LOG_REGEX = Pattern.compile("Tail of .+$",
Pattern.MULTILINE);
+
+ private static final long STATUS_REQUEST_DELAY = 4 * 1024;
+
+ private IOpenshiftService service;
+ private Reader logReader;
+ private Application application;
+ private InternalUser user;
+ private String currentStatus;
+
+ public ApplicationLogReader(Application application, InternalUser user,
IOpenshiftService service) {
+ this.application = application;
+ this.user = user;
+ this.service = service;
+ }
+
+ @Override
+ public int read(char[] cbuf, int off, int len) throws IOException {
+ int charactersRead = -1;
+ try {
+ while (charactersRead == -1) {
+ if (logReader == null) {
+ this.logReader = createLogReader(requestStatus());
+ }
+ charactersRead = logReader.read(cbuf, off, len);
+ if (charactersRead == -1) {
+ this.logReader = null;
+ }
+ }
+ return charactersRead;
+ } catch (OpenshiftException e) {
+ throw new IOException(e);
+ } catch (InterruptedException e) {
+ return -1;
+ }
+ }
+
+ private Reader createLogReader(String status) throws InterruptedException, IOException
{
+ String log = getLog(status);
+ return new StringReader(log);
+ }
+
+ private String getLog(String status) throws IOException {
+ Matcher matcher = LOG_REGEX.matcher(status);
+ int logStart = 0;
+ if (matcher.find()
+ && matcher.end() < status.length()) {
+ logStart = matcher.end() + 1;
+ }
+ return status.substring(logStart);
+ }
+
+ protected String requestStatus() throws InterruptedException, OpenshiftException {
+ String status = null;
+ while (status == null) {
+ status = service.getStatus(application.getName(), application.getCartridge(), user);
+ if (isSameStatus(currentStatus, status)) {
+ Thread.sleep(STATUS_REQUEST_DELAY);
+ status = null;
+ continue;
+ }
+ }
+ this.currentStatus = status;
+ return status;
+ }
+
+ private boolean isSameStatus(String thisStatus, String otherStatus) {
+ return otherStatus != null
+ && otherStatus.equals(thisStatus);
+ }
+
+ @Override
+ public void close() throws IOException {
+ if (logReader != null) {
+ logReader.close();
+ }
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ApplicationLogReader.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/Cartridge.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/Cartridge.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/Cartridge.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.client;
+
+/**
+ * A cartridge that is available on the openshift server. This class is no enum
+ * since we dont know all available types and they may change at any time.
+ *
+ * @author André Dietisheim
+ */
+public class Cartridge implements ICartridge {
+
+ private String name;
+
+ public Cartridge(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public static ICartridge valueOf(String name) {
+ if (JBOSSAS_7.getName().equals(name)) {
+ return JBOSSAS_7;
+ }
+ return null;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/Cartridge.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IApplication.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IApplication.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IApplication.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.client;
+
+import java.util.Date;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IApplication {
+
+ public String getName();
+
+ public String getUUID() throws OpenshiftException;
+
+ public ICartridge getCartridge();
+
+ public String getEmbedded() throws OpenshiftException;
+
+ public Date getCreationTime() throws OpenshiftException;
+
+ public void destroy() throws OpenshiftException;
+
+ public void start() throws OpenshiftException;
+
+ public void restart() throws OpenshiftException;
+
+ public void stop() throws OpenshiftException;
+
+ public ApplicationLogReader getLogReader() throws OpenshiftException;
+
+ public String getGitUri() throws OpenshiftException;
+
+ public String getApplicationUrl() throws OpenshiftException;
+
+}
\ No newline at end of file
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IApplication.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ICartridge.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ICartridge.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ICartridge.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+/**
+ * @author André Dietisheim
+ */
+public interface ICartridge {
+
+ public static final ICartridge JBOSSAS_7 = new Cartridge("jbossas-7.0");
+
+ public abstract String getName();
+
+}
\ No newline at end of file
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ICartridge.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IDomain.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IDomain.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IDomain.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.client;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IDomain {
+
+ public abstract void setNamespace(String namespace) throws OpenshiftException;
+
+ public abstract String getNamespace();
+
+ public abstract String getRhcDomain() throws OpenshiftException;
+
+}
\ No newline at end of file
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IDomain.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IHttpClient.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IHttpClient.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IHttpClient.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.client;
+
+import org.jboss.tools.openshift.express.internal.client.httpclient.HttpClientException;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IHttpClient {
+
+ public String post(String data) throws HttpClientException;
+
+ public String get() throws HttpClientException;
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IHttpClient.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IOpenshiftService.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IOpenshiftService.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IOpenshiftService.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.jboss.tools.openshift.express.internal.client.ApplicationInfo;
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+import org.jboss.tools.openshift.express.internal.client.UserInfo;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenshiftService {
+
+ /**
+ * The platform base url
+ */
+ public static final String BASE_URL = "https://openshift.redhat.com";
+
+ /**
+ * The path (url path addition) to the service
+ */
+ public static final String SERVICE_PATH = "/broker";
+
+ /**
+ * Returns the url at which the service is reachable.
+ *
+ * @return
+ */
+ public String getServiceUrl();
+
+ /**
+ * Returns the url at which the platform is reachable.
+ *
+ * @return
+ */
+ public String getPlatformUrl();
+
+ /**
+ * Returns <code>true</code> if given user has valid credentials. Returns
+ * <code>false</code> otherwise.
+ *
+ * @return
+ * @throws OpenshiftException
+ * @throws MalformedURLException
+ */
+ public boolean isValid(InternalUser user) throws OpenshiftException;
+
+ /**
+ * List all cartridges that are available on the Openshift Express platform.
+ *
+ * @param user
+ * the user account that shall be used
+ * @return the list of cartridges available on the platform
+ * @throws OpenshiftException
+ * @throws MalformedURLException
+ *
+ * @see InternalUser
+ */
+ public List<ICartridge> getCartridges(InternalUser user) throws
OpenshiftException;
+
+ /**
+ * Creates an application with the given name and cartridge for the given
+ * user.
+ *
+ * @param name
+ * the application name
+ * @param cartridge
+ * the cartridge to use
+ * @param user
+ * the user account
+ * @return the application that was created
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see IApplication
+ */
+ public IApplication createApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException;
+
+ /**
+ * Destroys the application with the given name and cartridge for the given
+ * user.
+ *
+ * @param name
+ * the name of the application that shall be destroyed
+ * @param cartridge
+ * the cartridge that the application is running on
+ * @param user
+ * the user account
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ */
+ public void destroyApplication(String name, ICartridge cartridge, InternalUser user)
throws OpenshiftException;
+
+ /**
+ * Starts the application with the given name and cartridge for the given
+ * user account. Starting an application that is already started has no
+ * effect.
+ *
+ * @param name
+ * of the application that shall be started
+ * @param cartridge
+ * the cartridge the application is running on
+ * @param user
+ * the user account to use
+ * @return the application that was started
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see IApplication
+ */
+ public IApplication startApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException;
+
+ /**
+ * Restarts the application with the given name and cartridge for the given
+ * user account.
+ *
+ * @param name
+ * the name of the application that shall be restarted
+ * @param cartridge
+ * the cartridge the application is running on
+ * @param user
+ * the user account to use
+ * @return the application that was started
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see IApplication
+ */
+ public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException;
+
+ /**
+ * Stops the application with the given name and cartridge for the given
+ * user account. Stopping an application that is already stopped has no
+ * effect.
+ *
+ * @param name
+ * the name of the application that shall be restarted
+ * @param cartridge
+ * the cartridge the application is running on
+ * @param user
+ * the user account to use
+ * @return the application that was stopped
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see IApplication
+ */
+ public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException;
+
+ /**
+ * Returns the log of the application with the given name and cartridge.
+ * Returns the whole log if no new log entry was created since the last
+ * call. Returns the new entries otherwise.
+ *
+ * @param name
+ * of the application that the log shall be returned of
+ * @param cartridge
+ * the cartridge the application is running on
+ * @param user
+ * the user account to use
+ * @return the log of the application
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ */
+ public String getStatus(String name, ICartridge cartridge, InternalUser user) throws
OpenshiftException;
+
+ /**
+ * Changes the current domain (namespace) to the given name.
+ *
+ * @param name
+ * the new domain name(-space)
+ * @param sshKey
+ * the ssh key that shall be used.
+ * @param user
+ * the user account to use
+ * @return the domain that was changed
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see SSHKeyPair
+ * @see ISSHPublicKey
+ * @see IDomain
+ */
+ public IDomain changeDomain(String name, ISSHPublicKey sshKey, InternalUser user) throws
OpenshiftException;
+
+ /**
+ * Creates a domain (namespace) with the given name for the given user
+ * account with the given ssh public key. If a domain already exists an
+ * OpenshiftEndpointException is thrown.
+ *
+ * @param name
+ * the new domain name(-space)
+ * @param sshKey
+ * the ssh key that shall be used.
+ * @param user
+ * the user account to use
+ * @return the domain that was changed
+ * @throws OpenshiftException
+ *
+ * @see ICartridge
+ * @see InternalUser
+ * @see SSHKeyPair
+ * @see ISSHPublicKey
+ * @see IDomain
+ */
+ public IDomain createDomain(String name, ISSHPublicKey sshKey, InternalUser user) throws
OpenshiftException;
+
+ /**
+ * Returns all informations for the given user and its applications.
+ *
+ * @param user
+ * the user account to use
+ * @return all user informations (user related info and applications)
+ * @throws OpenshiftException
+ *
+ * @see InternalUser
+ * @see InternalUserInfo
+ * @see ApplicationInfo
+ */
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException;
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IOpenshiftService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ISSHPublicKey.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ISSHPublicKey.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ISSHPublicKey.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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.client;
+
+/**
+ * @author André Dietisheim
+ */
+public interface ISSHPublicKey {
+
+ /**
+ * Returns the content of the public key (key content without ssh-rsa
+ * identifier nor comment) of the ssh key
+ *
+ * @return the content of the public key (without signature, without
+ * comment)
+ * @throws OpenshiftException
+ */
+ public String getPublicKey() throws OpenshiftException ;
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/ISSHPublicKey.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IUser.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IUser.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IUser.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.util.Collection;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IUser {
+
+ public String getRhlogin();
+
+ 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 ICartridge getCartridgeByName(String name) 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
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/IUser.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.client;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class InvalidCredentialsOpenshiftException extends OpenshiftEndpointException {
+
+ private static final long serialVersionUID = 1L;
+
+ public InvalidCredentialsOpenshiftException(String url, Throwable cause) {
+ super(url, cause, "Your credentials are not authorized to access
\"{0}\"", url);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.client;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class NotFoundOpenshiftException extends OpenshiftEndpointException {
+
+ private static final long serialVersionUID = 1L;
+
+ public NotFoundOpenshiftException(String url, Throwable cause) {
+ super(url, cause, "Could not find any Openshift Express resource at
\"{0}\"", url);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.client;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class OpenshiftEndpointException extends OpenshiftException {
+
+ private static final long serialVersionUID = 1L;
+
+ private String url;
+
+ public OpenshiftEndpointException(String url, Throwable cause, String message, Object...
arguments) {
+ super(cause, message, arguments);
+ this.url = url;
+ }
+
+ protected String getUrl() {
+ return url;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.client;
+
+import java.text.MessageFormat;
+
+/**
+ * @author André Dietisheim
+ */
+public class OpenshiftException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public OpenshiftException(Throwable cause, String message, Object... arguments) {
+ super(MessageFormat.format(message, arguments), cause);
+ }
+
+ public OpenshiftException(String message, Object... arguments) {
+ super(MessageFormat.format(message, arguments));
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftService.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftService.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftService.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.tools.openshift.express.internal.client.Application;
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+import org.jboss.tools.openshift.express.internal.client.UserInfo;
+import org.jboss.tools.openshift.express.internal.client.httpclient.HttpClientException;
+import org.jboss.tools.openshift.express.internal.client.httpclient.NotFoundException;
+import
org.jboss.tools.openshift.express.internal.client.httpclient.UnauthorizedException;
+import
org.jboss.tools.openshift.express.internal.client.httpclient.UrlConnectionHttpClient;
+import org.jboss.tools.openshift.express.internal.client.request.AbstractDomainRequest;
+import org.jboss.tools.openshift.express.internal.client.request.ApplicationAction;
+import org.jboss.tools.openshift.express.internal.client.request.ApplicationRequest;
+import org.jboss.tools.openshift.express.internal.client.request.ChangeDomainRequest;
+import org.jboss.tools.openshift.express.internal.client.request.CreateDomainRequest;
+import org.jboss.tools.openshift.express.internal.client.request.ListCartridgesRequest;
+import
org.jboss.tools.openshift.express.internal.client.request.OpenshiftEnvelopeFactory;
+import org.jboss.tools.openshift.express.internal.client.request.UserInfoRequest;
+import
org.jboss.tools.openshift.express.internal.client.request.marshalling.ApplicationRequestJsonMarshaller;
+import
org.jboss.tools.openshift.express.internal.client.request.marshalling.DomainRequestJsonMarshaller;
+import
org.jboss.tools.openshift.express.internal.client.request.marshalling.ListCartridgesRequestJsonMarshaller;
+import
org.jboss.tools.openshift.express.internal.client.request.marshalling.UserInfoRequestJsonMarshaller;
+import org.jboss.tools.openshift.express.internal.client.response.OpenshiftResponse;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.ApplicationResponseUnmarshaller;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.ApplicationStatusResponseUnmarshaller;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.DomainResponseUnmarshaller;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.JsonSanitizer;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.ListCartridgesResponseUnmarshaller;
+import
org.jboss.tools.openshift.express.internal.client.response.unmarshalling.UserInfoResponseUnmarshaller;
+
+/**
+ * @author André Dietisheim
+ */
+public class OpenshiftService implements IOpenshiftService {
+
+ private String baseUrl;
+
+ public OpenshiftService() {
+ this(BASE_URL);
+ }
+
+ public OpenshiftService(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ @Override
+ public String getServiceUrl() {
+ return baseUrl + SERVICE_PATH;
+ }
+
+ @Override
+ public String getPlatformUrl() {
+ return baseUrl;
+ }
+
+ @Override
+ public boolean isValid(InternalUser user) throws OpenshiftException {
+ return getUserInfo(user) != null;
+ }
+
+ @Override
+ public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
+ UserInfoRequest request = new UserInfoRequest(user.getRhlogin(), true);
+ String url = request.getUrlString(getServiceUrl());
+ try {
+ String requestString = new UserInfoRequestJsonMarshaller().marshall(request);
+ String openShiftRequestString = new OpenshiftEnvelopeFactory(user.getPassword(),
requestString)
+ .createString();
+ String responseString = createHttpClient(url).post(openShiftRequestString);
+ responseString = JsonSanitizer.sanitize(responseString);
+ OpenshiftResponse<UserInfo> response =
+ new UserInfoResponseUnmarshaller().unmarshall(responseString);
+ return response.getOpenshiftObject();
+ } catch (MalformedURLException e) {
+ throw new OpenshiftEndpointException(
+ url, e, "Could not get user info for user \"{0}\" at
\"{1}\"", user.getRhlogin(), url);
+ } catch (UnauthorizedException e) {
+ throw new InvalidCredentialsOpenshiftException(url, e);
+ } catch (NotFoundException e) {
+ throw new NotFoundOpenshiftException(url, e);
+ } catch (HttpClientException e) {
+ throw new OpenshiftEndpointException(
+ url, e, "Could not get user info for user \"{0}\" at
\"{1}\"", user.getRhlogin(), url);
+ }
+ }
+
+ @Override
+ public List<ICartridge> getCartridges(InternalUser user) throws OpenshiftException
{
+ ListCartridgesRequest listCartridgesRequest = new
ListCartridgesRequest(user.getRhlogin(), true);
+ String url = listCartridgesRequest.getUrlString(getServiceUrl());
+ try {
+ String listCartridgesRequestString =
+ new ListCartridgesRequestJsonMarshaller().marshall(listCartridgesRequest);
+ String request = new OpenshiftEnvelopeFactory(user.getPassword(),
listCartridgesRequestString)
+ .createString();
+ String listCatridgesReponse = createHttpClient(url).post(request);
+ listCatridgesReponse = JsonSanitizer.sanitize(listCatridgesReponse);
+ OpenshiftResponse<List<ICartridge>> response =
+ new ListCartridgesResponseUnmarshaller().unmarshall(listCatridgesReponse);
+ return response.getOpenshiftObject();
+ /**
+ * always allowed to list cartridges, even with invalid credentials
+ */
+ } catch (MalformedURLException e) {
+ throw new OpenshiftEndpointException(url, e, "Could not list available cartridges
at \"{0}\"", url);
+ } catch (NotFoundException e) {
+ throw new NotFoundOpenshiftException(url, e);
+ } catch (HttpClientException e) {
+ throw new OpenshiftEndpointException(url, e, "Could not list available cartridges
at \"{0}\"", url);
+ }
+ }
+
+ @Override
+ 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 user)
throws OpenshiftException {
+ return requestDomainAction(new ChangeDomainRequest(newName, sshKey, user.getRhlogin(),
true), user);
+ }
+
+ protected IDomain requestDomainAction(AbstractDomainRequest request, InternalUser user)
throws OpenshiftException {
+ String url = request.getUrlString(getServiceUrl());
+ try {
+ String requestString =
+ new OpenshiftEnvelopeFactory(
+ user.getPassword(),
+ new DomainRequestJsonMarshaller().marshall(request))
+ .createString();
+ String responseString = createHttpClient(url).post(requestString);
+ responseString = JsonSanitizer.sanitize(responseString);
+ OpenshiftResponse<IDomain> response =
+ new DomainResponseUnmarshaller(request.getName(), user,
this).unmarshall(responseString);
+ return response.getOpenshiftObject();
+ } catch (MalformedURLException e) {
+ throw new OpenshiftEndpointException(url, e, "Could reach openshift platform at
\"{0}\"", url);
+ } catch (UnauthorizedException e) {
+ throw new InvalidCredentialsOpenshiftException(url, e);
+ } catch (NotFoundException e) {
+ throw new NotFoundOpenshiftException(url, e);
+ } catch (HttpClientException e) {
+ throw new OpenshiftEndpointException(url, e, "Could not {0}",
request.toHumanReadable());
+ }
+ }
+
+ @Override
+ public Application createApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException {
+ Application application = requestApplicationAction(new ApplicationRequest(name,
cartridge,
+ ApplicationAction.CONFIGURE,
+ user.getRhlogin(), true), user);
+ return application;
+ }
+
+ @Override
+ public void destroyApplication(String name, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
+ IApplication application = requestApplicationAction(new ApplicationRequest(name,
cartridge,
+ ApplicationAction.DECONFIGURE,
+ user.getRhlogin(), true), user);
+ user.remove(application);
+ }
+
+ @Override
+ public IApplication startApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException {
+ return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.START,
+ user.getRhlogin(), true), user);
+ }
+
+ @Override
+ public IApplication restartApplication(String name, ICartridge cartridge, InternalUser
user)
+ throws OpenshiftException {
+ return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.RESTART,
+ user.getRhlogin(), true), user);
+ }
+
+ @Override
+ public IApplication stopApplication(String name, ICartridge cartridge, InternalUser
user) throws OpenshiftException {
+ return requestApplicationAction(new ApplicationRequest(name, cartridge,
ApplicationAction.STOP,
+ user.getRhlogin(), true), user);
+ }
+
+ @Override
+ public String getStatus(String applicationName, ICartridge cartridge, InternalUser user)
throws OpenshiftException {
+ ApplicationRequest applicationRequest =
+ new ApplicationRequest(applicationName, cartridge, ApplicationAction.STATUS,
user.getRhlogin(), true);
+ String url = applicationRequest.getUrlString(getServiceUrl());
+ try {
+ String applicationRequestString =
+ new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
+ String request = new OpenshiftEnvelopeFactory(user.getPassword(),
applicationRequestString).createString();
+ String response = createHttpClient(url).post(request);
+
+ response = JsonSanitizer.sanitize(response);
+ OpenshiftResponse<String> openshiftResponse =
+ new ApplicationStatusResponseUnmarshaller().unmarshall(response);
+ return openshiftResponse.getOpenshiftObject();
+ } catch (MalformedURLException e) {
+ throw new OpenshiftException(
+ e, "Could not {0} application \"{1}\" at \"{2}\": Invalid
url \"{2}\"",
+ applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url);
+ } catch (UnauthorizedException e) {
+ throw new InvalidCredentialsOpenshiftException(url, e);
+ } catch (NotFoundException e) {
+ throw new NotFoundOpenshiftException(url, e);
+ } catch (HttpClientException e) {
+ throw new OpenshiftEndpointException(
+ url, e, "Could not {0} application \"{1}\" at
\"{2}\"",
+ applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url);
+ }
+ }
+
+ protected Application requestApplicationAction(ApplicationRequest applicationRequest,
InternalUser user)
+ throws OpenshiftException {
+ String url = applicationRequest.getUrlString(getServiceUrl());
+ try {
+ String applicationRequestString =
+ new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
+ 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(), user, this).unmarshall(response);
+ return openshiftResponse.getOpenshiftObject();
+ } catch (MalformedURLException e) {
+ throw new OpenshiftException(
+ e, "Could not {0} application \"{1}\" at \"{2}\": Invalid
url \"{2}\"",
+ applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url);
+ } catch (UnauthorizedException e) {
+ throw new InvalidCredentialsOpenshiftException(url, e);
+ } catch (NotFoundException e) {
+ throw new NotFoundOpenshiftException(url, e);
+ } catch (HttpClientException e) {
+ throw new OpenshiftEndpointException(
+ url, e, "Could not {0} application \"{1}\" at
\"{2}\"",
+ applicationRequest.getAction().toHumanReadable(), applicationRequest.getName(),
url);
+ }
+ }
+
+ private IHttpClient createHttpClient(String url) throws MalformedURLException {
+ return new UrlConnectionHttpClient(new URL(url));
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/OpenshiftService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.client;
+
+import org.jboss.tools.openshift.express.internal.client.OpenshiftCoreActivator;
+import org.jboss.tools.openshift.express.internal.client.utils.Base64Encoder;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.KeyPair;
+
+/**
+ * @author André Dietisheim
+ */
+public class SSHKeyPair implements ISSHPublicKey {
+
+ /**
+ * the length of the key that is created when using #create. ssh-keygen uses
+ * a default of 2048
+ *
+ * @see #create(String, String, String)
+ * @see
http://en.wikipedia.org/wiki/Ssh-keygen
+ */
+ private static final int KEYLENGTH = 2048;
+
+ private KeyPair keyPair;
+ private String privateKeyPath;
+
+ private String publicKeyPath;
+
+ private SSHKeyPair(KeyPair keyPair, String privateKeyPath, String publicKeyPath) throws
OpenshiftException {
+ this.keyPair = keyPair;
+ this.privateKeyPath = privateKeyPath;
+ this.publicKeyPath = publicKeyPath;
+ }
+
+ /**
+ * Creates private and public ssh-rsa keys and stores them to the given
+ * paths. The key is created while using the given pass phrase.
+ *
+ * @param passPhrase
+ * the pass phrase to set to the new key
+ * @param privateKeyPath
+ * the path where the new private key gets stored
+ * @param publicKeyPath
+ * the path where the new public key gets stored
+ * @return
+ * @throws OpenshiftException
+ * if the key could not be created
+ */
+ public static SSHKeyPair create(String passPhrase, String privateKeyPath, String
publicKeyPath)
+ throws OpenshiftException {
+ try {
+ KeyPair keyPair = KeyPair.genKeyPair(new JSch(), KeyPair.RSA, KEYLENGTH);
+ keyPair.setPassphrase(passPhrase);
+ keyPair.writePublicKey(publicKeyPath, "created by " +
OpenshiftCoreActivator.PLUGIN_ID);
+ keyPair.writePrivateKey(privateKeyPath);
+ return new SSHKeyPair(keyPair, privateKeyPath, publicKeyPath);
+ } catch (Exception e) {
+ throw new OpenshiftException(e, "Could not create new rsa key", e);
+ }
+ }
+
+ /**
+ * Loads existing private and public ssh key from the given paths.
+ *
+ * @param privateKeyPath
+ * the path to the private key
+ * @param publicKeyPath
+ * the path to the public key
+ * @return
+ * @throws OpenshiftException
+ */
+ public static SSHKeyPair load(String privateKeyPath, String publicKeyPath)
+ throws OpenshiftException {
+ try {
+ KeyPair keyPair = KeyPair.load(new JSch(), privateKeyPath, publicKeyPath);
+ return new SSHKeyPair(keyPair, privateKeyPath, publicKeyPath);
+ } catch (JSchException e) {
+ throw new OpenshiftException(e, "Could not create new rsa key");
+ }
+ }
+
+ public String getPublicKey() throws OpenshiftException {
+ return new String(Base64Encoder.encode(keyPair.getPublicKeyBlob()));
+ }
+
+ protected String getPrivateKeyPath() {
+ return privateKeyPath;
+ }
+
+ protected String getPublicKeyPath() {
+ return publicKeyPath;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHPublicKey.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHPublicKey.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHPublicKey.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.client;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.jboss.tools.openshift.express.internal.client.utils.StreamUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class SSHPublicKey implements ISSHPublicKey {
+
+ private static final Pattern PUBLICKEY_PATTERN = Pattern.compile("[^ ]+ ([^ ]+)(
.+)*");
+
+ private String publicKey;
+
+ public SSHPublicKey(File publicKeyFilePath) throws IOException, OpenshiftException {
+ this.publicKey = extractPublicKey(publicKeyFilePath);
+ }
+
+ public SSHPublicKey(String publicKey) {
+ this.publicKey = publicKey;
+ }
+
+ private String extractPublicKey(File file) throws OpenshiftException,
FileNotFoundException, IOException {
+ String keyWithIdAndComment = StreamUtils.readToString(new FileReader(file));
+ Matcher matcher = PUBLICKEY_PATTERN.matcher(keyWithIdAndComment);
+ if (!matcher.find()
+ || matcher.groupCount() < 1) {
+ throw new OpenshiftException("Could not load public key from file
\"{0}\"", file.getAbsolutePath());
+ }
+
+ return matcher.group(1);
+ }
+
+ public String getPublicKey() {
+ return publicKey;
+ }
+
+ void update(String publicKey) {
+ this.publicKey = publicKey;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHPublicKey.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/User.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/User.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/User.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.client;
+
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+
+/**
+ * @author André Dietisheim
+ */
+public class User extends InternalUser {
+
+ public User(String rhlogin, String password) {
+ super(rhlogin, password);
+ }
+
+ protected User(String rhlogin, String password, String url) {
+ super(rhlogin, password, url);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/User.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/UserConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/UserConfiguration.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/UserConfiguration.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.client;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Properties;
+
+import org.jboss.tools.openshift.express.internal.client.utils.StreamUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class UserConfiguration {
+
+ private static final String CONFIGURATION_FOLDER = ".openshift";
+ private static final String CONFIGURATION_FILE = "express.conf";
+ private static final String PROPERTY_USERHOME = "user.home";
+ protected static final String KEY_RHLOGIN = "default_rhlogin";
+
+ private Properties properties;
+ protected File file;
+
+ public UserConfiguration() throws OpenshiftException, IOException {
+ this.file = getUserConfigurationFile();
+ this.properties = getUserProperties(file);
+ }
+
+ protected File getUserConfigurationFile() throws OpenshiftException, IOException {
+ String userHome = System.getProperty(PROPERTY_USERHOME);
+ if (userHome == null) {
+ throw new OpenshiftException("Could not read user configuration: user home
directory not found");
+ }
+ return new File(CONFIGURATION_FILE, userHome + File.separatorChar +
CONFIGURATION_FOLDER);
+ }
+
+ protected Properties getUserProperties(File userConfigurationFile) throws
FileNotFoundException, IOException {
+ FileReader reader = null;
+ try {
+ Properties userConfigurationProperties = new Properties();
+ reader = new FileReader(userConfigurationFile);
+ userConfigurationProperties.load(reader);
+ return userConfigurationProperties;
+ } finally {
+ StreamUtils.close(reader);
+ }
+ }
+
+ public String getRhlogin() {
+ return properties.getProperty(KEY_RHLOGIN);
+ }
+
+ public void setRhlogin(String rhlogin) {
+ properties.put(KEY_RHLOGIN, rhlogin);
+ }
+
+ public void store() throws IOException {
+ Writer writer = null;
+ try {
+ writer = new FileWriter(file);
+ properties.store(writer, "");
+ } finally {
+ StreamUtils.close(writer);
+ }
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/UserConfiguration.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Application.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Application.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Application.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.text.MessageFormat;
+import java.util.Date;
+
+import org.jboss.tools.openshift.express.client.ApplicationLogReader;
+import org.jboss.tools.openshift.express.client.IApplication;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.IDomain;
+import org.jboss.tools.openshift.express.client.IOpenshiftService;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+
+/**
+ * @author André Dietisheim
+ */
+public class Application extends UserInfoAware implements IApplication {
+
+ private static final String GIT_URI_PATTERN =
"ssh://{0}@{1}-{2}.{3}/~/git/{1}.git/";
+ private static final String APPLICATION_URL_PATTERN = "http://{0}-{1}.{2}/";
+
+ private String name;
+ private ICartridge cartridge;
+ private IOpenshiftService service;
+ private ApplicationLogReader logReader;
+ private ApplicationInfo applicationInfo;
+
+ 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 user,
+ IOpenshiftService service) {
+ super(user);
+ this.name = name;
+ this.cartridge = cartridge;
+ this.service = service;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getUUID() throws OpenshiftException {
+ return getApplicationInfo().getUuid();
+ }
+
+ @Override
+ public ICartridge getCartridge() {
+ return cartridge;
+ }
+
+ @Override
+ public String getEmbedded() throws OpenshiftException {
+ return getApplicationInfo().getEmbedded();
+ }
+
+ @Override
+ public Date getCreationTime() throws OpenshiftException {
+ return getApplicationInfo().getCreationTime();
+ }
+
+ @Override
+ public void destroy() throws OpenshiftException {
+ service.destroyApplication(name, cartridge, getUser());
+ }
+
+ @Override
+ public void start() throws OpenshiftException {
+ service.startApplication(name, cartridge, getUser());
+ }
+
+ @Override
+ public void restart() throws OpenshiftException {
+ service.restartApplication(name, cartridge, getUser());
+ }
+
+ @Override
+ public void stop() throws OpenshiftException {
+ service.stopApplication(name, cartridge, getUser());
+ }
+
+ @Override
+ public ApplicationLogReader getLogReader() throws OpenshiftException {
+ if (logReader == null) {
+ this.logReader = new ApplicationLogReader(this, getUser(), service);
+ }
+ return logReader;
+ }
+
+ @Override
+ public String getGitUri() throws OpenshiftException {
+ IDomain domain = getUser().getDomain();
+ if (domain == null) {
+ return null;
+ }
+ return MessageFormat
+ .format(GIT_URI_PATTERN, getUUID(), getName(), domain.getNamespace(),
domain.getRhcDomain());
+ }
+
+ @Override
+ public String getApplicationUrl() throws OpenshiftException {
+ IDomain domain = getUser().getDomain();
+ if (domain == null) {
+ return null;
+ }
+ return MessageFormat.format(APPLICATION_URL_PATTERN, name, domain.getNamespace(),
domain.getRhcDomain());
+ }
+
+ protected IOpenshiftService getService() {
+ return service;
+ }
+
+ protected ApplicationInfo getApplicationInfo() throws OpenshiftException {
+ if (applicationInfo == null) {
+ this.applicationInfo = getUserInfo().getApplicationInfoByName(getName());
+ }
+ return applicationInfo;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object)
+ return true;
+ if (object == null)
+ return false;
+ if (getClass() != object.getClass())
+ return false;
+ Application other = (Application) object;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Application.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.util.Date;
+
+import org.jboss.tools.openshift.express.client.ICartridge;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationInfo {
+
+ private String name;
+ private String uuid;
+ private String embedded;
+ private ICartridge cartridge;
+ private Date creationTime;
+
+ public ApplicationInfo(String name, String uuid, String embedded, ICartridge cartridge,
Date creationTime) {
+ this.name = name;
+ this.uuid = uuid;
+ this.embedded = embedded;
+ this.cartridge = cartridge;
+ this.creationTime = creationTime;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getEmbedded() {
+ return embedded;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public ICartridge getCartridge() {
+ return cartridge;
+ }
+
+ public Date getCreationTime() {
+ return creationTime;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Domain.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Domain.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Domain.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import org.jboss.tools.openshift.express.client.IDomain;
+import org.jboss.tools.openshift.express.client.IOpenshiftService;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class Domain extends UserInfoAware implements IDomain {
+
+ private String namespace;
+ private IOpenshiftService service;
+
+ public Domain(String namespace, InternalUser user, IOpenshiftService service) {
+ this(namespace, null, user, service);
+ }
+
+ public Domain(String namespace, String rhcDomain, InternalUser user, IOpenshiftService
service) {
+ super(user);
+ this.namespace = namespace;
+ this.service = service;
+ }
+
+ @Override
+ public String getNamespace() {
+ return namespace;
+ }
+
+ @Override
+ public String getRhcDomain() throws OpenshiftException {
+ return getUserInfo().getRhcDomain();
+ }
+
+ @Override
+ public void setNamespace(String namespace) throws OpenshiftException {
+ InternalUser user = getUser();
+ IDomain domain = service.changeDomain(namespace, user.getSshKey(), user);
+ update(domain);
+ }
+
+ private void update(IDomain domain) {
+ this.namespace = domain.getNamespace();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/Domain.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+/**
+ * @author André Dietisheim
+ */
+public class IOpenshiftJsonConstants {
+
+ public static final String PROPERTY_DEBUG = "debug";
+ public static final String PROPERTY_RHLOGIN = "rhlogin";
+
+ public static final String PROPERTY_CART_TYPE = "cart_type";
+
+ public static final String PROPERTY_MESSAGES = "messages";
+ public static final String PROPERTY_RESULT = "result";
+ public static final String PROPERTY_EXIT_CODE = "exit_code";
+ public static final String PROPERTY_DATA = "data";
+ public static final String PROPERTY_APP_NAME = "app_name";
+ public static final String PROPERTY_ACTION = "action";
+ public static final String PROPERTY_CARTRIDGE = "cartridge";
+ public static final String PROPERTY_CARTS = "carts";
+ public static final String PROPERTY_NAMESPACE = "namespace";
+ public static final String PROPERTY_ALTER = "alter";
+ public static final String PROPERTY_SSH = "ssh";
+ public static final String PROPERTY_UUID = "uuid";
+ public static final String PROPERTY_USER_INFO = "user_info";
+ public static final String PROPERTY_APP_INFO = "app_info";
+ public static final String PROPERTY_RHC_DOMAIN = "rhc_domain";
+ public static final String PROPERTY_EMBEDDED = "embedded";
+ public static final String PROPERTY_FRAMEWORK = "framework";
+ public static final String PROPERTY_CREATION_TIME = "creation_time";
+ public static final String PROPERTY_SSH_KEY = "ssh_key";
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/InternalUser.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/InternalUser.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/InternalUser.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.tools.openshift.express.client.IApplication;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.IDomain;
+import org.jboss.tools.openshift.express.client.IOpenshiftService;
+import org.jboss.tools.openshift.express.client.ISSHPublicKey;
+import org.jboss.tools.openshift.express.client.IUser;
+import org.jboss.tools.openshift.express.client.InvalidCredentialsOpenshiftException;
+import org.jboss.tools.openshift.express.client.NotFoundOpenshiftException;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.client.OpenshiftService;
+import org.jboss.tools.openshift.express.client.UserConfiguration;
+
+/**
+ * @author André Dietisheim
+ */
+public class InternalUser implements IUser {
+
+ private String rhlogin;
+ private String password;
+ private ISSHPublicKey sshKey;
+ private IDomain domain;
+ private UserInfo userInfo;
+ private List<ICartridge> cartridges;
+ private List<IApplication> applications = new ArrayList<IApplication>();
+
+ private IOpenshiftService service;
+
+ public InternalUser(String password) throws OpenshiftException, IOException {
+ this(new UserConfiguration(), password);
+ }
+
+ public InternalUser(UserConfiguration configuration, String password) {
+ this(configuration.getRhlogin(), password, (ISSHPublicKey) null, new
OpenshiftService());
+ }
+
+ public InternalUser(String rhlogin, String password) {
+ this(rhlogin, password, (ISSHPublicKey) null, new OpenshiftService());
+ }
+
+ public InternalUser(String rhlogin, String password, String url) {
+ this(rhlogin, password, (ISSHPublicKey) null, new OpenshiftService(url));
+ }
+
+ public InternalUser(String rhlogin, String password, IOpenshiftService service) {
+ this(rhlogin, password, (ISSHPublicKey) null, service);
+ }
+
+ public InternalUser(String rhlogin, String password, ISSHPublicKey sshKey,
IOpenshiftService service) {
+ this.rhlogin = rhlogin;
+ this.password = password;
+ this.sshKey = sshKey;
+ this.service = service;
+ }
+
+ @Override
+ public boolean isValid() throws OpenshiftException {
+ try {
+ return service.isValid(this);
+ } catch (InvalidCredentialsOpenshiftException e) {
+ return false;
+ }
+ }
+
+ @Override
+ public IDomain createDomain(String name, ISSHPublicKey key) throws OpenshiftException {
+ setSshKey(key);
+ this.domain = getService().createDomain(name, key, this);
+ return domain;
+ }
+
+ @Override
+ public IDomain getDomain() throws OpenshiftException {
+ if (domain == null) {
+ 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) {
+ this.sshKey = getUserInfo().getSshPublicKey();
+ }
+ return sshKey;
+ }
+
+ @Override
+ public String getRhlogin() {
+ return rhlogin;
+ }
+
+ @Override
+ public String getPassword() {
+ return password;
+ }
+
+ @Override
+ public String getUUID() throws OpenshiftException {
+ return getUserInfo().getUuid();
+ }
+
+ @Override
+ public List<ICartridge> getCartridges() throws OpenshiftException {
+ if (cartridges == null) {
+ this.cartridges = service.getCartridges(this);
+ }
+ return Collections.unmodifiableList(cartridges);
+ }
+
+ @Override
+ public ICartridge getCartridgeByName(String name) throws OpenshiftException {
+ ICartridge matchingCartridge = null;
+ for(ICartridge cartridge : getCartridges()) {
+ if (name.equals(cartridge.getName())) {
+ matchingCartridge = cartridge;
+ break;
+ }
+ }
+ return matchingCartridge;
+ }
+
+ @Override
+ public IApplication createApplication(String name, ICartridge cartridge) throws
OpenshiftException {
+ IApplication application = service.createApplication(name, cartridge, this);
+ add(application);
+ return application;
+ }
+
+ @Override
+ public Collection<IApplication> getApplications() throws OpenshiftException {
+ if (getUserInfo().getApplicationInfos().size() > applications.size()) {
+ update(getUserInfo().getApplicationInfos());
+ }
+ return Collections.unmodifiableList(applications);
+ }
+
+ @Override
+ public IApplication getApplicationByName(String name) throws OpenshiftException {
+ return getApplicationByName(name, getApplications());
+ }
+
+ private IApplication getApplicationByName(String name, Collection<IApplication>
applications) {
+ IApplication matchingApplication = null;
+ for (IApplication application : applications) {
+ if (name.equals(application.getName())) {
+ matchingApplication = application;
+ }
+ }
+ return matchingApplication;
+ }
+
+ public void add(IApplication application) {
+ applications.add(application);
+ }
+
+ public void remove(IApplication application) {
+ applications.remove(application);
+ }
+
+ public void setSshPublicKey(ISSHPublicKey key) {
+ this.sshKey = key;
+ }
+
+ protected UserInfo getUserInfo() throws OpenshiftException {
+ if (userInfo == null) {
+ this.userInfo = service.getUserInfo(this);
+ }
+ return userInfo;
+ }
+
+ @Override
+ public void refresh() throws OpenshiftException {
+ this.domain = null;
+ this.sshKey = null;
+ getUserInfo();
+ }
+
+ private void update(List<ApplicationInfo> applicationInfos) {
+ for (ApplicationInfo applicationInfo : applicationInfos) {
+ IApplication application = getApplicationByName(applicationInfo.getName(),
applications);
+ if (application == null) {
+ applications.add(createApplication(applicationInfo));
+ }
+ }
+ }
+
+ private Application createApplication(ApplicationInfo applicationInfo) {
+ return new Application(applicationInfo.getName()
+ , applicationInfo.getCartridge()
+ , applicationInfo
+ , this, service);
+ }
+
+ protected IOpenshiftService getService() {
+ return service;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/InternalUser.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OpenshiftCoreActivator implements BundleActivator {
+
+ public static final String PLUGIN_ID =
"org.jboss.tools.openshift.express.client";
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ public void start(BundleContext bundleContext) throws Exception {
+ OpenshiftCoreActivator.context = bundleContext;
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ OpenshiftCoreActivator.context = null;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfo.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfo.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfo.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import java.util.List;
+
+import org.jboss.tools.openshift.express.client.SSHPublicKey;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class UserInfo {
+
+ private String rhLogin;
+ private String uuid;
+ private SSHPublicKey sshPublicKey;
+ private String rhcDomain;
+ private String namespace;
+ private List<ApplicationInfo> applicationInfos;
+
+ public UserInfo(String rhLogin, String uuid, String sshPublicKey, String rhcDomain,
String namespace, List<ApplicationInfo> applicationInfos) {
+ this.rhLogin = rhLogin;
+ this.uuid = uuid;
+ this.sshPublicKey = new SSHPublicKey(sshPublicKey);
+ this.rhcDomain = rhcDomain;
+ this.namespace = namespace;
+ this.applicationInfos = applicationInfos;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public SSHPublicKey getSshPublicKey() {
+ return sshPublicKey;
+ }
+
+ public String getRhLogin() {
+ return rhLogin;
+ }
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public List<ApplicationInfo> getApplicationInfos() {
+ return applicationInfos;
+ }
+
+ public ApplicationInfo getApplicationInfoByName(String name) {
+ ApplicationInfo matchingApplicationInfo = null;
+ for (ApplicationInfo applicationInfo : applicationInfos) {
+ if (name.equals(applicationInfo.getName())) {
+ matchingApplicationInfo = applicationInfo;
+ break;
+ }
+ }
+ return matchingApplicationInfo;
+ }
+
+ public String getRhcDomain() {
+ return rhcDomain;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfo.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfoAware.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfoAware.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfoAware.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client;
+
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+
+public class UserInfoAware {
+
+ private UserInfo userInfo;
+ private InternalUser user;
+
+ protected UserInfoAware(InternalUser user) {
+ this.user = user;
+ }
+
+ protected UserInfo getUserInfo() throws OpenshiftException {
+ if (userInfo == null) {
+ this.userInfo = user.getUserInfo();
+ }
+ return userInfo;
+ }
+
+ protected InternalUser getUser() {
+ return user;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/UserInfoAware.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+/**
+ * @author André Dietisheim
+ */
+public class BadRequestException extends HttpClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public BadRequestException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public BadRequestException(Throwable cause) {
+ super(cause);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+/**
+ * @author André Dietisheim
+ */
+public class HttpClientException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public HttpClientException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public HttpClientException(String message) {
+ super(message);
+ }
+
+ public HttpClientException(Throwable cause) {
+ super(cause);
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+/**
+ * @author André Dietisheim
+ */
+public class InternalServerErrorException extends HttpClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public InternalServerErrorException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public InternalServerErrorException(String message) {
+ super(message);
+ }
+
+ public InternalServerErrorException(Throwable cause) {
+ super(cause);
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+/**
+ * @author André Dietisheim
+ */
+public class NotFoundException extends HttpClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public NotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ private NotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+/**
+ * @author André Dietisheim
+ */
+public class UnauthorizedException extends HttpClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public UnauthorizedException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public UnauthorizedException(Throwable cause) {
+ super(cause);
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.httpclient;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.jboss.tools.openshift.express.client.IHttpClient;
+import org.jboss.tools.openshift.express.internal.client.utils.StreamUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class UrlConnectionHttpClient implements IHttpClient {
+
+ private static final String PROPERTY_CONTENT_TYPE = "Content-Type";
+ private static final int TIMEOUT = 10 * 1024;
+
+ private URL url;
+
+ public UrlConnectionHttpClient(URL url) {
+ this.url = url;
+ }
+
+ public String post(String data) throws HttpClientException {
+ HttpURLConnection connection = null;
+ try {
+ connection = createConnection(url);
+ connection.setDoOutput(true);
+ StreamUtils.writeTo(data.getBytes(), connection.getOutputStream());
+ return StreamUtils.readToString(connection.getInputStream());
+ } catch (FileNotFoundException e) {
+ throw new NotFoundException(
+ MessageFormat.format("Could not find resource {0}", url.toString()), e);
+ } catch (IOException e) {
+ throw createException(e, connection);
+ } finally {
+ if (connection != null) {
+ connection.disconnect();
+ }
+ }
+ }
+
+ public String get() throws HttpClientException {
+ HttpURLConnection connection = null;
+ try {
+ connection = createConnection(url);
+ return StreamUtils.readToString(connection.getInputStream());
+ } catch (FileNotFoundException e) {
+ throw new NotFoundException(
+ MessageFormat.format("Could not find resource {0}", url.toString()), e);
+ } catch (IOException e) {
+ throw createException(e, connection);
+ } finally {
+ if (connection != null) {
+ connection.disconnect();
+ }
+ }
+ }
+
+ private HttpClientException createException(IOException ioe, HttpURLConnection
connection) {
+ try {
+ int responseCode = connection.getResponseCode();
+ String errorMessage = StreamUtils.readToString(connection.getErrorStream());
+ switch (responseCode) {
+ case 500:
+ return new InternalServerErrorException(errorMessage, ioe);
+ case 400:
+ return new BadRequestException(errorMessage, ioe);
+ case 401:
+ return new UnauthorizedException(errorMessage, ioe);
+ default:
+ return new HttpClientException(errorMessage, ioe);
+ }
+ } catch (IOException e) {
+ return new HttpClientException(e);
+ }
+ }
+
+ private HttpURLConnection createConnection(URL url) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(TIMEOUT);
+ connection.setRequestProperty(PROPERTY_CONTENT_TYPE,
"application/x-www-form-urlencoded");
+ connection.setInstanceFollowRedirects(true);
+ return connection;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import org.jboss.tools.openshift.express.client.ISSHPublicKey;
+
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractDomainRequest extends AbstractOpenshiftRequest {
+
+ private String name;
+ private ISSHPublicKey sshKey;
+
+ public AbstractDomainRequest(String name, ISSHPublicKey sshKey, String username) {
+ this(name, sshKey, username, false);
+ }
+
+ public AbstractDomainRequest(String name, ISSHPublicKey sshKey, String username, boolean
debug) {
+ super(username, debug);
+ this.name = name;
+ this.sshKey = sshKey;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ISSHPublicKey getSshKey() {
+ return sshKey;
+ }
+
+ @Override
+ public String getResourcePath() {
+ return "domain";
+ }
+
+ public abstract boolean isAlter();
+
+ public abstract String toHumanReadable();
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.tools.openshift.express.internal.client.utils.UrlBuilder;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractOpenshiftRequest implements IOpenshiftRequest {
+
+ private String rhlogin;
+ private boolean debug;
+
+ public AbstractOpenshiftRequest(String username) {
+ this(username, false);
+ }
+
+ public AbstractOpenshiftRequest(String username, boolean debug) {
+ this.rhlogin = username;
+ this.debug = debug;
+ }
+
+ public String getRhLogin() {
+ return rhlogin;
+ }
+
+ public boolean isDebug() {
+ return debug;
+ }
+
+ public URL getUrl(String baseUrl) throws MalformedURLException {
+ return new UrlBuilder(baseUrl).path(getResourcePath()).toUrl();
+ }
+
+ public String getUrlString(String baseUrl) {
+ return new UrlBuilder(baseUrl).path(getResourcePath()).toString();
+ }
+
+ protected abstract String getResourcePath();
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+public enum ApplicationAction {
+ CONFIGURE, DECONFIGURE, START, STOP, RESTART, STATUS;
+
+ public String toHumanReadable() {
+ return name().toLowerCase();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import org.jboss.tools.openshift.express.client.ICartridge;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationRequest extends AbstractOpenshiftRequest {
+
+ private String name;
+ private ICartridge cartridge ;
+ private ApplicationAction action;
+
+ public ApplicationRequest(String name, ICartridge cartridge, ApplicationAction action,
String username) {
+ this(name, cartridge, action, username, false);
+ }
+
+ public ApplicationRequest(String name, ICartridge cartridge, ApplicationAction action,
String username, boolean debug) {
+ super(username, debug);
+ this.name = name;
+ this.cartridge = cartridge;
+ this.action = action;
+ }
+
+ public ApplicationAction getAction() {
+ return action;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ICartridge getCartridge() {
+ return cartridge;
+ }
+
+ @Override
+ public String getResourcePath() {
+ return "cartridge";
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import org.jboss.tools.openshift.express.client.ISSHPublicKey;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class ChangeDomainRequest extends AbstractDomainRequest {
+
+ public ChangeDomainRequest(String name, ISSHPublicKey sshKey, String username) {
+ this(name, sshKey, username, false);
+ }
+
+ public ChangeDomainRequest(String name, ISSHPublicKey sshKey, String username, boolean
debug) {
+ super(name, sshKey, username, debug);
+ }
+
+ public boolean isAlter() {
+ return true;
+ }
+
+ @Override
+ public String toHumanReadable() {
+ return "change domain to " + getName();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import org.jboss.tools.openshift.express.client.ISSHPublicKey;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class CreateDomainRequest extends AbstractDomainRequest {
+
+ public CreateDomainRequest(String name, ISSHPublicKey sshKey, ApplicationAction action,
String username) {
+ this(name, sshKey, username, false);
+ }
+
+ public CreateDomainRequest(String name, ISSHPublicKey sshKey, String username, boolean
debug) {
+ super(name, sshKey, username, debug);
+ }
+
+ public boolean isAlter() {
+ return false;
+ }
+
+ @Override
+ public String toHumanReadable() {
+ return "create domain " + getName();
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenshiftRequest {
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenshiftRequestFactory {
+
+ /**
+ * Creates an request String that may be sent to the openshift server
+ * @return
+ * @throws OpenshiftException
+ */
+ public String createString() throws OpenshiftException;
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class ListCartridgesRequest extends AbstractOpenshiftRequest {
+
+ private static final String CART_TYPE_STANDALONE = "standalone";
+
+ public ListCartridgesRequest(String username) {
+ this(username, false);
+ }
+
+ public ListCartridgesRequest(String username, boolean debug) {
+ super(username, debug);
+ }
+
+ public String getCartType() {
+ return CART_TYPE_STANDALONE;
+ }
+
+ @Override
+ protected String getResourcePath() {
+ return "cartlist";
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+
+/**
+ * A factory that creates the json string that the openshift rest service
+ * would consume.
+ *
+ * @author André Dietisheim
+ */
+public class OpenshiftEnvelopeFactory implements IOpenshiftRequestFactory {
+
+ private static final char EQ = '=';
+ private static final String PROPERTY_PASSWORD = "password";
+ private static final String PROPERTY_JSON_DATA = "json_data";
+ private static final String DATA_ENCODING = "UTF-8";
+ private static final char AMP = '&';
+
+ private String[] payloads;
+ private String password;
+
+ public OpenshiftEnvelopeFactory(String password, String... payloads) {
+ this.password = password;
+ this.payloads = payloads;
+ }
+
+ public String createString() throws OpenshiftException {
+ try {
+ StringBuilder builder = new StringBuilder();
+ appendPassword(builder);
+ builder.append(AMP);
+ appendPayload(builder);
+ return builder.toString();
+ } catch (UnsupportedEncodingException e) {
+ throw new OpenshiftException(e, "Could not create request");
+ }
+ }
+
+ private void appendPassword(StringBuilder builder) throws UnsupportedEncodingException
{
+ builder.append(PROPERTY_PASSWORD)
+ .append(EQ)
+ .append(URLEncoder.encode(password, DATA_ENCODING));
+ }
+
+ private void appendPayload(StringBuilder builder) throws UnsupportedEncodingException {
+ StringBuilder payloadBuilder = new StringBuilder();
+ for (int i = 0; i < payloads.length; i++) {
+ if (i > 0
+ && i < payloads.length + 1) {
+ payloadBuilder.append(AMP);
+ }
+ payloadBuilder.append(payloads[i]);
+ }
+
+ if (builder.length() > 0) {
+ builder
+ .append(PROPERTY_JSON_DATA)
+ .append(EQ)
+ .append(URLEncoder.encode(payloadBuilder.toString(), DATA_ENCODING));
+ }
+
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request;
+
+/**
+ * @author André Dietisheim
+ */
+public class UserInfoRequest extends AbstractOpenshiftRequest {
+
+ public UserInfoRequest(String username) {
+ this(username, false);
+ }
+
+ public UserInfoRequest(String username, boolean debug) {
+ super(username, debug);
+ }
+
+ @Override
+ protected String getResourcePath() {
+ return "userinfo";
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import
org.jboss.tools.openshift.express.internal.client.request.AbstractOpenshiftRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractJsonMarshaller<REQUEST extends
AbstractOpenshiftRequest> implements
+ IOpenshiftMarshaller<REQUEST> {
+
+ public String marshall(REQUEST request) throws OpenshiftException {
+ ModelNode node = new ModelNode();
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_RHLOGIN, request.getRhLogin(),
node);
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_DEBUG,
String.valueOf(request.isDebug()), node);
+ setJsonDataProperties(node, request);
+ return node.toJSONString(true);
+ }
+
+ protected void setJsonDataProperties(ModelNode node, REQUEST request) throws
OpenshiftException {
+ // empty default implementation
+ }
+
+ protected void setStringProperty(String propertyName, Object value, ModelNode node) {
+ if (!(value instanceof String)
+ && !isSet((String) value)) {
+ return;
+ }
+
+ setStringProperty((String) value, propertyName, node);
+ }
+
+ protected void setStringProperty(String propertyName, String value, ModelNode node) {
+ if (!isSet(value)) {
+ return;
+ }
+
+ node.get(propertyName).set(value);
+ }
+
+ protected boolean isSet(String value) {
+ return value != null
+ && value.length() > 0;
+ }
+
+ protected boolean isSet(Object value) {
+ return value != null;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,17 @@
+package org.jboss.tools.openshift.express.internal.client.request.marshalling;
+
+import org.jboss.tools.openshift.express.internal.client.request.IOpenshiftRequest;
+
+
+public abstract class AbstractOpenshiftMarshaller<REQUEST extends
IOpenshiftRequest> implements IOpenshiftMarshaller<REQUEST> {
+
+ @Override
+ public String marshall(REQUEST object) {
+ StringBuilder builder = new StringBuilder();
+ append(builder);
+ return builder.toString();
+ }
+
+ protected abstract void append(StringBuilder builder);
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import org.jboss.tools.openshift.express.internal.client.request.ApplicationAction;
+import org.jboss.tools.openshift.express.internal.client.request.ApplicationRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationRequestJsonMarshaller extends
AbstractJsonMarshaller<ApplicationRequest> {
+
+ @Override
+ protected void setJsonDataProperties(ModelNode node, ApplicationRequest request) {
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_CARTRIDGE,
getCartridgeName(request.getCartridge()), node);
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_ACTION,
getActionName(request.getAction()), node);
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_APP_NAME, request.getName(), node);
+ }
+
+ private String getCartridgeName(ICartridge cartridge) {
+ if (cartridge == null) {
+ return null;
+ }
+ return cartridge.getName();
+ }
+
+ private String getActionName(ApplicationAction action) {
+ if (action == null) {
+ return null;
+ }
+ return action.name().toLowerCase();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import org.jboss.tools.openshift.express.internal.client.request.AbstractDomainRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public class DomainRequestJsonMarshaller extends
AbstractJsonMarshaller<AbstractDomainRequest> {
+
+ @Override
+ protected void setJsonDataProperties(ModelNode node, AbstractDomainRequest request)
throws OpenshiftException {
+ node.get(IOpenshiftJsonConstants.PROPERTY_NAMESPACE).set(request.getName());
+ node.get(IOpenshiftJsonConstants.PROPERTY_ALTER).set(String.valueOf(request.isAlter()));
+ node.get(IOpenshiftJsonConstants.PROPERTY_SSH).set(request.getSshKey().getPublicKey());
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.client.request.IOpenshiftRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenshiftMarshaller<REQUEST extends IOpenshiftRequest> {
+
+ public String marshall(REQUEST object) throws OpenshiftException;
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import org.jboss.tools.openshift.express.internal.client.request.ListCartridgesRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public class ListCartridgesRequestJsonMarshaller extends
AbstractJsonMarshaller<ListCartridgesRequest> {
+
+ @Override
+ protected void setJsonDataProperties(ModelNode node, ListCartridgesRequest request) {
+ setStringProperty(IOpenshiftJsonConstants.PROPERTY_CART_TYPE, request.getCartType(),
node);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.request.marshalling;
+
+import org.jboss.tools.openshift.express.internal.client.request.UserInfoRequest;
+
+/**
+ * @author André Dietisheim
+ */
+public class UserInfoRequestJsonMarshaller extends
AbstractJsonMarshaller<UserInfoRequest> {
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class OpenshiftResponse<OPENSHIFTOBJECT> {
+
+ private boolean debug;
+ private String messages;
+ private String result;
+ private OPENSHIFTOBJECT openshiftObject;
+ private int exitCode;
+
+ public OpenshiftResponse(boolean debug, String messages, String result, OPENSHIFTOBJECT
openshiftObject, int exitCode) {
+ this.debug = debug;
+ this.messages = messages;
+ this.result = result;
+ this.openshiftObject = openshiftObject;
+ this.exitCode = exitCode;
+ }
+
+ public boolean isDebug() {
+ return debug;
+ }
+
+ public String getMessages() {
+ return messages;
+ }
+
+ public String getResult() {
+ return result;
+ }
+
+ public OPENSHIFTOBJECT getOpenshiftObject() {
+ return openshiftObject;
+ }
+
+ public int getExitCode() {
+ return exitCode;
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import java.util.Date;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.ModelType;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import org.jboss.tools.openshift.express.internal.client.response.OpenshiftResponse;
+import org.jboss.tools.openshift.express.internal.client.utils.RFC822DateUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractOpenshiftJsonResponseUnmarshaller<OPENSHIFTOBJECT> {
+
+ private String response;
+
+ public OpenshiftResponse<OPENSHIFTOBJECT> unmarshall(String response) throws
OpenshiftException {
+ try {
+ ModelNode node = ModelNode.fromJSONString(response);
+ boolean debug = node.get(IOpenshiftJsonConstants.PROPERTY_DEBUG).asBoolean();
+ String messages = getString(IOpenshiftJsonConstants.PROPERTY_MESSAGES, node);
+ String result = getString(IOpenshiftJsonConstants.PROPERTY_RESULT, node);
+ int exitCode = node.get(IOpenshiftJsonConstants.PROPERTY_EXIT_CODE).asInt();
+ OPENSHIFTOBJECT openshiftObject = createOpenshiftObject(node);
+ return new OpenshiftResponse<OPENSHIFTOBJECT>(debug, messages, result,
openshiftObject, exitCode);
+ } catch (IllegalArgumentException e) {
+ throw new OpenshiftException(e, "Could not parse response
\"{0}\"", response);
+ } catch (Exception e) {
+ throw new OpenshiftException(e, "Could not unmarshall response
\"{0}\"", response);
+ }
+ }
+
+ protected abstract OPENSHIFTOBJECT createOpenshiftObject(ModelNode responseNode) throws
Exception;
+
+ protected String getResponse() {
+ return response;
+ }
+
+ protected String getString(String property, ModelNode node) {
+ ModelNode propertyNode = node.get(property);
+ if (!isSet(propertyNode)) {
+ // replace "undefined" by null
+ return null;
+ }
+ return propertyNode.asString();
+ }
+
+ protected boolean isSet(ModelNode node) {
+ return node != null
+ && node.getType() != ModelType.UNDEFINED;
+ }
+
+ protected Date getDate(String property, ModelNode node) throws
DatatypeConfigurationException {
+ ModelNode propertyNode = node.get(property);
+ return RFC822DateUtils.getDate(propertyNode.asString());
+ }
+
+ protected long getLong(String property, ModelNode node) {
+ ModelNode propertyNode = node.get(property);
+ return propertyNode.asLong(-1);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.OpenshiftService;
+import org.jboss.tools.openshift.express.internal.client.Application;
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<Application> {
+
+ private InternalUser user;
+ private String applicationName;
+ private ICartridge cartridge;
+ private OpenshiftService service;
+
+ public ApplicationResponseUnmarshaller(String applicationName, ICartridge cartridge,
InternalUser user, OpenshiftService service) {
+ this.applicationName = applicationName;
+ this.cartridge = cartridge;
+ this.user = user;
+ this.service = service;
+ }
+
+ @Override
+ protected Application createOpenshiftObject(ModelNode node) {
+ return new Application(applicationName, cartridge, user, service);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class ApplicationStatusResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<String> {
+
+ @Override
+ protected String createOpenshiftObject(ModelNode responseNode) {
+ ModelNode resultNode = responseNode.get(IOpenshiftJsonConstants.PROPERTY_RESULT);
+ return resultNode.asString();
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.IDomain;
+import org.jboss.tools.openshift.express.client.IOpenshiftService;
+import org.jboss.tools.openshift.express.internal.client.Domain;
+import org.jboss.tools.openshift.express.internal.client.InternalUser;
+
+/**
+ * @author André Dietisheim
+ */
+public class DomainResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<IDomain> {
+
+ private String domainName;
+ private InternalUser user;
+ private IOpenshiftService service;
+
+ public DomainResponseUnmarshaller(String domainName, InternalUser user,
IOpenshiftService service) {
+ this.domainName = domainName;
+ this.user = user;
+ this.service = service;
+ }
+
+ @Override
+ protected IDomain createOpenshiftObject(ModelNode node) {
+ return new Domain(domainName, user, service);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,51 @@
+package org.jboss.tools.openshift.express.internal.client.response.unmarshalling;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ ******************************************************************************/
+
+/**
+ * @author André Dietisheim
+ */
+public class JsonSanitizer {
+
+ private static final Pattern QUOTED_JSON_OBJECT_PATTERN =
Pattern.compile("\"\\{(.+)\\}\"");
+ private static final Pattern ESCAPED_QUOTES_PATTERN =
Pattern.compile("\\\"");
+
+ public static String sanitize(String json) {
+ return correctEscapedJsonObjects(json);
+ }
+
+ /**
+ * Corrects erroneously quoted json objects in the given string.
+ * <p>
+ * corrects: "{ \"property\": \"value\" }" to {
"propery" : "value" }
+ *
+ * @param json
+ * @return
+ */
+ protected static String correctEscapedJsonObjects(String json) {
+ String sanitizedJson = json;
+ Matcher matcher = QUOTED_JSON_OBJECT_PATTERN.matcher(json);
+ if (matcher.find()
+ && matcher.groupCount() > 0) {
+ sanitizedJson = matcher.replaceAll("{" + unescapeQuotes(matcher.group(1)) +
"}");
+ }
+ return sanitizedJson;
+ }
+
+ private static String unescapeQuotes(String responseFragment) {
+ return
ESCAPED_QUOTES_PATTERN.matcher(responseFragment).replaceAll("\"");
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.Cartridge;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+
+/**
+ * WARNING: the current (9-7-2011) response from the openshift rest service is
+ * invalid. It quotes the nested json object in the data property: '"data"
:
+ * "{'. My current unmarshalling code does not handle this bad json.
+ *
+ * @author André Dietisheim
+ */
+public class ListCartridgesResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<List<ICartridge>> {
+
+ @Override
+ protected List<ICartridge> createOpenshiftObject(ModelNode responseNode) {
+ List<ICartridge> cartridges = new ArrayList<ICartridge>();
+ ModelNode dataNode = responseNode.get(IOpenshiftJsonConstants.PROPERTY_DATA);
+ if (dataNode == null) {
+ return cartridges;
+ }
+ ModelNode cartridgesNode = dataNode.get(IOpenshiftJsonConstants.PROPERTY_CARTS);
+ if (cartridgesNode == null) {
+ return cartridges;
+ }
+ for (ModelNode cartridgeNode : cartridgesNode.asList()) {
+ cartridges.add(createCartridge(cartridgeNode));
+ }
+ return cartridges;
+ }
+
+ private Cartridge createCartridge(ModelNode cartridgeNode) {
+ String name = cartridgeNode.asString();
+ return new Cartridge(name);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.response.unmarshalling;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.tools.openshift.express.client.Cartridge;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.internal.client.ApplicationInfo;
+import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
+import org.jboss.tools.openshift.express.internal.client.UserInfo;
+
+/**
+ * @author André Dietisheim
+ */
+public class UserInfoResponseUnmarshaller extends
AbstractOpenshiftJsonResponseUnmarshaller<UserInfo> {
+
+ @Override
+ protected UserInfo createOpenshiftObject(ModelNode node) throws
DatatypeConfigurationException {
+ ModelNode dataNode = node.get(IOpenshiftJsonConstants.PROPERTY_DATA);
+ if (!isSet(dataNode)) {
+ return null;
+ }
+
+ ModelNode userInfoNode = dataNode.get(IOpenshiftJsonConstants.PROPERTY_USER_INFO);
+ if (!isSet(userInfoNode)) {
+ return null;
+ }
+
+ String sshPublicKey = getString(IOpenshiftJsonConstants.PROPERTY_SSH_KEY,
userInfoNode);
+ String rhlogin = getString(IOpenshiftJsonConstants.PROPERTY_RHLOGIN, userInfoNode);
+ String uuid = getString(IOpenshiftJsonConstants.PROPERTY_UUID, userInfoNode);
+ String namespace = getString(IOpenshiftJsonConstants.PROPERTY_NAMESPACE,
userInfoNode);
+ String rhcDomain = getString(IOpenshiftJsonConstants.PROPERTY_RHC_DOMAIN,
userInfoNode);
+
+ List<ApplicationInfo> applicationInfos =
createApplicationInfos(dataNode.get(IOpenshiftJsonConstants.PROPERTY_APP_INFO));
+
+ return new UserInfo(rhlogin, uuid, sshPublicKey, rhcDomain, namespace,
applicationInfos);
+ }
+
+ private List<ApplicationInfo> createApplicationInfos(ModelNode appInfoNode) throws
DatatypeConfigurationException {
+ List<ApplicationInfo> applicationInfos = new ArrayList<ApplicationInfo>();
+ if (!isSet(appInfoNode)) {
+ return applicationInfos;
+ }
+
+ for (String name : appInfoNode.keys()) {
+ applicationInfos.add(createApplicationInfo(name, appInfoNode.get(name)));
+ }
+ return applicationInfos;
+ }
+
+ private ApplicationInfo createApplicationInfo(String name, ModelNode appNode) throws
DatatypeConfigurationException {
+ String uuid = getString(IOpenshiftJsonConstants.PROPERTY_UUID, appNode);
+ String embedded = getString(IOpenshiftJsonConstants.PROPERTY_EMBEDDED, appNode);
+ ICartridge cartrdige = new
Cartridge(getString(IOpenshiftJsonConstants.PROPERTY_FRAMEWORK, appNode));
+ Date creationTime = getDate(IOpenshiftJsonConstants.PROPERTY_CREATION_TIME, appNode);
+ return new ApplicationInfo(name, uuid, embedded, cartrdige, creationTime);
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Assert.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Assert.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Assert.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.utils;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class Assert {
+
+ public static final class AssertionFailedException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public AssertionFailedException() {
+ super();
+ }
+
+ }
+
+ public static <V> V assertNotNull(V value) {
+ if (value == null) {
+ throw new AssertionFailedException();
+ }
+ return value;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Assert.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,79 @@
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+/*
+Copyright (c) 2002-2008 ymnk, JCraft,Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+package org.jboss.tools.openshift.express.internal.client.utils;
+
+public class Base64Encoder {
+
+ private static final byte[] b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".getBytes();
+
+ public static byte[] encode(byte[] buf) {
+ return encode(buf, 0, buf.length);
+ }
+
+ public static byte[] encode(byte[] buf, int start, int length) {
+ byte[] tmp = new byte[length * 2];
+ int i, j, k;
+
+ int foo = (length / 3) * 3 + start;
+ i = 0;
+ for (j = start; j < foo; j += 3) {
+ k = (buf[j] >>> 2) & 0x3f;
+ tmp[i++] = b64[k];
+ k = (buf[j] & 0x03) << 4 | (buf[j + 1] >>> 4) & 0x0f;
+ tmp[i++] = b64[k];
+ k = (buf[j + 1] & 0x0f) << 2 | (buf[j + 2] >>> 6) & 0x03;
+ tmp[i++] = b64[k];
+ k = buf[j + 2] & 0x3f;
+ tmp[i++] = b64[k];
+ }
+
+ foo = (start + length) - foo;
+ if (foo == 1) {
+ k = (buf[j] >>> 2) & 0x3f;
+ tmp[i++] = b64[k];
+ k = ((buf[j] & 0x03) << 4) & 0x3f;
+ tmp[i++] = b64[k];
+ tmp[i++] = (byte) '=';
+ tmp[i++] = (byte) '=';
+ }
+ else if (foo == 2) {
+ k = (buf[j] >>> 2) & 0x3f;
+ tmp[i++] = b64[k];
+ k = (buf[j] & 0x03) << 4 | (buf[j + 1] >>> 4) & 0x0f;
+ tmp[i++] = b64[k];
+ k = ((buf[j + 1] & 0x0f) << 2) & 0x3f;
+ tmp[i++] = b64[k];
+ tmp[i++] = (byte) '=';
+ }
+ byte[] bar = new byte[i];
+ System.arraycopy(tmp, 0, bar, 0, i);
+ return bar;
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.utils;
+
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+
+/**
+ * @author André Dietisheim
+ */
+public class RFC822DateUtils {
+
+ public static Date getDate(String rfc822DateString) throws
DatatypeConfigurationException {
+ // SimpleDateFormat can't handle RFC822 (-04:00 instead of GMT-04:00)
+ // date formats
+ //
+ // SimpleDateFormat dateFormat = new
+ // SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
+ // return dateFormat.parse(propertyNode.asString());
+ GregorianCalendar calendar =
+ DatatypeFactory.newInstance().newXMLGregorianCalendar(rfc822DateString).toGregorianCalendar();
+ return calendar.getTime();
+ }
+
+ public static String getString(Date date) throws DatatypeConfigurationException {
+ GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance();
+ return DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar).toXMLFormat();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,96 @@
+package org.jboss.tools.openshift.express.internal.client.utils;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+public class StreamUtils {
+
+ /**
+ * Writes the content of the given input stream to the given output stream
+ * and returns and input stream that may still be used to read from.
+ *
+ * @param outputStream
+ * the output stream to write to
+ * @param inputStream
+ * the input stream to read from
+ * @return a new, unread input stream
+ * @throws IOException
+ */
+ public static InputStream writeTo(InputStream inputStream, OutputStream outputStream)
throws IOException {
+ List<Byte> data = new ArrayList<Byte>();
+ for (int character = -1; (character = inputStream.read()) != -1;) {
+ data.add((byte) character);
+ outputStream.write(character);
+ }
+ byte[] byteArray = new byte[data.size()];
+ for (int i = byteArray.length - 1; i >= 0; i--) {
+ byteArray[i] = data.get(i);
+ }
+ return new ByteArrayInputStream(byteArray);
+ }
+
+ public static String readToString(InputStream inputStream) throws IOException {
+ return readToString(new InputStreamReader(inputStream));
+ }
+
+ public static String readToString(Reader reader) throws IOException {
+ BufferedReader bufferedReader = new BufferedReader(reader);
+ StringWriter writer = new StringWriter();
+ String line = null;
+ while ((line = bufferedReader.readLine()) != null) {
+ writer.write(line);
+ }
+ return writer.toString();
+ }
+
+ /**
+ * Writes the given string to the given output stream. The stream is closed
+ * after writing all data.
+ *
+ * @param data
+ * the data to write
+ * @param outputStream
+ * the stream to write to
+ * @throws IOException
+ */
+ public static void writeTo(byte[] data, OutputStream outputStream) throws IOException {
+ outputStream.write(data);
+ outputStream.flush();
+ outputStream.close();
+ }
+
+ public static void close(InputStream inputStream) throws IOException {
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ }
+
+ public static void close(OutputStream outputStream) throws IOException {
+ if (outputStream != null) {
+ outputStream.close();
+ }
+ }
+
+ public static void close(Reader reader) throws IOException {
+ if (reader != null) {
+ reader.close();
+ }
+ }
+
+ public static void close(Writer writer) throws IOException {
+ if (writer != null) {
+ writer.close();
+ }
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.client.utils;
+
+
+/**
+ * @author André Dietisheim
+ */
+public class StringUtils {
+
+ public static String toLowerCase(String message) {
+ if (message == null) {
+ return null;
+ }
+ return message.toLowerCase();
+ }
+
+ public static String toLowerCase(Enum<?> aEnum) {
+ if (aEnum == null) {
+ return null;
+ }
+ return toLowerCase(aEnum.name());
+ }
+
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.java 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,133 @@
+package org.jboss.tools.openshift.express.internal.client.utils;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.Collection;
+
+/**
+ * A builder for an url. Currently no state checking is done, the InternalUser is
+ * responsible to build something that makes sense.
+ *
+ * @author André Dietisheim
+ */
+public class UrlBuilder {
+ private static final String URL_ENCODING = "UTF-8";
+ private static final String HOST_PROTOCOL_DELIMITER = ":";
+ private static final String HTTP_PROTOCOL_PREFIX = "http://";
+ private static final char PARAMETER_URL_DELIMITER = '?';
+ private static final char PARAMETER_DELIMITER = '&';
+ private static final char PARAMETER_NAME_VALUE_DELIMITER = '=';
+ private static final char PATH_SEPARATOR = '/';
+
+ private StringBuilder urlStringBuilder = new StringBuilder();
+
+ private boolean parametersAdded = false;
+
+ public UrlBuilder() {
+ }
+
+ public UrlBuilder(String baseUrl) {
+ urlStringBuilder.append(baseUrl);
+ }
+
+ public UrlBuilder(URL baseUrl) {
+ urlStringBuilder.append(baseUrl.toString());
+ }
+
+ /**
+ * adds a host to .
+ *
+ * @param host
+ * the host
+ *
+ * @return the url builder
+ */
+ public UrlBuilder host(String host) {
+ urlStringBuilder.append(HTTP_PROTOCOL_PREFIX);
+ urlStringBuilder.append(host);
+ return this;
+ }
+
+ /**
+ * Adds a port.
+ *
+ * @param port
+ * the port
+ *
+ * @return the url builder
+ */
+ public UrlBuilder port(String port) {
+ urlStringBuilder.append(HOST_PROTOCOL_DELIMITER);
+ urlStringBuilder.append(port);
+ return this;
+ }
+
+ /**
+ * adds a path to the url.
+ *
+ * @param path
+ * the path
+ *
+ * @return the url builder
+ */
+ public UrlBuilder path(String path) {
+ urlStringBuilder.append(PATH_SEPARATOR);
+ urlStringBuilder.append(path);
+ return this;
+ }
+
+ public UrlBuilder path(Collection<String> paths) {
+ for (String path : paths) {
+ path(path);
+ }
+ return this;
+ }
+
+ public UrlBuilder parameter(String name, String value) {
+ if (value != null) {
+ appendParameterDelimiter();
+ urlStringBuilder.append(name).append(PARAMETER_NAME_VALUE_DELIMITER).append(urlEncode(value));
+ }
+ return this;
+ }
+
+ private void appendParameterDelimiter() {
+ if (!parametersAdded) {
+ urlStringBuilder.append(PARAMETER_URL_DELIMITER);
+ parametersAdded = true;
+ } else {
+ urlStringBuilder.append(PARAMETER_DELIMITER);
+ }
+ }
+
+ public UrlBuilder parameters(String... parameters) {
+ for (String parameter : parameters) {
+ parameter(parameter);
+ }
+ return this;
+ }
+
+ public UrlBuilder parameter(String parameter) {
+ appendParameterDelimiter();
+ urlStringBuilder.append(urlEncode(parameter));
+ return this;
+ }
+
+ private String urlEncode(String value) {
+ try {
+ return URLEncoder.encode(value, URL_ENCODING);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public URL toUrl() throws MalformedURLException {
+ return new URL(urlStringBuilder.toString());
+ }
+
+ public String toString() {
+ return urlStringBuilder.toString();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/target/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/target/MANIFEST.MF
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/MANIFEST.MF 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Export-Package: org.jboss.dmr;x-friends:="org.jboss.ide.eclipse.as.ope
+ nshift.test",org.jboss.tools.openshift.express.client,org.jboss.tools
+ .openshift.express.internal.client;x-friends:="org.jboss.ide.eclipse.
+ as.openshift.test",org.jboss.tools.openshift.express.internal.client.
+ request;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jbos
+ s.tools.openshift.express.internal.client.request.marshalling;x-frien
+ ds:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshi
+ ft.express.internal.client.response;x-friends:="org.jboss.ide.eclipse
+ .as.openshift.test",org.jboss.tools.openshift.express.internal.client
+ .response.unmarshalling;x-friends:="org.jboss.ide.eclipse.as.openshif
+ t.test",org.jboss.tools.openshift.express.internal.client.utils;x-fri
+ ends:="org.jboss.ide.eclipse.as.openshift.test"
+Require-Bundle: org.eclipse.core.runtime,com.jcraft.jsch;bundle-versio
+ n="[0.1.41,2.0.0)"
+Bundle-Vendor: JBoss by Red Hat
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: jboss-dmr-1.0.0.Final.jar,.
+Bundle-Version: 2.3.0.v20111005-1239-M4
+Bundle-Name: Openshift Core Plugin
+Bundle-Activator: org.jboss.tools.openshift.express.internal.client.Op
+ enshiftCoreActivator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.tools.openshift.express.client
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ApplicationLogReader.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ApplicationLogReader.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/Cartridge.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/Cartridge.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IApplication.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IApplication.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ICartridge.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ICartridge.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IDomain.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IDomain.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IHttpClient.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IHttpClient.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IOpenshiftService.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IOpenshiftService.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ISSHPublicKey.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/ISSHPublicKey.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IUser.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/IUser.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/InvalidCredentialsOpenshiftException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/NotFoundOpenshiftException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftEndpointException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftService.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/OpenshiftService.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHKeyPair.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHKeyPair.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHPublicKey.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/SSHPublicKey.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/User.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/User.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/UserConfiguration.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/client/UserConfiguration.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Application.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Application.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/ApplicationInfo.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Domain.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/Domain.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/IOpenshiftJsonConstants.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/InternalUser.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/InternalUser.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/OpenshiftCoreActivator.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfo.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfo.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfoAware.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/UserInfoAware.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/BadRequestException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/HttpClientException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/InternalServerErrorException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/NotFoundException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UnauthorizedException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/httpclient/UrlConnectionHttpClient.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractDomainRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/AbstractOpenshiftRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationAction.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ApplicationRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ChangeDomainRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/CreateDomainRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/IOpenshiftRequestFactory.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/ListCartridgesRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/OpenshiftEnvelopeFactory.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/UserInfoRequest.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractJsonMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/AbstractOpenshiftMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ApplicationRequestJsonMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/DomainRequestJsonMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/IOpenshiftMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/ListCartridgesRequestJsonMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/request/marshalling/UserInfoRequestJsonMarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/OpenshiftResponse.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ApplicationStatusResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/DomainResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/JsonSanitizer.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/ListCartridgesResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/UserInfoResponseUnmarshaller.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert$AssertionFailedException.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert$AssertionFailedException.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Assert.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/Base64Encoder.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StreamUtils.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/StringUtils.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/classes/org/jboss/tools/openshift/express/internal/client/utils/UrlBuilder.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/local-artifacts.properties
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/local-artifacts.properties
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/local-artifacts.properties 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,5 @@
+#Wed Oct 05 12:39:13 CEST 2011
+artifact.attached.p2metadata=/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml
+artifact.main=/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
+artifact.attached.sources=/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT-sources.jar
+artifact.attached.p2artifacts=/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/local-artifacts.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/pom.properties
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/pom.properties
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/pom.properties 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Wed Oct 05 12:39:13 CEST 2011
+version=2.3.0-SNAPSHOT
+groupId=org.jboss.tools.as.plugins
+artifactId=org.jboss.tools.openshift.express.client
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/maven-archiver/pom.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<artifacts size='2'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.tools.openshift.express.client'
version='2.3.0.v20111005-1239-M4'>
+ <properties size='6'>
+ <property name='artifact.size' value='156891'/>
+ <property name='download.size' value='156891'/>
+ <property name='download.md5'
value='869f8065a6537aeaf1079413baffdcea'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.tools.openshift.express.client'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle'
id='org.jboss.tools.openshift.express.client.source'
version='2.3.0.v20111005-1239-M4'>
+ <properties size='7'>
+ <property name='artifact.size' value='59659'/>
+ <property name='download.size' value='59659'/>
+ <property name='download.md5'
value='940dd8c22e7b6a2cd34dc07a09a16728'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.tools.openshift.express.client'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ <property name='maven-classifier' value='sources'/>
+ </properties>
+ </artifact>
+</artifacts>
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2artifacts.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml 2011-10-05
11:00:47 UTC (rev 35354)
@@ -0,0 +1,66 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<units size='2'>
+ <unit id='org.jboss.tools.openshift.express.client'
version='2.3.0.v20111005-1239-M4' singleton='false'>
+ <update id='org.jboss.tools.openshift.express.client'
range='[0.0.0,2.3.0.v20111005-1239-M4)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='Openshift Core
Plugin'/>
+ <property name='org.eclipse.equinox.p2.provider' value='JBoss by Red
Hat'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.tools.openshift.express.client'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ </properties>
+ <provides size='11'>
+ <provided namespace='org.eclipse.equinox.p2.iu'
name='org.jboss.tools.openshift.express.client'
version='2.3.0.v20111005-1239-M4'/>
+ <provided namespace='osgi.bundle'
name='org.jboss.tools.openshift.express.client'
version='2.3.0.v20111005-1239-M4'/>
+ <provided namespace='java.package' name='org.jboss.dmr'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.client' version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client.request'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client.request.marshalling'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client.response'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client.response.unmarshalling'
version='0.0.0'/>
+ <provided namespace='java.package'
name='org.jboss.tools.openshift.express.internal.client.utils'
version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='osgi.bundle'
name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='com.jcraft.jsch'
range='[0.1.41,2.0.0)'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.tools.openshift.express.client'
version='2.3.0.v20111005-1239-M4'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2
Created-By: Apache
Maven
Archiver-Version: Plexus Archiver
Manifest-Version:
1.0
Bundle-Name: Openshift Core Plugin
Bundle-Vendor: JBoss by Red
Hat
Bundle-ActivationPolicy: lazy
Bundle-ClassPath:
jboss-dmr-1.0.0.Final.jar,.
Build-Jdk: 1.6.0_24
Bundle-Version:
2.3.0.v20111005-1239-M4
Export-Package:
org.jboss.dmr;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshift.express.client,org.jboss.tools.openshift.express.internal.client;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshift.express.internal.client.request;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshift.express.internal.client.request.marshalling;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshift.express.internal.client.response;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.j!
boss.tools.openshift.express.internal.client.response.unmarshalling;x-friends:="org.jboss.ide.eclipse.as.openshift.test",org.jboss.tools.openshift.express.internal.client.utils;x-friends:="org.jboss.ide.eclipse.as.openshift.test"
Require-Bundle:
org.eclipse.core.runtime,com.jcraft.jsch;bundle-version="[0.1.41,2.0.0)"
Bundle-Activator:
org.jboss.tools.openshift.express.internal.client.OpenshiftCoreActivator
Bundle-SymbolicName:
org.jboss.tools.openshift.express.client
Built-By:
adietish
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.jboss.tools.openshift.express.client.source'
version='2.3.0.v20111005-1239-M4' singleton='false'>
+ <update id='org.jboss.tools.openshift.express.client.source'
range='[0.0.0,2.3.0.v20111005-1239-M4)' severity='0'/>
+ <properties size='4'>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.tools.openshift.express.client'/>
+ <property name='maven-version' value='2.3.0-SNAPSHOT'/>
+ <property name='maven-classifier' value='sources'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu'
name='org.jboss.tools.openshift.express.client.source'
version='2.3.0.v20111005-1239-M4'/>
+ <provided namespace='osgi.bundle'
name='org.jboss.tools.openshift.express.client.source'
version='2.3.0.v20111005-1239-M4'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='source' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.tools.openshift.express.client.source'
version='2.3.0.v20111005-1239-M4'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2
Built-By: adietish
Bundle-Version:
2.3.0.v20111005-1239-M4
Build-Jdk: 1.6.0_24
Eclipse-SourceBundle:
org.jboss.tools.openshift.express.client;version="2.3.0.v20111005-1239-M4";roots:="."
Created-By:
Apache Maven
Bundle-SymbolicName:
org.jboss.tools.openshift.express.client.source
Manifest-Version:
1.0
Archiver-Version: Plexus Archiver

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+</units>
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/target/p2content.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain