fix #477: apply vpd by policy filter template

This commit is contained in:
devmrko
2026-06-26 07:36:23 +09:00
parent 49feccb659
commit ef47893324
7 changed files with 133 additions and 46 deletions

View File

@@ -0,0 +1,33 @@
package com.cloudhandson.vpdbackoffice.domain.vpd;
public record VpdPolicyTemplateOption(
String policyName,
String functionOwner,
String packageName,
String functionName,
String statementTypes,
String enabled,
String checkOption
) {
public String functionKey() {
String packagePrefix = packageName == null || packageName.isBlank() ? "" : packageName + ".";
return functionOwner + "." + packagePrefix + functionName;
}
public String filterDisplayName() {
return functionKey();
}
public String label() {
return policyName + " / " + filterDisplayName() + " / " + statementTypes;
}
public boolean enabledValue() {
return "YES".equalsIgnoreCase(enabled);
}
public boolean updateCheckValue() {
return "YES".equalsIgnoreCase(checkOption);
}
}