Package org.apache.struts2.config
Interface ScopedConstantProvider
- All Known Implementing Classes:
StrutsScopedConstantProvider
public interface ScopedConstantProvider
Resolves a scopable constant for the current action invocation or a given package: the package's
<scoped-constant>, inherited
through extends, or else the global constant.- Since:
- 7.5.0
-
Method Summary
-
Method Details
-
getValue
- Parameters:
name- a constant registered through aScopableConstantsbean- Returns:
- the scoped value, or the global value (
nullwhen there is none) - Throws:
IllegalArgumentException- whennameis not scopable
-
getValue
- Parameters:
name- a constant registered through aScopableConstantsbeanpackageConfig- the package whose scoped constants, inherited ones included, take precedence; may benull- Returns:
- the package's scoped value, or else
getValue(String) - Throws:
IllegalArgumentException- whennameis not scopable; this default checks only on thegetValue(String)fallback, as package values were validated at startup- Since:
- 7.5.0
-