jmri
Interface ConditionalManager

All Superinterfaces:
Manager
All Known Implementing Classes:
DefaultConditionalManager

public interface ConditionalManager
extends Manager

Interface for obtaining Conditionals

This doesn't have a "new" method, since Conditionals are separately implemented, instead of being system-specific.


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.

Author:
Dave Duchamp Copyright (C) 2007

Field Summary
 
Fields inherited from interface jmri.Manager
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXS, MEMORIES, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
 
Method Summary
 Conditional createNewConditional(String systemName, String userName)
          Method to create a new Conditional if the Conditional does not exist Returns null if a Conditional with the same systemName or userName already exists, or if there is trouble creating a new Conditional If the parent Logix cannot be found, the userName cannot be checked, but the Conditional is still created.
 void deleteConditional(Conditional c)
          Delete Conditional by removing it from the manager.
 void dispose()
          Free resources when no longer used.
 Conditional getBySystemName(String s)
           
 Conditional getByUserName(Logix x, String s)
           
 Conditional getByUserName(String s)
           
 Conditional getConditional(Logix x, String name)
          Method to get an existing Conditional.
 Conditional getConditional(String name)
           
 Logix getParentLogix(String name)
          Parses the Conditional system name to get the parent Logix system name, then gets the parent Logix, and returns it.
 List<String> getSystemNameListForLogix(Logix x)
          Get a list of all Conditional system names with the specified Logix parent
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, deregister, getBeanBySystemName, getSystemNameArray, getSystemNameList, getSystemPrefix, getXMLOrder, makeSystemName, register, removePropertyChangeListener, systemLetter, typeLetter
 

Method Detail

dispose

void dispose()
Description copied from interface: Manager
Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.

Specified by:
dispose in interface Manager

createNewConditional

Conditional createNewConditional(String systemName,
                                 String userName)
Method to create a new Conditional if the Conditional does not exist Returns null if a Conditional with the same systemName or userName already exists, or if there is trouble creating a new Conditional If the parent Logix cannot be found, the userName cannot be checked, but the Conditional is still created. The scenario can happen when a Logix is loaded from a file after its Conditionals.


getParentLogix

Logix getParentLogix(String name)
Parses the Conditional system name to get the parent Logix system name, then gets the parent Logix, and returns it.

Parameters:
name - - system name of Conditional (must be trimmed and upper case)

getConditional

Conditional getConditional(Logix x,
                           String name)
Method to get an existing Conditional. First looks up assuming that name is a User Name. Note: the parent Logix must be passed in x for user name lookup. If this fails, or if x == null, looks up assuming that name is a System Name. If both fail, returns null.

Parameters:
x - - parent Logix (may be null)
name - - name to look up
Returns:
null if no match found

getConditional

Conditional getConditional(String name)

getByUserName

Conditional getByUserName(String s)

getByUserName

Conditional getByUserName(Logix x,
                          String s)

getBySystemName

Conditional getBySystemName(String s)

getSystemNameListForLogix

List<String> getSystemNameListForLogix(Logix x)
Get a list of all Conditional system names with the specified Logix parent


deleteConditional

void deleteConditional(Conditional c)
Delete Conditional by removing it from the manager. The parent Logix must first be deactivated so it stops processing.



Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads