Skip to content

Commit

Permalink
Move HolidayManagerValueHandler next to the HolidayManager and reduce…
Browse files Browse the repository at this point in the history
… visibility
  • Loading branch information
derTobsch committed Mar 1, 2024
1 parent f37ee2c commit 9c69288
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.focus_shift.jollyday.core;

import de.focus_shift.jollyday.core.caching.Cache;
import de.focus_shift.jollyday.core.caching.HolidayManagerValueHandler;
import de.focus_shift.jollyday.core.configuration.ConfigurationProviderManager;
import de.focus_shift.jollyday.core.datasource.ConfigurationServiceManager;
import de.focus_shift.jollyday.core.parser.functions.CalendarToLocalDate;
Expand Down Expand Up @@ -112,6 +111,7 @@ public static HolidayManager getInstance(final ManagerParameter parameter) {
private static HolidayManager createManager(final ManagerParameter parameter) {
LOG.debug("Creating HolidayManager for calendar '{}'. Caching enabled: {}", parameter, isManagerCachingEnabled());
CONFIGURATION_MANAGER_PROVIDER.mergeConfigurationProperties(parameter);

final String managerImplClassName = readManagerImplClassName(parameter);
final HolidayManagerValueHandler holidayManagerValueHandler = new HolidayManagerValueHandler(parameter, managerImplClassName, configurationServiceManager);
if (isManagerCachingEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package de.focus_shift.jollyday.core.caching;
package de.focus_shift.jollyday.core;

import de.focus_shift.jollyday.core.HolidayManager;
import de.focus_shift.jollyday.core.ManagerParameter;
import de.focus_shift.jollyday.core.caching.Cache;
import de.focus_shift.jollyday.core.datasource.ConfigurationServiceManager;
import de.focus_shift.jollyday.core.spi.ConfigurationService;
import de.focus_shift.jollyday.core.util.ClassLoadingUtil;

/**
* Creates the {@link Cache.ValueHandler} which constructs a {@link HolidayManager}.
* Creates the {@link Cache.ValueHandler} which constructs and caches a {@link HolidayManager}.
*/
public class HolidayManagerValueHandler implements Cache.ValueHandler<HolidayManager> {
class HolidayManagerValueHandler implements Cache.ValueHandler<HolidayManager> {

private final ManagerParameter parameter;
private final String managerImplClassName;
private final ConfigurationServiceManager configurationServiceManager;

public HolidayManagerValueHandler(final ManagerParameter parameter, final String managerImplClassName, final ConfigurationServiceManager configurationServiceManager) {
HolidayManagerValueHandler(final ManagerParameter parameter, final String managerImplClassName, final ConfigurationServiceManager configurationServiceManager) {
this.parameter = parameter;
this.managerImplClassName = managerImplClassName;
this.configurationServiceManager = configurationServiceManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.focus_shift.jollyday.core.caching;
package de.focus_shift.jollyday.core;

import de.focus_shift.jollyday.core.HolidayManager;
import de.focus_shift.jollyday.core.HolidayManagerValueHandler;
import de.focus_shift.jollyday.core.ManagerParameter;
import de.focus_shift.jollyday.core.datasource.ConfigurationServiceManager;
import de.focus_shift.jollyday.core.impl.DefaultHolidayManager;
Expand Down

0 comments on commit 9c69288

Please sign in to comment.