|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.subject.provider.BaseSourceAdapter
public abstract class BaseSourceAdapter
Base Source adapter. Developers note: you should implement the getSubject and getSubjectByIdentifier methods (that take boolean) since the base class method will soon become abstract, and the method overloads which are deprecated and dont take booleans will go away.
Constructor Summary | |
---|---|
BaseSourceAdapter()
Default constructor. |
|
BaseSourceAdapter(String id1,
String name1)
Allocates adapter with ID and name. |
Method Summary | |
---|---|
void |
addAttribute(String attributeName)
|
void |
addInitParam(String name1,
String value)
(non-javadoc) |
void |
addSubjectType(String type1)
(non-javadoc) |
boolean |
equals(Object other)
Compares this source against the specified source. |
String |
getId()
Returns the ID of this source. |
String |
getInitParam(String name1)
(non-javadoc) |
Properties |
getInitParams()
(non-javadoc) |
String |
getName()
Returns the name of this source. |
abstract Subject |
getSubject(String id1)
Deprecated. use the overload instead |
Subject |
getSubject(String id1,
boolean exceptionIfNull)
Gets a Subject by its ID. |
abstract Subject |
getSubjectByIdentifier(String id1)
Deprecated. use the overload instead |
Subject |
getSubjectByIdentifier(String id1,
boolean exceptionIfNull)
note, you should implement this method since this implementation will become abstract at some point |
Subject |
getSubjectByIdOrIdentifier(String idOrIdentifier,
boolean exceptionIfNull)
find by id or identifier |
Map<String,Subject> |
getSubjectsByIdentifiers(Collection<String> identifiers)
Get subjects by identifiers. |
Map<String,Subject> |
getSubjectsByIds(Collection<String> ids)
Get subjects by ids. |
Map<String,Subject> |
getSubjectsByIdsOrIdentifiers(Collection<String> idsOrIdentifiers)
Get subjects by ids or identifiers. |
SubjectType |
getSubjectType()
|
Set<SubjectType> |
getSubjectTypes()
Gets the SubjectTypes supported by this source. |
int |
hashCode()
|
abstract void |
init()
Called by SourceManager when it loads this source. |
void |
loadSearch(Search search)
|
abstract Set<Subject> |
search(String searchValue)
Unstructured search for Subjects. |
void |
setId(String id1)
Sets the ID of this source. |
void |
setName(String name1)
Sets the name of this source. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.internet2.middleware.subject.Source |
---|
checkConfig, printConfig |
Constructor Detail |
---|
public BaseSourceAdapter()
public BaseSourceAdapter(String id1, String name1)
id1
- name1
- Method Detail |
---|
public Map<String,Subject> getSubjectsByIdentifiers(Collection<String> identifiers)
Source
getSubjectsByIdentifiers
in interface Source
Source.getSubjectsByIdentifiers(java.util.Collection)
public Map<String,Subject> getSubjectsByIds(Collection<String> ids)
Source
getSubjectsByIds
in interface Source
Source.getSubjectsByIds(java.util.Collection)
public Subject getSubjectByIdOrIdentifier(String idOrIdentifier, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdOrIdentifier
in interface Source
idOrIdentifier
- exceptionIfNull
- if SubjectNotFoundException or null
SubjectNotFoundException
SubjectNotUniqueException
public Map<String,Subject> getSubjectsByIdsOrIdentifiers(Collection<String> idsOrIdentifiers)
Source
getSubjectsByIdsOrIdentifiers
in interface Source
idsOrIdentifiers
- each string could be a subject id or identifier
Source.getSubjectsByIdsOrIdentifiers(java.util.Collection)
public String getId()
getId
in interface Source
public void setId(String id1)
setId
in interface Source
public String getName()
getName
in interface Source
public void setName(String name1)
setName
in interface Source
public Set<SubjectType> getSubjectTypes()
getSubjectTypes
in interface Source
public SubjectType getSubjectType()
@Deprecated public abstract Subject getSubject(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
Source
getSubject
in interface Source
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubject(java.lang.String)
public Subject getSubject(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
Source
getSubject
in interface Source
exceptionIfNull
- if SubjectNotFoundException should be
throws if the subject is null, or if null should be returned
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubject(java.lang.String, boolean)
@Deprecated public abstract Subject getSubjectByIdentifier(String id1) throws SubjectNotFoundException, SubjectNotUniqueException
Source
getSubjectByIdentifier
in interface Source
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubjectByIdentifier(java.lang.String)
public Subject getSubjectByIdentifier(String id1, boolean exceptionIfNull) throws SubjectNotFoundException, SubjectNotUniqueException
getSubjectByIdentifier
in interface Source
SubjectNotFoundException
SubjectNotUniqueException
Source.getSubjectByIdentifier(java.lang.String, boolean)
public abstract Set<Subject> search(String searchValue)
search
in interface Source
public abstract void init() throws SourceUnavailableException
init
in interface Source
SourceUnavailableException
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void addSubjectType(String type1)
type1
- public void addInitParam(String name1, String value)
name1
- value
- public String getInitParam(String name1)
getInitParam
in interface Source
name1
-
public Properties getInitParams()
getInitParams
in interface Source
public void addAttribute(String attributeName)
attributeName
- public void loadSearch(Search search)
search
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |