Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.record.container.interfaces
Interface IServiceRecordContainer

All Known Subinterfaces:
IExportServiceRecordContainer, IImportServiceRecordContainer

public interface IServiceRecordContainer

The IServiceRecordContainer interface declares the API for service record containers.

This interface does not declare a responsibility for adding records to the container, since for type-safety reasons this is left for the sub-interfaces to define.

Note: Since this abstraction is used internally by the SAT bundle this interface is typically not used directly by bundle developers.


Method Summary
 boolean contains(IServiceRecord record)
          Query the container for the existence of a service record.
 boolean doForEach(IServiceRecordAction action, Object parameter)
          For each service record execute an action.
 void empty()
          Empty the container by removing all the records.
 IServiceRecord get(String name)
          Get the service record for a named service in the container.
 IServiceRecord get(String name, Object service)
          Get the service record for the specified service.
 IServiceRecord[] getAll()
          Get all the service records in the container.
 IServiceRecord[] getAll(String name)
          Get all the service records in the container for the specified name.
 boolean isEmpty()
          Query whether the receiver is empty.
 boolean removeAll(String name)
          Remove from the container all the service with a name matching the specified name.
 int size()
          Query the size of the container.
 

Method Detail

contains

boolean contains(IServiceRecord record)
Query the container for the existence of a service record.

Parameters:
record - A service record.
Returns:
True if the service record exists, otherwise false.

doForEach

boolean doForEach(IServiceRecordAction action,
                  Object parameter)
For each service record execute an action. If executing the action answers false, stop iterating through the service records.

Parameters:
action - An action to perform.
parameter - Optional parameter passed to the service record.
Returns:
False if all service records were not visited, otherwise true.

empty

void empty()
Empty the container by removing all the records.


get

IServiceRecord get(String name)
Get the service record for a named service in the container.

Parameters:
name - A Service name.
Returns:
The service record. Returns null if the a service record for the service does not exist.

get

IServiceRecord get(String name,
                   Object service)
Get the service record for the specified service.

Parameters:
name - A service name.
service - A service.
Returns:
The service record for the specified name and service object, or null if a service record does not exist.

getAll

IServiceRecord[] getAll()
Get all the service records in the container.

Returns:
An array of service record in the container. Returns an array of zero elements if the container does not contain any service records.

getAll

IServiceRecord[] getAll(String name)
Get all the service records in the container for the specified name.

Parameters:
name - A service name.
Returns:
An array of service record in the container. Returns an array of zero elements if the container does not contain any service records.

isEmpty

boolean isEmpty()
Query whether the receiver is empty.

Returns:
True if the container is empty, otherwise false.

removeAll

boolean removeAll(String name)
Remove from the container all the service with a name matching the specified name.

Parameters:
name - The name of the services to remove.
Returns:
True if at least one service with the specified name was removed, otherwise false.

size

int size()
Query the size of the container.

Returns:
The size of the container.

Service Activator Toolkit
Version 1.1.0 (20081206)