Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1143 from MPDL-Innovations/develop
Browse files Browse the repository at this point in the history
imeji 3.4
  • Loading branch information
bastiensaquet committed May 12, 2016
2 parents ccac053 + 6919bc5 commit 90023d4
Show file tree
Hide file tree
Showing 565 changed files with 15,297 additions and 13,323 deletions.
7 changes: 6 additions & 1 deletion pom.xml
Expand Up @@ -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>
Expand Down Expand Up @@ -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 -->
Expand Down
Expand Up @@ -6,7 +6,7 @@ public class AlreadyExistsException extends ImejiException {

/**
* Constructor for a new {@link AlreadyExistsException}
*
*
* @param message
*/
public AlreadyExistsException(String message) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/de/mpg/imeji/exceptions/AuthenticationError.java
@@ -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
*/
/*
Expand Down
14 changes: 9 additions & 5 deletions src/main/java/de/mpg/imeji/exceptions/BadRequestException.java
@@ -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
*/
/*
Expand All @@ -38,4 +38,8 @@ public BadRequestException(String message) {
super(message);
}

public BadRequestException(String message, Throwable e) {
super(message, e);
}

}
6 changes: 5 additions & 1 deletion src/main/java/de/mpg/imeji/exceptions/ImejiException.java
Expand Up @@ -5,6 +5,10 @@
public class ImejiException extends Exception {
private static final long serialVersionUID = -1024323233094119992L;

public ImejiException() {
super();
}

public ImejiException(String message) {
super(message);
}
Expand All @@ -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));
}

}
Expand Up @@ -2,7 +2,7 @@

/**
* Exception for authentication of inactive users
*
*
* @author bastiens
*
*/
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/de/mpg/imeji/exceptions/NotAllowedError.java
@@ -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
*/
/*
Expand All @@ -27,7 +27,7 @@


/**
*
*
*/
public class NotAllowedError extends ImejiException {
private static final long serialVersionUID = -3504946406047760565L;
Expand Down
@@ -1,14 +1,14 @@
/**
*
*
*/
package de.mpg.imeji.exceptions;

public class NotSupportedMethodException extends ImejiException {


/**
*
*/
*
*/
private static final long serialVersionUID = -474498315581861322L;

public NotSupportedMethodException() {
Expand Down
Expand Up @@ -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 {

Expand All @@ -8,4 +8,8 @@ public TypeNotAllowedException(String message) {
super(message);
}

public TypeNotAllowedException(String message, Throwable e) {
super(message, e);
}

}
30 changes: 26 additions & 4 deletions src/main/java/de/mpg/imeji/exceptions/UnprocessableError.java
Expand Up @@ -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);
Expand All @@ -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();
}
}
Expand Up @@ -2,7 +2,7 @@

/**
* Exception when ann non valid workflow operation is done (for instance: release, discard)
*
*
* @author bastiens
*
*/
Expand Down

0 comments on commit 90023d4

Please sign in to comment.