pt.digitalis.dif.dem.managers.impl
Class DEMManagerImpl

java.lang.Object
  extended by pt.digitalis.dif.dem.managers.impl.DEMManagerImpl
All Implemented Interfaces:
IDEMManager

public class DEMManagerImpl
extends Object
implements IDEMManager

This class manages the DEM entities, providing the connections between the elements to the CodeGen module. TODO: Do performance tests to determine if the getters that search sequentially the Maps are too slow. One could keep an index of IDs for each entity and gather by direct id searches the dependent entities we need. Since this will be seldom used I think the effort is unnecessary.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt, Pedro Viegas pviegas@digitalis.pt
Created on:
2007/06/01

Constructor Summary
DEMManagerImpl()
           
 
Method Summary
 IApplication getApplication(String applicationID)
          Returns the application with the given id
 Map<String,IApplication> getApplications(IProvider provider)
          Returns all applications related to the given provider.
 IProvider getDefaultProvider()
          Returns the default provider
 IEntity getEntity(Entity type, String entityID)
          Returns the entity with the given id
 IProvider getProvider(String providerID)
          Returns the provider with the given id
 Map<String,IProvider> getProviders()
          Returns all registered providers.
 IService getService(String serviceID)
          Returns the service with the given id
 Map<String,IService> getServices(IApplication application)
          Returns all services related to the given application.
 IStage getStage(String stageID)
          Returns the stage with the given id
 Map<String,IStage> getStages(IService service)
          Returns all stages related to the given service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DEMManagerImpl

public DEMManagerImpl()
Method Detail

getApplication

public IApplication getApplication(String applicationID)
Description copied from interface: IDEMManager
Returns the application with the given id

Specified by:
getApplication in interface IDEMManager
Parameters:
applicationID - the application id
Returns:
the application
See Also:
IDEMManager.getApplication(java.lang.String)

getApplications

public Map<String,IApplication> getApplications(IProvider provider)
Description copied from interface: IDEMManager
Returns all applications related to the given provider.

Specified by:
getApplications in interface IDEMManager
Parameters:
provider - the provider
Returns:
a map of all applications associated with the provider
See Also:
IDEMManager.getApplications(pt.digitalis.dif.dem.interfaces.IProvider)

getDefaultProvider

public IProvider getDefaultProvider()
Description copied from interface: IDEMManager
Returns the default provider

Specified by:
getDefaultProvider in interface IDEMManager
Returns:
the provider
See Also:
IDEMManager.getDefaultProvider()

getEntity

public IEntity getEntity(Entity type,
                         String entityID)
Description copied from interface: IDEMManager
Returns the entity with the given id

Specified by:
getEntity in interface IDEMManager
Parameters:
type - the entity type
entityID - the entity ID
Returns:
the entity object
See Also:
IDEMManager.getEntity(pt.digitalis.dif.dem.Entity, java.lang.String)

getProvider

public IProvider getProvider(String providerID)
Description copied from interface: IDEMManager
Returns the provider with the given id

Specified by:
getProvider in interface IDEMManager
Parameters:
providerID - the provider id
Returns:
the provider
See Also:
IDEMManager.getProvider(java.lang.String)

getProviders

public Map<String,IProvider> getProviders()
Description copied from interface: IDEMManager
Returns all registered providers.

Specified by:
getProviders in interface IDEMManager
Returns:
a map with all the registered providers.
See Also:
IDEMManager.getProviders()

getService

public IService getService(String serviceID)
Description copied from interface: IDEMManager
Returns the service with the given id

Specified by:
getService in interface IDEMManager
Parameters:
serviceID - the service id
Returns:
the service
See Also:
IDEMManager.getService(java.lang.String)

getServices

public Map<String,IService> getServices(IApplication application)
Description copied from interface: IDEMManager
Returns all services related to the given application.

Specified by:
getServices in interface IDEMManager
Parameters:
application - the application
Returns:
a map of all services associated with the application
See Also:
IDEMManager.getServices(pt.digitalis.dif.dem.interfaces.IApplication)

getStage

public IStage getStage(String stageID)
Description copied from interface: IDEMManager
Returns the stage with the given id

Specified by:
getStage in interface IDEMManager
Parameters:
stageID - the stage id
Returns:
the stage
See Also:
IDEMManager.getStage(java.lang.String)

getStages

public Map<String,IStage> getStages(IService service)
Description copied from interface: IDEMManager
Returns all stages related to the given service.

Specified by:
getStages in interface IDEMManager
Parameters:
service - the service
Returns:
a map with all the stages related to the service
See Also:
IDEMManager.getStages(pt.digitalis.dif.dem.interfaces.IService)


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.