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)
          Make IContainer instance.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID)
          Make IContainer instance.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, java.lang.Object[] parameters)
          Make IContainer instance.
 IContainer createContainer(ContainerTypeDescription containerTypeDescription, java.lang.Object[] parameters)
          Make IContainer instance.
 IContainer createContainer(ID containerID)
          Make a base IContainer instance.
 IContainer createContainer(java.lang.String containerTypeDescriptionName)
          Make IContainer instance.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, ID containerID)
          Make IContainer instance.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, ID containerID, java.lang.Object[] parameters)
          Make IContainer instance.
 IContainer createContainer(java.lang.String containerTypeDescriptionName, java.lang.Object[] parameters)
          Make IContainer instance.
 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 a base IContainer instance.

createContainer

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

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
Make IContainer instance. Given a ContainerTypeDescription, this method will

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

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription name, this method will

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
Make IContainer instance. Given a ContainerTypeDescription object, a String [] of argument types, and an Object [] of parameters, this method will

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
Returns:
a valid instance of IContainer. A non-null. instance will be returned.
Throws:
ContainerCreateException

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription name, this method will

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

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           ID containerID,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription object, a String [] of argument types, and an Object [] of parameters, this method will

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 - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator
Returns:
a valid instance of IContainer
Throws:
ContainerCreateException

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           ID containerID,
                           java.lang.Object[] parameters)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription name, this method will

Parameters:
containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
containerID - the new container's id. 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

createContainer

IContainer createContainer(ContainerTypeDescription containerTypeDescription,
                           ID containerID)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription, this method will

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

createContainer

IContainer createContainer(java.lang.String containerTypeDescriptionName,
                           ID containerID)
                           throws ContainerCreateException
Make IContainer instance. Given a ContainerTypeDescription name, this method will

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