jpos.config
Interface JposEntryRegistry

All Known Implementing Classes:
SimpleEntryRegistry

public interface JposEntryRegistry

This interface defines the populator used by the service connection and the JposServiceFactory to access the JavaPOS JposEntry objects. It also allows a consistent place to aggregates the defined JposEntry and allows for dynamic updates of the current set of JposEntry objects.

Since:
0.1 (Philly 99 meeting)
Author:
E. Michael Maximilien (maxim@us.ibm.com)

Method Summary
 void addJposEntry(JposEntry entry)
          Add an JposEntry for the service.
 void addJposEntry(java.lang.String logicalName, JposEntry entry)
          Add an JposEntry for the service with logical name specified
 void addJposEntryRegistryListener(JposEntryRegistryListener l)
          Adds a new JposEntryRegistryListener to the list of listeners
 java.util.Enumeration getEntries()
           
 JposEntry getJposEntry(java.lang.String logicalName)
           
 JposRegPopulator getRegPopulator()
           
 int getSize()
           
 boolean hasJposEntry(java.lang.String logicalName)
           
 boolean isLoaded()
           
 void load()
          Loads the JposEntryRegistry using the current populator NOTE: if no entries are found or an error occurs then the registry is empty
 void modifyJposEntry(java.lang.String logicalName, JposEntry newEntry)
          Modify the JposEntry with logicalName with the new entry indicated
 void removeJposEntry(JposEntry entry)
          Removes the specified JposEntry
 void removeJposEntry(java.lang.String logicalName)
          Removes the JposEntry with the logicalName specified
 void removeJposEntryRegistryListener(JposEntryRegistryListener l)
          Removes a new JposEntryRegistryListener to the list of listeners
 void save()
          Tell the JposEntryRegistry to save the current entries NOTE: the actual implementation will save it in dependent manner
 

Method Detail

hasJposEntry

public boolean hasJposEntry(java.lang.String logicalName)
Parameters:
logicalName - the logical name for the service
Returns:
true if there is an JposEntry with the specified logical name
Since:
0.1 (Philly 99 meeting)

getEntries

public java.util.Enumeration getEntries()
Returns:
an enumeration of JposEntry objects
Since:
0.1 (Philly 99 meeting)

getJposEntry

public JposEntry getJposEntry(java.lang.String logicalName)
Parameters:
logicalName - the logical name of the JposEntry to find
Returns:
the JposEntry for the logicalName specified
Since:
0.1 (Philly 99 meeting)

addJposEntry

public void addJposEntry(java.lang.String logicalName,
                         JposEntry entry)
Add an JposEntry for the service with logical name specified
Parameters:
logicalName - the logicalName of the service
entry - the JposEntry to add
Since:
0.1 (Philly 99 meeting)

addJposEntry

public void addJposEntry(JposEntry entry)
Add an JposEntry for the service. The logical name is obtained from the entry
Parameters:
entry - the JposEntry to add
Since:
1.3 (Washington DC 2001 meeting)
See Also:
JposEntry.getLogicalName()

removeJposEntry

public void removeJposEntry(JposEntry entry)
Removes the specified JposEntry
Parameters:
entry - the entry to remove
Since:
0.1 (Philly 99 meeting)

removeJposEntry

public void removeJposEntry(java.lang.String logicalName)
Removes the JposEntry with the logicalName specified
Parameters:
logicalName - the JposEntry's logical name
Since:
0.1 (Philly 99 meeting)

modifyJposEntry

public void modifyJposEntry(java.lang.String logicalName,
                            JposEntry newEntry)
Modify the JposEntry with logicalName with the new entry indicated
Parameters:
logicalName - the JposEntry's logical name
newEntry - the new JposEntry
Since:
0.1 (Philly 99 meeting)

addJposEntryRegistryListener

public void addJposEntryRegistryListener(JposEntryRegistryListener l)
Adds a new JposEntryRegistryListener to the list of listeners
Parameters:
l - the JposEntryRegistryListener object
Since:
0.1 (Philly 99 meeting)

removeJposEntryRegistryListener

public void removeJposEntryRegistryListener(JposEntryRegistryListener l)
Removes a new JposEntryRegistryListener to the list of listeners
Parameters:
l - the JposEntryRegistryListener object
Since:
0.1 (Philly 99 meeting)

save

public void save()
          throws java.lang.Exception
Tell the JposEntryRegistry to save the current entries NOTE: the actual implementation will save it in dependent manner
Throws:
java.lang.Exception - if any error occurs while saving
Since:
0.1 (Philly 99 meeting)

load

public void load()
Loads the JposEntryRegistry using the current populator NOTE: if no entries are found or an error occurs then the registry is empty
Since:
1.2 (NY 2K meeting)

getRegPopulator

public JposRegPopulator getRegPopulator()
Returns:
the JposRegPopulator for this registry
Since:
1.2 (NY 2K meeting)

getSize

public int getSize()
Returns:
the current size of the registry
Since:
1.3 (Tokyo 2001 meeting)

isLoaded

public boolean isLoaded()
Returns:
true if the registry has already been loaded or false otherwise
Since:
1.3 (Washington DC 2001 meeting)


This API and code belongs to the JavaPOS committee please see LISCENCE file for details