add metadata-backed game scope resolver

This commit is contained in:
devmrko
2026-07-27 13:04:43 +09:00
parent 9c48d86696
commit 443d6677a3
3 changed files with 218 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import org.springframework.context.annotation.Configuration;
@EnableConfigurationProperties({
BackofficeProperties.class,
CatalogProperties.class,
GameScopeProperties.class,
MaskingProperties.class,
McpProperties.class,
ProductProperties.class,

View File

@@ -0,0 +1,26 @@
package com.cloudhandson.vpdbackoffice.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Names the customer-owned DB view used to resolve game query scopes.
*
* <p>The view is a stable integration contract, not a Smilegate-specific table.
* Each environment can expose its own game master, alias source, and approved
* object inventory behind this view without changing application code.</p>
*/
@ConfigurationProperties(prefix = "backoffice.game-scope")
public record GameScopeProperties(
boolean enabled,
String viewName,
int maxScopes
) {
public boolean configured() {
return enabled && viewName != null && !viewName.isBlank();
}
public int resolvedMaxScopes() {
return maxScopes >= 1 && maxScopes <= 20 ? maxScopes : 8;
}
}