001package jmri; 002 003import java.util.List; 004import javax.annotation.Nonnull; 005 006/** 007 * Interface for Managers of NamedBeans that are proxies for a collection of 008 * Managers for the same type of NamedBean. 009 * 010 * @author Randall Wood Copyright 2019 011 * @param <B> type of supported NamedBean 012 */ 013public interface ProxyManager<B extends NamedBean> extends Manager<B> { 014 015 /** 016 * Add a Manager to the collection of Managers. 017 * 018 * @param manager the Manager to add; if manager has already been added, it 019 * will not be added again 020 */ 021 void addManager(@Nonnull Manager<B> manager); 022 023 /** 024 * Get the default manager or the internal manager if no default manager has 025 * been set. 026 * 027 * @return the default manager or the internal manager 028 */ 029 @Nonnull 030 Manager<B> getDefaultManager(); 031 032 /** 033 * Returns a list of all managers, including the internal manager. This is 034 * not a live list, but it is in alpha order (don't assume default is at 035 * front) 036 * 037 * @return the list of managers 038 */ 039 List<Manager<B>> getManagerList(); 040 041 /** 042 * Get a list of all managers, with the default as the first item and internal 043 * default as the last item. 044 * 045 * @return the list of managers 046 */ 047 List<Manager<B>> getDisplayOrderManagerList(); 048 049}