edu.internet2.middleware.grouper.subj
Interface SubjectResolver

All Known Implementing Classes:
CachingResolver, SourcesXmlResolver, SubjectResolverDecorator, ValidatingResolver

public interface SubjectResolver

Subject resolution interface.

Since:
1.2.1
Version:
$Id: SubjectResolver.java,v 1.5 2008-08-26 21:11:51 mchyzer Exp $
Author:
blair christensen.

Method Summary
 edu.internet2.middleware.subject.Subject find(String id)
           
 edu.internet2.middleware.subject.Subject find(String id, String source)
           
 Set<edu.internet2.middleware.subject.Subject> findAll(String query)
           
 Set<edu.internet2.middleware.subject.Subject> findAll(String query, Set<edu.internet2.middleware.subject.Source> sources)
          find subjects in a set of sources
 Set<edu.internet2.middleware.subject.Subject> findAll(String query, String source)
           
 Set<edu.internet2.middleware.subject.Subject> findAllInStem(String stemName, String query)
           
 edu.internet2.middleware.subject.Subject findByIdentifier(String id)
           
 edu.internet2.middleware.subject.Subject findByIdentifier(String id, String source)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIdentifiers(Collection<String> identifiers)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIdentifiers(Collection<String> identifiers, String source)
           
 edu.internet2.middleware.subject.Subject findByIdOrIdentifier(String id)
           
 edu.internet2.middleware.subject.Subject findByIdOrIdentifier(String id, String source)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIds(Collection<String> ids)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIds(Collection<String> ids, String source)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIdsOrIdentifiers(Collection<String> idsOrIdentifiers)
           
 Map<String,edu.internet2.middleware.subject.Subject> findByIdsOrIdentifiers(Collection<String> idsOrIdentifiers, String source)
           
 edu.internet2.middleware.subject.SearchPageResult findPage(String query)
           
 edu.internet2.middleware.subject.SearchPageResult findPage(String query, Set<edu.internet2.middleware.subject.Source> sources)
          find a page of subjects in a set of sources
 edu.internet2.middleware.subject.SearchPageResult findPage(String query, String source)
           
 edu.internet2.middleware.subject.SearchPageResult findPageInStem(String stemName, String query)
           
 edu.internet2.middleware.subject.SearchPageResult findPageInStem(String stemName, String query, Set<edu.internet2.middleware.subject.Source> sources)
           
 void flushCache()
          flush the cache (e.g.
 edu.internet2.middleware.subject.Source getSource(String id)
           
 Set<edu.internet2.middleware.subject.Source> getSources()
           
 

Method Detail

flushCache

void flushCache()
flush the cache (e.g. for testing)


find

edu.internet2.middleware.subject.Subject find(String id)
                                              throws IllegalArgumentException,
                                                     edu.internet2.middleware.subject.SubjectNotFoundException,
                                                     edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject id to search on.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

find

edu.internet2.middleware.subject.Subject find(String id,
                                              String source)
                                              throws IllegalArgumentException,
                                                     edu.internet2.middleware.subject.SourceUnavailableException,
                                                     edu.internet2.middleware.subject.SubjectNotFoundException,
                                                     edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject id to search on.
source - Source adapter to search within.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

findAll

Set<edu.internet2.middleware.subject.Subject> findAll(String query)
                                                      throws IllegalArgumentException
Parameters:
query - A source-appropraite query string.
Returns:
All subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
Since:
1.2.1

findAll

Set<edu.internet2.middleware.subject.Subject> findAll(String query,
                                                      Set<edu.internet2.middleware.subject.Source> sources)
                                                      throws IllegalArgumentException
find subjects in a set of sources

Parameters:
query -
sources -
Returns:
the subjects
Throws:
IllegalArgumentException

findPage

edu.internet2.middleware.subject.SearchPageResult findPage(String query,
                                                           Set<edu.internet2.middleware.subject.Source> sources)
                                                           throws edu.internet2.middleware.subject.SourceUnavailableException
find a page of subjects in a set of sources

Parameters:
query -
sources -
Returns:
the page of subjects
Throws:
edu.internet2.middleware.subject.SourceUnavailableException

findAllInStem

Set<edu.internet2.middleware.subject.Subject> findAllInStem(String stemName,
                                                            String query)
                                                            throws IllegalArgumentException
Parameters:
stemName - name of stem we are querying
query - A source-appropriate query string.
Returns:
All subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
Since:
1.2.1

findAll

Set<edu.internet2.middleware.subject.Subject> findAll(String query,
                                                      String source)
                                                      throws IllegalArgumentException,
                                                             edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
query - A source-appropriate query string.
source - Restrict query to within this source.
Returns:
All subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
Since:
1.2.1

findByIdentifier

edu.internet2.middleware.subject.Subject findByIdentifier(String id)
                                                          throws IllegalArgumentException,
                                                                 edu.internet2.middleware.subject.SubjectNotFoundException,
                                                                 edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject identifier to search on.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

findByIdentifier

edu.internet2.middleware.subject.Subject findByIdentifier(String id,
                                                          String source)
                                                          throws IllegalArgumentException,
                                                                 edu.internet2.middleware.subject.SourceUnavailableException,
                                                                 edu.internet2.middleware.subject.SubjectNotFoundException,
                                                                 edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject identifier to search on.
source - Source adapter to search within.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

getSource

edu.internet2.middleware.subject.Source getSource(String id)
                                                  throws IllegalArgumentException,
                                                         edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
id -
Returns:
Subject source identified by id.
Throws:
IllegalArgumentException - if id is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source cannot be returned.
Since:
1.2.1

getSources

Set<edu.internet2.middleware.subject.Source> getSources()
Returns:
All Subject sources.
Since:
1.2.1

findByIdOrIdentifier

edu.internet2.middleware.subject.Subject findByIdOrIdentifier(String id)
                                                              throws IllegalArgumentException,
                                                                     edu.internet2.middleware.subject.SubjectNotFoundException,
                                                                     edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject identifier to search on.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

findByIdOrIdentifier

edu.internet2.middleware.subject.Subject findByIdOrIdentifier(String id,
                                                              String source)
                                                              throws IllegalArgumentException,
                                                                     edu.internet2.middleware.subject.SourceUnavailableException,
                                                                     edu.internet2.middleware.subject.SubjectNotFoundException,
                                                                     edu.internet2.middleware.subject.SubjectNotUniqueException
Parameters:
id - Subject identifier to search on.
type - Subject type to search on.
source - Source adapter to search within.
Returns:
Subject matching search parameters.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
1.2.1

findPage

edu.internet2.middleware.subject.SearchPageResult findPage(String query)
                                                           throws IllegalArgumentException
Parameters:
query - A source-appropraite query string.
Returns:
Paged subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
Since:
2.0.2

findPage

edu.internet2.middleware.subject.SearchPageResult findPage(String query,
                                                           String source)
                                                           throws IllegalArgumentException,
                                                                  edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
query - A source-appropriate query string.
source - Restrict query to within this source.
Returns:
Page of subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
Since:
2.0.2

findPageInStem

edu.internet2.middleware.subject.SearchPageResult findPageInStem(String stemName,
                                                                 String query)
                                                                 throws IllegalArgumentException
Parameters:
stemName - name of stem we are querying
query - A source-appropriate query string.
Returns:
All subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
Since:
2.0.2

findPageInStem

edu.internet2.middleware.subject.SearchPageResult findPageInStem(String stemName,
                                                                 String query,
                                                                 Set<edu.internet2.middleware.subject.Source> sources)
                                                                 throws IllegalArgumentException
Parameters:
stemName - name of stem we are querying
query - A source-appropriate query string.
source -
Returns:
All subjects matching query.
Throws:
IllegalArgumentException - if any parameter is null.
Since:
2.0.2

findByIdsOrIdentifiers

Map<String,edu.internet2.middleware.subject.Subject> findByIdsOrIdentifiers(Collection<String> idsOrIdentifiers)
                                                                            throws IllegalArgumentException
Parameters:
idsOrIdentifiers - Subject identifiers to search on.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2

findByIdsOrIdentifiers

Map<String,edu.internet2.middleware.subject.Subject> findByIdsOrIdentifiers(Collection<String> idsOrIdentifiers,
                                                                            String source)
                                                                            throws IllegalArgumentException,
                                                                                   edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
id - Subject identifier to search on.
type - Subject type to search on.
source - Source adapter to search within.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2

findByIds

Map<String,edu.internet2.middleware.subject.Subject> findByIds(Collection<String> ids)
                                                               throws IllegalArgumentException
Parameters:
ids - Subject id to search on.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2

findByIds

Map<String,edu.internet2.middleware.subject.Subject> findByIds(Collection<String> ids,
                                                               String source)
                                                               throws IllegalArgumentException,
                                                                      edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
id - Subject id to search on.
source - Source adapter to search within.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2

findByIdentifiers

Map<String,edu.internet2.middleware.subject.Subject> findByIdentifiers(Collection<String> identifiers)
                                                                       throws IllegalArgumentException
Parameters:
id - Subject identifier to search on.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2

findByIdentifiers

Map<String,edu.internet2.middleware.subject.Subject> findByIdentifiers(Collection<String> identifiers,
                                                                       String source)
                                                                       throws IllegalArgumentException,
                                                                              edu.internet2.middleware.subject.SourceUnavailableException
Parameters:
id - Subject identifier to search on.
source - Source adapter to search within.
Returns:
map of search param to subject
Throws:
IllegalArgumentException - if any parameter is null.
edu.internet2.middleware.subject.SourceUnavailableException - if source is unavailable.
edu.internet2.middleware.subject.SubjectNotFoundException - if no matching subject is found.
edu.internet2.middleware.subject.SubjectNotUniqueException - if more than one matching subject is found.
Since:
2.0.2