Cleaning up pom files, removing unused features from p2 profile, removing unused components in Stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/028c3539 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/028c3539 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/028c3539 Branch: refs/heads/master Commit: 028c3539f64c13f0609f4ca5b09c09cc4a7aa08d Parents: bef7f66 Author: Akila Perera <[email protected]> Authored: Sun Aug 23 23:09:20 2015 +0530 Committer: Akila Perera <[email protected]> Committed: Sun Aug 23 23:09:20 2015 +0530 ---------------------------------------------------------------------- .../org.apache.stratos.autoscaler/pom.xml | 31 +- .../org.apache.stratos.cartridge.agent/pom.xml | 9 +- components/org.apache.stratos.cli/pom.xml | 15 +- .../org.apache.stratos.cloud.controller/pom.xml | 162 +--- components/org.apache.stratos.common/pom.xml | 14 +- .../org.apache.stratos.custom.handlers/pom.xml | 22 +- .../org.apache.stratos.deployment/pom.xml | 97 -- .../deployment/CloudDeploymentInterceptor.java | 92 -- .../deployment/SuperTenantRolePlayer.java | 46 - .../CloudDeploymentServiceComponent.java | 74 -- .../stratos/deployment/internal/DataHolder.java | 46 - .../org.apache.stratos.email.sender/pom.xml | 88 -- .../email/sender/api/BulkEmailSender.java | 103 --- .../email/sender/api/EmailDataHolder.java | 47 - .../stratos/email/sender/api/EmailSender.java | 111 --- .../sender/api/EmailSenderConfiguration.java | 134 --- .../internal/EmailSenderServiceComponent.java | 83 -- .../apache/stratos/email/sender/util/Util.java | 106 --- .../pom.xml | 10 +- .../pom.xml | 14 +- .../pom.xml | 17 +- .../org.apache.stratos.load.balancer/pom.xml | 17 +- .../org.apache.stratos.logging.view.ui/pom.xml | 81 -- .../logging/view/ui/LogViewerClient.java | 272 ------ .../src/main/resources/META-INF/component.xml | 49 - .../logging/view/ui/i18n/Resources.properties | 66 -- .../web/log-view/application_log_viewer.jsp | 376 -------- .../web/log-view/cassandra_log_viewer.jsp | 482 ---------- .../web/log-view/docs/images/application.jpg | Bin 83936 -> 0 bytes .../resources/web/log-view/docs/images/log.jpg | Bin 1575250 -> 0 bytes .../web/log-view/docs/images/logIndex.jpg | Bin 35191 -> 0 bytes .../web/log-view/docs/images/logview.jpg | Bin 104153 -> 0 bytes .../resources/web/log-view/docs/userguide.html | 90 -- .../web/log-view/download-ajaxprocessor.jsp | 88 -- .../web/log-view/downloadgz-ajaxprocessor.jsp | 69 -- .../resources/web/log-view/images/cancel.gif | Bin 1032 -> 0 bytes .../resources/web/log-view/images/collapse.gif | Bin 102 -> 0 bytes .../resources/web/log-view/images/debug.png | Bin 775 -> 0 bytes .../resources/web/log-view/images/download.gif | Bin 146 -> 0 bytes .../resources/web/log-view/images/error.png | Bin 778 -> 0 bytes .../resources/web/log-view/images/expand.gif | Bin 102 -> 0 bytes .../resources/web/log-view/images/fatal.png | Bin 670 -> 0 bytes .../web/log-view/images/information.gif | Bin 1025 -> 0 bytes .../resources/web/log-view/images/magnifier.gif | Bin 578 -> 0 bytes .../resources/web/log-view/images/minus.gif | Bin 896 -> 0 bytes .../main/resources/web/log-view/images/plus.gif | Bin 905 -> 0 bytes .../web/log-view/images/script_gear.gif | Bin 1082 -> 0 bytes .../resources/web/log-view/images/search.gif | Bin 578 -> 0 bytes .../resources/web/log-view/images/trace.png | Bin 900 -> 0 bytes .../main/resources/web/log-view/images/view.gif | Bin 596 -> 0 bytes .../main/resources/web/log-view/images/warn.png | Bin 741 -> 0 bytes .../src/main/resources/web/log-view/index.jsp | 671 -------------- .../main/resources/web/log-view/index_old.jsp | 204 ----- .../main/resources/web/log-view/js/logviewer.js | 912 ------------------- .../resources/web/log-view/syslog_index.jsp | 372 -------- .../src/main/resources/web/log-view/view.jsp | 314 ------- .../org.apache.stratos.manager.styles/pom.xml | 23 +- components/org.apache.stratos.manager/pom.xml | 12 +- components/org.apache.stratos.messaging/pom.xml | 15 +- .../org.apache.stratos.metadata.client/pom.xml | 9 +- .../org.apache.stratos.metadata.service/pom.xml | 24 +- .../org.apache.stratos.mock.iaas.api/pom.xml | 17 +- .../org.apache.stratos.mock.iaas.client/pom.xml | 13 +- components/org.apache.stratos.mock.iaas/pom.xml | 17 +- .../pom.xml | 20 +- .../org.apache.stratos.rest.endpoint/pom.xml | 17 +- .../pom.xml | 77 -- .../ui/internal/RedirectorJSPFilter.java | 60 -- .../internal/SSORedirectorServiceComponent.java | 66 -- .../sso/redirector/ui/i18n/Resources.properties | 53 -- .../web/stratos-auth/css/stratos-loginpage.css | 115 --- .../images/cloud-identity-sso-config-ok.png | Bin 38465 -> 0 bytes .../images/cloud-identity-sso-config.png | Bin 32929 -> 0 bytes .../stratos-auth/images/cloud-sso-config.png | Bin 29222 -> 0 bytes .../web/stratos-auth/images/delete.gif | Bin 555 -> 0 bytes .../web/stratos-auth/images/import.gif | Bin 1051 -> 0 bytes .../web/stratos-auth/images/loading.gif | Bin 14367 -> 0 bytes .../resources/web/stratos-auth/images/logo.gif | Bin 17603 -> 0 bytes .../web/stratos-auth/images/policy.gif | Bin 1017 -> 0 bytes .../web/stratos-auth/images/powered.gif | Bin 1773 -> 0 bytes .../web/stratos-auth/images/register.gif | Bin 4099 -> 0 bytes .../resources/web/stratos-auth/images/sso.gif | Bin 394 -> 0 bytes .../stratos-auth/images/st-login-body-bg.gif | Bin 2215 -> 0 bytes .../stratos-auth/images/st-login-content-bg.gif | Bin 1060 -> 0 bytes .../stratos-auth/images/st-login-footer-bg.gif | Bin 749 -> 0 bytes .../stratos-auth/images/st-login-header-bg.gif | Bin 64503 -> 0 bytes .../web/stratos-auth/redirect_ajaxprocessor.jsp | 177 ---- .../org.apache.stratos.tenant.activity/pom.xml | 138 --- .../activity/beans/PaginatedTenantDataBean.java | 57 -- .../tenant/activity/beans/TenantDataBean.java | 97 -- .../GetActiveTenantsInMemberRequest.java | 59 -- .../GetActiveTenantsInMemberResponse.java | 54 -- .../TenantActivityServiceComponent.java | 95 -- .../services/TenantActivityService.java | 84 -- .../activity/util/TenantActivityUtil.java | 79 -- .../stratos/tenant/activity/util/Util.java | 82 -- .../src/main/resources/META-INF/component.xml | 39 - .../src/main/resources/META-INF/services.xml | 44 - components/pom.xml | 198 +--- dependencies/fabric8/kubernetes-api/pom.xml | 10 +- dependencies/fabric8/pom.xml | 16 +- dependencies/guice-assistedinject/pom.xml | 5 +- dependencies/guice-multibindings/pom.xml | 5 +- dependencies/guice/pom.xml | 6 +- dependencies/jclouds/aws-ec2/pom.xml | 2 +- dependencies/jclouds/cloudstack/pom.xml | 3 +- dependencies/jclouds/ec2/pom.xml | 5 +- .../google-cloud-storage/pom.xml | 5 +- .../google-compute-engine/pom.xml | 5 +- .../google-jclouds-labs/googlecloud/pom.xml | 5 +- .../jclouds/google-jclouds-labs/oauth/pom.xml | 5 +- .../jclouds/google-jclouds-labs/pom.xml | 2 +- dependencies/jclouds/jclouds-blobstore/pom.xml | 5 +- .../jclouds/jclouds-bouncycastle/pom.xml | 3 +- dependencies/jclouds/jclouds-compute/pom.xml | 3 +- dependencies/jclouds/jclouds-core/pom.xml | 3 +- dependencies/jclouds/jclouds-enterprise/pom.xml | 3 +- dependencies/jclouds/jclouds-joda/pom.xml | 3 +- dependencies/jclouds/jclouds-netty/pom.xml | 3 +- dependencies/jclouds/jclouds-sshj/pom.xml | 3 +- dependencies/jclouds/openstack-common/pom.xml | 3 +- dependencies/jclouds/openstack-keystone/pom.xml | 3 +- dependencies/jclouds/openstack-neutron/pom.xml | 3 +- dependencies/jclouds/openstack-nova/pom.xml | 3 +- dependencies/jclouds/pom.xml | 3 +- dependencies/jclouds/sts/pom.xml | 3 +- dependencies/org.wso2.carbon.ui/pom.xml | 5 +- dependencies/pom.xml | 5 +- dependencies/rocoto/pom.xml | 5 +- dependencies/sshj/pom.xml | 5 +- extensions/cep/distribution/pom.xml | 14 +- .../cep/distribution/src/assembly/bin.xml | 19 +- extensions/cep/stratos-cep-extension/pom.xml | 14 +- .../load-balancer/haproxy-extension/pom.xml | 7 +- extensions/load-balancer/lvs-extension/pom.xml | 7 +- .../load-balancer/nginx-extension/pom.xml | 7 +- extensions/load-balancer/pom.xml | 10 +- extensions/pom.xml | 10 +- .../pom.xml | 32 +- features/autoscaler/pom.xml | 9 +- .../pom.xml | 15 +- .../pom.xml | 50 +- features/cep/pom.xml | 15 +- .../pom.xml | 6 +- features/cloud-controller/pom.xml | 12 +- .../org.apache.stratos.common.feature/pom.xml | 25 +- .../pom.xml | 137 +-- .../pom.xml | 116 --- .../pom.xml | 48 +- features/common/pom.xml | 10 +- .../pom.xml | 28 +- .../pom.xml | 39 +- features/load-balancer/pom.xml | 13 +- features/manager/deployment/pom.xml | 72 -- .../pom.xml | 109 --- features/manager/logging-mgt/pom.xml | 139 --- .../pom.xml | 45 +- .../pom.xml | 46 +- features/manager/pom.xml | 102 +-- .../pom.xml | 8 +- .../org.apache.stratos.manager.feature/pom.xml | 29 +- .../pom.xml | 67 +- features/manager/stratos-mgt/pom.xml | 13 +- .../pom.xml | 30 +- .../pom.xml | 97 -- features/manager/tenant-activity/pom.xml | 35 - .../pom.xml | 26 +- features/messaging/pom.xml | 9 +- .../pom.xml | 8 +- features/mock-iaas/pom.xml | 7 +- features/pom.xml | 15 - pom.xml | 235 ++++- .../modules/distribution/pom.xml | 58 +- .../distribution/src/main/assembly/bin.xml | 26 +- products/cartridge-agent/pom.xml | 10 +- .../load-balancer/modules/distribution/pom.xml | 436 +-------- .../distribution/src/main/assembly/bin.xml | 47 +- .../modules/p2-profile-gen/pom.xml | 423 +++++++++ .../load-balancer/modules/p2-profile/pom.xml | 451 --------- products/load-balancer/pom.xml | 75 +- products/pom.xml | 9 +- .../python-cartridge-agent/distribution/pom.xml | 47 +- products/python-cartridge-agent/pom.xml | 7 +- products/stratos-cli/distribution/pom.xml | 24 +- .../distribution/src/main/assembly/bin.xml | 2 +- products/stratos-cli/pom.xml | 16 +- products/stratos/modules/distribution/pom.xml | 451 +-------- .../modules/distribution/src/assembly/bin.xml | 224 ++--- products/stratos/modules/integration/pom.xml | 16 +- products/stratos/modules/p2-profile-gen/pom.xml | 85 +- products/stratos/pom.xml | 258 +----- .../pom.xml | 11 +- .../pom.xml | 13 +- .../pom.xml | 35 +- service-stubs/pom.xml | 72 +- tools/pom.xml | 37 - 196 files changed, 1348 insertions(+), 10483 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.autoscaler/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/pom.xml b/components/org.apache.stratos.autoscaler/pom.xml index 3c927bd..5faa872 100644 --- a/components/org.apache.stratos.autoscaler/pom.xml +++ b/components/org.apache.stratos.autoscaler/pom.xml @@ -17,31 +17,27 @@ specific language governing permissions and limitations under the License. --> - <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/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.autoscaler</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Autoscaler</name> <description>Autoscaler components</description> - <url>http://apache.org</url> <dependencies> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.registry.core</artifactId> - <version>${carbon.platform.version}</version> + <version>${carbon.kernel.version}</version> <scope>provided</scope> </dependency> - <dependency> <groupId>org.drools</groupId> <artifactId>drools-core</artifactId> @@ -102,16 +98,6 @@ <artifactId>mvel2</artifactId> <version>2.1.3.Final</version> </dependency> - <!--dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.6.4</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.6.4</version> - </dependency--> <dependency> <groupId>org.drools</groupId> <artifactId>drools-verifier</artifactId> @@ -162,7 +148,7 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.utils</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> <scope>provided</scope> </dependency> <dependency> @@ -175,7 +161,7 @@ <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.ntask.core</artifactId> <scope>provided</scope> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.apache.stratos</groupId> @@ -195,7 +181,7 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.identity.application.mgt.stub</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>com.nimbusds.wso2</groupId> @@ -213,7 +199,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> <configuration> <instructions> @@ -223,7 +208,6 @@ <Export-Package>!org.apache.stratos.autoscaler.internal.*,org.apache.stratos.autoscaler.* </Export-Package> <Import-Package> - org.osgi.framework.*;resolution:=optional, org.apache.stratos.common.services.*; version="${project.version}", *;resolution:=optional </Import-Package> @@ -260,7 +244,4 @@ </resource> </resources> </build> - <properties> - <drools.version>5.5.0.Final</drools.version> - </properties> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.cartridge.agent/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cartridge.agent/pom.xml b/components/org.apache.stratos.cartridge.agent/pom.xml index 256c6bc..3bb7b6e 100644 --- a/components/org.apache.stratos.cartridge.agent/pom.xml +++ b/components/org.apache.stratos.cartridge.agent/pom.xml @@ -19,14 +19,13 @@ --> <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/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.cartridge.agent</artifactId> <packaging>jar</packaging> <name>Apache Stratos - Cartridge Agent</name> @@ -105,12 +104,12 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.utils</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> </dependencies> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.cli/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cli/pom.xml b/components/org.apache.stratos.cli/pom.xml index b66e7c3..0fa0821 100644 --- a/components/org.apache.stratos.cli/pom.xml +++ b/components/org.apache.stratos.cli/pom.xml @@ -19,24 +19,17 @@ --> <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/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.cli</artifactId> <packaging>jar</packaging> <name>Apache Stratos - CLI</name> <description>Apache Stratos CLI</description> - <url>http://apache.org</url> - - <properties> - <slf4j.version>1.7.6</slf4j.version> - <wiremock.version>1.46</wiremock.version> - </properties> <dependencies> <!-- Adding HttpClient dependencies. Those were resolved with above one --> @@ -118,7 +111,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>2.7</version> <executions> <execution> <id>copy</id> @@ -161,8 +153,8 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> <executions> <execution> <phase>pre-integration-test</phase> @@ -187,7 +179,6 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.3</version> <executions> <execution> <configuration> @@ -276,4 +267,4 @@ </build> </profile> </profiles> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.cloud.controller/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cloud.controller/pom.xml b/components/org.apache.stratos.cloud.controller/pom.xml index 02ef8f9..db2114e 100644 --- a/components/org.apache.stratos.cloud.controller/pom.xml +++ b/components/org.apache.stratos.cloud.controller/pom.xml @@ -19,17 +19,16 @@ --> <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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.cloud.controller</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Cloud Controller</name> - <url>http://apache.org</url> <build> <plugins> @@ -40,7 +39,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> <extensions>true</extensions> <configuration> <instructions> @@ -98,12 +96,12 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.core</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.utils</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.apache.stratos</groupId> @@ -121,61 +119,46 @@ <version>${project.version}</version> </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>16.0.1</version> - </dependency> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch.agentproxy.jsch</artifactId> - <version>0.0.8</version> - </dependency> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch.agentproxy.core</artifactId> - <version>0.0.8</version> + <groupId>org.wso2.carbon</groupId> + <artifactId>org.wso2.carbon.securevault</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch.agentproxy.connector-factory</artifactId> - <version>0.0.8</version> + <groupId>org.wso2.carbon</groupId> + <artifactId>org.wso2.carbon.analytics.hive.stub</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> - <groupId>org.reflections</groupId> - <artifactId>reflections</artifactId> - <version>0.9.9-RC1</version> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>${gson.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.securevault</artifactId> - <version>${wso2carbon.version}</version> + <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> - <groupId>org.hectorclient.wso2</groupId> - <artifactId>hector-core</artifactId> - <version>1.1.0.wso2v1</version> - <exclusions> - <exclusion> - <groupId>com.google.guava.wso2</groupId> - <artifactId>guava</artifactId> - </exclusion> - </exclusions> + <groupId>org.apache.stratos</groupId> + <artifactId>org.apache.stratos.metadata.client</artifactId> + <version>${project.version}</version> </dependency> <dependency> - <groupId>org.wso2.andes.wso2</groupId> - <artifactId>andes-client</artifactId> - <version>0.13.wso2v3</version> + <groupId>org.apache.stratos</groupId> + <artifactId>org.apache.stratos.mock.iaas.client</artifactId> + <version>${project.version}</version> </dependency> <dependency> - <groupId>org.apache.geronimo.specs.wso2</groupId> - <artifactId>geronimo-jms_1.1_spec</artifactId> - <version>${orbit.version.geronimo-jms_1.1_spec}</version> + <groupId>org.apache.stratos</groupId> + <artifactId>kubernetes-api</artifactId> + <version>${kubernetes.api.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.analytics.hive.stub</artifactId> - <version>${wso2carbon.version}</version> + <artifactId>org.wso2.carbon.ntask.core</artifactId> + <version>${carbon.kernel.version}</version> </dependency> + <!-- jclouds dependencies --> <dependency> <groupId>org.apache.jclouds.api</groupId> @@ -194,27 +177,6 @@ </dependency> <dependency> <groupId>org.apache.jclouds.driver</groupId> - <artifactId>jclouds-bouncycastle</artifactId> - <version>${jclouds.version}</version> - <exclusions> - <exclusion> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk16</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.jclouds.driver</groupId> - <artifactId>jclouds-sshj</artifactId> - <version>${jclouds.version}</version> - </dependency> - <dependency> - <groupId>org.apache.jclouds.driver</groupId> - <artifactId>jclouds-log4j</artifactId> - <version>${jclouds.version}</version> - </dependency> - <dependency> - <groupId>org.apache.jclouds.driver</groupId> <artifactId>jclouds-enterprise</artifactId> <version>${jclouds.version}</version> </dependency> @@ -254,73 +216,19 @@ <version>${jclouds.version}</version> </dependency> <dependency> - <groupId>com.jamesmurty.utils.wso2</groupId> - <artifactId>java-xmlbuilder</artifactId> - <version>0.4.wso2v1</version> - </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>${gson.version}</version> - </dependency> - <dependency> - <groupId>com.google.guice.wso2</groupId> - <artifactId>guice</artifactId> - <version>${google.guice.wso2.version}</version> - </dependency> - <dependency> - <groupId>com.google.guice.assistedinject.wso2</groupId> - <artifactId>guice-assistedinject</artifactId> - <version>${com.google.guice.assistedinject.wso2.version}</version> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> - <version>${sun.jersey.version}</version> - </dependency> - <dependency> - <groupId>net.oauth.core</groupId> - <artifactId>oauth</artifactId> - <version>20100527</version> - </dependency> - <dependency> - <groupId>commons-io.wso2</groupId> - <artifactId>commons-io</artifactId> - <version>2.0.0.wso2v1</version> - </dependency> - <dependency> - <groupId>rhino.wso2</groupId> - <artifactId>js</artifactId> - <version>1.7.0.R1-wso2v3</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.ntask.core</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>org.apache.stratos.metadata.client</artifactId> - <version>${project.version}</version> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-log4j</artifactId> + <version>${jclouds.version}</version> </dependency> <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>org.apache.stratos.mock.iaas.client</artifactId> - <version>${project.version}</version> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-slf4j</artifactId> + <version>${jclouds.version}</version> </dependency> <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>kubernetes-api</artifactId> - <version>${project.version}</version> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-sshj</artifactId> + <version>${jclouds.version}</version> </dependency> </dependencies> - <properties> - <com.google.guice.assistedinject.wso2.version>3.0.wso2v1</com.google.guice.assistedinject.wso2.version> - <sun.jersey.version>1.12</sun.jersey.version> - </properties> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.common/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.common/pom.xml b/components/org.apache.stratos.common/pom.xml index 2d6d547..1371b4e 100644 --- a/components/org.apache.stratos.common/pom.xml +++ b/components/org.apache.stratos.common/pom.xml @@ -18,19 +18,18 @@ --> <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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.common</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Common</name> <build> - <plugins> <plugin> <groupId>org.apache.felix</groupId> @@ -39,7 +38,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> <configuration> <instructions> @@ -72,14 +70,17 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.registry.core</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.user.core</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.user.mgt</artifactId> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.apache.stratos</groupId> @@ -99,12 +100,13 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> + <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.databridge.commons</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>commons-lang.wso2</groupId> @@ -124,7 +126,7 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> </dependencies> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.custom.handlers/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.custom.handlers/pom.xml b/components/org.apache.stratos.custom.handlers/pom.xml index 5102ec1..9d914d1 100644 --- a/components/org.apache.stratos.custom.handlers/pom.xml +++ b/components/org.apache.stratos.custom.handlers/pom.xml @@ -16,21 +16,20 @@ ~ specific language governing permissions and limitations ~ under the License. --> -<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://maven.apache.org/POM/4.0.0" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.custom.handlers</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Custom Handlers</name> <description>Custom Handlers</description> - <url>http://apache.org</url> + <dependencies> <dependency> <groupId>org.wso2.carbon</groupId> @@ -50,27 +49,27 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.logging</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.core</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.core.common</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.core.services</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.utils</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>opensaml.wso2</groupId> @@ -92,7 +91,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.0</version> <extensions>true</extensions> <configuration> <instructions> @@ -117,4 +115,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.deployment/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.deployment/pom.xml b/components/org.apache.stratos.deployment/pom.xml deleted file mode 100644 index a37b2e8..0000000 --- a/components/org.apache.stratos.deployment/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<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/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.stratos</groupId> - <artifactId>stratos-components-parent</artifactId> - <version>4.1.2-SNAPSHOT</version> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>org.apache.stratos.deployment</artifactId> - <packaging>bundle</packaging> - <name>Apache Stratos - Deployment</name> - - <build> - - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-scr-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Name>${project.artifactId}</Bundle-Name> - <Private-Package> - org.apache.stratos.deployment.internal.* - </Private-Package> - <Export-Package> - !org.apache.stratos.deployment.internal.*, - org.apache.stratos.deployment.* - </Export-Package> - <Import-Package> - !javax.xml.namespace, - org.apache.axis2.*; version="${axis2.osgi.version.range}", - javax.xml.namespace; version=0.0.0, - javax.servlet;version="${imp.pkg.version.javax.servlet}", - javax.servlet.http;version="${imp.pkg.version.javax.servlet}", - *;resolution:=optional - </Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>org.apache.stratos.common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.axis2.wso2</groupId> - <artifactId>axis2</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.registry.core</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - </dependencies> - <properties> - <axis2.osgi.version.range>1.6.1.wso2v8</axis2.osgi.version.range> - </properties> -</project> - http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/CloudDeploymentInterceptor.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/CloudDeploymentInterceptor.java b/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/CloudDeploymentInterceptor.java deleted file mode 100644 index f6abe30..0000000 --- a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/CloudDeploymentInterceptor.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.deployment; - -import org.apache.axiom.om.OMElement; -import org.apache.axis2.AxisFault; -import org.apache.axis2.description.AxisModule; -import org.apache.axis2.description.AxisOperation; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.AxisServiceGroup; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.engine.AxisConfiguration; -import org.apache.axis2.engine.AxisEvent; -import org.apache.axis2.engine.AxisObserver; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import javax.xml.namespace.QName; -import java.util.ArrayList; - -/** - * Deployment interceptor for handling modification of ServiceAdmin so that the service list is not - * displayed when the user has not logged in. - */ -public class CloudDeploymentInterceptor implements AxisObserver { - private static final Log log = LogFactory.getLog(CloudDeploymentInterceptor.class); - - public void init(AxisConfiguration axisConfiguration) { - } - - public void serviceUpdate(AxisEvent axisEvent, AxisService axisService) { - try { - if (axisEvent.getEventType() == AxisEvent.SERVICE_DEPLOY && - axisService.getName().equals("ServiceAdmin")){ - AxisOperation operation = axisService.getOperation(new QName("listServiceGroups")); - ArrayList<Parameter> params = operation.getParameters(); - for(Parameter param: params) { - operation.removeParameter(param); - } - Parameter authAction = new Parameter("AuthorizationAction", - "/permission/admin/manage/monitor/service"); - operation.addParameter(authAction); - } - } catch (AxisFault e) { - log.error("Cannot add AuthorizationAction parameter to ServiceAdmin", e); - } - } - - public void serviceGroupUpdate(AxisEvent axisEvent, AxisServiceGroup axisServiceGroup) { - } - - public void moduleUpdate(AxisEvent axisEvent, AxisModule axisModule) { - } - - public void addParameter(Parameter parameter) throws AxisFault { - } - - public void removeParameter(Parameter parameter) throws AxisFault { - } - - public void deserializeParameters(OMElement omElement) throws AxisFault { - } - - public Parameter getParameter(String s) { - return null; - } - - public ArrayList<Parameter> getParameters() { - return null; - } - - public boolean isParameterLocked(String s) { - return false; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/SuperTenantRolePlayer.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/SuperTenantRolePlayer.java b/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/SuperTenantRolePlayer.java deleted file mode 100644 index 9f75ea9..0000000 --- a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/SuperTenantRolePlayer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.deployment; - -import org.apache.axiom.soap.RolePlayer; -import org.wso2.carbon.base.MultitenantConstants; -import org.wso2.carbon.context.CarbonContext; - -import java.util.List; -import java.util.ArrayList; - -public class SuperTenantRolePlayer implements RolePlayer{ - - private List<String> roles; - - public SuperTenantRolePlayer() { - this.roles = new ArrayList<String>(); - this.roles.add("supertenant"); - } - - public List getRoles() { - return this.roles; - } - - public boolean isUltimateDestination() { - return (CarbonContext.getCurrentContext().getTenantId() == - MultitenantConstants.SUPER_TENANT_ID); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/CloudDeploymentServiceComponent.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/CloudDeploymentServiceComponent.java b/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/CloudDeploymentServiceComponent.java deleted file mode 100644 index 62f2ed0..0000000 --- a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/CloudDeploymentServiceComponent.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.deployment.internal; - -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.description.Parameter; -import org.apache.axis2.engine.AxisConfiguration; -import org.apache.axis2.engine.AxisObserver; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.stratos.deployment.CloudDeploymentInterceptor; -import org.apache.stratos.deployment.SuperTenantRolePlayer; -import org.osgi.service.component.ComponentContext; -import org.wso2.carbon.CarbonConstants; -import org.wso2.carbon.utils.ConfigurationContextService; - -import java.util.Dictionary; -import java.util.Hashtable; - -/** - * @scr.component name="org.apache.stratos.deployment.internal.CloudDeploymentServiceComponent" immediate="true" - * @scr.reference name="config.context.service" - * interface="org.wso2.carbon.utils.ConfigurationContextService" cardinality="1..1" - * policy="dynamic" bind="setConfigurationContextService" - * unbind="unsetConfigurationContextService" - */ -public class CloudDeploymentServiceComponent { - private static final Log log = LogFactory.getLog(CloudDeploymentServiceComponent.class); - - protected void activate(ComponentContext ctxt) { - //TODO: Modify the permission in the UI - try { - ConfigurationContext configContext = DataHolder.getInstance().getServerConfigContext(); - Dictionary props = new Hashtable(); - props.put(CarbonConstants.AXIS2_CONFIG_SERVICE, AxisObserver.class.getName()); - ctxt.getBundleContext().registerService(AxisObserver.class.getName(), new CloudDeploymentInterceptor(),props); - - // register the role player for this configuration - AxisConfiguration axisConfiguration = configContext.getAxisConfiguration(); - axisConfiguration.addParameter(new Parameter("rolePlayer", new SuperTenantRolePlayer())); - } catch (Exception e) { - log.error("CloudDeploymentServiceComponent activation failed", e); - } - } - - protected void deactivate(ComponentContext ctxt) { - - } - - protected void setConfigurationContextService(ConfigurationContextService contextService) { - DataHolder.getInstance().setServerConfigContext(contextService.getServerConfigContext()); - } - - protected void unsetConfigurationContextService(ConfigurationContextService contextService) { - DataHolder.getInstance().setServerConfigContext(null); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/DataHolder.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/DataHolder.java b/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/DataHolder.java deleted file mode 100644 index dde4d17..0000000 --- a/components/org.apache.stratos.deployment/src/main/java/org/apache/stratos/deployment/internal/DataHolder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.deployment.internal; - -import org.apache.axis2.context.ConfigurationContext; - -/** - * DataHolder for Service deployment component - */ -public class DataHolder { - private static DataHolder instance = new DataHolder(); - - private ConfigurationContext serverConfigContext; - - public static DataHolder getInstance() { - return instance; - } - - private DataHolder() { - } - - public ConfigurationContext getServerConfigContext() { - return serverConfigContext; - } - - public void setServerConfigContext(ConfigurationContext serverConfigContext) { - this.serverConfigContext = serverConfigContext; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/pom.xml b/components/org.apache.stratos.email.sender/pom.xml deleted file mode 100644 index 2036cb1..0000000 --- a/components/org.apache.stratos.email.sender/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ -<!-- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. ---> -<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/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.stratos</groupId> - <artifactId>stratos-components-parent</artifactId> - <version>4.1.2-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>org.apache.stratos.email.sender</artifactId> - <packaging>bundle</packaging> - <name>Apache Stratos - Email Sender Component</name> - - <build> - - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-scr-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Name>${project.artifactId}</Bundle-Name> - <Private-Package> - org.apache.stratos.email.sender.internal.*, - org.apache.stratos.email.senderder.util.*, - </Private-Package> - <Export-Package> - org.apache.stratos.email.sender.api.* - </Export-Package> - <Import-Package> - !javax.xml.namespace, - javax.xml.namespace; version=0.0.0, - javax.servlet;version="${imp.pkg.version.javax.servlet}", - javax.servlet.http;version="${imp.pkg.version.javax.servlet}", - *;resolution:=optional - </Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.apache.axis2.wso2</groupId> - <artifactId>axis2</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.registry.core</artifactId> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/BulkEmailSender.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/BulkEmailSender.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/BulkEmailSender.java deleted file mode 100644 index afe752f..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/BulkEmailSender.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.email.sender.api; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axis2.AxisFault; -import org.apache.axis2.Constants; -import org.apache.axis2.addressing.EndpointReference; -import org.apache.axis2.client.Options; -import org.apache.axis2.client.ServiceClient; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.MessageContext; -import org.apache.axis2.transport.base.BaseConstants; -import org.apache.axis2.transport.mail.MailConstants; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.stratos.email.sender.util.Util; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * The class that handles the bulk email sending logic for stratos. - */ -public class BulkEmailSender extends EmailSender{ - private static Log log = LogFactory.getLog(BulkEmailSender.class); - - public BulkEmailSender(EmailSenderConfiguration config) { - super(config); - } - - /** - * Sends the email - * @param bulkEmailData List of email data holder objects - * @throws Exception, if sending the email notification failed. - */ - public void sendBulkEmails(List<EmailDataHolder> bulkEmailData) throws Exception { - - final List<EmailDataHolder> emailDataHolderList = bulkEmailData; - - final ServiceClient serviceClient; - ConfigurationContext configContext = Util.getConfigurationContext(); - if (configContext != null) { - serviceClient = new ServiceClient(configContext, null); - } else { - serviceClient = new ServiceClient(); - } - - new Thread() { - public void run() { - - for(EmailDataHolder dataHolder : emailDataHolderList){ - - String subject = getMessageTitle(dataHolder.getEmailParameters()); - String body = getMessageBody(dataHolder.getEmailParameters()); - String email = dataHolder.getEmail(); // no change in here, - - Map<String, String> headerMap = new HashMap<String, String>(); - headerMap.put(MailConstants.MAIL_HEADER_SUBJECT, subject); - OMElement payload = OMAbstractFactory.getOMFactory().createOMElement( - BaseConstants.DEFAULT_TEXT_WRAPPER, null); - payload.setText(body); - - try { - Options options = new Options(); - options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE); - options.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap); - options.setProperty(MailConstants.TRANSPORT_MAIL_FORMAT, - MailConstants.TRANSPORT_FORMAT_TEXT); - options.setTo(new EndpointReference("mailto:" + email)); - serviceClient.setOptions(options); - serviceClient.fireAndForget(payload); - serviceClient.cleanup(); - } catch (AxisFault e) { - String msg = "Error in delivering the message, " + - "subject: " + subject + ", to: " + email + "."; - log.error(msg); - } - } - - } - }.start(); - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailDataHolder.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailDataHolder.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailDataHolder.java deleted file mode 100644 index 73d9199..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailDataHolder.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.apache.stratos.email.sender.api; -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - - -import java.util.Map; - -//This holds the email address and email parameter map -public class EmailDataHolder { - - private String email; - private Map<String, String> emailParameters; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public Map<String, String> getEmailParameters() { - return emailParameters; - } - - public void setEmailParameters(Map<String, String> emailParameters) { - this.emailParameters = emailParameters; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSender.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSender.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSender.java deleted file mode 100644 index 851227d..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSender.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.email.sender.api; - -import org.apache.stratos.email.sender.util.Util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.axis2.transport.mail.MailConstants; -import org.apache.axis2.transport.base.BaseConstants; -import org.apache.axis2.client.Options; -import org.apache.axis2.client.ServiceClient; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.MessageContext; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axis2.Constants; -import org.apache.axis2.AxisFault; -import org.apache.axis2.addressing.EndpointReference; - -import java.util.Map; -import java.util.HashMap; - -/** - * The class that handles the email sending logic for stratos. - */ -public class EmailSender{ - private static Log log = LogFactory.getLog(EmailSender.class); - private EmailSenderConfiguration config = null; - - public EmailSender(EmailSenderConfiguration config) { - this.config = config; - } - - /** - * Sends the email - * @param toEmail Email Address (To:) - * @param userParameters - map of user parameters - * @throws Exception, if sending the email notification failed. - */ - public void sendEmail(String toEmail, Map<String, String>userParameters) throws Exception { - final String subject = getMessageTitle(userParameters); - final String body = getMessageBody(userParameters); - final String email = toEmail; // no change in here, - new Thread() { - public void run() { - Map<String, String> headerMap = new HashMap<String, String>(); - headerMap.put(MailConstants.MAIL_HEADER_SUBJECT, subject); - OMElement payload = OMAbstractFactory.getOMFactory().createOMElement( - BaseConstants.DEFAULT_TEXT_WRAPPER, null); - payload.setText(body); - - try { - ServiceClient serviceClient; - ConfigurationContext configContext = Util.getConfigurationContext(); - if (configContext != null) { - serviceClient = new ServiceClient(configContext, null); - } else { - serviceClient = new ServiceClient(); - } - Options options = new Options(); - options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE); - options.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap); - options.setProperty(MailConstants.TRANSPORT_MAIL_FORMAT, - MailConstants.TRANSPORT_FORMAT_TEXT); - options.setTo(new EndpointReference("mailto:" + email)); - serviceClient.setOptions(options); - serviceClient.fireAndForget(payload); - log.debug("Sending confirmation mail to " + email); - } catch (AxisFault e) { - String msg = "Error in delivering the message, " + - "subject: " + subject + ", to: " + email + "."; - log.error(msg); - } - } - }.start(); - } - - /** - * gets the title of the message - * @param userParameters - map of user parameters - * @return the title of the message - */ - protected String getMessageTitle(Map<String, String> userParameters) { - return Util.replacePlaceHolders(config.getSubject(), userParameters); - } - - /** - * gets the body of the message - * @param userParameters - map of user parameters - * @return the body of the message - */ - protected String getMessageBody(Map<String, String> userParameters) { - return Util.replacePlaceHolders(config.getBody(), userParameters); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSenderConfiguration.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSenderConfiguration.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSenderConfiguration.java deleted file mode 100644 index 706ccac..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/api/EmailSenderConfiguration.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.email.sender.api; - -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * The class that handles the configuration of the email sender for Stratos - */ -public class EmailSenderConfiguration { - private static Log log = LogFactory.getLog(EmailSenderConfiguration.class); - - public final static String DEFAULT_VALUE_SUBJECT = "EmailSender"; - public final static String DEFAULT_VALUE_MESSAGE = "Sent form WSO2 Carbon"; - - private String fromEmail; - private String subject = DEFAULT_VALUE_SUBJECT; - private String body = DEFAULT_VALUE_MESSAGE; - private Map<String, String> customParameters; - - public Map<String, String> getCustomParameters() { - return customParameters; - } - - public void setCustomParameters(Map<String, String> customParameters) { - this.customParameters = customParameters; - } - - - public String getSubject() { - return subject; - } - - public void setSubject(String subject) { - this.subject = subject.trim(); - } - - public String getBody() { - return body; - } - - public void setBody(String emailMessage) { - this.body = emailMessage.trim(); - } - - public String getFromEmail() { - return fromEmail; - } - - public void setFromEmail(String fromEmail) { - this.fromEmail = fromEmail; - } - - /** - * Loads the email sender configuration - * @param configFilename configuration file name - * @return EmailSenderConfiguration. - */ - public static EmailSenderConfiguration loadEmailSenderConfiguration(String configFilename) { - File configFile = new File(configFilename); - if (!configFile.exists()) { - log.error("Email sender configuration File is not present at: " + configFilename); - return null; - } - EmailSenderConfiguration config = new EmailSenderConfiguration(); - FileInputStream ip = null; - try { - ip = new FileInputStream(configFile); - XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(ip); - StAXOMBuilder builder = new StAXOMBuilder(parser); - OMElement documentElement = builder.getDocumentElement(); - Iterator it = documentElement.getChildElements(); - while (it.hasNext()) { - OMElement element = (OMElement) it.next(); - if ("subject".equals(element.getLocalName())) { - config.setSubject(element.getText()); - } else if ("body".equals(element.getLocalName())) { - config.setBody(element.getText()); - } else if ("customParameters".equals(element.getLocalName())) { - Map<String, String> customParameters = new HashMap<String, String>(); - Iterator customParamIt = element.getChildElements(); - while (customParamIt.hasNext()) { - OMElement customElement = (OMElement) it.next(); - customParameters.put(customElement.getLocalName(), customElement.getText()); - } - config.setCustomParameters(customParameters); - } - } - return config; - } catch (Exception e) { - String msg = "Error in loading configuration for email verification: " + - configFilename + "."; - log.error(msg, e); - return null; - } finally { - if (ip != null) { - try { - ip.close(); - } catch (IOException e) { - log.warn("Could not close InputStream for file " + configFile.getAbsolutePath()); - } - } - - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/internal/EmailSenderServiceComponent.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/internal/EmailSenderServiceComponent.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/internal/EmailSenderServiceComponent.java deleted file mode 100644 index 0667603..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/internal/EmailSenderServiceComponent.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.email.sender.internal; - -import org.apache.stratos.email.sender.util.Util; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.service.component.ComponentContext; -import org.wso2.carbon.registry.core.service.RegistryService; -import org.wso2.carbon.user.core.service.RealmService; -import org.wso2.carbon.utils.CarbonUtils; -import org.wso2.carbon.utils.ConfigurationContextService; - -/** - * @scr.component name="org.apache.stratos.email.sender" - * immediate="true" - * @scr.reference name="registry.service" - * interface="org.wso2.carbon.registry.core.service.RegistryService" cardinality="1..1" - * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService" - * @scr.reference name="user.realmservice.default" interface="org.wso2.carbon.user.core.service.RealmService" - * cardinality="1..1" policy="dynamic" bind="setRealmService" - * unbind="unsetRealmService" - * @scr.reference name="configuration.context.service" - * interface="org.wso2.carbon.utils.ConfigurationContextService" cardinality="1..1" - * policy="dynamic" bind="setConfigurationContextService" unbind="unsetConfigurationContextService" - */ -public class EmailSenderServiceComponent { - private static Log log = LogFactory.getLog(EmailSenderServiceComponent.class); - - protected void activate(ComponentContext context) { - try { - log.debug("******* Email Sender bundle is activated ******* "); - } catch (Exception e) { - log.error("******* Email Sender bundle failed activating ****", e); - } - } - - protected void deactivate(ComponentContext context) { - log.debug("******* Email Sender bundle is deactivated ******* "); - } - protected void setRegistryService(RegistryService registryService) { - Util.setRegistryService(registryService); - } - - protected void unsetRegistryService(RegistryService registryService) { - Util.setRegistryService(null); - } - - protected void setRealmService(RealmService realmService) { - Util.setRealmService(realmService); - } - - protected void unsetRealmService(RealmService realmService) { - Util.setRealmService(null); - } - - protected void setConfigurationContextService(ConfigurationContextService configurationContextService){ - log.debug("Receiving ConfigurationContext Service"); - Util.setConfigurationContextService(configurationContextService); - - } - - protected void unsetConfigurationContextService(ConfigurationContextService configurationContextService){ - log.debug("Unsetting ConfigurationContext Service"); - Util.setConfigurationContextService(null); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/util/Util.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/util/Util.java b/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/util/Util.java deleted file mode 100644 index a16880d..0000000 --- a/components/org.apache.stratos.email.sender/src/main/java/org/apache/stratos/email/sender/util/Util.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.email.sender.util; - -import org.apache.axis2.context.ConfigurationContext; -import org.wso2.carbon.registry.core.exceptions.RegistryException; -import org.wso2.carbon.registry.core.service.RegistryService; -import org.wso2.carbon.registry.core.session.UserRegistry; -import org.wso2.carbon.user.api.RealmConfiguration; -import org.wso2.carbon.user.core.service.RealmService; -import org.wso2.carbon.user.core.tenant.TenantManager; -import org.wso2.carbon.utils.ConfigurationContextService; - -import java.util.Map; -import java.util.regex.Matcher; - -/** - * Utility methods for the email sender component - */ -public class Util { - - private static RegistryService registryService; - private static RealmService realmService; - private static ConfigurationContextService configurationContextService; - - - public static ConfigurationContextService getConfigurationContextService() { - return configurationContextService; - } - - public static void setConfigurationContextService( - ConfigurationContextService configurationContextService) { - Util.configurationContextService = configurationContextService; - } - - public static ConfigurationContext getConfigurationContext() { - if (configurationContextService.getServerConfigContext() == null) { - return null; - } - return configurationContextService.getServerConfigContext(); - } - - public static synchronized void setRegistryService(RegistryService service) { - if (registryService == null) { - registryService = service; - } - } - - public static RegistryService getRegistryService() { - return registryService; - } - - public static synchronized void setRealmService(RealmService service) { - if (realmService == null) { - realmService = service; - } - } - - public static RealmService getRealmService() { - return realmService; - } - - public static TenantManager getTenantManager() { - return realmService.getTenantManager(); - } - - public static RealmConfiguration getBootstrapRealmConfiguration() { - return realmService.getBootstrapRealmConfiguration(); - } - - public static UserRegistry getGovernanceSystemRegistry(int tenantId) throws RegistryException { - return registryService.getGovernanceSystemRegistry(tenantId); - } - - /** - * Replace the {place-holders} with the respective value provided - * @param text string - * @param userParameters - map of user parameters - * @return replaced text for the email {title or body} - */ - public static String replacePlaceHolders(String text, Map<String, String> userParameters) { - if (userParameters != null) { - for (Map.Entry<String, String> entry : userParameters.entrySet()) { - String key = entry.getKey(); - text = text.replaceAll("\\{" + key + "\\}", Matcher.quoteReplacement(entry.getValue())); - } - } - return text; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.kubernetes.client/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.kubernetes.client/pom.xml b/components/org.apache.stratos.kubernetes.client/pom.xml index c496318..091d645 100644 --- a/components/org.apache.stratos.kubernetes.client/pom.xml +++ b/components/org.apache.stratos.kubernetes.client/pom.xml @@ -20,19 +20,17 @@ <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/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.kubernetes.client</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Kubernetes API Java Client</name> <description>A Java client library written for Kubernetes API</description> - <url>http://apache.org</url> <dependencies> <dependency> @@ -43,16 +41,18 @@ <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> + <version>1.1.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> + <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.stratos</groupId> <artifactId>kubernetes-api</artifactId> - <version>${project.version}</version> + <version>${kubernetes.api.version}</version> </dependency> </dependencies> @@ -131,4 +131,4 @@ </build> </profile> </profiles> -</project> +</project> \ No newline at end of file
