You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2013/07/05 12:32:44 UTC
[07/34] adding changes to adc components
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/exception/CommandException.java
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/exception/CommandException.java b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/exception/CommandException.java
new file mode 100644
index 0000000..691bbd1
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/exception/CommandException.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2013, WSO2, Inc. http://wso2.org
+ *
+ * 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.adc.mgt.cli.exception;
+
+public class CommandException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public CommandException() {
+ }
+
+ public CommandException(String message) {
+ super(message);
+ }
+
+ public CommandException(Throwable cause) {
+ super(cause);
+ }
+
+ public CommandException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliConstants.java
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliConstants.java b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliConstants.java
new file mode 100644
index 0000000..b2818f6
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliConstants.java
@@ -0,0 +1,111 @@
+package org.wso2.carbon.adc.mgt.cli.utils;
+
+/**
+ * Constants for CLI Tool
+ */
+public class CliConstants {
+
+ public static final String STRATOS_APPLICATION_NAME = "stratos";
+
+ public static final String STRATOS_URL_ENV_PROPERTY = "STRATOS_URL";
+
+ public static final String STRATOS_USERNAME_ENV_PROPERTY = "STRATOS_USERNAME";
+
+ public static final String STRATOS_PASSWORD_ENV_PROPERTY = "STRATOS_PASSWORD";
+
+ public static final String STRATOS_SHELL_PROMPT = "stratos> ";
+
+ public static final int SUCCESSFUL_CODE = 0;
+ public static final int BAD_ARGS_CODE = 1;
+ public static final int ERROR_CODE = 2;
+
+
+ /**
+ * The Directory for storing configuration
+ */
+ public static final String STRATOS_DIR = ".stratos";
+ public static final String STRATOS_HISTORY_DIR = ".history";
+
+ public static final String HELP_ACTION = "help";
+
+ /**
+ * Subscribe to a cartridge.
+ */
+ public static final String SUBSCRIBE_ACTION = "subscribe";
+
+ public static final String UNSUBSCRIBE_ACTION = "unsubscribe";
+
+ /**
+ * List the subscribed cartridges
+ */
+ public static final String LIST_ACTION = "list";
+
+ /**
+ * List the available cartridges
+ */
+ public static final String CARTRIDGES_ACTION = "cartridges";
+
+ /**
+ * Give information of a cartridge.
+ */
+ public static final String INFO_ACTION = "info";
+
+ /**
+ * Synchronize repository
+ */
+ public static final String SYNC_ACTION = "sync";
+
+ /**
+ * Domain mapping
+ */
+ public static final String ADD_DOMAIN_MAPPING_ACTION = "add-domain-mapping";
+ /**
+ * Remove Domain mapping
+ */
+ public static final String REMOVE_DOMAIN_MAPPING_ACTION = "remove-domain-mapping";
+
+ /**
+ * List the available policies
+ */
+ public static final String POLICIES_ACTION = "policies";
+
+ /**
+ * Exit action
+ */
+ public static final String EXIT_ACTION = "exit";
+
+ public static final String REPO_URL_OPTION = "r";
+ public static final String REPO_URL_LONG_OPTION = "repoURL";
+
+ public static final String PRIVATE_REPO_OPTION = "i";
+ public static final String PRIVATE_REPO_LONG_OPTION = "privateRepo";
+
+ public static final String USERNAME_OPTION = "u";
+ public static final String USERNAME_LONG_OPTION = "username";
+
+ public static final String PASSWORD_OPTION = "p";
+ public static final String PASSWORD_LONG_OPTION = "password";
+
+ public static final String HELP_OPTION = "h";
+ public static final String HELP_LONG_OPTION = "help";
+
+ public static final String POLICY_OPTION = "o";
+ public static final String POLICY_LONG_OPTION = "policy";
+
+ public static final String CONNECT_OPTION = "c";
+ public static final String CONNECT_LONG_OPTION = "connect";
+
+ public static final String DATA_ALIAS_OPTION = "d";
+ public static final String DATA_ALIAS_LONG_OPTION = "data-alias";
+
+ public static final String FULL_OPTION = "f";
+ public static final String FULL_LONG_OPTION = "full";
+
+ public static final String FORCE_OPTION = "f";
+ public static final String FORCE_LONG_OPTION = "force";
+
+ public static final String TRACE_OPTION = "trace";
+
+ public static final String DEBUG_OPTION = "debug";
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliMessages.java
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliMessages.java b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CliMessages.java
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CommandLineUtils.java
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CommandLineUtils.java b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CommandLineUtils.java
new file mode 100644
index 0000000..9ef34fe
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/CommandLineUtils.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2013, WSO2, Inc. http://wso2.org
+ *
+ * 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.adc.mgt.cli.utils;
+
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+
+public class CommandLineUtils {
+
+ private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("Resources");
+
+ public static <T> void printTable(T[] data, RowMapper<T> mapper, String... headers) {
+ if (data == null) {
+ return;
+ }
+ // The maximum number of columns
+ // All data String[] length must be equal to this
+ int columns = headers.length;
+ int rows = data.length + 1;
+
+ String[][] table = new String[rows][columns];
+ table[0] = headers;
+
+ for (int i = 0; i < data.length; i++) {
+ T t = data[i];
+ table[i + 1] = mapper.getData(t);
+ }
+
+ // Find the maximum length of a string in each column
+ int[] lengths = new int[columns];
+ for (int i = 0; i < table.length; i++) {
+ for (int j = 0; j < table[i].length; j++) {
+ lengths[j] = Math.max(table[i][j].length(), lengths[j]);
+ }
+ }
+
+ // The border rows
+ String borders[] = new String[lengths.length];
+ // Generate a format string for each column
+ String[] formats = new String[lengths.length];
+ for (int i = 0; i < lengths.length; i++) {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("+");
+ for (int j = 0; j < lengths[i] + 2; j++) {
+ stringBuilder.append("-");
+ }
+ boolean finalColumn = (i + 1 == lengths.length);
+ if (finalColumn) {
+ stringBuilder.append("+\n");
+ }
+ borders[i] = stringBuilder.toString();
+ formats[i] = "| %1$-" + lengths[i] + "s " + (finalColumn ? "|\n" : "");
+ }
+
+ // Print the table
+ for (int i = 0; i < table.length; i++) {
+ for (int j = 0; j < table[i].length; j++) {
+ System.out.print(borders[j]);
+ }
+ for (int j = 0; j < table[i].length; j++) {
+ System.out.format(formats[j], table[i][j]);
+ }
+ if (i + 1 == table.length) {
+ for (int j = 0; j < table[i].length; j++) {
+ System.out.print(borders[j]);
+ }
+ }
+ }
+ }
+
+ public static String getMessage(String key, Object... args) {
+ String message = BUNDLE.getString(key);
+ if (args != null && args.length > 0) {
+ message = MessageFormat.format(message, args);
+ }
+ return message;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/RowMapper.java
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/RowMapper.java b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/RowMapper.java
new file mode 100644
index 0000000..a181a3c
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/java/org/wso2/carbon/adc/mgt/cli/utils/RowMapper.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2013, WSO2, Inc. http://wso2.org
+ *
+ * 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.adc.mgt.cli.utils;
+
+public interface RowMapper<T> {
+ String[] getData(T t);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/Resources.properties b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/Resources.properties
new file mode 100644
index 0000000..fcec66f
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/Resources.properties
@@ -0,0 +1,25 @@
+
+
+cannot.list.available.cartridges=An error occurred when getting available cartridges.
+cannot.list.subscribed.cartridges=An error occurred when getting subscribed cartridges.
+cannot.get.cartridge.info=An error occurred when getting cartridge information.
+cannot.syncrepo=Synchronization failed
+cannot.subscribe=Subscribe failed
+cannot.unsubscribe=Unsubscribe failed
+cannot.mapdomain=Map Domain failed
+cannot.removedomain=Mapped Domain removal failed
+
+notsubscribed.error=You have not subscribed to {0}
+domainmapping.exists.error=The domain mapping {0} already exists for {1}
+
+cartridge.notregistered=Cartridge {0} is not registered
+cartridge.invalid.alias=The provided cartridge alias is not valid. The alias can contain only lowercase characters and numbers.
+cartridge.already.subscribed=You have already subscribed for cartridge type {0}
+cartridge.alias.duplicate=Duplicate cartridge alias {0}
+
+policy.error=Could not load policy.
+repository.required=An external repository required
+repository.credentials.required=Username and Password are required for the repository: {0}
+repository.transport.error=Error connecting to the repository: {0}
+repository.invalid.error=Invalid repository: {0}
+remote.error=Error connecting to back-end service.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/log4j.properties b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/log4j.properties
new file mode 100755
index 0000000..958eb9c
--- /dev/null
+++ b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/log4j.properties
@@ -0,0 +1,15 @@
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c{1} [%t] %n%m%n
+
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=${user.home}/.stratos/.stratos-cli.log
+log4j.appender.file.MaxFileSize=10MB
+log4j.appender.file.MaxBackupIndex=100
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c{1} [%t] %n%m%n
+
+#Loggers
+log4j.rootLogger=info, file
+log4j.logger.org.wso2.carbon.adc.mgt.cli=info
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/wso2carbon.jks
----------------------------------------------------------------------
diff --git a/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/wso2carbon.jks b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/wso2carbon.jks
new file mode 100644
index 0000000..7942c53
Binary files /dev/null and b/components/org.wso2.carbon.adc.mgt.cli/2.1.3/src/main/resources/wso2carbon.jks differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 37d505e..a44906b 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -191,8 +191,9 @@
<axiom.osgi.version.range>[1.2.11.wso2v4, 1.3.0)</axiom.osgi.version.range>
<version.tomcat>7.0.34</version.tomcat>
<axis2.wso2.version>1.6.1.wso2v9</axis2.wso2.version>
- <orbit.version.geronimo-jms_1.1_spec>1.1.0.wso2v1</orbit.version.geronimo-jms_1.1_spec>
- <google.guice.wso2.version>3.0.wso2v1</google.guice.wso2.version>
+ <axis2.kernel.version>1.6.1-wso2v9</axis2.kernel.version>
+ <orbit.version.geronimo-jms_1.1_spec>1.1.0.wso2v1</orbit.version.geronimo-jms_1.1_spec>
+ <google.guice.wso2.version>3.0.wso2v1</google.guice.wso2.version>
<!--eclipse.osgi.version>3.5.0.v20090520</eclipse.osgi.version>
<eclipse.osgi.services.version>3.2.0.v20090520-1800</eclipse.osgi.services.version>
<equinox.commons.logging.version>1.0.4.v200706111724</equinox.commons.logging.version>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/pom.xml b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/pom.xml
deleted file mode 100644
index 6f0f4a6..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
- ~ Copyright 2011-2012 WSO2, Inc. (http://wso2.com)
- ~
- ~ 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>adc-mgt</artifactId>
- <version>2.1.0</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.apache.stratos.adc.mgt.repository.synchronizer</artifactId>
- <version>2.1.1</version>
- <name>Repository Synchronizer</name>
- <description>Repository Synchronizer</description>
- <packaging>war</packaging>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- <version>2.3.2</version>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
- <warName>${project.artifactId}</warName>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>2.6.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>2.6.2</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
- <version>2.4</version>
- <classifier>jdk15</classifier>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/java/org/apache/stratos/adc/mgt/reposync/service/RepositorySynchronizer.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/java/org/apache/stratos/adc/mgt/reposync/service/RepositorySynchronizer.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/java/org/apache/stratos/adc/mgt/reposync/service/RepositorySynchronizer.java
deleted file mode 100644
index 937baab..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/java/org/apache/stratos/adc/mgt/reposync/service/RepositorySynchronizer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- *
- */
-package org.apache.stratos.adc.mgt.reposync.service;
-
-import java.util.Map;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.MediaType;
-
-import net.sf.json.JSONObject;
-
-/**
- * @author wso2
- *
- */
-@Path("/reposyncservice/")
-public class RepositorySynchronizer {
-
- @POST
- @Path("/notify/")
- @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
- public void execute(@FormParam("payload") String payload) {
- Map jsonObject = JSONObject.fromObject(payload);
- System.out.println("Printing......");
- Map repoMap = (Map) jsonObject.get("repository");
- System.out.println("-------------");
- System.out.println("Repo URL : " + repoMap.get("url"));
- System.out.println("-------------");
- System.out.println("-------------");
- System.out.println("-------------");
- System.out.println("---JSON customer : " + payload);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/cxf-servlet.xml
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/cxf-servlet.xml
deleted file mode 100644
index 9454028..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/cxf-servlet.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Copyright 2011-2012 WSO2, Inc. (http://wso2.com)
- ~
- ~ 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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jaxrs="http://cxf.apache.org/jaxrs"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
-
- <jaxrs:server id="repoSynchronizer" address="/notify">
- <jaxrs:serviceBeans>
- <ref bean="serviceBean"/>
- </jaxrs:serviceBeans>
- </jaxrs:server>
-
- <bean id="serviceBean" class="org.apache.stratos.adc.mgt.reposync.service.RepositorySynchronizer"/>
-</beans>
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/web.xml b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 696d5cc..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright 2011-2012 WSO2, Inc. (http://wso2.com)
- ~
- ~ 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.
- -->
-
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-
- <display-name>JAX-WS/JAX-RS Webapp</display-name>
-
- <servlet>
- <servlet-name>JAXServlet</servlet-name>
- <display-name>JAX-WS/JAX-RS Servlet</display-name>
- <description>JAX-WS/JAX-RS Endpoint</description>
- <servlet-class>
- org.apache.cxf.transport.servlet.CXFServlet
- </servlet-class>
- <init-param>
- <param-name>service-list-stylesheet</param-name>
- <param-value>servicelist.css</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>JAXServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <session-config>
- <session-timeout>60</session-timeout>
- </session-config>
-
-</web-app>
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/servicelist.css
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/servicelist.css b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/servicelist.css
deleted file mode 100644
index bbc4987..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt.repository.synchronizer/2.1.1/src/main/webapp/servicelist.css
+++ /dev/null
@@ -1,117 +0,0 @@
-@CHARSET "ISO-8859-1";
-
-/* http://meyerweb.com/eric/tools/css/reset/
- v2.0 | 20110126
- License: none (public domain)
-*/
-
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
-}
-/* HTML5 display-role reset for older browsers */
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display: block;
-}
-
-html {
- background: #efefef;
-}
-
-body {
- line-height: 1;
- width:960px;
- margin:auto;
- background:white;
- padding:10px;
- box-shadow:0px 0px 5px #CCC;
- font-family:"Lucida Grande","Lucida Sans","Microsoft Sans Serif", "Lucida Sans Unicode","Verdana","Sans-serif","trebuchet ms" !important;
-
-}
-ol, ul {
- list-style: none;
-}
-blockquote, q {
- quotes: none;
-}
-blockquote:before, blockquote:after,
-q:before, q:after {
- content: '';
- content: none;
-}
-table {
- border-collapse: collapse;
- border-spacing: 0;
- width:960px;
- border:solid 1px #ccc;
-}
-
-table a {
- font-size:12px;
- color:#1e90ff;
- padding:7px;
-float:left;
-;
-}
-
-.heading {
- font-size: 18px;
- margin-top: 20px;
- float:left;
- color:#0067B1;
- margin-bottom:20px;
- padding-top:20px;
-}
-
-.field {
- font-weight: normal;
- width:120px;
- font-size:12px;
- float:left;
- padding:7px;
- clear:left;
-}
-.value {
- font-weight: bold;
- font-size:12px;
- float:left;
- padding:7px;
- clear:right;
-}
-.porttypename {
- font-weight: bold;
- font-size:14px;
-}
-UL {
- margin-top: 0;
-}
-LI {
- font-weight: normal;
- font-size:12px;
- margin-top:10px;
-}
-
-TD {
- border:1px solid #ccc;
- vertical-align: text-top;
- padding: 5px;
-}
-
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/pom.xml b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/pom.xml
deleted file mode 100644
index f0e1594..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/pom.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- ~ Copyright (c) 2009-2010, 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.apache.stratos</groupId>
- <artifactId>stratos-components</artifactId>
- <version>2.1.0</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.apache.stratos.adc.mgt</artifactId>
- <version>2.1.3</version>
- <packaging>bundle</packaging>
- <name>WSO2 Carbon - ADC BE</name>
- <description>BE functionalities of ADC</description>
- <url>http://wso2.org</url>
-
- <dependencies>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.ws.client</artifactId>
- </dependency>
- <!--<dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging-api</artifactId>
- </dependency> -->
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.load.balance.cartridge.autoscaler.service.stub</artifactId>
- <version>4.1.3</version>
- </dependency>
-
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.adc.topology.mgt</artifactId>
- <version>2.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.utils</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.cartridge.agent.stub</artifactId>
- <version>4.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat.wso2</groupId>
- <artifactId>jdbc-pool</artifactId>
- <version>${version.tomcat}.wso2v1</version>
- </dependency>
-
- <dependency>
- <groupId>com.gitblit</groupId>
- <artifactId>gitblit</artifactId>
- <version>1.2.0.wso2v1</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit</artifactId>
- <version>2.1.0.wso2v1</version>
- </dependency>
- <dependency>
- <groupId>com.jcraft</groupId>
- <artifactId>jsch</artifactId>
- <version>0.1.49.wso2v1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <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>
- <Bundle-Activator>
- org.apache.stratos.adc.mgt.internal.HostingManagementActivator
- </Bundle-Activator>
- <Private-Package>org.apache.stratos.adc.mgt.internal.*</Private-Package>
- <Export-Package>
- org.apache.stratos.adc.mgt.utils*,
- org.apache.stratos.adc.mgt.service.*,
- org.apache.stratos.adc.mgt.*
- </Export-Package>
- <Import-Package>
- org.apache.axis2.*; version="1.6.1.wso2v6",
- org.apache.axiom.*;
- version="1.2.11.wso2v2",
- org.apache.neethi.*;
- version="2.0.4.wso2v4",
- javax.xml.stream.*; version="1.0.1",
- javax.wsdl.*; version="1.6.2",
- org.osgi.framework.*,
- *;resolution:=optional
- </Import-Package>
- <DynamicImport-Package>*</DynamicImport-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/cartridge-config.properties
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/cartridge-config.properties b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/cartridge-config.properties
deleted file mode 100644
index b495014..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/cartridge-config.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-# Configuration properties
-
-sc.ip=s2_ip
-autoscalerService.url=https://cc.wso2.com:9444/services/CloudControllerService/
-autoscaler.time.out=190000
-cartridge.agent.epr=https://s2_ip:9447/services/CartridgeAgentService
-git.host.name=s2_hostname
-git.host.ip=s2_ip
-git.repo.notification.url=https://sc.wso2.com:9445/services/RepoNotificationService/
-identity.server.url=https://sc.wso2.com:9447/services/RepoNotificationService/
-
-adc.jdbc.url=jdbc:h2:repository/database/WSO2S2_DB
-adc.jdbc.username=wso2carbon
-adc.jdbc.password=wso2carbon
-adc.jdbc.driver=org.h2.Driver
-
-mb.server.ip=cc.wso2.com:5673
-
-feature.externalrepo.validation.enabled=true
-feature.internalrepo.enabled=false
-feature.multitenant.multiplesubscription.enabled=false
-
-internal.repo.username=admin
-internal.repo.password=admin
-
-append.script=SCRIPT_PATH/add_entry_zone_file.sh
-remove.script=SCRIPT_PATH/remove_entry_zone_file.sh
-bind.file.path=/etc/bind/db.STRATOS_DOMAIN
-elb.ip=s2_ip
-
-bam.ip=s2_ip
-bam.port=7714
-
-max.attempts=1000
-
-cartridge.key=KEYPATH
-
-repository.info.epr=https://s2_ip:9445/services/RepositoryInformationService
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/tenant-resource-policy.xml
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/tenant-resource-policy.xml b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/tenant-resource-policy.xml
deleted file mode 100644
index 12bbf74..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/conf/tenant-resource-policy.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CartridgeAgentClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CartridgeAgentClient.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CartridgeAgentClient.java
deleted file mode 100644
index 3731107..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CartridgeAgentClient.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.client;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.internal.DataHolder;
-import org.wso2.carbon.cartridge.agent.stub.CartridgeAgentServiceStub;
-
-public class CartridgeAgentClient {
-
- private static final Log log = LogFactory.getLog(CartridgeAgentClient.class);
- CartridgeAgentServiceStub stub = null;
- public CartridgeAgentClient(String epr) throws AxisFault {
- ConfigurationContext clientConfigContext = DataHolder.getClientConfigContext();
- stub = new CartridgeAgentServiceStub(clientConfigContext, epr);
- }
-
- public void unregister(String domain, String subDomain, String hostName) throws Exception {
- log.info(" ** Unregistering -- ");
- stub.unregister(domain, subDomain, hostName);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CloudControllerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CloudControllerServiceClient.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CloudControllerServiceClient.java
deleted file mode 100644
index 1f2bb28..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/CloudControllerServiceClient.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.client;
-
-import java.rmi.RemoteException;
-
-import javax.activation.DataHandler;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.exception.UnregisteredCartridgeException;
-import org.apache.stratos.adc.mgt.internal.DataHolder;
-import org.wso2.carbon.stratos.cloud.controller.stub.CloudControllerServiceStub;
-import org.wso2.carbon.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
-import org.wso2.carbon.stratos.cloud.controller.util.xsd.CartridgeInfo;
-import org.wso2.carbon.stratos.cloud.controller.util.xsd.Properties;
-
-public class CloudControllerServiceClient {
-
- private CloudControllerServiceStub stub;
-
- private static final Log log = LogFactory.getLog(CloudControllerServiceClient.class);
-
- public CloudControllerServiceClient(String epr) throws AxisFault {
-
- ConfigurationContext clientConfigContext = DataHolder.getClientConfigContext();
- try {
- stub = new CloudControllerServiceStub(clientConfigContext, epr);
- stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000);
-
- } catch (AxisFault axisFault) {
- String msg = "Failed to initiate AutoscalerService client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new AxisFault(msg, axisFault);
- }
-
- }
-
- public boolean register(String domainName, String subDomain, String cartridgeType,
- DataHandler payload, String tenantRange, String hostName, Properties properties) throws RemoteException, CloudControllerServiceUnregisteredCartridgeExceptionException
- {
- return stub.registerService(domainName, subDomain, tenantRange, cartridgeType, hostName,
- properties, payload);
-
- }
-
- public String startInstance(String domain, String subDomain) throws Exception {
- return stub.startInstance(domain, subDomain);
- }
-
- public boolean terminateAllInstances(String domain, String subDomain) throws Exception {
- return stub.terminateAllInstances(domain, subDomain);
- }
-
- public String[] getRegisteredCartridges() throws Exception {
- return stub.getRegisteredCartridges();
- }
-
- public boolean createKeyPair(String cartridge, String keyPairName, String publicKey)
- throws Exception {
- return stub.createKeyPairFromPublicKey(cartridge, keyPairName, publicKey);
- }
-
- public CartridgeInfo getCartridgeInfo(String cartridgeType) throws UnregisteredCartridgeException, Exception {
- try {
- return stub.getCartridgeInfo(cartridgeType);
- } catch (RemoteException e) {
- throw e;
- } catch (CloudControllerServiceUnregisteredCartridgeExceptionException e) {
- throw new UnregisteredCartridgeException("Not a registered cartridge " + cartridgeType, cartridgeType, e);
- }
- }
-
- public boolean unregisterService(String domain, String subDomain) throws Exception {
- return stub.unregisterService(domain, subDomain);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/RegistryClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/RegistryClient.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/RegistryClient.java
deleted file mode 100644
index c1d6cd3..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/client/RegistryClient.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.client;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.UUID;
-
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.commons.io.IOUtils;
-import org.wso2.carbon.registry.core.Association;
-import org.wso2.carbon.registry.core.Collection;
-import org.wso2.carbon.registry.core.Registry;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient;
-
-public class RegistryClient {
-
- // url where the repository is running its services interface
- private static String backendURL = "http://localhost:9763/services/";
- private static ConfigurationContext configContext = null;
-
- // configuration locations used to bootstrap axis2
- private static String axis2Repo =
- "/home/wso2/Desktop/HP-demo-packs-with-video/cartridge/wso2stratos-cartridge-1.0.0-SNAPSHOT/repository/conf/axis2";
- private static String axis2Conf =
- "/home/wso2/Desktop/HP-demo-packs-with-video/cartridge/wso2stratos-cartridge-1.0.0-SNAPSHOT/repository/conf/axis2/axis2_client.xml";
- private static String serverURL = "https://localhost:9443/services/";
-
- public RegistryClient() {
- // TODO Auto-generated constructor stub
- }
-
- private static WSRegistryServiceClient initialize() throws Exception {
- // set these properties, this is used for authentication over https to
- // the registry
- // if you have a newer version, you can update the keystore by copying
- // it from
- // the security directory of the repository
- System.setProperty("javax.net.ssl.trustStore", "wso2carbon.jks");
- System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
- System.setProperty("javax.net.ssl.trustStoreType", "JKS");
-
- configContext =
- ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo,
- axis2Conf);
- return new WSRegistryServiceClient(serverURL, "admin", "admin", backendURL, configContext);
- }
-
- public static void addKey(String keyName, String content) throws Exception {
- Registry registry = initialize();
-
- // get the governance folder
- Resource governanceFolder = registry.get("/_system/governance");
- System.out.println("Folder description: " + governanceFolder.getDescription());
- Resource r1 = registry.newResource();
- String path = "/_system/governance/" + keyName;
- r1.setContent(content);
- registry.put(path, r1);
-
- /*
- * List<Resource> paths = getServicePath(registry,
- * "/_system/governance/trunk/services");
- *
- * for (Resource service : paths) { // we've got all the services here
- *
- * Properties props = service.getProperties(); for (Object prop :
- * props.keySet()) { System.out.println(prop + " - " + props.get(prop));
- * }
- *
- * Association[] associations =
- * registry.getAssociations(service.getPath(), "Documentation"); for
- * (Association association : associations) {
- * System.out.println(association.getAssociationType()); } }
- */
- }
-
- private static List<Resource> getServicePath(Registry registry, String servicesResource)
- throws RegistryException {
- List<Resource> result = new ArrayList<Resource>();
- Resource resource = registry.get(servicesResource);
-
- if (resource instanceof Collection) {
- Object content = resource.getContent();
- for (Object path : (Object[]) content) {
- result.addAll(getServicePath(registry, (String) path));
- }
- } else if (resource instanceof Resource) {
- result.add(resource);
- }
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/custom/domain/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/custom/domain/RegistryManager.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/custom/domain/RegistryManager.java
deleted file mode 100644
index d53fcc0..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/custom/domain/RegistryManager.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.custom.domain;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.exception.ADCException;
-import org.apache.stratos.adc.mgt.exception.DomainMappingExistsException;
-import org.apache.stratos.adc.mgt.internal.DataHolder;
-import org.apache.stratos.adc.mgt.utils.CartridgeConstants;
-import org.wso2.carbon.registry.core.Collection;
-import org.wso2.carbon.registry.core.Registry;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-
-public class RegistryManager {
- private static Log log = LogFactory.getLog(RegistryManager.class);
- private static Registry registry = DataHolder.getRegistry();
-
- public RegistryManager() {
- try {
- if (!registry.resourceExists(CartridgeConstants.DomainMappingInfo.HOSTINFO)) {
- registry.put(CartridgeConstants.DomainMappingInfo.HOSTINFO,
- registry.newCollection());
- }
- } catch (RegistryException e) {
- String msg =
- "Error while accessing registry or initializing domain mapping registry path\n";
- log.error(msg + e.getMessage());
- }
- }
-
- /**
- *
- */
- public void addDomainMappingToRegistry(String hostName, String actualHost)
- throws ADCException, RegistryException, DomainMappingExistsException {
- try {
- registry.beginTransaction();
- Resource hostResource = registry.newResource();
- hostResource.addProperty(CartridgeConstants.DomainMappingInfo.ACTUAL_HOST, actualHost);
- if (!registry.resourceExists(CartridgeConstants.DomainMappingInfo.HOSTINFO +
- hostName)) {
- registry.put(CartridgeConstants.DomainMappingInfo.HOSTINFO + hostName,
- hostResource);
- } else {
- registry.rollbackTransaction();
- String msg = "Requested domain is already taken!";
- log.error(msg);
- throw new DomainMappingExistsException(msg, hostName);
- }
- registry.commitTransaction();
- } catch (RegistryException e) {
- registry.rollbackTransaction();
- throw e;
- }
- }
-
-
- /**
- *
- */
- public void removeDomainMappingFromRegistry(String actualHost) throws Exception {
- try {
- registry.beginTransaction();
- String hostResourcePath = CartridgeConstants.DomainMappingInfo.HOSTINFO;
- if (registry.resourceExists(hostResourcePath)) {
- Resource hostResource = registry.get(hostResourcePath);
- Collection hostInfoCollection;
- if(hostResource instanceof Collection){
- hostInfoCollection = (Collection) hostResource;
- } else {
- throw new Exception("Resource is not a collection " + hostResourcePath );
- }
- String[] paths = hostInfoCollection.getChildren();
- for (String path: paths){
- Resource domainMapping = registry.get(path);
- String actualHostInRegistry = domainMapping.getProperty(CartridgeConstants.DomainMappingInfo.ACTUAL_HOST);
- if(actualHostInRegistry != null && actualHost.equalsIgnoreCase(actualHostInRegistry)){
- registry.delete(path);
- }
- }
- }
- registry.commitTransaction();
- } catch (RegistryException e) {
- registry.rollbackTransaction();
- log.error("Unable to remove the mapping", e);
- throw e;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/CartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/CartridgeSubscription.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/CartridgeSubscription.java
deleted file mode 100644
index 9d48b0f..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/CartridgeSubscription.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dao;
-
-import java.util.List;
-
-public class CartridgeSubscription {
-
- private int subscriptionId;
- private int tenantId;
- private String cartridge;
- private String provider;
- private String hostName;
- private String policy;
- private List<PortMapping> portMappings;
- private String clusterDomain;
- private String clusterSubdomain;
- private Repository repository;
- private String state;
- private String alias;
- private String tenantDomain;
- private DataCartridge dataCartridge;
- private String baseDirectory;
- private String mappedDomain;
- private String mgtClusterDomain;
- private String mgtClusterSubDomain;
-
- public int getSubscriptionId() {
- return subscriptionId;
- }
-
- public void setSubscriptionId(int subscriptionId) {
- this.subscriptionId = subscriptionId;
- }
-
- public int getTenantId() {
- return tenantId;
- }
-
- public void setTenantId(int tenantId) {
- this.tenantId = tenantId;
- }
-
- public String getCartridge() {
- return cartridge;
- }
-
- public void setCartridge(String cartridge) {
- this.cartridge = cartridge;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- public String getHostName() {
- return hostName;
- }
-
- public void setHostName(String hostName) {
- this.hostName = hostName;
- }
-
- public String getPolicy() {
- return policy;
- }
-
- public void setPolicy(String policy) {
- this.policy = policy;
- }
-
- public List<PortMapping> getPortMappings() {
- return portMappings;
- }
-
- public void setPortMappings(List<PortMapping> portMappings) {
- this.portMappings = portMappings;
- }
-
- public String getClusterDomain() {
- return clusterDomain;
- }
-
- public void setClusterDomain(String clusterDomain) {
- this.clusterDomain = clusterDomain;
- }
-
- public String getClusterSubdomain() {
- return clusterSubdomain;
- }
-
- public void setClusterSubdomain(String clusterSubdomain) {
- this.clusterSubdomain = clusterSubdomain;
- }
-
- public Repository getRepository() {
- return repository;
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getAlias() {
- return alias;
- }
-
- public void setAlias(String alias) {
- this.alias = alias;
- }
-
- public String getTenantDomain() {
- return tenantDomain;
- }
-
- public void setTenantDomain(String tenantDomain) {
- this.tenantDomain = tenantDomain;
- }
-
- public DataCartridge getDataCartridge() {
- return dataCartridge;
- }
-
- public void setDataCartridge(DataCartridge dataCartridge) {
- this.dataCartridge = dataCartridge;
- }
-
- public String getBaseDirectory() {
- return baseDirectory;
- }
-
- public void setBaseDirectory(String baseDirectory) {
- this.baseDirectory = baseDirectory;
- }
-
- public String getMappedDomain() {
- return mappedDomain;
- }
-
- public void setMappedDomain(String mappedDomain) {
- this.mappedDomain = mappedDomain;
- }
-
- public String getMgtClusterDomain() {
- return mgtClusterDomain;
- }
-
- public void setMgtClusterDomain(String mgtClusterDomain) {
- this.mgtClusterDomain = mgtClusterDomain;
- }
-
- public String getMgtClusterSubDomain() {
- return mgtClusterSubDomain;
- }
-
- public void setMgtClusterSubDomain(String mgtClusterSubDomain) {
- this.mgtClusterSubDomain = mgtClusterSubDomain;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/DataCartridge.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/DataCartridge.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/DataCartridge.java
deleted file mode 100644
index 8e43079..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/DataCartridge.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dao;
-
-public class DataCartridge {
-
- private int id;
- private String dataCartridgeType;
- private String userName;
- private String password;
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getDataCartridgeType() {
- return dataCartridgeType;
- }
- public void setDataCartridgeType(String dataCartridgeType) {
- this.dataCartridgeType = dataCartridgeType;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/PortMapping.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/PortMapping.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/PortMapping.java
deleted file mode 100644
index 5916847..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/PortMapping.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dao;
-
-public class PortMapping {
- private int id;
- private String type;
- private String primaryPort;
- private String proxyPort;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getPrimaryPort() {
- return primaryPort;
- }
-
- public void setPrimaryPort(String primaryPort) {
- this.primaryPort = primaryPort;
- }
-
- public String getProxyPort() {
- return proxyPort;
- }
-
- public void setProxyPort(String proxyPort) {
- this.proxyPort = proxyPort;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/Repository.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/Repository.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/Repository.java
deleted file mode 100644
index a951e78..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/Repository.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dao;
-
-public class Repository {
- private int repoId;
- private String repoName;
- private String repoUserName;
- private String repoUserPassword;
-
- public int getRepoId() {
- return repoId;
- }
-
- public void setRepoId(int repoId) {
- this.repoId = repoId;
- }
-
- public String getRepoName() {
- return repoName;
- }
-
- public void setRepoName(String repoName) {
- this.repoName = repoName;
- }
-
- public String getRepoUserName() {
- return repoUserName;
- }
-
- public void setRepoUserName(String repoUserName) {
- this.repoUserName=repoUserName;
- }
-
- public String getRepoUserPassword() {
- return repoUserPassword;
- }
-
- public void setRepoUserPassword(String repoUserPassword) {
- this.repoUserPassword=repoUserPassword;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/RepositoryCredentials.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/RepositoryCredentials.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/RepositoryCredentials.java
deleted file mode 100644
index 90670e7..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dao/RepositoryCredentials.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.stratos.adc.mgt.dao;
-
-public class RepositoryCredentials {
-
- private String url;
- private String userName;
- private String password;
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
deleted file mode 100644
index ceb77fb..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
+++ /dev/null
@@ -1,86 +0,0 @@
- /*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dns;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.utils.CartridgeConstants;
-
-/**
- * This class is for handling dns entries.
- */
-public class DNSManager {
- private static final Log log = LogFactory.getLog(DNSManager.class);
-
- /**
- * This is get called when there is a need of adding new sub domain to
- * exciting domain.
- * It will append required text to bind9 zone file and reload bind9 server.
- * Note: make sure the user who run ADC has got rights to run sudo scripts
- * without password
- *
- * @param subDomain
- * will be added in front of domain
- */
- public void addNewSubDomain(String subDomain, String ip) {
- try {
- Runtime.getRuntime()
- .exec(CartridgeConstants.SUDO_SH + " " +
- // script script file that will be used to edit
- // required files
- System.getProperty(CartridgeConstants.APPEND_SCRIPT) + " " +
- subDomain + " " +
- // machineIp ip of the machine DNS bind service
- // is running
- ip + " " +
- // bindFile the file which we edit to append
- // the DNS entry
- System.getProperty(CartridgeConstants.BIND_FILE_PATH));
- log.info("New sub domain is added to zone file");
- } catch (Exception e) {
- log.error(e.getMessage());
- throw new RuntimeException(e);
- }
- }
- /**
- * This is get called when there is a need of remove a sub domain.
- * It will remove required text from bind9 zone file and reload bind9 server.
- * Note: make sure the user who run ADC has got rights to run sudo scripts
- * without password
- *
- * @param subDomain
- * will be used to delete the entry related to this
- */
- public void removeSubDomain(String subDomain) {
- try {
- Runtime.getRuntime()
- .exec(CartridgeConstants.SUDO_SH + " " +
- // script script file that will be used to edit
- // required files
- System.getProperty(CartridgeConstants.REMOVE_SCRIPT) + " " +
- subDomain + " " +
- // bindFile the file which we edit to remove
- // the DNS entry
- System.getProperty(CartridgeConstants.BIND_FILE_PATH));
- log.info("Sub domain is removed from zone file");
- } catch (Exception e) {
- log.error(e.getMessage());
- throw new RuntimeException(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
deleted file mode 100644
index facfbe3..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dto;
-
-public class AppRepo {
-
- private int tenantId;
- private String repoName;
- private String cartridge;
- private String appName;
- private boolean isWebRoot;
- private String tenantPubKey;
- private String tenantCartridgePubKey;
-
- public int getTenantId() {
- return tenantId;
- }
-
- public void setTenantId(int tenantId) {
- this.tenantId = tenantId;
- }
-
- public String getRepoName() {
- return repoName;
- }
-
- public void setRepoName(String repoName) {
- this.repoName = repoName;
- }
-
- public String getCartridge() {
- return cartridge;
- }
-
- public void setCartridge(String cartridge) {
- this.cartridge = cartridge;
- }
-
- public String getAppName() {
- return appName;
- }
-
- public void setAppName(String appName) {
- this.appName = appName;
- }
-
- public boolean isWebRoot() {
- return isWebRoot;
- }
-
- public void setWebRoot(boolean isWebRoot) {
- this.isWebRoot = isWebRoot;
- }
-
- public String getTenantPubKey() {
- return tenantPubKey;
- }
-
- public void setTenantPubKey(String tenantPubKey) {
- this.tenantPubKey = tenantPubKey;
- }
-
- public String getTenantCartridgePubKey() {
- return tenantCartridgePubKey;
- }
-
- public void setTenantCartridgePubKey(String tenantCartridgePubKey) {
- this.tenantCartridgePubKey = tenantCartridgePubKey;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
deleted file mode 100644
index 4d990ce..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright WSO2, Inc. (http://wso2.com)
- *
- * 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.apache.stratos.adc.mgt.dto;
-
-public class Cartridge implements Comparable<Cartridge> {
-
- private String displayName;
- private String description;
- private String cartridgeAlias;
- private String cartridgeType;
- private int activeInstances;
- private String status;
- private String ip;
- private String password;
- private String provider;
- private String version;
- private boolean multiTenant;
- private String hostName;
- private String policy;
- private String policyDescription;
- private String repoURL;
- private String dbUserName;
- private String mappedDomain;
-
- private String[] accessURLs;
-
- public String getDisplayName() {
- return displayName;
- }
-
- public void setDisplayName(String displayName) {
- this.displayName = displayName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getCartridgeAlias() {
- return cartridgeAlias;
- }
-
- public void setCartridgeAlias(String cartridgeAlias) {
- this.cartridgeAlias = cartridgeAlias;
- }
-
- public String getCartridgeType() {
- return cartridgeType;
- }
-
- public void setCartridgeType(String cartridgeType) {
- this.cartridgeType = cartridgeType;
- }
-
- public int getActiveInstances() {
- return activeInstances;
- }
-
- public void setActiveInstances(int activeInstances) {
- this.activeInstances = activeInstances;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getIp() {
- return ip;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public boolean isMultiTenant() {
- return multiTenant;
- }
-
- public void setMultiTenant(boolean multiTenant) {
- this.multiTenant = multiTenant;
- }
-
- public String getHostName() {
- return hostName;
- }
-
- public void setHostName(String hostName) {
- this.hostName = hostName;
- }
-
- public String getPolicy() {
- return policy;
- }
-
- public void setPolicy(String policy) {
- this.policy = policy;
- }
-
- public String getPolicyDescription() {
- return policyDescription;
- }
-
- public void setPolicyDescription(String policyDescription) {
- this.policyDescription = policyDescription;
- }
-
- public String getRepoURL() {
- return repoURL;
- }
-
- public void setRepoURL(String repoURL) {
- this.repoURL = repoURL;
- }
-
- public String getDbUserName() {
- return dbUserName;
- }
-
- public String[] getAccessURLs() {
- return accessURLs;
- }
-
- public void setAccessURLs(String[] accessURLs) {
- this.accessURLs = accessURLs;
- }
-
- public void setDbUserName(String dbUserName) {
- this.dbUserName = dbUserName;
- }
-
- public String getMappedDomain() {
- return mappedDomain;
- }
-
- public void setMappedDomain(String mappedDomain) {
- this.mappedDomain = mappedDomain;
- }
-
- @Override
- public int compareTo(Cartridge o) {
- int compare = 0;
- if (cartridgeAlias != null && o.cartridgeAlias != null) {
- compare = cartridgeAlias.compareTo(o.cartridgeAlias);
- }
- if (compare == 0 && cartridgeType != null && o.cartridgeType != null) {
- compare = cartridgeType.compareTo(o.cartridgeType);
- }
- return compare;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
deleted file mode 100644
index 48a0086..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.apache.stratos.adc.mgt.dto;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
deleted file mode 100644
index 48a0086..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.apache.stratos.adc.mgt.dto;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
deleted file mode 100644
index 1339a16..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * 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.apache.stratos.adc.mgt.dto;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.wso2.carbon.utils.Pageable;
-
-/**
- * This class holds paginated information about cartridges
- */
-public final class CartridgeWrapper implements Pageable {
-
- private Cartridge[] cartridges;
- private int numberOfPages;
-
- public CartridgeWrapper() {
- }
-
- public int getNumberOfPages() {
- return numberOfPages;
- }
-
- public void setNumberOfPages(int numberOfPages) {
- this.numberOfPages = numberOfPages;
- }
-
- public <T> void set(List<T> items) {
- this.cartridges = items.toArray(new Cartridge[items.size()]);
- }
-
- public Cartridge[] getCartridges() {
- return cartridges != null ? Arrays.copyOf(cartridges, cartridges.length) : null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4f217859/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java
----------------------------------------------------------------------
diff --git a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java b/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java
deleted file mode 100644
index 451618d..0000000
--- a/components/stratos/artifact-deployment-coordinator/org.apache.stratos.adc.mgt/2.1.3/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright 2013, WSO2, Inc. http://wso2.org
- *
- * 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.apache.stratos.adc.mgt.dto;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class Policy implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String description;
- private boolean defaultPolicy;
-
- private Integer minAppInstances;
- private Integer maxAppInstances;
- private Integer maxRequestsPerSecond;
- private BigDecimal alarmingUpperRate;
- private BigDecimal alarmingLowerRate;
- private BigDecimal scaleDownFactor;
- private Integer roundsToAverage;
-
- public Policy() {
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isDefaultPolicy() {
- return defaultPolicy;
- }
-
- public void setDefaultPolicy(boolean defaultPolicy) {
- this.defaultPolicy = defaultPolicy;
- }
-
- public Integer getMinAppInstances() {
- return minAppInstances;
- }
-
- public void setMinAppInstances(Integer minAppInstances) {
- this.minAppInstances = minAppInstances;
- }
-
- public Integer getMaxAppInstances() {
- return maxAppInstances;
- }
-
- public void setMaxAppInstances(Integer maxAppInstances) {
- this.maxAppInstances = maxAppInstances;
- }
-
- public Integer getMaxRequestsPerSecond() {
- return maxRequestsPerSecond;
- }
-
- public void setMaxRequestsPerSecond(Integer maxRequestsPerSecond) {
- this.maxRequestsPerSecond = maxRequestsPerSecond;
- }
-
- public BigDecimal getAlarmingUpperRate() {
- return alarmingUpperRate;
- }
-
- public void setAlarmingUpperRate(BigDecimal alarmingUpperRate) {
- this.alarmingUpperRate = alarmingUpperRate;
- }
-
- public BigDecimal getAlarmingLowerRate() {
- return alarmingLowerRate;
- }
-
- public void setAlarmingLowerRate(BigDecimal alarmingLowerRate) {
- this.alarmingLowerRate = alarmingLowerRate;
- }
-
- public BigDecimal getScaleDownFactor() {
- return scaleDownFactor;
- }
-
- public void setScaleDownFactor(BigDecimal scaleDownFactor) {
- this.scaleDownFactor = scaleDownFactor;
- }
-
- public Integer getRoundsToAverage() {
- return roundsToAverage;
- }
-
- public void setRoundsToAverage(Integer roundsToAverage) {
- this.roundsToAverage = roundsToAverage;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof Policy))
- return false;
- Policy other = (Policy) obj;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- return true;
- }
-
-}