Add an exeption to handle app sign up errors

Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/179208fd
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/179208fd
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/179208fd

Branch: refs/heads/master
Commit: 179208fd7edf459ca5211e28d69913db1fad8e49
Parents: 7347ebd
Author: Lahiru Sandaruwan <[email protected]>
Authored: Wed Apr 29 23:01:33 2015 +0530
Committer: Lahiru Sandaruwan <[email protected]>
Committed: Wed Apr 29 23:05:18 2015 +0530

----------------------------------------------------------------------
 .../ApplicationSignUpRestAPIException.java      | 70 ++++++++++++++++++++
 1 file changed, 70 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/179208fd/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ApplicationSignUpRestAPIException.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ApplicationSignUpRestAPIException.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ApplicationSignUpRestAPIException.java
new file mode 100644
index 0000000..f644f52
--- /dev/null
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ApplicationSignUpRestAPIException.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 ApplicationSignUpRestAPIException extends RestAPIException {
+
+    private static final long serialVersionUID = 1L;
+
+    private String message;
+    private Response.Status httpStatusCode;
+
+    public ApplicationSignUpRestAPIException() {
+        super();
+    }
+
+    public ApplicationSignUpRestAPIException(String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+    }
+
+    public ApplicationSignUpRestAPIException(Response.Status httpStatusCode, 
String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public ApplicationSignUpRestAPIException(String message) {
+        super(message);
+        this.message = message;
+    }
+
+    public ApplicationSignUpRestAPIException(Response.Status httpStatusCode, 
String message) {
+        super(message);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public ApplicationSignUpRestAPIException(Throwable cause) {
+        super(cause);
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Response.Status getHTTPStatusCode() {
+        return httpStatusCode;
+    }
+
+
+}

Reply via email to