Class PortalManager
- java.lang.Object
-
- jmri.jmrit.logix.PortalManager
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
,InstanceManagerAutoDefault
public class PortalManager extends java.lang.Object implements InstanceManagerAutoDefault, java.beans.PropertyChangeListener
Basic implementation of a PortalManager.Note that this does not enforce any particular system naming convention.
Note this is an 'after thought' manager. Portals have been in use since 2009. Their use has now expanded well beyond what was expected. A Portal factory is needed for development to continue. Portal system names will be numbers and they will not be shown to users. The UI will treat Portal names as it does now as user names.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Constructor Summary
Constructors Constructor Description PortalManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Portal
createNewPortal(java.lang.String userName)
int
getIndexOf(Portal portal)
Portal
getPortal(int idx)
Portal
getPortal(java.lang.String name)
int
getPortalCount()
java.util.Collection<Portal>
getPortalSet()
void
propertyChange(java.beans.PropertyChangeEvent e)
Portal
providePortal(java.lang.String name)
void
removePropertyChangeListener(java.beans.PropertyChangeListener l)
-
-
-
Constructor Detail
-
PortalManager
public PortalManager()
-
-
Method Detail
-
getPortalCount
public int getPortalCount()
-
getIndexOf
public int getIndexOf(Portal portal)
-
getPortalSet
public java.util.Collection<Portal> getPortalSet()
-
createNewPortal
public Portal createNewPortal(@Nonnull java.lang.String userName)
-
providePortal
public Portal providePortal(java.lang.String name)
-
addPropertyChangeListener
@OverridingMethodsMustInvokeSuper public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
@OverridingMethodsMustInvokeSuper public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-