private void checkDependencies ( SleeComponent sleeComponent , DeployableUnitImpl deployableUnit ) throws DependencyException { for ( ComponentID componentID : sleeComponent . getDependenciesSet ( ) ) { if ( componentID instanceof EventTypeID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( EventTypeID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof LibraryID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( LibraryID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof ProfileSpecificationID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( ProfileSpecificationID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof ResourceAdaptorID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( ResourceAdaptorID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof ResourceAdaptorTypeID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( ResourceAdaptorTypeID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof SbbID ) { if ( deployableUnit . getDeployableUnitRepository ( ) . getComponentByID ( ( SbbID ) componentID ) == null ) { throw new DependencyException ( "Component " + sleeComponent . getComponentID ( ) + " depends on " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } else if ( componentID instanceof ServiceID ) { throw new SLEEException ( "Component " + sleeComponent . getComponentID ( ) + " depends on a service component " + componentID + " which is not available in the component repository or in the deployable unit" ) ; } } }
Checks if all dependencies of a DU component exists