|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractManager
jmri.DefaultConditionalManager
public class DefaultConditionalManager
Basic Implementation of a ConditionalManager.
Note that Conditionals always have an associated parent Logix.
Logix system names must begin with IX, and be followed by a string, usually, but not always, a number. The system names of Conditionals always begin with the parent Logix's system name, then there is a capital C and a number.
Conditional system names are set automatically when the Conditional is created. All alphabetic characters in a Conditional system name must be upper case. This is enforced when a new Conditional is created via LogixTableAction.java.
| Field Summary |
|---|
| Fields inherited from class jmri.AbstractManager |
|---|
_tsys, _tuser |
| Constructor Summary | |
|---|---|
DefaultConditionalManager()
|
|
| 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)
Remove an existing Conditional. |
Conditional |
getBySystemName(String name)
|
Conditional |
getByUserName(Logix x,
String key)
|
Conditional |
getConditional(Logix x,
String name)
Method to get an existing Conditional. |
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 |
getSystemNameListForLogix(Logix x)
Get a list of all Conditional system names with the specified Logix parent |
static DefaultConditionalManager |
instance()
|
char |
systemLetter()
|
char |
typeLetter()
|
| Methods inherited from class jmri.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameList, makeSystemName, propertyChange, register, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.ConditionalManager |
|---|
dispose |
| Methods inherited from interface jmri.Manager |
|---|
addPropertyChangeListener, deregister, getSystemNameList, makeSystemName, register, removePropertyChangeListener |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Constructor Detail |
|---|
public DefaultConditionalManager()
| Method Detail |
|---|
public char systemLetter()
systemLetter in interface Managerpublic char typeLetter()
typeLetter in interface Manager
public Conditional createNewConditional(String systemName,
String userName)
createNewConditional in interface ConditionalManagerpublic Logix getParentLogix(String name)
getParentLogix in interface ConditionalManagername - - system name of Conditional (must be trimmed and upper case)public void deleteConditional(Conditional c)
deleteConditional in interface ConditionalManager
public Conditional getConditional(Logix x,
String name)
getConditional in interface ConditionalManagerx - - parent Logix (may be null)name - - name to look up
public Conditional getByUserName(Logix x,
String key)
getByUserName in interface ConditionalManagerpublic Conditional getBySystemName(String name)
getBySystemName in interface ConditionalManagerpublic List getSystemNameListForLogix(Logix x)
getSystemNameListForLogix in interface ConditionalManagerpublic static DefaultConditionalManager instance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||