edu.internet2.middleware.subject.provider
Class SourceManager

java.lang.Object
  extended by edu.internet2.middleware.subject.provider.SourceManager

public class SourceManager
extends Object

Factory to load and get Sources. Sources are defined in a configuration file named, sources.xml, and must be placed in the classpath.


Method Summary
static SourceManager getInstance()
          Returns the singleton instance of SourceManager.
 Source getSource(String sourceId)
          Gets Source for the argument source ID.
 Collection<Source> getSources()
          Returns a Collection of Sources.
 Collection<Source> getSources(SubjectType type)
          Returns a Collection of Sources that supports the argument SubjectType.
 void loadSource(Source source)
          (non-javadoc)
static void main(String[] args)
          Validates sources.xml config file.
 String printConfig()
          print out the config for the subject API
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

printConfig

public String printConfig()
print out the config for the subject API

Returns:
the config

getInstance

public static SourceManager getInstance()
Returns the singleton instance of SourceManager.

Returns:
source manager

getSource

public Source getSource(String sourceId)
                 throws SourceUnavailableException
Gets Source for the argument source ID.

Parameters:
sourceId -
Returns:
Source
Throws:
SourceUnavailableException

getSources

public Collection<Source> getSources()
Returns a Collection of Sources.

Returns:
Collection

getSources

public Collection<Source> getSources(SubjectType type)
Returns a Collection of Sources that supports the argument SubjectType.

Parameters:
type -
Returns:
Collection

loadSource

public void loadSource(Source source)
(non-javadoc)

Parameters:
source -

main

public static void main(String[] args)
Validates sources.xml config file.

Parameters:
args -