class EphemerisModuleHandlerFactory extends BaseModuleHandlerFactory implements ModuleHandlerFactory {

    @Override
    protected @Nullable ModuleHandler internalCreate(final Module module, final String ruleUID) {
        final String moduleTypeUID = module.getTypeUID();
        logger.trace("create {} -> {} : {}", module.getId(), moduleTypeUID, ruleUID);

        if (module instanceof Condition) {
            switch (moduleTypeUID) {
                case EphemerisConditionHandler.HOLIDAY_MODULE_TYPE_ID:
                case EphemerisConditionHandler.WEEKEND_MODULE_TYPE_ID:
                case EphemerisConditionHandler.WEEKDAY_MODULE_TYPE_ID:
                case EphemerisConditionHandler.DAYSET_MODULE_TYPE_ID:
                    return new EphemerisConditionHandler((Condition) module, ephemerisManager);
            }
        }

        logger.error("The ModuleHandler is not supported: {}", moduleTypeUID);
        return null;
    }

    @Activate public  EphemerisModuleHandlerFactory(final @Reference EphemerisManager ephemerisManager);

}