@@ -32,6 +32,7 @@ public static class Builder<I,O> {
32
32
protected RestxRequestMatcher matcher ;
33
33
protected HttpStatus successStatus = HttpStatus .OK ;
34
34
protected RestxLogLevel logLevel = RestxLogLevel .DEFAULT ;
35
+ protected PermissionFactory permissionFactory ;
35
36
protected MatchedEntityRoute <I ,O > matchedEntityRoute ;
36
37
37
38
public Builder <I ,O > entityRequestBodyReader (final EntityRequestBodyReader <I > entityRequestBodyReader ) {
@@ -49,6 +50,11 @@ public Builder<I,O> name(final String name) {
49
50
return this ;
50
51
}
51
52
53
+ public Builder <I ,O > permissionFactory (final PermissionFactory permissionFactory ) {
54
+ this .permissionFactory = permissionFactory ;
55
+ return this ;
56
+ }
57
+
52
58
public Builder <I ,O > matcher (final RestxRequestMatcher matcher ) {
53
59
this .matcher = matcher ;
54
60
return this ;
@@ -74,7 +80,7 @@ public StdEntityRoute<I,O> build() {
74
80
return new StdEntityRoute <I , O >(
75
81
name , entityRequestBodyReader == null ? voidBodyReader () : entityRequestBodyReader ,
76
82
entityResponseWriter ,
77
- matcher , successStatus , logLevel ) {
83
+ matcher , successStatus , logLevel , permissionFactory ) {
78
84
@ Override
79
85
protected Optional <O > doRoute (RestxRequest restxRequest , RestxRequestMatch match , I i ) throws IOException {
80
86
return matchedEntityRoute .route (restxRequest , match , i );
@@ -102,16 +108,6 @@ public static <I,O> Builder<I,O> builder() {
102
108
private final RestxLogLevel logLevel ;
103
109
private final PermissionFactory permissionFactory ;
104
110
105
- public StdEntityRoute (String name ,
106
- EntityRequestBodyReader <I > entityRequestBodyReader ,
107
- EntityResponseWriter <O > entityResponseWriter ,
108
- RestxRequestMatcher matcher ,
109
- HttpStatus successStatus ,
110
- RestxLogLevel logLevel
111
- ) {
112
- this (name , entityRequestBodyReader , entityResponseWriter , matcher , successStatus , logLevel , null );
113
- }
114
-
115
111
public StdEntityRoute (String name ,
116
112
EntityRequestBodyReader <I > entityRequestBodyReader ,
117
113
EntityResponseWriter <O > entityResponseWriter ,
0 commit comments