Skip to content

Commit

Permalink
Extend DTR APIs for Access management
Browse files Browse the repository at this point in the history
- Code review fixes #1
  • Loading branch information
istvan-nagy-epam committed Feb 2, 2024
1 parent 006947c commit a72198c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public String getBpn() {
return getStringValueOfRule( BPN_RULE_NAME );
}

@JsonIgnore
private Set<String> getStringValuesOfRule( final String ruleName ) {
return accessRules.stream().filter( rule -> ruleName.equals( rule.attribute() ) )
.flatMap( rule -> {
Expand All @@ -88,18 +87,18 @@ private String getStringValueOfRule( final String ruleName ) {
.findAny().orElse( null );
}

private static String getAccessRulePolicyValueStringFunction( final AccessRulePolicyValue idValue, final String ruleName ) {
private String getAccessRulePolicyValueStringFunction( final AccessRulePolicyValue idValue, final String ruleName ) {
assertSingleValued( idValue, ruleName );
return idValue.value();
}

private static void assertSingleValued( final AccessRulePolicyValue idValue, final String path ) {
private void assertSingleValued( final AccessRulePolicyValue idValue, final String path ) {
if ( !idValue.hasSingleValue() ) {
throw new IllegalStateException( "Entry of " + path + " must have single value!" );
}
}

private static void assertMultiValued( AccessRulePolicyValue idValue, String path ) {
private void assertMultiValued( AccessRulePolicyValue idValue, String path ) {
if ( idValue.hasSingleValue() ) {
throw new IllegalStateException( "Entry of " + path + " must have multiple values!" );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class SqlBackedAccessControlRuleService implements AccessControlRuleServi

private final AccessControlRuleRepository repository;

public SqlBackedAccessControlRuleService( @Autowired AccessControlRuleRepository repository ) {
public SqlBackedAccessControlRuleService( AccessControlRuleRepository repository ) {
this.repository = repository;
}

Expand Down

0 comments on commit a72198c

Please sign in to comment.