Package com.thecoderscorner.menu.persist
Class PropertiesLocaleEnabledHandler
java.lang.Object
com.thecoderscorner.menu.persist.PropertiesLocaleEnabledHandler
- All Implemented Interfaces:
LocaleMappingHandler
-
Field Summary
FieldsFields inherited from interface com.thecoderscorner.menu.persist.LocaleMappingHandler
NOOP_IMPLEMENTATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeLocale(Locale locale) getLocalSpecificEntry(String source) booleanbooleanvoidnotifyExternalChange(String propertiesFile) Report a change in the file system that has occurred in the directory this locale represents, ignored by no locale handler.voidputIntoDefaultIfNeeded(String localeName, String existing) voidvoidsetLocalSpecificEntry(String source, String newValue) voidsetSaveNotificationConsumer(BiConsumer<Path, String> listener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thecoderscorner.menu.persist.LocaleMappingHandler
getFromLocaleOrUseSource, getFromLocaleWithDefault, getWithLocaleInitIfNeeded
-
Field Details
-
DEFAULT_LOCALE
-
-
Constructor Details
-
Method Details
-
setSaveNotificationConsumer
- Specified by:
setSaveNotificationConsumerin interfaceLocaleMappingHandler
-
isLocalSupportEnabled
public boolean isLocalSupportEnabled()- Specified by:
isLocalSupportEnabledin interfaceLocaleMappingHandler
-
getLocalSpecificEntry
- Specified by:
getLocalSpecificEntryin interfaceLocaleMappingHandler- Throws:
IllegalArgumentException
-
setLocalSpecificEntry
- Specified by:
setLocalSpecificEntryin interfaceLocaleMappingHandler- Throws:
IllegalArgumentException
-
getEnabledLocales
- Specified by:
getEnabledLocalesin interfaceLocaleMappingHandler
-
changeLocale
- Specified by:
changeLocalein interfaceLocaleMappingHandler- Throws:
IOException
-
notifyExternalChange
Description copied from interface:LocaleMappingHandlerReport a change in the file system that has occurred in the directory this locale represents, ignored by no locale handler.- Specified by:
notifyExternalChangein interfaceLocaleMappingHandler
-
isDirty
- Specified by:
isDirtyin interfaceLocaleMappingHandler
-
saveChanges
public void saveChanges()- Specified by:
saveChangesin interfaceLocaleMappingHandler
-
getUnderlyingMap
- Specified by:
getUnderlyingMapin interfaceLocaleMappingHandler
-
getSafeLoader
-
getCurrentLocale
- Specified by:
getCurrentLocalein interfaceLocaleMappingHandler
-
putIntoDefaultIfNeeded
-