Package ch.tocco.nice2.usersettings.impl
Class PreferencesFactoryImpl
java.lang.Object
ch.tocco.nice2.usersettings.impl.PreferencesFactoryImpl
- All Implemented Interfaces:
PreferencesFactory
Factory for
Preferences
objects.
Each call to getPreferences(Node)
results in reading all preferences of this node from the
database. The entity system maintains a cache already, so I omitted to cache Preferences
objects here. I then decided to make PreferencesImpl
is not thread safe. Client code is
always supposed to call getPreferences(Node)
and not caching it.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetGlobalPreferences
(Node node) Returns a new preferences object for the specified node that is not linked to any principal.getGlobalPreferences
(String path) getPreferences
(Node node) Returns a new preferences object for the specified node that is linked to the current business unit and current principal.getPreferences
(String path)
-
Constructor Details
-
PreferencesFactoryImpl
-
-
Method Details
-
getPreferences
Description copied from interface:PreferencesFactory
Returns a new preferences object for the specified node that is linked to the current business unit and current principal.- Specified by:
getPreferences
in interfacePreferencesFactory
-
getGlobalPreferences
Description copied from interface:PreferencesFactory
Returns a new preferences object for the specified node that is not linked to any principal. That is, the fk_principal is null.- Specified by:
getGlobalPreferences
in interfacePreferencesFactory
-
getPreferences
- Specified by:
getPreferences
in interfacePreferencesFactory
- See Also:
-
getGlobalPreferences
- Specified by:
getGlobalPreferences
in interfacePreferencesFactory
- See Also:
-