001package jmri.jmrit.logixng; 002 003import java.util.List; 004import java.util.Map; 005 006import javax.annotation.Nonnull; 007 008import jmri.Category; 009 010/** 011 * Manager for DigitalActionBean 012 * 013 * @author Dave Duchamp Copyright (C) 2007 014 * @author Daniel Bergqvist Copyright (C) 2018 015 */ 016public interface DigitalActionManager extends BaseManager<MaleDigitalActionSocket> { 017 018 /** 019 * Remember a NamedBean Object created outside the manager. 020 * This method creates a MaleDigitalActionSocket for the action. 021 * 022 * @param action the bean 023 * @return the male socket for this action 024 * @throws IllegalArgumentException if the action has an invalid system name 025 */ 026 MaleDigitalActionSocket registerAction(@Nonnull DigitalActionBean action) 027 throws IllegalArgumentException; 028 029 /** 030 * Create a new system name for an DigitalActionBean. 031 * @return a new system name 032 */ 033 String getAutoSystemName(); 034 035 FemaleDigitalActionSocket createFemaleSocket( 036 Base parent, FemaleSocketListener listener, String socketName); 037 038 /** 039 * Get a set of classes that implements the DigitalActionBean interface. 040 * 041 * @return a set of entries with category and class 042 */ 043 Map<Category, List<Class<? extends Base>>> getActionClasses(); 044 045 /** 046 * {@inheritDoc} 047 * 048 * The sub system prefix for the DigitalActionManager is 049 * {@link #getSystemNamePrefix() } and "DA"; 050 */ 051 @Override 052 default String getSubSystemNamePrefix() { 053 return getSystemNamePrefix() + "DA"; 054 } 055 056 /** 057 * Delete DigitalActionBean by removing it from the manager. The DigitalActionBean must first be 058 * deactivated so it stops processing. 059 * 060 * @param x the DigitalActionBean to delete 061 */ 062 void deleteDigitalAction(MaleDigitalActionSocket x); 063 064}