[automation] Moved constants to top and made them public for reference (#1513)

* Moved constants to top and made them public for reference

Signed-off-by: Kai Kreuzer <kai@openhab.org>
pull/1515/head
Kai Kreuzer 2020-06-07 23:03:53 +02:00 committed by GitHub
parent f52af0b748
commit 840335bbd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 104 additions and 106 deletions

View File

@ -44,10 +44,10 @@ public abstract class AbstractScriptModuleHandler<T extends Module> extends Base
private final Logger logger = LoggerFactory.getLogger(AbstractScriptModuleHandler.class);
/** Constant defining the configuration parameter of modules that specifies the mime type of a script */
protected static final String SCRIPT_TYPE = "type";
public static final String SCRIPT_TYPE = "type";
/** Constant defining the configuration parameter of modules that specifies the script itself */
protected static final String SCRIPT = "script";
public static final String SCRIPT = "script";
protected final ScriptEngineManager scriptEngineManager;

View File

@ -124,26 +124,26 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
*/
private final long scheduleReinitializationDelay;
private final Map<String, WrappedRule> managedRules = new ConcurrentHashMap<>();
private final Map<String, @Nullable WrappedRule> managedRules = new ConcurrentHashMap<>();
/**
* {@link Map} holding all created {@link TriggerHandlerCallback} instances, corresponding to each {@link Rule}.
* There is only one {@link TriggerHandlerCallback} instance per {@link Rule}. The relation is
* {@link Rule}'s UID to {@link TriggerHandlerCallback} instance.
*/
private final Map<String, TriggerHandlerCallbackImpl> thCallbacks = new HashMap<>();
private final Map<String, @Nullable TriggerHandlerCallbackImpl> thCallbacks = new HashMap<>();
/**
* {@link Map} holding all {@link ModuleType} UIDs that are available in some rule's module definition. The relation
* is {@link ModuleType}'s UID to {@link Set} of {@link Rule} UIDs.
*/
private final Map<String, Set<String>> mapModuleTypeToRules = new HashMap<>();
private final Map<String, @Nullable Set<String>> mapModuleTypeToRules = new HashMap<>();
/**
* {@link Map} holding all available {@link ModuleHandlerFactory}s linked with {@link ModuleType}s that they
* supporting. The relation is {@link ModuleType}'s UID to {@link ModuleHandlerFactory} instance.
*/
private final Map<String, ModuleHandlerFactory> moduleHandlerFactories;
private final Map<String, @Nullable ModuleHandlerFactory> moduleHandlerFactories;
/**
* {@link Set} holding all available {@link ModuleHandlerFactory}s.
@ -173,7 +173,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
* The context map of a {@link Rule} is cleaned when the execution is completed. The relation is
* {@link Rule}'s UID to Rule context map.
*/
private final Map<String, Map<String, Object>> contextMap;
private final Map<String, @Nullable Map<String, @Nullable Object>> contextMap;
/**
* This field holds reference to {@link ModuleTypeRegistry}. The {@link RuleEngineImpl} needs it to auto-map
@ -191,7 +191,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
* UID to
* re-initialization task as a {@link Future} instance.
*/
private final Map<String, Future<?>> scheduleTasks = new HashMap<>(31);
private final Map<String, @Nullable Future<?>> scheduleTasks = new HashMap<>(31);
/**
* Performs the {@link Rule} re-initialization tasks.
@ -209,6 +209,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
* {@link RuleStatusInfoEvent}.
*/
private @Nullable EventPublisher eventPublisher;
private static final String SOURCE = RuleEngineImpl.class.getSimpleName();
private final ModuleHandlerCallback moduleHandlerCallback = new ModuleHandlerCallback() {
@ -459,7 +460,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
unregister(oldRule);
}
if (isEnabled(rUID)) {
if (isEnabled(rUID) == Boolean.TRUE) {
setRule(rule);
}
}
@ -758,9 +759,9 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
if (r != null) {
unregister(r);
synchronized (this) {
for (Iterator<Map.Entry<String, Set<String>>> it = mapModuleTypeToRules.entrySet().iterator(); it
.hasNext();) {
Map.Entry<String, Set<String>> e = it.next();
for (Iterator<Map.Entry<String, @Nullable Set<String>>> it = mapModuleTypeToRules.entrySet()
.iterator(); it.hasNext();) {
Map.Entry<String, @Nullable Set<String>> e = it.next();
Set<String> rules = e.getValue();
if (rules != null && rules.contains(rUID)) {
rules.remove(rUID);
@ -859,9 +860,6 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
@Override
public @Nullable RuleStatusInfo getStatusInfo(String ruleUID) {
if (ruleUID == null) {
return null;
}
final WrappedRule rule = managedRules.get(ruleUID);
if (rule == null) {
return null;
@ -877,8 +875,8 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
@Override
public @Nullable Boolean isEnabled(String ruleUID) {
return getStatus(ruleUID) == null ? null
: !RuleStatusDetail.DISABLED.equals(getStatusInfo(ruleUID).getStatusDetail());
RuleStatusInfo statusInfo = getStatusInfo(ruleUID);
return statusInfo == null ? null : !RuleStatusDetail.DISABLED.equals(statusInfo.getStatusDetail());
}
/**
@ -915,7 +913,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
}
private void removeMissingModuleTypes(Collection<String> moduleTypes) {
Map<String, List<String>> mapMissingHandlers = null;
Map<String, @Nullable List<String>> mapMissingHandlers = null;
for (Iterator<String> it = moduleTypes.iterator(); it.hasNext();) {
String moduleTypeName = it.next();
Set<String> rules = null;
@ -946,7 +944,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
}
} // for
if (mapMissingHandlers != null) {
for (Entry<String, List<String>> e : mapMissingHandlers.entrySet()) {
for (Entry<String, @Nullable List<String>> e : mapMissingHandlers.entrySet()) {
String rUID = e.getKey();
List<String> missingTypes = e.getValue();
StringBuffer sb = new StringBuffer();
@ -974,7 +972,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
}
synchronized (this) {
final RuleStatus ruleStatus = getRuleStatus(ruleUID);
if (ruleStatus != RuleStatus.IDLE) {
if (ruleStatus != null && ruleStatus != RuleStatus.IDLE) {
logger.error("Failed to execute rule {}' with status '{}'", ruleUID, ruleStatus.name());
return;
}
@ -1016,7 +1014,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
}
synchronized (this) {
final RuleStatus ruleStatus = getRuleStatus(ruleUID);
if (ruleStatus != RuleStatus.IDLE) {
if (ruleStatus != null && ruleStatus != RuleStatus.IDLE) {
logger.error("Failed to execute rule {}' with status '{}'", ruleUID, ruleStatus.name());
return;
}
@ -1058,7 +1056,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
* @param ruleUID the UID of the rule whose context must be cleared.
*/
protected void clearContext(String ruleUID) {
Map<String, Object> context = contextMap.get(ruleUID);
Map<String, @Nullable Object> context = contextMap.get(ruleUID);
if (context != null) {
context.clear();
}
@ -1081,8 +1079,8 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
*
* @param outputs new output values.
*/
private void updateContext(String ruleUID, String moduleUID, Map<String, ?> outputs) {
Map<String, Object> context = getContext(ruleUID, null);
private void updateContext(String ruleUID, String moduleUID, @Nullable Map<String, ?> outputs) {
Map<String, @Nullable Object> context = getContext(ruleUID, null);
if (outputs != null) {
for (Map.Entry<String, ?> entry : outputs.entrySet()) {
String key = moduleUID + OUTPUT_SEPARATOR + entry.getKey();
@ -1094,8 +1092,8 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
/**
* @return copy of current context in rule engine
*/
private Map<String, Object> getContext(String ruleUID, @Nullable Set<Connection> connections) {
Map<String, Object> context = contextMap.get(ruleUID);
private Map<String, @Nullable Object> getContext(String ruleUID, @Nullable Set<Connection> connections) {
Map<String, @Nullable Object> context = contextMap.get(ruleUID);
if (context == null) {
context = new HashMap<>();
contextMap.put(ruleUID, context);
@ -1151,7 +1149,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
final WrappedCondition managedCondition = it.next();
final Condition condition = managedCondition.unwrap();
ConditionHandler tHandler = managedCondition.getModuleHandler();
Map<String, Object> context = getContext(ruleUID, managedCondition.getConnections());
Map<String, @Nullable Object> context = getContext(ruleUID, managedCondition.getConnections());
if (tHandler != null && !tHandler.isSatisfied(Collections.unmodifiableMap(context))) {
logger.debug("The condition '{}' of rule '{}' is unsatisfied.", condition.getId(), ruleUID);
return false;
@ -1181,7 +1179,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
final Action action = managedAction.unwrap();
ActionHandler aHandler = managedAction.getModuleHandler();
if (aHandler != null) {
Map<String, Object> context = getContext(ruleUID, managedAction.getConnections());
Map<String, @Nullable Object> context = getContext(ruleUID, managedAction.getConnections());
try {
Map<String, ?> outputs = aHandler.execute(Collections.unmodifiableMap(context));
if (outputs != null) {
@ -1365,7 +1363,7 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
return result;
}
private void initTagsMap(String moduleId, List<Output> outputs, Map<Set<String>, OutputRef> tagMap) {
private void initTagsMap(String moduleId, List<Output> outputs, Map<Set<String>, @Nullable OutputRef> tagMap) {
for (Output output : outputs) {
Set<String> tags = output.getTags();
if (!tags.isEmpty()) {

View File

@ -38,13 +38,13 @@ import org.slf4j.LoggerFactory;
*/
public class ChannelEventTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
private final Logger logger = LoggerFactory.getLogger(ChannelEventTriggerHandler.class);
public static final String MODULE_TYPE_ID = "core.ChannelEventTrigger";
private static final String CFG_CHANNEL_EVENT = "event";
private static final String CFG_CHANNEL = "channelUID";
private static final String TOPIC = "smarthome/channels/*/triggered";
public static final String CFG_CHANNEL_EVENT = "event";
public static final String CFG_CHANNEL = "channelUID";
public static final String TOPIC = "smarthome/channels/*/triggered";
private final Logger logger = LoggerFactory.getLogger(ChannelEventTriggerHandler.class);
private final String eventOnChannel;
private final String channelUID;

View File

@ -33,8 +33,6 @@ import org.slf4j.LoggerFactory;
*/
public class CompareConditionHandler extends BaseConditionModuleHandler {
public final Logger logger = LoggerFactory.getLogger(CompareConditionHandler.class);
public static final String MODULE_TYPE = "core.GenericCompareCondition";
public static final String INPUT_LEFT_OBJECT = "input";
@ -42,6 +40,8 @@ public class CompareConditionHandler extends BaseConditionModuleHandler {
public static final String RIGHT_OP = "right";
public static final String OPERATOR = "operator";
public final Logger logger = LoggerFactory.getLogger(CompareConditionHandler.class);
public CompareConditionHandler(Condition module) {
super(module);
}

View File

@ -29,12 +29,12 @@ import org.slf4j.LoggerFactory;
*/
public class DayOfWeekConditionHandler extends BaseConditionModuleHandler {
private final Logger logger = LoggerFactory.getLogger(DayOfWeekConditionHandler.class);
public static final String MODULE_TYPE_ID = "timer.DayOfWeekCondition";
public static final String MODULE_CONTEXT_NAME = "MODULE";
private static final String CFG_DAYS = "days";
public static final String CFG_DAYS = "days";
private final Logger logger = LoggerFactory.getLogger(DayOfWeekConditionHandler.class);
private final Set<Integer> days;

View File

@ -32,13 +32,14 @@ import org.slf4j.LoggerFactory;
*/
public class GenericCronTriggerHandler extends BaseTriggerModuleHandler implements SchedulerRunnable {
private final Logger logger = LoggerFactory.getLogger(GenericCronTriggerHandler.class);
public static final String MODULE_TYPE_ID = "timer.GenericCronTrigger";
public static final String CALLBACK_CONTEXT_NAME = "CALLBACK";
public static final String MODULE_CONTEXT_NAME = "MODULE";
private static final String CFG_CRON_EXPRESSION = "cronExpression";
public static final String CFG_CRON_EXPRESSION = "cronExpression";
private final Logger logger = LoggerFactory.getLogger(GenericCronTriggerHandler.class);
private final CronScheduler scheduler;
private final String expression;
private ScheduledCompletableFuture<?> schedule;

View File

@ -28,8 +28,6 @@ import org.slf4j.LoggerFactory;
*/
public class GenericEventConditionHandler extends BaseConditionModuleHandler {
public final Logger logger = LoggerFactory.getLogger(GenericEventConditionHandler.class);
public static final String MODULETYPE_ID = "core.GenericEventCondition";
private static final String TOPIC = "topic";
@ -37,6 +35,8 @@ public class GenericEventConditionHandler extends BaseConditionModuleHandler {
private static final String SOURCE = "source";
private static final String PAYLOAD = "payload";
public final Logger logger = LoggerFactory.getLogger(GenericEventConditionHandler.class);
public GenericEventConditionHandler(Condition module) {
super(module);
}

View File

@ -46,6 +46,12 @@ import org.slf4j.LoggerFactory;
*/
public class GenericEventTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
public static final String MODULE_TYPE_ID = "core.GenericEventTrigger";
private static final String CFG_EVENT_TOPIC = "eventTopic";
private static final String CFG_EVENT_SOURCE = "eventSource";
private static final String CFG_EVENT_TYPES = "eventTypes";
private final Logger logger = LoggerFactory.getLogger(GenericEventTriggerHandler.class);
private final String source;
@ -53,14 +59,7 @@ public class GenericEventTriggerHandler extends BaseTriggerModuleHandler impleme
private final Set<String> types;
private final BundleContext bundleContext;
public static final String MODULE_TYPE_ID = "core.GenericEventTrigger";
private static final String CFG_EVENT_TOPIC = "eventTopic";
private static final String CFG_EVENT_SOURCE = "eventSource";
private static final String CFG_EVENT_TYPES = "eventTypes";
@SuppressWarnings("rawtypes")
private ServiceRegistration eventSubscriberRegistration;
private ServiceRegistration<?> eventSubscriberRegistration;
public GenericEventTriggerHandler(Trigger module, BundleContext bundleContext) {
super(module);

View File

@ -57,8 +57,8 @@ public class GroupCommandTriggerHandler extends BaseTriggerModuleHandler impleme
public static final String MODULE_TYPE_ID = "core.GroupCommandTrigger";
private static final String CFG_GROUPNAME = "groupName";
private static final String CFG_COMMAND = "command";
public static final String CFG_GROUPNAME = "groupName";
public static final String CFG_COMMAND = "command";
private ServiceRegistration<?> eventSubscriberRegistration;
private @Nullable ItemRegistry itemRegistry;

View File

@ -48,6 +48,14 @@ import org.slf4j.LoggerFactory;
*/
@NonNullByDefault
public class GroupStateTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
public static final String UPDATE_MODULE_TYPE_ID = "core.GroupStateUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.GroupStateChangeTrigger";
public static final String CFG_GROUPNAME = "groupName";
public static final String CFG_STATE = "state";
public static final String CFG_PREVIOUS_STATE = "previousState";
private final Logger logger = LoggerFactory.getLogger(GroupStateTriggerHandler.class);
private final String groupName;
@ -57,13 +65,6 @@ public class GroupStateTriggerHandler extends BaseTriggerModuleHandler implement
private final BundleContext bundleContext;
private @Nullable ItemRegistry itemRegistry;
public static final String UPDATE_MODULE_TYPE_ID = "core.GroupStateUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.GroupStateChangeTrigger";
private static final String CFG_GROUPNAME = "groupName";
private static final String CFG_STATE = "state";
private static final String CFG_PREVIOUS_STATE = "previousState";
private ServiceRegistration<?> eventSubscriberRegistration;
public GroupStateTriggerHandler(Trigger module, BundleContext bundleContext) {

View File

@ -36,11 +36,11 @@ import org.slf4j.LoggerFactory;
*/
public class ItemCommandActionHandler extends BaseActionModuleHandler {
private final Logger logger = LoggerFactory.getLogger(ItemCommandActionHandler.class);
public static final String ITEM_COMMAND_ACTION = "core.ItemCommandAction";
private static final String ITEM_NAME = "itemName";
private static final String COMMAND = "command";
public static final String ITEM_NAME = "itemName";
public static final String COMMAND = "command";
private final Logger logger = LoggerFactory.getLogger(ItemCommandActionHandler.class);
private ItemRegistry itemRegistry;
private EventPublisher eventPublisher;

View File

@ -41,6 +41,11 @@ import org.slf4j.LoggerFactory;
*/
public class ItemCommandTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
public static final String MODULE_TYPE_ID = "core.ItemCommandTrigger";
public static final String CFG_ITEMNAME = "itemName";
public static final String CFG_COMMAND = "command";
private final Logger logger = LoggerFactory.getLogger(ItemCommandTriggerHandler.class);
private final String itemName;
@ -50,13 +55,7 @@ public class ItemCommandTriggerHandler extends BaseTriggerModuleHandler implemen
private final Set<String> types;
private final BundleContext bundleContext;
public static final String MODULE_TYPE_ID = "core.ItemCommandTrigger";
private static final String CFG_ITEMNAME = "itemName";
private static final String CFG_COMMAND = "command";
@SuppressWarnings("rawtypes")
private ServiceRegistration eventSubscriberRegistration;
private ServiceRegistration<?> eventSubscriberRegistration;
public ItemCommandTriggerHandler(Trigger module, BundleContext bundleContext) {
super(module);

View File

@ -33,12 +33,6 @@ import org.slf4j.LoggerFactory;
*/
public class ItemStateConditionHandler extends BaseConditionModuleHandler {
private final Logger logger = LoggerFactory.getLogger(ItemStateConditionHandler.class);
public static final String ITEM_STATE_CONDITION = "core.ItemStateCondition";
private ItemRegistry itemRegistry;
/**
* Constants for Config-Parameters corresponding to Definition in
* ItemModuleTypeDefinition.json
@ -47,6 +41,12 @@ public class ItemStateConditionHandler extends BaseConditionModuleHandler {
private static final String OPERATOR = "operator";
private static final String STATE = "state";
private final Logger logger = LoggerFactory.getLogger(ItemStateConditionHandler.class);
public static final String ITEM_STATE_CONDITION = "core.ItemStateCondition";
private ItemRegistry itemRegistry;
public ItemStateConditionHandler(Condition condition) {
super(condition);
}

View File

@ -44,6 +44,14 @@ import org.slf4j.LoggerFactory;
* @author Simon Merschjohann - Initial contribution
*/
public class ItemStateTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
public static final String UPDATE_MODULE_TYPE_ID = "core.ItemStateUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.ItemStateChangeTrigger";
public static final String CFG_ITEMNAME = "itemName";
public static final String CFG_STATE = "state";
public static final String CFG_PREVIOUS_STATE = "previousState";
private final Logger logger = LoggerFactory.getLogger(ItemStateTriggerHandler.class);
private final String itemName;
@ -52,15 +60,7 @@ public class ItemStateTriggerHandler extends BaseTriggerModuleHandler implements
private Set<String> types;
private final BundleContext bundleContext;
public static final String UPDATE_MODULE_TYPE_ID = "core.ItemStateUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.ItemStateChangeTrigger";
private static final String CFG_ITEMNAME = "itemName";
private static final String CFG_STATE = "state";
private static final String CFG_PREVIOUS_STATE = "previousState";
@SuppressWarnings("rawtypes")
private ServiceRegistration eventSubscriberRegistration;
private ServiceRegistration<?> eventSubscriberRegistration;
public ItemStateTriggerHandler(Trigger module, BundleContext bundleContext) {
super(module);

View File

@ -43,11 +43,11 @@ import org.slf4j.LoggerFactory;
@NonNullByDefault
public class SystemTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
private final Logger logger = LoggerFactory.getLogger(SystemTriggerHandler.class);
public static final String STARTLEVEL_MODULE_TYPE_ID = "core.SystemStartlevelTrigger";
private static final String CFG_STARTLEVEL = "startlevel";
private static final String OUT_STARTLEVEL = "startlevel";
public static final String CFG_STARTLEVEL = "startlevel";
public static final String OUT_STARTLEVEL = "startlevel";
private final Logger logger = LoggerFactory.getLogger(SystemTriggerHandler.class);
private final Integer startlevel;
private final Set<String> types;

View File

@ -45,6 +45,18 @@ import org.slf4j.LoggerFactory;
@NonNullByDefault
public class ThingStatusTriggerHandler extends BaseTriggerModuleHandler implements EventSubscriber, EventFilter {
public static final String UPDATE_MODULE_TYPE_ID = "core.ThingStatusUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.ThingStatusChangeTrigger";
public static final String CFG_THING_UID = "thingUID";
public static final String CFG_STATUS = "status";
public static final String CFG_PREVIOUS_STATUS = "previousStatus";
public static final String OUT_STATUS = "status";
public static final String OUT_NEW_STATUS = "newStatus";
public static final String OUT_OLD_STATUS = "oldStatus";
public static final String OUT_EVENT = "event";
private final Logger logger = LoggerFactory.getLogger(ThingStatusTriggerHandler.class);
private final String thingUID;
@ -53,18 +65,6 @@ public class ThingStatusTriggerHandler extends BaseTriggerModuleHandler implemen
private final Set<String> types;
private final BundleContext bundleContext;
public static final String UPDATE_MODULE_TYPE_ID = "core.ThingStatusUpdateTrigger";
public static final String CHANGE_MODULE_TYPE_ID = "core.ThingStatusChangeTrigger";
private static final String CFG_THING_UID = "thingUID";
private static final String CFG_STATUS = "status";
private static final String CFG_PREVIOUS_STATUS = "previousStatus";
private static final String OUT_STATUS = "status";
private static final String OUT_NEW_STATUS = "newStatus";
private static final String OUT_OLD_STATUS = "oldStatus";
private static final String OUT_EVENT = "event";
private final ServiceRegistration<?> eventSubscriberRegistration;
public ThingStatusTriggerHandler(Trigger module, BundleContext bundleContext) {

View File

@ -29,8 +29,6 @@ import org.slf4j.LoggerFactory;
*/
public class TimeOfDayConditionHandler extends BaseConditionModuleHandler {
private final Logger logger = LoggerFactory.getLogger(TimeOfDayConditionHandler.class);
public static final String MODULE_TYPE_ID = "core.TimeOfDayCondition";
/**
@ -39,6 +37,8 @@ public class TimeOfDayConditionHandler extends BaseConditionModuleHandler {
*/
private static final String START_TIME = "startTime";
private static final String END_TIME = "endTime";
private final Logger logger = LoggerFactory.getLogger(TimeOfDayConditionHandler.class);
/**
* The start time of the user configured time span.
*/

View File

@ -37,7 +37,7 @@ public class TimeOfDayTriggerHandler extends BaseTriggerModuleHandler implements
public static final String MODULE_TYPE_ID = "timer.TimeOfDayTrigger";
public static final String MODULE_CONTEXT_NAME = "MODULE";
private static final String CFG_TIME = "time";
public static final String CFG_TIME = "time";
private final CronScheduler scheduler;
private final String expression;