001package jmri.jmrit.logixng; 002 003import java.util.List; 004import java.util.Map; 005import javax.annotation.Nonnull; 006 007/** 008 * Manager for AnalogActionBean 009 * 010 * @author Dave Duchamp Copyright (C) 2007 011 * @author Daniel Bergqvist Copyright (C) 2018 012 */ 013public interface AnalogActionManager extends BaseManager<MaleAnalogActionSocket> { 014 015 /** 016 * Remember a NamedBean Object created outside the manager. 017 * This method creates a MaleAnalogActionSocket for the action. 018 * 019 * @param action the bean 020 * @return the male socket for this action 021 * @throws IllegalArgumentException if the action has an invalid system name 022 */ 023 MaleAnalogActionSocket registerAction(@Nonnull AnalogActionBean action) 024 throws IllegalArgumentException; 025 026 /** 027 * Create a new system name for an AnalogActionBean. 028 * @return a new system name 029 */ 030 String getAutoSystemName(); 031 032 FemaleAnalogActionSocket createFemaleSocket( 033 Base parent, FemaleSocketListener listener, String socketName); 034 035 /** 036 * Get a set of classes that implements the DigitalAction interface. 037 * 038 * @return a set of entries with category and class 039 */ 040 Map<Category, List<Class<? extends Base>>> getActionClasses(); 041 042 /*.* 043 * Add an Action. 044 * 045 * @param action the action to add 046 * @throws IllegalArgumentException if the action has an invalid system name 047 */ 048// public void addAction(Action action) 049// throws IllegalArgumentException; 050 051 /*.* 052 * Locate via user name, then system name if needed. Does not create a new 053 * one if nothing found 054 * 055 * @param name User name or system name to match 056 * @return null if no match found 057 */ 058// public Action getAction(String name); 059 060// public Action getByUserName(String s); 061 062// public Action getBySystemName(String s); 063 064 /** 065 * {@inheritDoc} 066 * 067 * The sub system prefix for the AnalogActionManager is 068 * {@link #getSystemNamePrefix() } and "AA"; 069 */ 070 @Override 071 default String getSubSystemNamePrefix() { 072 return getSystemNamePrefix() + "AA"; 073 } 074 075 /** 076 * Delete Action by removing it from the manager. The Action must first be 077 * deactivated so it stops processing. 078 * 079 * @param x the Action to delete 080 */ 081 void deleteAnalogAction(MaleAnalogActionSocket x); 082 083}