-
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.
Add builder decorators to configure builders with defaults
- Loading branch information
Andy Buttaro
committed
Sep 5, 2018
1 parent
331b349
commit d7123c2
Showing
5 changed files
with
127 additions
and
47 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...a/com/github/restup/controller/content/negotiation/ContentNegotiatorBuilderDecorator.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,17 @@ | ||
package com.github.restup.controller.content.negotiation; | ||
|
||
import com.github.restup.controller.content.negotiation.ContentNegotiator.Builder; | ||
|
||
@FunctionalInterface | ||
public interface ContentNegotiatorBuilderDecorator { | ||
|
||
/** | ||
* Decorate a {@link Builder}. Useful in dependency injection frameworks such as Spring where a | ||
* default builder can complete basic wiring requiring only customization to be configured. | ||
* | ||
* @param builder to decorate | ||
* @return the builder | ||
*/ | ||
Builder decorate(Builder builder); | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
.../main/java/com/github/restup/controller/request/parser/RequestParserBuilderDecorator.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,18 @@ | ||
package com.github.restup.controller.request.parser; | ||
|
||
|
||
import com.github.restup.controller.request.parser.RequestParser.Builder; | ||
|
||
@FunctionalInterface | ||
public interface RequestParserBuilderDecorator { | ||
|
||
/** | ||
* Decorate a {@link Builder}. Useful in dependency injection frameworks such as Spring where a | ||
* default builder can complete basic wiring requiring only customization to be configured. | ||
* | ||
* @param builder to decorate | ||
* @return the builder | ||
*/ | ||
Builder decorate(Builder builder); | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
up-core/src/main/java/com/github/restup/ResourceRegistryBuilderDecorator.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,17 @@ | ||
package com.github.restup; | ||
|
||
import com.github.restup.registry.ResourceRegistry.Builder; | ||
|
||
@FunctionalInterface | ||
public interface ResourceRegistryBuilderDecorator { | ||
|
||
/** | ||
* Decorate a {@link Builder}. Useful in dependency injection frameworks such as Spring where a | ||
* default builder can complete basic wiring requiring only customization to be configured. | ||
* | ||
* @param builder to decorate | ||
* @return the builder | ||
*/ | ||
Builder decorate(Builder builder); | ||
|
||
} |
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