You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/07/14 06:30:17 UTC
git commit: Adding mising exception classes
Repository: stratos
Updated Branches:
refs/heads/master 4e6ec2846 -> 1b932e4e8
Adding mising exception classes
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1b932e4e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1b932e4e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1b932e4e
Branch: refs/heads/master
Commit: 1b932e4e87be76e3612f47023388f1d553db7548
Parents: 4e6ec28
Author: Udara Liyanage <ud...@wso2.com>
Authored: Mon Jul 14 09:48:52 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Mon Jul 14 09:48:52 2014 +0530
----------------------------------------------------------------------
.../DomainSubscriptionDoesNotExist.java | 48 ++++++++++++++
.../exception/ServiceDoesNotExistException.java | 48 ++++++++++++++
.../exception/TenantNotFoundException.java | 70 ++++++++++++++++++++
3 files changed, 166 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/1b932e4e/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
new file mode 100644
index 0000000..b4d09da
--- /dev/null
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.manager.exception;
+
+public class DomainSubscriptionDoesNotExist extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String message;
+
+ private final String subscriptionDomain;
+
+ public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain, Throwable cause) {
+ super(message, cause);
+ this.message = message;
+ this.subscriptionDomain = subscriptionDomain;
+ }
+
+ public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain) {
+ super(message);
+ this.message = message;
+ this.subscriptionDomain = subscriptionDomain;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public String getSubscriptionDomain() {
+ return subscriptionDomain;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/1b932e4e/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
new file mode 100644
index 0000000..3e040be
--- /dev/null
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.manager.exception;
+
+public class ServiceDoesNotExistException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String message;
+
+ private final String serviceType;
+
+ public ServiceDoesNotExistException(String message, String cartridgeType, Throwable cause) {
+ super(message, cause);
+ this.message = message;
+ this.serviceType = cartridgeType;
+ }
+
+ public ServiceDoesNotExistException(String message, String cartridgeType) {
+ super(message);
+ this.message = message;
+ this.serviceType = cartridgeType;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public String getServiceType() {
+ return serviceType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/1b932e4e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/TenantNotFoundException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/TenantNotFoundException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/TenantNotFoundException.java
new file mode 100644
index 0000000..5aba904
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/TenantNotFoundException.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.exception;
+
+import javax.ws.rs.core.Response;
+
+public class TenantNotFoundException extends RestAPIException {
+
+ private static final long serialVersionUID = 1L;
+
+ private String message;
+ private Response.Status httpStatusCode;
+
+ public TenantNotFoundException() {
+ super();
+ }
+
+ public TenantNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ this.message = message;
+ }
+
+ public TenantNotFoundException(Response.Status httpStatusCode, String message, Throwable cause) {
+ super(message, cause);
+ this.message = message;
+ this.httpStatusCode = httpStatusCode;
+ }
+
+ public TenantNotFoundException(String message) {
+ super(message);
+ this.message = message;
+ }
+
+ public TenantNotFoundException(Response.Status httpStatusCode, String message) {
+ super(message);
+ this.message = message;
+ this.httpStatusCode = httpStatusCode;
+ }
+
+ public TenantNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public Response.Status getHTTPStatusCode() {
+ return httpStatusCode;
+ }
+
+
+}