Commit 97ebc8f1d3c716d1075d1ad281a2eb901a7be617
1 parent
7f7dc517
Exists in
master
Organização do código
Showing
2 changed files
with
9 additions
and
5 deletions
Show diff stats
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/HttpViolationException.java
@@ -15,6 +15,10 @@ public class HttpViolationException extends Exception { | @@ -15,6 +15,10 @@ public class HttpViolationException extends Exception { | ||
15 | this.statusCode = statusCode; | 15 | this.statusCode = statusCode; |
16 | } | 16 | } |
17 | 17 | ||
18 | + public HttpViolationException addViolation(String message) { | ||
19 | + return addViolation(null, message); | ||
20 | + } | ||
21 | + | ||
18 | public HttpViolationException addViolation(String property, String message) { | 22 | public HttpViolationException addViolation(String property, String message) { |
19 | this.violations.add(new Violation(property, message)); | 23 | this.violations.add(new Violation(property, message)); |
20 | return this; | 24 | return this; |
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/util/Rests.java
@@ -47,9 +47,9 @@ public final class Rests { | @@ -47,9 +47,9 @@ public final class Rests { | ||
47 | private Rests() { | 47 | private Rests() { |
48 | } | 48 | } |
49 | 49 | ||
50 | - public static Set<Class<?>> getClasses() { | 50 | + public static Set<Class<?>> getExceptionMappers() { |
51 | Set<Class<?>> result = new HashSet<Class<?>>(); | 51 | Set<Class<?>> result = new HashSet<Class<?>>(); |
52 | - ClassLoader extensionClassLoader = Rests.class.getClassLoader(); | 52 | + // ClassLoader extensionClassLoader = Rests.class.getClassLoader(); |
53 | 53 | ||
54 | Set<Class<?>> specClasses = new HashSet<Class<?>>(); | 54 | Set<Class<?>> specClasses = new HashSet<Class<?>>(); |
55 | specClasses.add(ExceptionMapper.class); | 55 | specClasses.add(ExceptionMapper.class); |
@@ -58,9 +58,9 @@ public final class Rests { | @@ -58,9 +58,9 @@ public final class Rests { | ||
58 | for (Bean<?> bean : Beans.getBeanManager().getBeans(specClass)) { | 58 | for (Bean<?> bean : Beans.getBeanManager().getBeans(specClass)) { |
59 | Class<?> type = bean.getBeanClass(); | 59 | Class<?> type = bean.getBeanClass(); |
60 | 60 | ||
61 | - if (type.getClassLoader() == extensionClassLoader) { | ||
62 | - | ||
63 | - } | 61 | + // if (type.getClassLoader() == extensionClassLoader) { |
62 | + // | ||
63 | + // } | ||
64 | 64 | ||
65 | result.add(type); | 65 | result.add(type); |
66 | } | 66 | } |