You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/08 07:11:02 UTC
[5/5] git commit: Remove unused components related to commit
79c88a9e98b82a0030cf1f57579f58a6e02fb387
Remove unused components related to commit 79c88a9e98b82a0030cf1f57579f58a6e02fb387
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/62dc2f7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/62dc2f7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/62dc2f7f
Branch: refs/heads/master
Commit: 62dc2f7f8e232259ee9416172f760259ad6ec76b
Parents: 79c88a9
Author: Lakmal Warusawithana <la...@wso2.com>
Authored: Mon Jul 8 10:40:10 2013 +0530
Committer: Lakmal Warusawithana <la...@wso2.com>
Committed: Mon Jul 8 10:40:10 2013 +0530
----------------------------------------------------------------------
.../org.wso2.carbon.db.keep.alive/2.1.0/pom.xml | 116 ------
.../alive/actions/AccessingBillingAction.java | 39 --
.../alive/actions/AccessingRegistryAction.java | 41 --
.../db/keep/alive/actions/UserMgtAction.java | 43 --
.../internal/DBKeepAliveServiceComponent.java | 81 ----
.../carbon/db/keep/alive/util/KeepAliveJob.java | 58 ---
.../wso2/carbon/db/keep/alive/util/Util.java | 115 ------
.../2.1.0/pom.xml | 100 -----
.../ui/GAppRegistrationUIConstants.java | 6 -
.../ui/GoolgeAppsRegistrationClient.java | 227 -----------
.../ui/InMemoryPasswordcallbackHandler.java | 39 --
.../src/main/resources/META-INF/component.xml | 27 --
.../registration/ui/i18n/Resources.properties | 8 -
.../src/main/resources/signonly-policy.xml | 102 -----
.../web/gappregistration/done_ajaxprocessor.jsp | 165 --------
.../openidaccept_ajaxprocessor.jsp | 93 -----
.../gappregistration/setup_ajaxprocessor.jsp | 320 ---------------
.../2.1.0/pom.xml | 62 ---
.../GoogleAnalyticsUIServiceComponent.java | 68 ----
.../ui/servlets/GoogleAnalyticsServlet.java | 90 -----
.../src/main/resources/META-INF/component.xml | 43 --
.../js/googleAnalyticsProcessor.js | 35 --
.../web.googleanalytics/js/jquery.min.js | 167 --------
.../org.wso2.carbon.migration/2.1.0/pom.xml | 99 -----
.../org/wso2/carbon/migration/impl/Alpha1.java | 173 --------
.../impl/ManagementPermissionsAdder.java | 126 ------
.../internal/MigrationServiceComponent.java | 81 ----
.../wso2/carbon/migration/util/Migrator.java | 20 -
.../org/wso2/carbon/migration/util/Util.java | 72 ----
.../2.1.0/pom.xml | 104 -----
.../installer/ui/SampleDeployerClient.java | 400 -------------------
.../sample/installer/ui/ServerInfoBean.java | 46 ---
.../wso2/carbon/sample/installer/ui/Util.java | 128 ------
.../src/main/resources/META-INF/component.xml | 33 --
.../src/main/resources/SampleDeployer.wsdl | 284 -------------
.../installer/ui/i18n/Resources.properties | 16 -
.../web/sample-installer/images/all.gif | Bin 234 -> 0 bytes
.../web/sample-installer/images/installer.gif | Bin 581 -> 0 bytes
.../web/sample-installer/images/services.gif | Bin 638 -> 0 bytes
.../resources/web/sample-installer/index.jsp | 162 --------
.../web/sample-installer/installer.jsp | 77 ----
.../2.1.0/pom.xml | 117 ------
.../carbon/sample/installer/SampleDeployer.java | 244 -----------
.../installer/beans/SampleInformation.java | 118 ------
.../sample/installer/config/SampleConfig.java | 111 -----
.../installer/config/SamplesDescConfig.java | 70 ----
.../SampleInstallerServiceComponent.java | 101 -----
.../carbon/sample/installer/utils/Util.java | 334 ----------------
.../src/main/resources/META-INF/services.xml | 30 --
components/stratos/sample-installer/pom.xml | 41 --
50 files changed, 5032 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/pom.xml b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/pom.xml
deleted file mode 100644
index 3438d6d..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<!--
-# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed 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.wso2.carbon</groupId>
- <artifactId>stratos-components</artifactId>
- <version>2.1.0</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.db.keep.alive</artifactId>
- <packaging>bundle</packaging>
- <name>WSO2 Stratos - DB Keep Alive</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.wso2.carbon.db.keep.alive.*,
- </Private-Package>
- <Import-Package>
- org.quartz.*,
- org.apache.synapse.task.*,
- org.wso2.carbon.registry.core.*;version=1.0.1,
- org.wso2.carbon.registry.resource.*,
- org.wso2.carbon.stratos.common.*,
- !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}",
- org.apache.axiom.*; version="${axiom.osgi.version.range}",
- *;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>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.user.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.user.mgt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.billing.mgt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.billing.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.stratos.common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.synapse</groupId>
- <artifactId>synapse-tasks</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.synapse</groupId>
- <artifactId>synapse-commons</artifactId>
- </dependency>
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingBillingAction.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingBillingAction.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingBillingAction.java
deleted file mode 100644
index e668040..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingBillingAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.db.keep.alive.actions;
-
-import org.wso2.carbon.billing.core.BillingEngine;
-
-public class AccessingBillingAction {
- BillingEngine billingEngine;
- public AccessingBillingAction(BillingEngine billingEngine) {
- this.billingEngine = billingEngine;
- }
- public void execute() throws Exception {
- billingEngine.beginTransaction();
- boolean succeeded = false;
- try {
- billingEngine.getCustomersWithName("some-non-existance-customer");
- succeeded = true;
- } finally {
- if (succeeded) {
- billingEngine.commitTransaction();
- } else {
- billingEngine.rollbackTransaction();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingRegistryAction.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingRegistryAction.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingRegistryAction.java
deleted file mode 100644
index e48ecc5..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/AccessingRegistryAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.db.keep.alive.actions;
-
-import org.wso2.carbon.registry.core.Collection;
-import org.wso2.carbon.registry.core.Registry;
-
-import java.util.Date;
-
-public class AccessingRegistryAction {
- private static final String KEEP_ALIVE_RESOURCE =
- "/repository/components/org.wso2.carbon.keep-alive-resource";
- Registry registry;
- public AccessingRegistryAction(Registry registry) {
- this.registry = registry;
- }
- public void execute() throws Exception {
- Collection c;
- if (registry.resourceExists(KEEP_ALIVE_RESOURCE)) {
- c = (Collection)registry.get(KEEP_ALIVE_RESOURCE);
- } else {
- c = registry.newCollection();
- }
- long currentTime = new Date().getTime();
- c.setProperty("currentTime", String.valueOf(currentTime));
- registry.put(KEEP_ALIVE_RESOURCE, c);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/UserMgtAction.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/UserMgtAction.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/UserMgtAction.java
deleted file mode 100644
index 0eb2b21..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/actions/UserMgtAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.db.keep.alive.actions;
-
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.user.core.AuthorizationManager;
-import org.wso2.carbon.user.core.Permission;
-import org.wso2.carbon.user.core.UserRealm;
-import org.wso2.carbon.user.core.UserStoreManager;
-import org.wso2.carbon.user.core.service.RealmService;
-
-public class UserMgtAction {
- UserRealm realm;
- public UserMgtAction(RegistryService registryService) throws RegistryException {
- realm = registryService.getUserRealm(0);
- }
- public void execute() throws Exception {
- UserStoreManager userStoreManager = realm.getUserStoreManager();
- if (!userStoreManager.isExistingUser("tracker")) {
- userStoreManager.addUser("tracker", "tracker123", null, null, null, false);
- Permission[] permisions = new Permission[] { new Permission("high security", "read")};
- userStoreManager.addRole("tracker_role", new String[] {"tracker"}, permisions);
- }
- userStoreManager.updateCredentialByAdmin("tracker", "tracker123");
- // do some authorizations
- AuthorizationManager authManager = realm.getAuthorizationManager();
- authManager.authorizeRole("tracker_role", "tracker_obj", "read");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/internal/DBKeepAliveServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/internal/DBKeepAliveServiceComponent.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/internal/DBKeepAliveServiceComponent.java
deleted file mode 100644
index c208845..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/internal/DBKeepAliveServiceComponent.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.db.keep.alive.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.billing.core.BillingManager;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.db.keep.alive.util.Util;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.user.mgt.UserMgtConstants;
-
-/**
- * @scr.component name="org.wso2.carbon.db.keep.alive"
- * 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="billingManager.service"
- * interface="org.wso2.carbon.billing.core.BillingManager" cardinality="1..1"
- * policy="dynamic" bind="setBillingManager" unbind="unsetBillingManager"
- */
-public class DBKeepAliveServiceComponent {
- private static Log log = LogFactory.getLog(DBKeepAliveServiceComponent.class);
-
-
- protected void activate(ComponentContext context) {
- Util.registerJob();
- log.debug("******* DBKeepAlive bundle is activated ******* ");
- }
-
- protected void deactivate(ComponentContext context) {
- log.debug("******* DBKeepAlive 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);
- }
-
- public void setBillingManager(BillingManager billingManager) {
- log.debug("Receiving billingManager service");
- Util.setBillingManager(billingManager);
- }
-
- public void unsetBillingManager(BillingManager billingManager) {
- log.debug("Unsetting billingManager service");
- Util.setBillingManager(null);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/KeepAliveJob.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/KeepAliveJob.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/KeepAliveJob.java
deleted file mode 100644
index 550bfc5..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/KeepAliveJob.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.db.keep.alive.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.db.keep.alive.actions.AccessingBillingAction;
-import org.wso2.carbon.db.keep.alive.actions.AccessingRegistryAction;
-import org.wso2.carbon.db.keep.alive.actions.UserMgtAction;
-
-public class KeepAliveJob implements Job {
- private static final Log log = LogFactory.getLog(KeepAliveJob.class);
-
- public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
- log.debug("-------------Running the db keep alive job------------------");
- RegistryService registryService = Util.getRegistryService();
- try {
- new AccessingRegistryAction(registryService.getLocalRepository()).execute();
- new AccessingRegistryAction(registryService.getConfigSystemRegistry()).execute();
- new AccessingRegistryAction(registryService.getGovernanceSystemRegistry()).execute();
- } catch (Exception e) {
- String msg = "Error in running registry actions.";
- log.error(msg, e);
- throw new JobExecutionException(msg, e);
- }
- try {
- new AccessingBillingAction(Util.getBillingEngine()).execute();
- } catch (Exception e) {
- String msg = "Error in running billing engine action.";
- log.error(msg, e);
- throw new JobExecutionException(msg, e);
- }
- try {
- new UserMgtAction(registryService).execute();
- } catch (Exception e) {
- String msg = "Error in running user manager actions.";
- log.error(msg, e);
- throw new JobExecutionException(msg, e);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/Util.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/Util.java b/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/Util.java
deleted file mode 100644
index 7af5c72..0000000
--- a/components/stratos/org.wso2.carbon.db.keep.alive/2.1.0/src/main/java/org/wso2/carbon/db/keep/alive/util/Util.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. 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.wso2.carbon.db.keep.alive.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.synapse.task.TaskDescription;
-import org.apache.synapse.task.TaskScheduler;
-import org.apache.synapse.task.TaskSchedulerFactory;
-import org.osgi.framework.ServiceRegistration;
-import org.wso2.carbon.billing.core.BillingEngine;
-import org.wso2.carbon.billing.core.BillingManager;
-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.registry.core.utils.UUIDGenerator;
-import org.wso2.carbon.user.core.UserRealm;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.stratos.common.constants.StratosConstants;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public class Util {
-
- private static final Log log = LogFactory.getLog(Util.class);
- private static int JOB_INTERVAL = 15; // in mins
- private static String TASK_ID = "taskId";
-
- private static RegistryService registryService;
- private static RealmService realmService;
- private static ServiceRegistration redirectorServiceRegistration = null;
- private static BillingManager billingManager;
-
- public static synchronized void setRegistryService(RegistryService service) {
- if (registryService == null) {
- registryService = service;
- }
- }
-
- public static synchronized void setRealmService(RealmService service) {
- if (realmService == null) {
- realmService = service;
- }
- }
-
- public static RealmService getRealmService() {
- return realmService;
- }
-
- public static RegistryService getRegistryService() {
- return registryService;
- }
-
- public static BillingManager getBillingManager() {
- return billingManager;
- }
-
- public static void setBillingManager(BillingManager billingManager) {
- Util.billingManager = billingManager;
- }
-
- public static UserRealm getUserRealm(int tenantId) throws RegistryException {
- return registryService.getUserRealm(tenantId);
- }
-
- public static UserRegistry getSuperTenantGovernanceSystemRegistry() throws RegistryException {
- return registryService.getGovernanceSystemRegistry();
- }
-
- public static BillingEngine getBillingEngine() {
- return billingManager.getBillingEngine(StratosConstants.MULTITENANCY_SCHEDULED_TASK_ID);
- }
-
- public static void registerJob() {
-
- String taskName = UUIDGenerator.generateUUID();
- String groupId = UUIDGenerator.generateUUID();
-
- TaskDescription taskDescription = new TaskDescription();
- taskDescription.setName(taskName);
- taskDescription.setGroup(groupId);
- // we are triggering only at the period
-
- //taskDescription.setInterval(200);
- taskDescription.setInterval(JOB_INTERVAL * 60 * 1000L);
-
- Map<String, Object> resources = new HashMap<String, Object>();
-
- TaskScheduler taskScheduler =
- TaskSchedulerFactory.getTaskScheduler(TASK_ID);
- if (!taskScheduler.isInitialized()) {
- Properties properties = new Properties();
- taskScheduler.init(properties);
- }
- taskScheduler.scheduleTask(taskDescription, resources, KeepAliveJob.class);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/pom.xml b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/pom.xml
deleted file mode 100644
index 0b1b170..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
- ~
- ~ Licensed 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.wso2.carbon</groupId>
- <artifactId>stratos-components</artifactId>
- <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.gapp.registration.ui</artifactId>
- <packaging>bundle</packaging>
- <name>WSO2 Carbon - Google Apps Registration UI</name>
- <description>Provides Google Apps Provisioning via Marketplace</description>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.axis2.wso2</groupId>
- <artifactId>axis2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.json.wso2</groupId>
- <artifactId>json</artifactId>
- <version>1.0.0.wso2v1</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.stratos.common</artifactId>
- <version>2.1.0</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.stratos.common.stub</artifactId>
- <version>4.1.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.rampart.wso2</groupId>
- <artifactId>rampart-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.security.wso2</groupId>
- <artifactId>wss4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.tenant.register.gapp.stub</artifactId>
- <version>4.1.0</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <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>
- <Export-Package>
- org.wso2.carbon.gapp.registration.ui.*
- </Export-Package>
- <Import-Package>
- !org.wso2.carbon.gapp.registration.ui.*,
- javax.xml.namespace.*;version="0.0.0",
- *;resolution:=optional
- </Import-Package>
- <Carbon-Component>UIBundle</Carbon-Component>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GAppRegistrationUIConstants.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GAppRegistrationUIConstants.java b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GAppRegistrationUIConstants.java
deleted file mode 100644
index d3a6f49..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GAppRegistrationUIConstants.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.wso2.carbon.gapp.registration.ui;
-
-public class GAppRegistrationUIConstants {
-
- public static final String AUTH_SESSION_ATTRIBUTE = "gapp.setup.authentication";
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GoolgeAppsRegistrationClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GoolgeAppsRegistrationClient.java b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GoolgeAppsRegistrationClient.java
deleted file mode 100644
index 6cfe333..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/GoolgeAppsRegistrationClient.java
+++ /dev/null
@@ -1,227 +0,0 @@
-package org.wso2.carbon.gapp.registration.ui;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Calendar;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.neethi.Policy;
-import org.apache.rampart.RampartMessageData;
-import org.apache.rampart.policy.model.CryptoConfig;
-import org.apache.rampart.policy.model.RampartConfig;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.wso2.carbon.base.ServerConfiguration;
-import org.wso2.carbon.stratos.common.config.CloudServiceConfig;
-import org.wso2.carbon.stratos.common.config.CloudServiceConfigParser;
-import org.wso2.carbon.stratos.common.constants.StratosConstants;
-import org.wso2.carbon.stratos.common.packages.stub.PackageInfo;
-import org.wso2.carbon.stratos.common.packages.stub.PackageInfoServiceStub;
-import org.wso2.carbon.tenant.register.gapp.stub.GAppTenantRegistrationServiceStub;
-import org.wso2.carbon.tenant.register.gapp.stub.xsd.TenantInfoBean;
-import org.wso2.carbon.utils.CarbonUtils;
-
-public class GoolgeAppsRegistrationClient {
-
- private static final Log log = LogFactory.getLog(GoolgeAppsRegistrationClient.class);
-
-
- private static final String GAPP_PROPERTIES_FILE = "gapp.setup.properties";
- private static Properties consumerKeys = new Properties();
-
- public GoolgeAppsRegistrationClient() {
-
- }
-
- public void registerTenantForGAppDomain(String backendServerURL,
- ConfigurationContext configContext,
- String domain,
- String email,
- String adminFirstName,
- String adminLastName,
- String usagePlan) throws Exception {
- try {
- Map<String, CloudServiceConfig> cloudServiceConfigs = CloudServiceConfigParser.
- loadCloudServicesConfiguration().
- getCloudServiceConfigs();
- String managerHomepageURL =
- cloudServiceConfigs.get(StratosConstants.CLOUD_MANAGER_SERVICE).
- getLink();
- String serviceURL = managerHomepageURL + "/services/GAppTenantRegistrationService";
- GAppTenantRegistrationServiceStub stub = new GAppTenantRegistrationServiceStub(configContext, serviceURL);
- ServiceClient client = stub._getServiceClient();
- // Engage rampart as we are going to sign requests to Relying Party Service
- client.engageModule("rampart");
- // Get a RampartConfig with default crypto information
- Policy rampartConfig = getDefaultRampartConfig();
- Policy signOnly = getSignOnlyPolicy();
- Policy mergedPolicy = signOnly.merge(rampartConfig);
- Options option = client.getOptions();
- option.setProperty(RampartMessageData.KEY_RAMPART_POLICY, mergedPolicy);
- option.setManageSession(true);
-
- String username = email.substring(0, email.indexOf("@"));
- TenantInfoBean bean = new TenantInfoBean();
- bean.setEmail(email);
- bean.setFirstname(adminFirstName);
- bean.setLastname(adminLastName);
- bean.setTenantDomain(domain);
- bean.setAdmin(username);
- bean.setUsagePlan(usagePlan);
- bean.setCreatedDate(Calendar.getInstance());
- stub.registerGoogleAppsTenant(bean);
- } catch (Exception e) {
- String msg = "Failed to create domain because " + e.getMessage();
- log.error(msg, e);
- throw new Exception(msg);
- }
-
- }
-
- public JSONArray buildPackageInfoJSONArray(PackageInfo[] packages) throws Exception {
- JSONArray packageInfo = new JSONArray();
- try {
- for (PackageInfo pak : packages) {
- JSONObject obj = new JSONObject();
- obj.put("name", pak.getName());
- obj.put("users", pak.getUsersLimit());
- packageInfo.put(obj);
- }
- return packageInfo;
- } catch (JSONException e) {
- String msg = "Failed to build JSON list " + e.getMessage();
- log.error(msg, e);
- throw new Exception(msg);
- }
- }
-
- public PackageInfo[] getPackageInfo(String backendServerURL,
- ConfigurationContext configContext) throws Exception {
- String packageServiceEpr = backendServerURL + "PackageInfoService";
- PackageInfoServiceStub packageStub = null;
- PackageInfo[] packageInfo = new PackageInfo[0];
- try {
- packageStub = new PackageInfoServiceStub(configContext, packageServiceEpr);
- PackageInfo[] packages = packageStub.getPackageInfos();
- int i = 0;
- packageInfo = new PackageInfo[packages.length];
- for (PackageInfo pack : packages ) {
- packageInfo[i] = new PackageInfo();
- packageInfo[i].setName(pack.getName());
- packageInfo[i].setUsersLimit(pack.getUsersLimit());
- i++;
- }
- return packageInfo;
- } catch (Exception e) {
- String msg = "Failed to retrieve package list " + e.getMessage();
- log.error(msg, e);
- throw new Exception(msg);
- }
- }
-
- private Policy getSignOnlyPolicy() {
- URL url = null;
- InputStream inStream;
- try {
- inStream = null;
- if ((url = this.getClass().getClassLoader().getResource("signonly-policy.xml")) != null) {
- inStream = url.openStream();
- } else {
- throw new Exception("The file is not present in bundle");
- }
- Policy policy = org.apache.neethi.PolicyEngine.getPolicy(inStream);
- return policy;
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException("Error while creating policy");
- }
- }
-
- public boolean isRegisteredAsGoogleAppDomain(ConfigurationContext configContext,
- String domain) throws Exception {
-
- Map<String, CloudServiceConfig> cloudServiceConfigs = CloudServiceConfigParser.
- loadCloudServicesConfiguration().
- getCloudServiceConfigs();
- String managerHomepageURL =
- cloudServiceConfigs.get(StratosConstants.CLOUD_MANAGER_SERVICE).
- getLink();
- String serviceURL = managerHomepageURL + "/services/GAppTenantRegistrationService";
-
- GAppTenantRegistrationServiceStub stub = new GAppTenantRegistrationServiceStub(configContext, serviceURL);
- ServiceClient client = stub._getServiceClient();
- // Engage rampart as we are going to sign requests to Relying Party Service
- client.engageModule("rampart");
- // Get a RampartConfig with default crypto information
- Policy rampartConfig = getDefaultRampartConfig();
- Policy signOnly = getSignOnlyPolicy();
- Policy mergedPolicy = signOnly.merge(rampartConfig);
- Options option = client.getOptions();
- option.setProperty(RampartMessageData.KEY_RAMPART_POLICY, mergedPolicy);
- option.setManageSession(true);
-
- return stub.isRegisteredAsGoogleAppDomain(domain);
- }
-
- public static String getGoogleAppSetupPropery(String name) throws Exception {
- try {
- if (consumerKeys.size() == 0) {
- String carbonHome = CarbonUtils.getCarbonHome();
- if (carbonHome != null) {
- File gappSetupProperties =
- new File(CarbonUtils.getCarbonConfigDirPath(),
- GAPP_PROPERTIES_FILE);
-
- FileInputStream in = new FileInputStream(gappSetupProperties);
- consumerKeys.load(in);
- }
- }
- return (String)consumerKeys.get(name);
- } catch (Exception e) {
- log.error(e.getMessage(), e);
- throw new Exception(e.getMessage(), e);
- }
- }
-
- private Policy getDefaultRampartConfig() {
- //Extract the primary keystore information from server configuration
- ServerConfiguration serverConfig = ServerConfiguration.getInstance();
- String keyStore = serverConfig.getFirstProperty("Security.KeyStore.Location");
- String keyStoreType = serverConfig.getFirstProperty("Security.KeyStore.Type");
- String keyStorePassword = serverConfig.getFirstProperty("Security.KeyStore.Password");
- String privateKeyAlias = serverConfig.getFirstProperty("Security.KeyStore.KeyAlias");
- String privateKeyPassword = serverConfig.getFirstProperty("Security.KeyStore.KeyPassword");
-
- //Populate Rampart Configuration
- RampartConfig rampartConfig = new RampartConfig();
- rampartConfig.setUser(privateKeyAlias);
- rampartConfig.setPwCbClass("org.wso2.carbon.gapp.registration.ui.InMemoryPasswordcallbackHandler");
-
- //Set the private key alias and private key password in the password callback handler
- InMemoryPasswordcallbackHandler.addUser(privateKeyAlias, privateKeyPassword);
-
- CryptoConfig sigCrypto = new CryptoConfig();
- Properties props = new Properties();
- sigCrypto.setProvider("org.apache.ws.security.components.crypto.Merlin");
- props.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", keyStoreType);
- props.setProperty("org.apache.ws.security.crypto.merlin.file", keyStore);
- props.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", keyStorePassword);
- sigCrypto.setProp(props);
-
- rampartConfig.setSigCryptoConfig(sigCrypto);
- Policy policy = new Policy();
- policy.addAssertion(rampartConfig);
-
- return policy;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/InMemoryPasswordcallbackHandler.java
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/InMemoryPasswordcallbackHandler.java b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/InMemoryPasswordcallbackHandler.java
deleted file mode 100644
index 082d816..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/java/org/wso2/carbon/gapp/registration/ui/InMemoryPasswordcallbackHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.wso2.carbon.gapp.registration.ui;
-
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.ws.security.WSPasswordCallback;
-
-public class InMemoryPasswordcallbackHandler implements CallbackHandler {
-
- private static Map<String, String> keystorePassword = new HashMap<String, String>();
-
- public void handle(Callback[] callbacks)
- throws IOException, UnsupportedCallbackException {
-
- for (int i = 0; i < callbacks.length; i++) {
-
- if (callbacks[i] instanceof WSPasswordCallback) {
- WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
- String id = pc.getIdentifier();
- if (keystorePassword.get(id) != null) {
- pc.setPassword(keystorePassword.get(id));
- } else {
- throw new UnsupportedCallbackException(callbacks[i], "no password found for " + id);
- }
- }
-
- }
- }
-
- public static void addUser(String username, String password) {
- keystorePassword.put(username, password);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/META-INF/component.xml b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/META-INF/component.xml
deleted file mode 100644
index 4436375..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<component xmlns="http://products.wso2.org/carbon">
- <framework-configuration>
- <bypass>
- <authentication>
- <link>/setup_ajaxprocessor.jsp</link>
- <link>/done_ajaxprocessor.jsp</link>
- </authentication>
- </bypass>
- </framework-configuration>
-</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/org/wso2/carbon/gapp/registration/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/org/wso2/carbon/gapp/registration/ui/i18n/Resources.properties b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/org/wso2/carbon/gapp/registration/ui/i18n/Resources.properties
deleted file mode 100644
index ec80581..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/org/wso2/carbon/gapp/registration/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-select.usage.plan.for.tenant=Select a usage plan for tenant
-help=help
-admin.firstname=First Name
-admin.lastname=Last Name
-admin.address=Address
-admin.email=Email
-select.usage.plan.for.tenant=Select a usage plan for tenant
-help=help
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/signonly-policy.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/signonly-policy.xml b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/signonly-policy.xml
deleted file mode 100644
index 2b24b29..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/signonly-policy.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigOnly">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:RequireThumbprintReference />
- <sp:WssX509V3Token10 />
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:RequireThumbprintReference />
- <sp:WssX509V3Token10 />
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:Basic256 />
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict />
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp />
- <sp:OnlySignEntireHeadersAndBody />
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Policy>
- <sp:MustSupportRefKeyIdentifier />
- <sp:MustSupportRefIssuerSerial />
- </sp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body />
- </sp:SignedParts>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigOnly">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:InitiatorToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:RequireThumbprintReference />
- <sp:WssX509V3Token10 />
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:InitiatorToken>
- <sp:RecipientToken>
- <wsp:Policy>
- <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
- <wsp:Policy>
- <sp:RequireThumbprintReference />
- <sp:WssX509V3Token10 />
- </wsp:Policy>
- </sp:X509Token>
- </wsp:Policy>
- </sp:RecipientToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:Basic256 />
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Strict />
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp />
- <sp:OnlySignEntireHeadersAndBody />
- </wsp:Policy>
- </sp:AsymmetricBinding>
- <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Policy>
- <sp:MustSupportRefKeyIdentifier />
- <sp:MustSupportRefIssuerSerial />
- </sp:Policy>
- </sp:Wss10>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <sp:Body />
- </sp:SignedParts>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/done_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/done_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/done_ajaxprocessor.jsp
deleted file mode 100644
index 0295fc7..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/done_ajaxprocessor.jsp
+++ /dev/null
@@ -1,165 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<%@page import="org.wso2.carbon.gapp.registration.ui.GAppRegistrationUIConstants"%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<html>
-<head>
-<%@page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@page import="org.wso2.carbon.CarbonConstants" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@page import="org.wso2.carbon.gapp.registration.ui.GoolgeAppsRegistrationClient" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-
-<%@page import="org.wso2.carbon.ui.util.CharacterEncoder"%><script type="text/javascript" src="../userstore/extensions/js/vui.js"></script>
-
-<%
- String domain = (String)session.getAttribute("domain");
- String callback = (String)session.getAttribute("callback");
-%>
-<script type="text/javascript" src="../admin/js/main.js"></script>
-<link href="../admin/css/global.css" rel="stylesheet" type="text/css" media="all"/>
-<link href="../admin/css/main.css" rel="stylesheet" type="text/css" media="all"/>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-
-
- <link href="../dialog/css/jqueryui/jqueryui-themeroller.css" rel="stylesheet" type="text/css" media="all"/>
- <link href="../dialog/css/dialog.css" rel="stylesheet" type="text/css" media="all"/>
- <link rel="icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
- <link rel="shortcut icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
-
- <script type="text/javascript" src="../admin/js/jquery.js"></script>
- <script type="text/javascript" src="../admin/js/jquery.form.js"></script>
- <script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
- <script type="text/javascript" src="../dialog/js/dialog.js"></script>
-
- <script type="text/javascript" src="../admin/js/main.js"></script>
- <script type="text/javascript" src="../admin/js/WSRequest.js"></script>
- <script type="text/javascript" src="../admin/js/cookies.js"></script>
- <script src="../yui/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
- <script src="../admin/js/widgets.js" type="text/javascript"></script>
-<!--[if gte IE 8]>
-<link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>
-<![endif]-->
-<!--[if gte IE 7]>
-<link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>
-<![endif]-->
-<style type="text/css">
- .header-links{
- display:none !important;
- }
- body, span, td, div{
- font-size:12px;
- }
-</style>
-</head>
-<body>
-<div id="dcontainer"></div>
-<script type="text/javascript">
- function forward() {
- location.href = "<%=callback%>";
- }
-</script>
-<%
- Object isAllowed = session.getAttribute(GAppRegistrationUIConstants.ALLOWED);
- boolean value = (Boolean)isAllowed;
- if (!value) {
- %>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showInfoDialog("Illegal access atempt!");
- });
- </script>
- <%
- return;
- }
-
- boolean isSuccess = true;
- try {
- String subscription = (String)request.getParameter("usage-plan-name");
- String firstName = (String)request.getParameter("admin-firstname");
- String lastName = (String)request.getParameter("admin-lastname");
- String email = (String)request.getParameter("admin-email");
- String[] users = new String[0];
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- GoolgeAppsRegistrationClient client = new GoolgeAppsRegistrationClient();
- client.registerTenantForGAppDomain(backendServerURL, configContext, domain, email, firstName, lastName, subscription);
- } catch (Exception e) {
- isSuccess = false;
- }
-
- if (isSuccess) {%>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showInfoDialog("Stratos setup was successful! You are being redirected back to Google", forward, forward);
- });
-
- </script>
-<%} else {%>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showErrorDialog("Stratos setup was unsuccessful! You are being redirected back to Google", forward, forward);
- });
- </script>
-<%}%>
-<table id="main-table" border="0" cellspacing="0">
- <tr>
- <td id="header"><jsp:include page="../admin/layout/header.jsp" />
- </td>
- </tr>
- <tr>
-
-
- <td id="middle-content">
- <table id="content-table" border="0" cellspacing="0">
-
- <tr>
- <td id="body">
- <fmt:bundle basename="org.wso2.carbon.gapp.registration.ui.i18n.Resources">
-
- <script type="text/javascript">
-
-
- </script>
- <div id="middle">
- <div id="workArea">
- <%if (isSuccess) {%>
- <p>Setting up Stratos was successful. You are being redirected back to <%=callback%></p>
- <% } else { %>
- <p>Setting up Stratos was unsuccessful. You are being redirected back to <%=callback%></p>
- <% } %>
- </div>
- </div>
- </fmt:bundle>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td id="footer"<jsp:include page="../admin/layout/footer.jsp" /></td>
- </tr>
- </table>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/openidaccept_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/openidaccept_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/openidaccept_ajaxprocessor.jsp
deleted file mode 100644
index aed6ece..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/openidaccept_ajaxprocessor.jsp
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<%@page import="org.wso2.carbon.gapp.registration.ui.GoolgeAppsRegistrationClient"%>
-<%@page import="com.google.step2.Step2.AxSchema"%>
-<%@page import="org.wso2.carbon.identity.relyingparty.stub.dto.ClaimDTO"%>
-<%@page import="com.google.gdata.data.appsforyourdomain.provisioning.UserEntry"%>
-<%@page import="com.google.gdata.client.appsforyourdomain.UserService"%>
-<%@page import="java.net.URL"%>
-<%@page import="com.google.gdata.client.authn.oauth.OAuthHmacSha1Signer"%>
-<%@page import="com.google.gdata.client.authn.oauth.GoogleOAuthParameters"%>
-<%@page import="org.wso2.carbon.utils.CarbonUtils"%>
-<%@page import="org.wso2.carbon.gapp.registration.ui.GAppRegistrationUIConstants"%>
-<%@page import="org.wso2.carbon.identity.relyingparty.ui.openid.OpenIDConsumer"%>
-<%@page import="org.wso2.carbon.identity.relyingparty.ui.client.RelyingPartyServiceClient"%>
-<%@page import="org.wso2.carbon.identity.relyingparty.ui.openid.OpenIDAuthenticationRequest"%>
-<%@ page import="org.wso2.carbon.identity.relyingparty.stub.dto.OpenIDDTO" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
- try {
-
- session.setAttribute(GAppRegistrationUIConstants.ALLOWED, new Boolean("false"));
-
- // is authenticated
- String webContextRoot = CarbonUtils.getServerConfiguration().getFirstProperty("WebContextRoot");
- String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL(webContextRoot);
- String recievingURL = adminConsoleURL + "gappregistration/openidaccept_ajaxprocessor.jsp";
- OpenIDDTO openID = OpenIDConsumer.getInstance().validateOpenIDAuthentication(request, recievingURL);
- ClaimDTO[] claims = openID.getClaims();
- String emailId = null;
- for(ClaimDTO claim : claims) {
- if(claim.getClaimUri().equals(AxSchema.EMAIL.getUri())) {
- emailId = claim.getClaimValue();
- }
- }
-
- if (emailId != null) {
- //is authorized
- String serviceName = (String)session.getAttribute("service");
-
- GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
- oauthParameters.setOAuthConsumerKey(
- GoolgeAppsRegistrationClient.
- getGoogleAppSetupPropery(serviceName + ".consumer.key"));
- oauthParameters.setOAuthConsumerSecret(
- GoolgeAppsRegistrationClient.
- getGoogleAppSetupPropery(serviceName + ".consumer.key.secret"));
- OAuthHmacSha1Signer signer = new OAuthHmacSha1Signer();
-
- String username = emailId.substring(0, emailId.indexOf("@"));
- String domain = (String)session.getAttribute("domain");
-
-
- URL feedUrl = new URL("https://apps-apis.google.com/a/feeds/" + domain + "/user/2.0/" +
- username +
- "?xoauth_requestor_id=" +
- emailId);
-
- UserService service = new UserService("ProvisiongApiClient");
- service.setOAuthCredentials(oauthParameters, signer);
- service.useSsl();
- UserEntry entry = service.getEntry(feedUrl, UserEntry.class);
- if (entry.getLogin().getAdmin()) {
- session.setAttribute(GAppRegistrationUIConstants.ALLOWED, new Boolean("true"));
- } else {
- throw new Exception("You are not the admin of this google apps domain. To setup stratos you must be an Admin");
- }
- } else {
- throw new IllegalStateException("Invalid state");
- }
-
- response.sendRedirect("setup_ajaxprocessor.jsp");
- } catch (Exception e) {
- CarbonUIMessage.sendCarbonUIMessage("Failed to setup stratos. " + e.getMessage(), CarbonUIMessage.ERROR, request);
- response.sendRedirect("setup_ajaxprocessor.jsp");
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/setup_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/setup_ajaxprocessor.jsp b/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/setup_ajaxprocessor.jsp
deleted file mode 100644
index bf5a1f6..0000000
--- a/components/stratos/org.wso2.carbon.gapp.registration.ui/2.1.0/src/main/resources/web/gappregistration/setup_ajaxprocessor.jsp
+++ /dev/null
@@ -1,320 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<%@page import="com.google.gdata.data.appsforyourdomain.provisioning.UserEntry"%>
-<%@page import="com.google.gdata.client.appsforyourdomain.UserService"%>
-<%@page import="java.net.URL"%>
-<%@page import="com.google.gdata.client.authn.oauth.OAuthHmacSha1Signer"%>
-<%@page import="com.google.gdata.client.authn.oauth.GoogleOAuthParameters"%>
-<html>
-<head>
-<%@page import="org.wso2.carbon.identity.relyingparty.ui.openid.OpenIDConsumer"%>
-<%@page import="org.wso2.carbon.identity.relyingparty.ui.openid.OpenIDAuthenticationRequest"%>
-<%@page import="org.wso2.carbon.gapp.registration.ui.GAppRegistrationUIConstants"%>
-<%@page import="org.wso2.carbon.stratos.common.packages.stub.PackageInfo"%>
-<%@page import="org.json.JSONArray"%>
-<%@page import="org.wso2.carbon.common.util.CommonUtil"%>
-<%@page import="org.wso2.carbon.utils.ServerConstants"%>
-<%@page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@page import="org.wso2.carbon.CarbonConstants" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@page import="org.wso2.carbon.gapp.registration.ui.GoolgeAppsRegistrationClient" %>
-<%@page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@page import="com.google.step2.Step2.AxSchema"%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-
-<%
- String domain = request.getParameter("domain");
- String callback = request.getParameter("callback");
- String service = request.getParameter("service");
-
- PackageInfo[] packageInfo = new PackageInfo[0];
-
- if (service != null && service.trim().length() > 0) {
- session.setAttribute(GAppRegistrationUIConstants.ALLOWED, null);
- session.setAttribute("service", service.trim());
- } else {
- service = (String) session.getAttribute("service");
- }
-
- if (domain != null && domain.trim().length() > 0) {
- session.setAttribute(GAppRegistrationUIConstants.ALLOWED, null);
- session.setAttribute("domain", domain.trim());
- } else {
- domain = (String) session.getAttribute("domain");
- }
-
- if (callback != null && callback.trim().length() > 0) {
- session.setAttribute(GAppRegistrationUIConstants.ALLOWED, null);
- session.setAttribute("callback", callback);
- } else {
- callback = (String) session.getAttribute("callback");
- }
-%>
-<script type="text/javascript" src="../admin/js/main.js"></script>
-
-<link href="../dialog/css/dialog.css" rel="stylesheet" type="text/css" media="all"/>
-<link href="../admin/css/global.css" rel="stylesheet" type="text/css" media="all"/>
-<link href="../admin/css/main.css" rel="stylesheet" type="text/css" media="all"/>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-<!--[if gte IE 8]>
-<link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>
-<![endif]-->
-<!--[if gte IE 7]>
-<link href="../dialog/css/dialog-ie8.css" rel="stylesheet" type="text/css" media="all"/>
-<![endif]-->
-<style type="text/css">
- .header-links{
- display:none !important;
- }
- body, span, td, div{
- font-size:12px;
- }
-</style>
-
- <link href="../dialog/css/jqueryui/jqueryui-themeroller.css" rel="stylesheet" type="text/css" media="all"/>
- <link href="../dialog/css/dialog.css" rel="stylesheet" type="text/css" media="all"/>
- <link rel="icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
- <link rel="shortcut icon" href="../admin/images/favicon.ico" type="image/x-icon"/>
-
- <script type="text/javascript" src="../admin/js/jquery.js"></script>
- <script type="text/javascript" src="../admin/js/jquery.form.js"></script>
- <script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
- <script type="text/javascript" src="../dialog/js/dialog.js"></script>
-
- <script type="text/javascript" src="../admin/js/main.js"></script>
- <script type="text/javascript" src="../admin/js/WSRequest.js"></script>
- <script type="text/javascript" src="../admin/js/cookies.js"></script>
- <script src="../yui/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
- <script src="../admin/js/widgets.js" type="text/javascript"></script>
- <script type="text/javascript">
-function validateGAppSetupInfo() {
- var error = validateEmpty('admin-email');
- if (error) {
- CARBON.showWarningDialog("Email address cannot be empty.");
- return false;
- }
-
- var fld = document.getElementById('admin-email');
- var value = fld.value;
- if (value.indexOf("@") > -1 ) {
- var emaildomain = value.substring(value.indexOf("@")+1, value.length);
- if (emaildomain == "<%=domain%>") {
- //do nothing
- } else {
- CARBON.showWarningDialog("Admin's email address must be in the same domain.");
- return false;
- }
- } else {
- CARBON.showWarningDialog("Invalid email address.");
- return false;
- }
-
- var error = validateEmpty('admin-firstname');
- if (error) {
- CARBON.showWarningDialog("First name cannot be empty.");
- return false;
- }
- var error = validateEmpty('admin-lastname');
- if (error) {
- CARBON.showWarningDialog("Last name cannot be empty.");
- return false;
- }
- document.gappsetupForm.submit();
-};
-</script>
-</head>
-<body>
-<div id="dcontainer"></div>
-<script type="text/javascript">
- function forward() {
- location.href = "<%=callback%>";
- }
-</script>
-<%
- try {
- Object isAllowed = session.getAttribute(GAppRegistrationUIConstants.ALLOWED);
- if (isAllowed == null) {
- //this is the first call
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext()
- .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- GoolgeAppsRegistrationClient client = new GoolgeAppsRegistrationClient();
-
- if (domain == null) {
- throw new Exception("Cannot proceed since domain is invalid");
- }
-
- boolean isRegistered =
- client.isRegisteredAsGoogleAppDomain(configContext, domain);
- if (isRegistered) {
-%>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showInfoDialog("Strato domain has been setup for the domain " + <%=domain%>, forward, forward);
- });
- </script>
- <%
- return;
- }
-
- OpenIDAuthenticationRequest openIDAuthRequest =
- new OpenIDAuthenticationRequest(
- request,
- response);
- openIDAuthRequest.setOpenIDUrl(domain.trim());
- String returnUrl =
- OpenIDConsumer.getInstance().getAdminConsoleURL(request) +
- "gappregistration/openidaccept_ajaxprocessor.jsp";
- openIDAuthRequest.setReturnUrl(returnUrl);
- openIDAuthRequest.addRequiredClaims(AxSchema.EMAIL.getUri());
- openIDAuthRequest.setRequestClaimsFromIdP(true);
- String forwardTo =
- OpenIDConsumer.getInstance()
- .doOpenIDAuthentication(openIDAuthRequest);
- response.sendRedirect(forwardTo);
- } else {
- boolean value = (Boolean) isAllowed;
- if (!value) {
- CarbonUIMessage carbonMessage =
- (CarbonUIMessage) session.getAttribute(CarbonUIMessage.ID);
- %>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showErrorDialog("<%=carbonMessage.getMessage()%>", forward, forward);
- });
- </script>
- <%
- return;
- }
- }
-
- String serverURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext()
- .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- GoolgeAppsRegistrationClient client = new GoolgeAppsRegistrationClient();
- packageInfo = client.getPackageInfo(serverURL, configContext);
- } catch (Exception e) {
- %>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showErrorDialog("Unable to setup Stratos. <%=e.getMessage()%> ", forward, forward);
- });
- </script>
- <%
- return;
- }
- %>
-
-<table id="main-table" border="0" cellspacing="0">
- <tr>
- <td id="header"><jsp:include page="../admin/layout/header.jsp" />
- </td>
- </tr>
- <tr>
-
-
- <td id="middle-content">
- <table id="content-table" border="0" cellspacing="0">
-
- <tr>
- <td id="body">
-
-
- <fmt:bundle basename="org.wso2.carbon.gapp.registration.ui.i18n.Resources">
- <div id="middle">
- <h2>Setting up the Stratos Domain for your Google Apps Domain</h2>
- <div id="workArea">
- <form method="post" name="gappsetupForm" action="done_ajaxprocessor.jsp">
- <div class="toggle_container">
- <table class="normal-nopadding" cellspacing="0" >
- <tbody>
- <tr>
- <td><fmt:message key="admin.email"/><span
- class="required">*</span></td>
- <td><input type="text" name="admin-email"
- id="admin-email" style="width:400px"/></td>
- </tr>
- <tr>
- <td><fmt:message key="admin.firstname"/><span
- class="required">*</span></td>
- <td><input type="text" name="admin-firstname"
- id="admin-firstname" style="width:400px"/></td>
- </tr>
- <tr>
- <td><fmt:message key="admin.lastname"/><span
- class="required">*</span></td>
- <td colspan="2"><input type="text" name="admin-lastname"
- id="admin-lastname" style="width:400px"/></td>
- </tr>
- <tr>
- <td>
- <fmt:message key="select.usage.plan.for.tenant"/><span class="required">*</span>
- </td>
- <td><p>
- <select name="usage-plan-name" id="usage-plan-name">
- <%
- for (int i = 0; i < packageInfo.length; i++) {
- %>
- <%
- if (i == 0) {
- %>
- <option value="<%=packageInfo[i].getName()%>" selected="selected"><%=packageInfo[i].getName()%></option>
- <%
- } else {
- %>
- <option value="<%=packageInfo[i].getName()%>"><%=packageInfo[i].getName()%></option>
- <%
- }
- }
- %>
- </select>
- <a href=<%=CommonUtil.getStratosConfig().getUsagePlanURL()%>
- target=<%=CommonUtil.getStratosConfig().getUsagePlanURL()%>>
- <b>More info</b>
- </a>
- </p>
- </td>
- </tr>
- <tr>
- <td class="buttonRow" colspan="2"><input type="button" class="button" value="OK" onclick="validateGAppSetupInfo();"/></td>
- </tr>
- </tbody>
- </table>
- </div>
- </form>
- </div>
- </div>
- </fmt:bundle>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td id="footer"><jsp:include page="../admin/layout/footer.jsp" /></td>
- </tr>
- </table>
-
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62dc2f7f/components/stratos/org.wso2.carbon.google.analytics.ui/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/org.wso2.carbon.google.analytics.ui/2.1.0/pom.xml b/components/stratos/org.wso2.carbon.google.analytics.ui/2.1.0/pom.xml
deleted file mode 100644
index 6ba9a06..0000000
--- a/components/stratos/org.wso2.carbon.google.analytics.ui/2.1.0/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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">
- <parent>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>stratos-components</artifactId>
- <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.google.analytics.ui</artifactId>
- <packaging>bundle</packaging>
- <name>WSO2 Stratos-Google Analytics UI</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.axis2.wso2</groupId>
- <artifactId>axis2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.stratos.common</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <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.wso2.carbon.google.analytics.ui.internal
- </Private-Package>
- <Export-Package>
- org.wso2.carbon.google.analytics.ui.*; version=1.0.0,
- </Export-Package>
- <Import-Package>
- javax.servlet;version="${imp.pkg.version.javax.servlet}",
- javax.xml.namespace; version="0.0.0",
- *;resolution:=optional
- </Import-Package>
- <DynamicImport-Package>*</DynamicImport-Package>
- <Carbon-Component>UIBundle</Carbon-Component>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>