001package jmri.jmrit.logixng.actions;
002
003import java.util.AbstractMap;
004import java.util.Map;
005import java.util.Set;
006
007import jmri.jmrit.logixng.*;
008
009import org.openide.util.lookup.ServiceProvider;
010
011/**
012 * The factory for DigitalAction classes.
013 */
014@ServiceProvider(service = DigitalActionFactory.class)
015public class DigitalFactory implements DigitalActionFactory {
016
017    @Override
018    public Set<Map.Entry<Category, Class<? extends DigitalActionBean>>> getActionClasses() {
019        Set<Map.Entry<Category, Class<? extends DigitalActionBean>>> digitalActionClasses =
020                Set.of(
021                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionAudio.class),
022                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionBlock.class),
023                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionClock.class),
024                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionClockRate.class),
025                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionCreateBeansFromTable.class),
026                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionDispatcher.class),
027                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionEntryExit.class),
028                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionFindTableRowOrColumn.class),
029                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionLight.class),
030                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionLightIntensity.class),
031                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionListenOnBeans.class),
032                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionListenOnBeansLocalVariable.class),
033                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionListenOnBeansTable.class),
034                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionLocalVariable.class),
035                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionMemory.class),
036                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionOBlock.class),
037                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionPower.class),
038                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionRequestUpdateAllSensors.class),
039                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionReporter.class),
040                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionRequestUpdateOfSensor.class),
041                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionScript.class),
042                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionSensor.class),
043                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionSetReporter.class),
044                        new AbstractMap.SimpleEntry<>(Category.OTHER, ActionShutDownTask.class),
045                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionSignalHead.class),
046                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionSignalMast.class),
047                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionSound.class),
048                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionTable.class),
049                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionThrottle.class),
050                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionThrottleFunction.class),
051                        new AbstractMap.SimpleEntry<>(Category.COMMON, ActionTimer.class),
052                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionTurnout.class),
053                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionTurnoutLock.class),
054                        new AbstractMap.SimpleEntry<>(Category.ITEM, ActionWarrant.class),
055                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Break.class),
056                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Continue.class),
057                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, DigitalCallModule.class),
058                        new AbstractMap.SimpleEntry<>(Category.COMMON, DigitalFormula.class),
059                        new AbstractMap.SimpleEntry<>(Category.COMMON, DoAnalogAction.class),
060                        new AbstractMap.SimpleEntry<>(Category.COMMON, DoStringAction.class),
061                        new AbstractMap.SimpleEntry<>(Category.ITEM, EnableLogix.class),
062                        new AbstractMap.SimpleEntry<>(Category.ITEM, EnableLogixNG.class),
063                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Error.class),
064                        new AbstractMap.SimpleEntry<>(Category.OTHER, ExecuteAction.class),
065                        new AbstractMap.SimpleEntry<>(Category.COMMON, ExecuteDelayed.class),
066                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Exit.class),
067                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, For.class),
068                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, ForEach.class),
069                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, IfThenElse.class),
070                        new AbstractMap.SimpleEntry<>(Category.OTHER, JsonDecode.class),
071                        new AbstractMap.SimpleEntry<>(Category.OTHER, Logix.class),
072                        new AbstractMap.SimpleEntry<>(Category.OTHER, LogData.class),
073                        new AbstractMap.SimpleEntry<>(Category.OTHER, LogLocalVariables.class),
074                        new AbstractMap.SimpleEntry<>(Category.COMMON, DigitalMany.class),
075                        new AbstractMap.SimpleEntry<>(Category.ITEM, ProgramOnMain.class),
076                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Return.class),
077                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, RunOnce.class),
078                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, Sequence.class),
079                        new AbstractMap.SimpleEntry<>(Category.OTHER, ShowDialog.class),
080                        new AbstractMap.SimpleEntry<>(Category.OTHER, ShutdownComputer.class),
081                        new AbstractMap.SimpleEntry<>(Category.OTHER, SimulateTurnoutFeedback.class),
082                        new AbstractMap.SimpleEntry<>(Category.FLOW_CONTROL, TableForEach.class),
083                        new AbstractMap.SimpleEntry<>(Category.OTHER, Timeout.class),
084                        new AbstractMap.SimpleEntry<>(Category.ITEM, TriggerRoute.class),
085                        new AbstractMap.SimpleEntry<>(Category.OTHER, WebBrowser.class),
086                        new AbstractMap.SimpleEntry<>(Category.OTHER, WebRequest.class)
087                );
088
089        return digitalActionClasses;
090    }
091
092}