-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Constraint with per-entity API based on AgEntityOverlay #493
- Loading branch information
Showing
11 changed files
with
109 additions
and
106 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
30 changes: 0 additions & 30 deletions
30
agrest-engine/src/main/java/io/agrest/access/PropertyAccessRules.java
This file was deleted.
Oops, something went wrong.
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
28 changes: 28 additions & 0 deletions
28
agrest-engine/src/main/java/io/agrest/filter/PropertyFilter.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,28 @@ | ||
package io.agrest.filter; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* Encapsulates logic for creation of custom property access rules for a single entity. The logic is implemented in the | ||
* {@link #apply(PropertyFilteringRulesBuilder)} method, where custom code invokes methods on an instance of | ||
* {@link PropertyFilteringRulesBuilder} to define access rules. | ||
* | ||
* @see io.agrest.SelectBuilder#propFilter(Class, PropertyFilter) | ||
* @since 4.7 | ||
*/ | ||
@FunctionalInterface | ||
public interface PropertyFilter { | ||
|
||
/** | ||
* Configures property access rules via the provided {@link PropertyFilteringRulesBuilder}. | ||
*/ | ||
void apply(PropertyFilteringRulesBuilder accessConfig); | ||
|
||
default PropertyFilter andThen(PropertyFilter after) { | ||
Objects.requireNonNull(after); | ||
return pa -> { | ||
apply(pa); | ||
after.apply(pa); | ||
}; | ||
} | ||
} |
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
Oops, something went wrong.