001package jmri.configurexml;
002
003import java.util.Locale;
004import jmri.util.startup.AbstractStartupActionFactory;
005import jmri.util.startup.StartupActionFactory;
006import org.openide.util.lookup.ServiceProvider;
007
008/**
009 * Factory for XML file loading startup actions.
010 *
011 * @author Randall Wood Copyright 2020
012 */
013@ServiceProvider(service = StartupActionFactory.class)
014public final class ConfigureXmlStartupActionFactory extends AbstractStartupActionFactory {
015
016    @Override
017    public String getTitle(Class<?> clazz, Locale locale) throws IllegalArgumentException {
018        if (clazz.equals(LoadXmlConfigAction.class)) {
019            return Bundle.getMessage(locale, "FileMenuItemLoad");  // NOI18N
020        }
021        throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName());  // NOI18N
022    }
023
024    @Override
025    public Class<?>[] getActionClasses() {
026        return new Class[]{LoadXmlConfigAction.class};
027    }
028
029}