-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ParametersValidator interface; validation-javax module & SimpleParame…
…tersValidator with javax.validation
- Loading branch information
Showing
27 changed files
with
384 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
core/src/main/java/net/cactusthorn/routing/validate/ParametersValidationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package net.cactusthorn.routing.validate; | ||
|
||
public class ParametersValidationException extends Exception { | ||
|
||
private static final long serialVersionUID = 0L; | ||
|
||
public ParametersValidationException(String message) { | ||
super(message); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
core/src/main/java/net/cactusthorn/routing/validate/ParametersValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.cactusthorn.routing.validate; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import javax.servlet.ServletContext; | ||
|
||
import net.cactusthorn.routing.ComponentProvider; | ||
|
||
public interface ParametersValidator { | ||
|
||
default void init(ServletContext servletContext, ComponentProvider componentProvider) { | ||
} | ||
|
||
void validate(Object object, Method method, Object[] parameters) throws ParametersValidationException; | ||
} |
Oops, something went wrong.