Interface PropertyScopes
- All Known Implementing Classes:
PropertyScopesImpl
public interface PropertyScopes
A PropertyScopes registry manages all available property scopes. The built-in scopes APPLICATION, MODULE, ROLE, and USER
are always registered. Downstream consumers can register additional domain-specific scopes via
PropertyScopeRegistrar
beans.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionall()Returns a collection of all registered scopes.booleanisRegistered(String name) Checks whether a scope with the given name is registered.Resolves a scope by name.
-
Method Details
-
isRegistered
Checks whether a scope with the given name is registered.- Parameters:
name- the scope name to check- Returns:
- true if the scope is registered, false otherwise
-
resolve
Resolves a scope by name. Only registered scopes are resolved successfully.- Parameters:
name- the scope name- Returns:
- the PropertyScope instance
- Throws:
IllegalArgumentException- if the scope name is not registered or invalid
-
all
Collection<PropertyScope> all()Returns a collection of all registered scopes.- Returns:
- all registered scopes
-