org.eclipse.ecf.core
Interface IContainerFactory

All Known Implementing Classes:
ContainerFactory

public interface IContainerFactory

Container factory contract ContainerFactory for default implementation.


Method Summary
 ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription)
          Add a ContainerTypeDescription to the set of known ContainerDescriptions.
 boolean containsDescription(ContainerTypeDescription containerTypeDescription)
          Check to see if a given named description is already contained by this factory
 IContainer createContainer()
          Make a base IContainer instance.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, java.lang.Object[] parameters)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.lang.Object[] parameters)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.lang.String containerId)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.lang.String containerId, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.lang.String containerId, java.lang.Object[] parameters)
          Create a new container.
 IContainer createContainer(ID containerID)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, ID containerID)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, ID containerID, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, ID containerID, java.lang.Object[] parameters)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.lang.Object[] parameters)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.lang.String containerId)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.lang.String containerId, java.util.Map parameters)
          Create a new container.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.lang.String containerId, java.lang.Object[] parameters)
          Create a new container.
 ContainerTypeDescription getDescriptionByName(java.lang.String containerTypeDescriptionName)
          Get the known ContainerTypeDescription given it's name.
 java.util.List getDescriptions()
          Get a collection of the ContainerDescriptions currently known to this factory.
 ContainerTypeDescription[] getDescriptionsForContainerAdapter(java.lang.Class containerAdapter)
          Get container type descriptions that support the given containerAdapter
 ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription)
          Remove given description from set known to this factory.
 

Method Detail

addDescription

ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription)
Add a ContainerTypeDescription to the set of known ContainerDescriptions.

Parameters:
containerTypeDescription - the ContainerTypeDescription to add to this factory. Must not be null.
Returns:
ContainerTypeDescription the old description of the same name, null if none found

getDescriptions

java.util.List getDescriptions()
Get a collection of the ContainerDescriptions currently known to this factory. This allows clients to query the factory to determine what if any other ContainerDescriptions are currently registered with the factory, and if so, what they are.

Returns:
List of ContainerTypeDescription instances

containsDescription

boolean containsDescription(ContainerTypeDescription containerTypeDescription)
Check to see if a given named description is already contained by this factory

Parameters:
containerTypeDescription - the ContainerTypeDescription to look for
Returns:
true if description is already known to factory, false otherwise

getDescriptionByName

ContainerTypeDescription getDescriptionByName(java.lang.String containerTypeDescriptionName)
Get the known ContainerTypeDescription given it's name.

Parameters:
containerTypeDescriptionName - the name to use as key to find ContainerTypeDescription. Must not be null.
Returns:
ContainerTypeDescription found. Null if not found.

removeDescription

ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription)
Remove given description from set known to this factory.

Parameters:
containerTypeDescription - the ContainerTypeDescription to remove
Returns:
the removed ContainerTypeDescription, null if nothing removed

getDescriptionsForContainerAdapter

ContainerTypeDescription[] getDescriptionsForContainerAdapter(java.lang.Class containerAdapter)
Get container type descriptions that support the given containerAdapter

Parameters:
containerAdapter - the container adapter. Must not be null.
Returns:
ContainerTypeDescription[] of descriptions that support the given container adapter. If no ContainerTypeDescriptions found that support the given adapter, an empty array will be returned.

createContainer

IContainer createContainer()
                           throws ContainerCreateException
Make a base IContainer instance.

Returns:
IContainer instance. A non-null instance will be returned.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(ID containerID)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerID - the container's new ID. Must not be null.
Returns:
IContainer instance. A non-null. instance will be returned.
Throws:
ContainerCreateException - if some problem creating a base IContainer instance.

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use. Must not be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer. A non-null instance will be returned.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
parameters - the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.lang.String containerId)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to use to create the instance. Must not be null.
containerId - the container's new ID. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.lang.String containerId,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to use to create the instance. Must not be null.
containerId - the container's new ID. May be null.
parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           java.lang.String containerId)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
containerId - the container's new ID. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           java.lang.String containerId,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
containerId - the container's new ID. May be null.
parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           ID containerID,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
containerID - the container's new ID. May be null.
parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           ID containerID,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
containerID - the new container's id. May be null.
parameters - the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           ID containerID)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to lookup. Must not be null.
containerID - the new container's id. May be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           ID containerID)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
containerID - the new container's id. May be null.
Returns:
a valid instance of IContainer. Will not be null.
Throws:
ContainerCreateException - if some problem creating the instance.

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           ID containerID,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
containerID - the container's new ID. Must not be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           java.lang.String containerId,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
containerId - the container's new ID. May be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           ID containerID,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
containerID - the container's new ID. May be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.lang.String containerId,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
containerId - the container's new ID. May be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.util.Map parameters)
                           throws ContainerCreateException
Create a new container.

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException - if some problem creating the instance.
Since:
3.1