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() );
try
{
this.layout = layoutFactory.getLayout( repository.getModel().getLayoutName() );
}
catch ( LayoutException e )
{
throw new ConsumerException( e.getMessage(), e );
}
}