Class FrameworkMessages
java.lang.Object
com.ultikits.ultitools.text.internal.FrameworkMessages
Framework-owned message lookups for console logs and panel text.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Messagesmessages()Returns the framework's own Messages from the root container.static AutoCloseableoverrideForTests(Messages messages, Locale fallback) Replaces both lookups until the returned scope is closed; close scopes in reverse order.static Stringplain(MessageKey key, Arg... args) Renders plain text in the server's fallback language without logging or throwing on unavailability.private static SimpleContainer
-
Field Details
-
testServices
-
-
Constructor Details
-
FrameworkMessages
private FrameworkMessages()
-
-
Method Details
-
messages
Returns the framework's own Messages from the root container.- Returns:
- the framework message service
- Throws:
IllegalStateException- when the framework is not running
-
plain
Renders plain text in the server's fallback language without logging or throwing on unavailability. The renderer may log once for a missing key or an invalid argument format.- Parameters:
key- the framework message keyargs- named message arguments- Returns:
- rendered text, or the key string when framework services or rendering are unavailable
-
overrideForTests
Replaces both lookups until the returned scope is closed; close scopes in reverse order.- Parameters:
messages- the test message servicefallback- the test fallback locale- Returns:
- a scope restoring both previous lookups
-
rootContext
-