001package jmri.jmrix.ipocs;
002
003import jmri.Light;
004import jmri.SystemConnectionMemo;
005import jmri.managers.AbstractLightManager;
006
007import javax.annotation.Nonnull;
008
009/**
010 *
011 * @author Fredrik Elestedt Copyright (C) 2020
012 * @since 4.21.2
013 */
014public class IpocsLightManager extends AbstractLightManager {
015
016  public IpocsLightManager(SystemConnectionMemo memo) {
017    super(memo);
018  }
019
020  private IpocsPortController getPortController() {
021    return ((IpocsSystemConnectionMemo)memo).getPortController();
022  }
023
024  @Override
025  public boolean validSystemNameConfig(@Nonnull String systemName) {
026    return false;
027  }
028
029  @Override
030  @Nonnull
031  protected Light createNewLight(@Nonnull String systemName, String userName) throws IllegalArgumentException {
032    return new IpocsLight(getPortController(), systemName, userName);
033  }
034  
035}