public void beginScan( ArchivaRepository repository ) throws ConsumerException
{
if ( !repository.isManaged() )
{
throw new ConsumerException( "Consumer requires managed repository." );
}
this.repository = repository;
this.repositoryDir = new File( repository.getUrl().getPath() );
String layoutName = repository.getModel().getLayoutName();
if ( !bidirectionalLayoutMap.containsKey( layoutName ) )
{
throw new ConsumerException( "Unable to process repository with layout [" + layoutName
+ "] as there is no coresponding " + BidirectionalRepositoryLayout.class.getName()
+ " implementation available." );
}
this.layout = (BidirectionalRepositoryLayout) bidirectionalLayoutMap.get( layoutName );