Permalink
Browse files

Merge pull request #1143 from MPDL-Innovations/develop

imeji 3.4
  • Loading branch information...
2 parents ccac053 + 6919bc5 commit 90023d45edfe90fbac8306e3a94d4d9ed774d20a @bastiensaquet bastiensaquet committed May 12, 2016
Showing 565 changed files with 15,297 additions and 13,323 deletions.
View
@@ -350,7 +350,7 @@
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf2</artifactId>
<version>3.3.3</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
@@ -599,6 +599,11 @@
<artifactId>pdfbox</artifactId>
<version>1.8.10</version>
</dependency>
+ <dependency>
+ <groupId>org.mapdb</groupId>
+ <artifactId>mapdb</artifactId>
+ <version>1.0.9</version>
+ </dependency>
</dependencies>
<profiles>
<!-- this profile is used by developers -->
@@ -6,7 +6,7 @@
/**
* Constructor for a new {@link AlreadyExistsException}
- *
+ *
* @param message
*/
public AlreadyExistsException(String message) {
@@ -1,20 +1,20 @@
/*
- *
+ *
* CDDL HEADER START
- *
+ *
* The contents of this file are subject to the terms of the Common Development and Distribution
* License, Version 1.0 only (the "License"). You may not use this file except in compliance with
* the License.
- *
+ *
* You can obtain a copy of the license at license/ESCIDOC.LICENSE or http://www.escidoc.de/license.
* See the License for the specific language governing permissions and limitations under the
* License.
- *
+ *
* When distributing Covered Code, include this CDDL HEADER in each file and include the License
* file at license/ESCIDOC.LICENSE. If applicable, add the following below this CDDL HEADER, with
* the fields enclosed by brackets "[]" replaced with your own identifying information: Portions
* Copyright [yyyy] [name of copyright owner]
- *
+ *
* CDDL HEADER END
*/
/*
@@ -1,20 +1,20 @@
/*
- *
+ *
* CDDL HEADER START
- *
+ *
* The contents of this file are subject to the terms of the Common Development and Distribution
* License, Version 1.0 only (the "License"). You may not use this file except in compliance with
* the License.
- *
+ *
* You can obtain a copy of the license at license/ESCIDOC.LICENSE or http://www.escidoc.de/license.
* See the License for the specific language governing permissions and limitations under the
* License.
- *
+ *
* When distributing Covered Code, include this CDDL HEADER in each file and include the License
* file at license/ESCIDOC.LICENSE. If applicable, add the following below this CDDL HEADER, with
* the fields enclosed by brackets "[]" replaced with your own identifying information: Portions
* Copyright [yyyy] [name of copyright owner]
- *
+ *
* CDDL HEADER END
*/
/*
@@ -38,4 +38,8 @@ public BadRequestException(String message) {
super(message);
}
+ public BadRequestException(String message, Throwable e) {
+ super(message, e);
+ }
+
}
@@ -5,6 +5,10 @@
public class ImejiException extends Exception {
private static final long serialVersionUID = -1024323233094119992L;
+ public ImejiException() {
+ super();
+ }
+
public ImejiException(String message) {
super(message);
}
@@ -18,7 +22,7 @@ public ImejiException(String message, Throwable e) {
* shows only the message plus the first element of the stacktrace
*/
protected void minimizeStacktrace() {
- setStackTrace(Arrays.copyOf(getStackTrace(), 1));
+ setStackTrace(Arrays.copyOf(getStackTrace(), 5));
}
}
@@ -2,7 +2,7 @@
/**
* Exception for authentication of inactive users
- *
+ *
* @author bastiens
*
*/
@@ -1,20 +1,20 @@
/*
- *
+ *
* CDDL HEADER START
- *
+ *
* The contents of this file are subject to the terms of the Common Development and Distribution
* License, Version 1.0 only (the "License"). You may not use this file except in compliance with
* the License.
- *
+ *
* You can obtain a copy of the license at license/ESCIDOC.LICENSE or http://www.escidoc.de/license.
* See the License for the specific language governing permissions and limitations under the
* License.
- *
+ *
* When distributing Covered Code, include this CDDL HEADER in each file and include the License
* file at license/ESCIDOC.LICENSE. If applicable, add the following below this CDDL HEADER, with
* the fields enclosed by brackets "[]" replaced with your own identifying information: Portions
* Copyright [yyyy] [name of copyright owner]
- *
+ *
* CDDL HEADER END
*/
/*
@@ -27,7 +27,7 @@
/**
- *
+ *
*/
public class NotAllowedError extends ImejiException {
private static final long serialVersionUID = -3504946406047760565L;
@@ -1,14 +1,14 @@
/**
- *
+ *
*/
package de.mpg.imeji.exceptions;
public class NotSupportedMethodException extends ImejiException {
/**
- *
- */
+ *
+ */
private static final long serialVersionUID = -474498315581861322L;
public NotSupportedMethodException() {
@@ -3,13 +3,13 @@
/**
* Created by vlad on 13.08.15.
*/
-public class QuotaExceededException extends ImejiException{
+public class QuotaExceededException extends ImejiException {
- private static final long serialVersionUID = 145948204335897106L;
+ private static final long serialVersionUID = 145948204335897106L;
- public QuotaExceededException(String message) {
- super(message);
- minimizeStacktrace();
- }
+ public QuotaExceededException(String message) {
+ super(message);
+ minimizeStacktrace();
+ }
}
@@ -1,4 +1,4 @@
-package de.mpg.imeji.logic.controller.exceptions;
+package de.mpg.imeji.exceptions;
public class TypeNotAllowedException extends Exception {
@@ -8,4 +8,8 @@ public TypeNotAllowedException(String message) {
super(message);
}
+ public TypeNotAllowedException(String message, Throwable e) {
+ super(message, e);
+ }
+
}
@@ -5,13 +5,13 @@
import java.util.Set;
public class UnprocessableError extends ImejiException {
- /**
- *
- */
private static final long serialVersionUID = -2949658202758865427L;
-
private Set<String> messages = new HashSet<>();
+ public UnprocessableError() {
+ super();
+ }
+
public UnprocessableError(String message) {
super(message);
messages.add(message);
@@ -25,9 +25,31 @@ public UnprocessableError(Set<String> messages) {
public UnprocessableError(String message, Throwable e) {
super(message, e);
this.messages.add(message);
+ if (e instanceof UnprocessableError) {
+ this.messages.addAll(((UnprocessableError) e).getMessages());
+ }
+ }
+
+ public UnprocessableError(Throwable e) {
+ super(e.getMessage(), e);
+ if (e instanceof UnprocessableError) {
+ this.messages.addAll(((UnprocessableError) e).getMessages());
+ }
+ }
+
+ public UnprocessableError(Set<String> messages, Throwable e) {
+ super(e.getMessage(), e);
+ this.messages.addAll(messages);
+ if (e instanceof UnprocessableError) {
+ this.messages.addAll(((UnprocessableError) e).getMessages());
+ }
}
public Set<String> getMessages() {
return messages;
}
+
+ public boolean hasMessages() {
+ return !messages.isEmpty();
+ }
}
@@ -2,7 +2,7 @@
/**
* Exception when ann non valid workflow operation is done (for instance: release, discard)
- *
+ *
* @author bastiens
*
*/
Oops, something went wrong.

0 comments on commit 90023d4

Please sign in to comment.