001package jmri.managers;
002
003import javax.annotation.Nonnull;
004import jmri.StringIO;
005import jmri.Manager;
006import jmri.SystemConnectionMemo;
007import jmri.StringIOManager;
008
009/**
010 * Abstract partial implementation of a StringIOManager.
011 * <p>
012 * Based on AbstractSignalHeadManager.java and AbstractSensorManager.java
013 *
014 * @author Dave Duchamp      Copyright (C) 2004
015 * @author Daniel Bergqvist  Copyright (C) 2020
016 */
017public abstract class AbstractStringIOManager extends AbstractManager<StringIO>
018        implements StringIOManager {
019
020    /**
021     * Create a new StringIOManager instance.
022     * 
023     * @param memo the system connection
024     */
025    public AbstractStringIOManager(SystemConnectionMemo memo) {
026        super(memo);
027    }
028
029    /** {@inheritDoc} */
030    @Override
031    public int getXMLOrder() {
032        return Manager.STRINGIOS;
033    }
034
035    /**
036     * {@inheritDoc}
037     */
038    @Override
039    public char typeLetter() {
040        return 'C';
041    }
042
043    /**
044     * Get bean type handled.
045     *
046     * @return a string for the type of object handled by this manager
047     */
048    @Override
049    @Nonnull
050    public String getBeanTypeHandled(boolean plural) {
051        return Bundle.getMessage(plural ? "BeanNameStringIOs" : "BeanNameStringIO");
052    }
053
054    /**
055     * {@inheritDoc}
056     */
057    @Override
058    public Class<StringIO> getNamedBeanClass() {
059        return StringIO.class;
060    }
061
062//    private final static Logger log = LoggerFactory.getLogger(AbstractStringIOManager.class);
063
064}