-
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.
- Loading branch information
Showing
67 changed files
with
1,254 additions
and
359 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
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
60 changes: 60 additions & 0 deletions
60
...ntroller/src/main/java/com/github/restup/controller/settings/BasicControllerSettings.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,60 @@ | ||
package com.github.restup.controller.settings; | ||
|
||
import com.github.restup.controller.ExceptionHandler; | ||
import com.github.restup.controller.content.negotiation.ContentNegotiator; | ||
import com.github.restup.controller.interceptor.RequestInterceptor; | ||
import com.github.restup.controller.request.parser.RequestParser; | ||
import com.github.restup.registry.ResourceRegistry; | ||
|
||
public class BasicControllerSettings implements ControllerSettings { | ||
|
||
private final ResourceRegistry registry; | ||
private final ContentNegotiator[] contentNegotiators; | ||
private final RequestInterceptor requestInterceptor; | ||
private final RequestParser requestParser; | ||
private final ExceptionHandler exceptionHandler; | ||
private final String defaultMediaType; | ||
|
||
protected BasicControllerSettings(ResourceRegistry registry, ContentNegotiator[] contentNegotiators, | ||
RequestInterceptor requestInterceptor, RequestParser requestParsers, | ||
ExceptionHandler exceptionHandler, String defaultMediaType) { | ||
super(); | ||
this.registry = registry; | ||
this.contentNegotiators = contentNegotiators; | ||
this.requestInterceptor = requestInterceptor; | ||
this.requestParser = requestParsers; | ||
this.exceptionHandler = exceptionHandler; | ||
this.defaultMediaType = defaultMediaType; | ||
} | ||
|
||
@Override | ||
public String getDefaultMediaType() { | ||
return defaultMediaType; | ||
} | ||
|
||
@Override | ||
public ResourceRegistry getRegistry() { | ||
return registry; | ||
} | ||
|
||
@Override | ||
public ContentNegotiator[] getContentNegotiators() { | ||
return contentNegotiators; | ||
} | ||
|
||
@Override | ||
public RequestInterceptor getRequestInterceptor() { | ||
return requestInterceptor; | ||
} | ||
|
||
@Override | ||
public RequestParser getRequestParser() { | ||
return requestParser; | ||
} | ||
|
||
@Override | ||
public ExceptionHandler getExceptionHandler() { | ||
return exceptionHandler; | ||
} | ||
|
||
} |
Oops, something went wrong.