ist.palcom.info
Interface InfoHandler

All Known Implementing Classes:
ModifiableInfoHandler

public interface InfoHandler

This interface defines an handler for a list of infos. The methods in this interface are for a read-only handler ( ModifiableInfoHandlerextends the behavior with updating methods).


Method Summary
 void addInfoListener(InfoListener l)
          Adds a listener for InfoEvents posted after the list changes.
 boolean assemblyIsEstablished(PRDAssemblyVer assemblyInfo)
           
 boolean assemblyIsPossible(PRDAssemblyVer assemblyInfo)
           
 boolean connectionIsPossible(PRDConnection connectionInfo)
           
 boolean containsInfoThatEquals(PRDData info)
          Returns true if the InfoHandler contains an info that equals info.
 boolean containsInfoThatIsAboutTheSameEntity(PRDData info)
          Returns true if the InfoHandler contains an info that is about the same entity as info.
 PRDDevice getDeviceInfo(DeviceID deviceID)
           
 PRDData getInfo(int index)
           
 PRDData getInfoThatEquals(PRDData info)
           
 PRDData getInfoThatIsAboutTheSameEntity(PRDData info)
           
 java.lang.String getLongName(LocalSID serviceLocalSID)
          Returns the long name of the service with a given LocalSID, or null if it does not exist in this handler.
 PRDConnection[] getMatchingConnectionInfos(PRDData info1, PRDData info2)
           
 int getNumberOfInfos()
           
 PRDServiceFMDescription getServiceDescription(LocalSID providerLocalSID)
           
 PRDServiceListItem getServiceListItem(LocalSID serviceLocalSID)
           
 PRDServiceList getSubserviceList(LocalSID parentLocalSID)
           
 void removeInfoListener(InfoListener l)
          Removes a listener previously added with addInfoListener().
 boolean servicesMatch(PRDData info1, PRDData info2)
           
 

Method Detail

getNumberOfInfos

int getNumberOfInfos()

getInfo

PRDData getInfo(int index)
Returns:
The Info at index index, or null if there is no such item.

getInfoThatEquals

PRDData getInfoThatEquals(PRDData info)
Returns:
The Info in the list that equals info, or null if none exists.

getInfoThatIsAboutTheSameEntity

PRDData getInfoThatIsAboutTheSameEntity(PRDData info)
Returns:
The Info in the list that is about the same entity, or null if none exists.

containsInfoThatEquals

boolean containsInfoThatEquals(PRDData info)
Returns true if the InfoHandler contains an info that equals info.


containsInfoThatIsAboutTheSameEntity

boolean containsInfoThatIsAboutTheSameEntity(PRDData info)
Returns true if the InfoHandler contains an info that is about the same entity as info.


addInfoListener

void addInfoListener(InfoListener l)
Adds a listener for InfoEvents posted after the list changes.


removeInfoListener

void removeInfoListener(InfoListener l)
Removes a listener previously added with addInfoListener().


getServiceListItem

PRDServiceListItem getServiceListItem(LocalSID serviceLocalSID)
Returns:
The service list item in this handler's list which has LocalSID serviceLocalSID. The whole trees will be searched, and a service or a sublist will be returned if it matches. Null is returned if no matching service list item is found.

getDeviceInfo

PRDDevice getDeviceInfo(DeviceID deviceID)
Returns:
The DeviceInfo in this handler's list which has String deviceID. Null is returned if no matching device info is found.

getSubserviceList

PRDServiceList getSubserviceList(LocalSID parentLocalSID)
Returns:
The list of subservices for the info with LocalSID parentLocalSID.

getServiceDescription

PRDServiceFMDescription getServiceDescription(LocalSID providerLocalSID)
Returns:
The ServiceDescription in this handler's list for the provider which has LocalSID providerLocalSID. Null is returned if no matching device info is found.

getLongName

java.lang.String getLongName(LocalSID serviceLocalSID)
Returns the long name of the service with a given LocalSID, or null if it does not exist in this handler.


connectionIsPossible

boolean connectionIsPossible(PRDConnection connectionInfo)
Returns:
True if the connection in connectionInfo is possible, i.e. if ServiceInfos for both its parties are in this InfoHandler.

assemblyIsEstablished

boolean assemblyIsEstablished(PRDAssemblyVer assemblyInfo)
Returns:
True if the assembly in assemblyInfo is fully established, i.e. if ConnectionInfos for all its connections are in this InfoHandler, and they are all active.

assemblyIsPossible

boolean assemblyIsPossible(PRDAssemblyVer assemblyInfo)
Returns:
True if the assembly in assemblyInfo is possible, i.e. if all its connections are possible, in the same sense as for connectionIsPossible(PRDConnection).

servicesMatch

boolean servicesMatch(PRDData info1,
                      PRDData info2)
Returns:
true if there is at least one matching customer-service pair in info1 and info2, looking in this InfoHandler. The whole trees of subservices are examined.

getMatchingConnectionInfos

PRDConnection[] getMatchingConnectionInfos(PRDData info1,
                                           PRDData info2)
Returns:
an array of ConnectionInfos for matching customer-service pairs in info1 and info2, looking in this InfoHandler.