001    package edu.nrao.sss.model.project;
002    
003    import java.util.List;
004    
005    import edu.nrao.sss.model.RepositoryException;
006    
007    /**
008     * A provider of {@link ProgramBlock program blocks}.
009     * <p>
010     * <b>Version Info:</b>
011     * <table style="margin-left:2em">
012     *   <tr><td>$Revision: 1348 $</td></tr>
013     *   <tr><td>$Date: 2008-06-11 16:55:09 -0600 (Wed, 11 Jun 2008) $</td></tr>
014     *   <tr><td>$Author: dharland $ (last person to modify)</td></tr>
015     * </table></p>
016     * 
017     * @author David M. Harland
018     * @since 2008-06-11
019     */
020    public interface ProgramBlockProvider
021    {
022      //TODO this is a stub of the eventual interface, just to get things started
023    
024      /**
025       * Returns a list of program blocks held by this provider that can pass
026       * through {@code filter}.  If {@code filter} is <i>null</i>, it will be
027       * treated as a wide-open filter, allowing all program blocks to pass.
028       * 
029       * @param filter
030       *   the filter through which a program block must pass in order to be
031       *   included in the returned collection.
032       *               
033       * @return
034       *   a list of program blocks that can pass through {@code filter}.
035       * 
036       * @throws RepositoryException
037       *   if anything goes wrong while trying to fetch program blocks from
038       *   this provider.
039       */
040      public List<ProgramBlock> getProgBlocks(ProgramBlockFilter filter)
041        throws RepositoryException;
042    
043      /**
044       * Returns a list of all program blocks held by this provider.
045       * 
046       * @return
047       *   a list of all program blocks held by this provider.  If this
048       *   provider has no program blocks the returned list will be empty.
049       * 
050       * @throws RepositoryException
051       *   if anything goes wrong while trying to fetch program blocks from
052       *   this provider.
053       */
054      public List<ProgramBlock> getAllProgBlocks()
055        throws RepositoryException;
056    }