org.eclipse.corona.container.manager
Interface IContainerManager

All Known Subinterfaces:
IProjectContainerManager
All Known Implementing Classes:
ContainerManager, ProjectContainerManager, ProjectContainerProxy

public interface IContainerManager


Method Summary
 void addRelatedContainerUri(java.lang.String containerUri, java.lang.String relatedContainerUri)
          Add a containerUri String to the list of related Containers in specified ContextContainer
 void close()
          Close the ContainerManager.
 void closeContainer(java.lang.String containerUri)
          Close the ContextContainer (however, a reference count of Container users is kept so it may not "really" close.
 void configure(IContainerConfiguration config)
          Not sure how configuration of the ContainerManager is really going to work.
 java.lang.String getHomeIdentifier()
          return the uri of the ContainerManager, Container manager is a singleton
 java.util.Map getNameToContainerUriMap()
          Provides a mapping from Container Name to Container Uri uses information from ContainerConfigurations so Containers do not have to be opened.
 java.lang.Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
           
 java.util.Map getUriToContainerNameMap()
          Provides a mapping from Container Uri to Container Name uses information from ContainerConfigurations so Containers do not have to be opened.
 java.util.List listAllRelatedContainerUris(ContextContainer startContainer)
          Get a list of all containers directly and indirectly related to this container.
 java.util.List listAllRelatedContainerUris(java.lang.String startContainerUri)
          Get a list of all containers directly and indirectly related to this container.
 java.util.List listContainerUris()
           
 java.util.List listOpenContainers()
           
 java.util.List listOpenContainersWithRepository(java.lang.String repositoryName)
          Find a list of ProjectContextContainer names which contain a RepositoryDescriptor with the given name
 java.util.List listRelatedContainerUris(ContextContainer container)
          Get a list of the containers list as related to this container.
 java.util.List listRelatedContainerUris(java.lang.String containerUri)
          Get a list of the containers list as related to this container.
 IContainerConfiguration loadConfiguration(java.lang.String containerUri)
          Load the configuration for this ContextContainer
 ContextContainer openContainer(java.lang.String containerUri)
          Open an existing ContextContainer,
 void removeRelatedContainerUri(java.lang.String containerUri, java.lang.String relatedContainerUri)
          Remove a containerUri String from the list of related Containers in specified ContextContainer
 java.lang.Object resolveContainer(java.lang.String containerUri, IContainerConfiguration containerConfig)
          Finds an existing Container if none exists with specified containerUri a new one is created.
 void saveContainer(java.lang.String containerUri)
          serializes the ContextContainer object to disk location specified in the ContainerConfiguration
 void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, java.lang.Object service)
           
 

Method Detail

loadConfiguration

IContainerConfiguration loadConfiguration(java.lang.String containerUri)
Load the configuration for this ContextContainer

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
Returns:
the ContainerConfiguration object

resolveContainer

java.lang.Object resolveContainer(java.lang.String containerUri,
                                  IContainerConfiguration containerConfig)
Finds an existing Container if none exists with specified containerUri a new one is created. If containerConfig is is null a new containerConfig is created and written

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
containerConfig - the configuration object for this this type of Container
Returns:

openContainer

ContextContainer openContainer(java.lang.String containerUri)
Open an existing ContextContainer,

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
Returns:
ContextContainer object

saveContainer

void saveContainer(java.lang.String containerUri)
serializes the ContextContainer object to disk location specified in the ContainerConfiguration

Parameters:
containerUri - uri used to uniquely identify the ContextContainer

closeContainer

void closeContainer(java.lang.String containerUri)
Close the ContextContainer (however, a reference count of Container users is kept so it may not "really" close.

Parameters:
containerUri - uri used to uniquely identify the ContextContainer

getNameToContainerUriMap

java.util.Map getNameToContainerUriMap()
Provides a mapping from Container Name to Container Uri uses information from ContainerConfigurations so Containers do not have to be opened.

Returns:
map of Container Name String to Container Uri String

getUriToContainerNameMap

java.util.Map getUriToContainerNameMap()
Provides a mapping from Container Uri to Container Name uses information from ContainerConfigurations so Containers do not have to be opened.

Returns:
map of Container Uri String to Container Name String

listRelatedContainerUris

java.util.List listRelatedContainerUris(java.lang.String containerUri)
Get a list of the containers list as related to this container. This list includes only directly referenced containers it does not "chase" related related containers.

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
Returns:
List of String of related Containers' uris

listRelatedContainerUris

java.util.List listRelatedContainerUris(ContextContainer container)
Get a list of the containers list as related to this container. This list includes only directly referenced containers it does not "chase" related related containers.

Parameters:
container - ContextContainer object
Returns:
List of String of related Containers' uris

listAllRelatedContainerUris

java.util.List listAllRelatedContainerUris(java.lang.String startContainerUri)
Get a list of all containers directly and indirectly related to this container. This list includes all referenced containers it "chases" all the related containers but the list will not contain duplicate containers

Parameters:
startContainer - uri used to uniquely identify the ContextContainer to start finding related containers from.
Returns:
List of containerUri Strings of ALL related and indirectly related Containers duplicates are not included in the list.

listAllRelatedContainerUris

java.util.List listAllRelatedContainerUris(ContextContainer startContainer)
Get a list of all containers directly and indirectly related to this container. This list includes all referenced containers it "chases" all the related containers but the list will not contain duplicate containers

Parameters:
startContainer - uri used to uniquely identify the ContextContainer to start finding related containers from.
Returns:
List of containerUri Strings of ALL related and indirectly related Containers duplicates are not included in the list.

addRelatedContainerUri

void addRelatedContainerUri(java.lang.String containerUri,
                            java.lang.String relatedContainerUri)
Add a containerUri String to the list of related Containers in specified ContextContainer

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
relatedContainerUri - uri used to uniquely identify the related ContextContainer

removeRelatedContainerUri

void removeRelatedContainerUri(java.lang.String containerUri,
                               java.lang.String relatedContainerUri)
Remove a containerUri String from the list of related Containers in specified ContextContainer

Parameters:
containerUri - uri used to uniquely identify the ContextContainer
relatedContainerUri - uri used to uniquely identify the related ContextContainer

listOpenContainers

java.util.List listOpenContainers()
Returns:

listOpenContainersWithRepository

java.util.List listOpenContainersWithRepository(java.lang.String repositoryName)
Find a list of ProjectContextContainer names which contain a RepositoryDescriptor with the given name

Parameters:
repositoryName - the name of the repository to search for in the open ProjectContextContainers
Returns:
a list of Strings of ProjectContextContainer Names which hold a RepositoryDescriptor with the name repositoryName

listContainerUris

java.util.List listContainerUris()
Returns:

getHomeIdentifier

java.lang.String getHomeIdentifier()
return the uri of the ContainerManager, Container manager is a singleton

Returns:
uri of the ContainerManager

configure

void configure(IContainerConfiguration config)
Not sure how configuration of the ContainerManager is really going to work.

Parameters:
config -

close

void close()
Close the ContainerManager. This method is called when the container manager is being closed and no longer needed. It provides the opportunity for the container manager to clean-up and close its resources.


getService

java.lang.Object getService(org.osgi.framework.Bundle bundle,
                            org.osgi.framework.ServiceRegistration registration)
Parameters:
bundle -
registration -
Returns:

ungetService

void ungetService(org.osgi.framework.Bundle bundle,
                  org.osgi.framework.ServiceRegistration registration,
                  java.lang.Object service)
Parameters:
bundle -
registration -
service -

Copyright 2006 IBM Corporation and others.
All Rights Reserved.