edu.internet2.middleware.subject.provider
Class NullSourceAdapter

java.lang.Object
  extended by edu.internet2.middleware.subject.provider.BaseSourceAdapter
      extended by edu.internet2.middleware.subject.provider.NullSourceAdapter
All Implemented Interfaces:
Source

public class NullSourceAdapter
extends BaseSourceAdapter

Null Source which will never return any Subjects.

Version:
$Id: NullSourceAdapter.java,v 1.4 2009-03-22 02:49:26 mchyzer Exp $
Author:
blair christensen.

Constructor Summary
NullSourceAdapter()
          Allocates new NullSourceAdapter.
NullSourceAdapter(String id1, String name1)
          Allocates new NullSourceAdapter.
 
Method Summary
 void checkConfig()
          make sure the config is ok, and log descriptive errors if not
 Subject getSubject(String id1)
          Deprecated.  
 Subject getSubject(String id1, boolean exceptionIfNull)
          Gets a Subject by its ID.
 Subject getSubjectByIdentifier(String id1)
          Deprecated.  
 Subject getSubjectByIdentifier(String id1, boolean exceptionIfNull)
          note, you should implement this method since this implementation will become abstract at some point
 Set<SubjectType> getSubjectTypes()
          Gets the SubjectTypes supported by this source.
 void init()
          Called by SourceManager when it loads this source.
 String printConfig()
          in the startup on this i2mi app, print helpful and brief info about this source
 Set<Subject> search(String searchValue)
          Unstructured search for Subjects.
 
Methods inherited from class edu.internet2.middleware.subject.provider.BaseSourceAdapter
addAttribute, addInitParam, addSubjectType, equals, getId, getInitParam, getInitParams, getName, getSubjectByIdOrIdentifier, getSubjectsByIdentifiers, getSubjectsByIds, getSubjectsByIdsOrIdentifiers, getSubjectType, hashCode, loadSearch, setId, setName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullSourceAdapter

public NullSourceAdapter()
Allocates new NullSourceAdapter.


NullSourceAdapter

public NullSourceAdapter(String id1,
                         String name1)
Allocates new NullSourceAdapter.

Parameters:
id1 - The source id for the new adapter.
name1 - The source name for the new adapter.
Method Detail

getSubject

public Subject getSubject(String id1,
                          boolean exceptionIfNull)
                   throws SubjectNotFoundException
Description copied from interface: Source
Gets a Subject by its ID.

Specified by:
getSubject in interface Source
Overrides:
getSubject in class BaseSourceAdapter
exceptionIfNull - if SubjectNotFoundException should be throws if the subject is null, or if null should be returned
Returns:
subject
Throws:
SubjectNotFoundException
See Also:
BaseSourceAdapter.getSubject(java.lang.String, boolean)

getSubjectByIdentifier

public Subject getSubjectByIdentifier(String id1,
                                      boolean exceptionIfNull)
                               throws SubjectNotFoundException
Description copied from class: BaseSourceAdapter
note, you should implement this method since this implementation will become abstract at some point

Specified by:
getSubjectByIdentifier in interface Source
Overrides:
getSubjectByIdentifier in class BaseSourceAdapter
Returns:
subject
Throws:
SubjectNotFoundException
See Also:
BaseSourceAdapter.getSubjectByIdentifier(java.lang.String, boolean)

getSubjectTypes

public Set<SubjectType> getSubjectTypes()
Description copied from class: BaseSourceAdapter
Gets the SubjectTypes supported by this source.

Specified by:
getSubjectTypes in interface Source
Overrides:
getSubjectTypes in class BaseSourceAdapter
Returns:
set
See Also:
BaseSourceAdapter.getSubjectTypes()

init

public void init()
          throws SourceUnavailableException
Description copied from class: BaseSourceAdapter
Called by SourceManager when it loads this source.

Specified by:
init in interface Source
Specified by:
init in class BaseSourceAdapter
Throws:
SourceUnavailableException
See Also:
BaseSourceAdapter.init()

search

public Set<Subject> search(String searchValue)
Description copied from class: BaseSourceAdapter
Unstructured search for Subjects. Each implementation utilizes its own search algorithm tailored to the Subject repository and schema.

Specified by:
search in interface Source
Specified by:
search in class BaseSourceAdapter
Returns:
set
See Also:
BaseSourceAdapter.search(java.lang.String)

checkConfig

public void checkConfig()
Description copied from interface: Source
make sure the config is ok, and log descriptive errors if not

See Also:
Source.checkConfig()

printConfig

public String printConfig()
Description copied from interface: Source
in the startup on this i2mi app, print helpful and brief info about this source

Returns:
the info
See Also:
Source.printConfig()

getSubject

@Deprecated
public Subject getSubject(String id1)
                   throws SubjectNotFoundException,
                          SubjectNotUniqueException
Deprecated. 

Description copied from interface: Source
Gets a Subject by its ID.

Specified by:
getSubject in interface Source
Specified by:
getSubject in class BaseSourceAdapter
Returns:
subject
Throws:
SubjectNotFoundException
SubjectNotUniqueException
See Also:
BaseSourceAdapter.getSubject(java.lang.String)

getSubjectByIdentifier

@Deprecated
public Subject getSubjectByIdentifier(String id1)
                               throws SubjectNotFoundException,
                                      SubjectNotUniqueException
Deprecated. 

Description copied from interface: Source
Gets a Subject by other well-known identifiers, aside from the subject ID, for example, login ID.

Specified by:
getSubjectByIdentifier in interface Source
Specified by:
getSubjectByIdentifier in class BaseSourceAdapter
Returns:
subject
Throws:
SubjectNotFoundException
SubjectNotUniqueException
See Also:
BaseSourceAdapter.getSubjectByIdentifier(java.lang.String)