Package org.apache.fop.events
Class EventFormatter
java.lang.Object
org.apache.fop.events.EventFormatter
Converts events into human-readable, localized messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static class
PartFactory for lookups. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
private static org.apache.commons.logging.Log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Formats an event using the default locale.static String
Formats the event using a given pattern.static String
Formats an event using a given locale.private static String
format
(Event event, ResourceBundle bundle) private static ResourceBundle
private static String
processIncludes
(String template, ResourceBundle bundle) private static int
processIncludesInner
(CharSequence template, StringBuffer sb, ResourceBundle bundle)
-
Field Details
-
INCLUDES_PATTERN
-
log
private static org.apache.commons.logging.Log log
-
-
Constructor Details
-
EventFormatter
private EventFormatter()
-
-
Method Details
-
getBundle
-
format
Formats an event using the default locale.- Parameters:
event
- the event- Returns:
- the formatted message
-
format
Formats an event using a given locale.- Parameters:
event
- the eventlocale
- the locale- Returns:
- the formatted message
-
format
-
processIncludes
-
processIncludesInner
private static int processIncludesInner(CharSequence template, StringBuffer sb, ResourceBundle bundle) -
format
Formats the event using a given pattern. The pattern needs to be compatible withAdvancedMessageFormat
.- Parameters:
event
- the eventpattern
- the pattern (compatible withAdvancedMessageFormat
)- Returns:
- the formatted message
-