Interface ExtSourceSimpleApi
- All Known Subinterfaces:
ExtSourceApi
- All Known Implementing Classes:
ExtSourceCSV
,ExtSourceEGISSO
,ExtSourceGoogle
,ExtSourceIdp
,ExtSourceINET
,ExtSourceInternal
,ExtSourceISMU
,ExtSourceISXML
,ExtSourceIT4I
,ExtSourceJSON
,ExtSourceKerberos
,ExtSourceLdap
,ExtSourcePerun
,ExtSourceREMS
,ExtSourceSql
,ExtSourceSqlComplex
,ExtSourceTCS
,ExtSourceUnity
,ExtSourceX509
,ExtSourceXML
public interface ExtSourceSimpleApi
Definition of simple extSource api.
Simple means: this extSource is not able to get all information about all subjects in one query. First need to get info about their logins and then for every login get info about subject from extSource.
- Author:
- Michal Prochazka michalp@ics.muni.cz (extSourceApi), Michal Stava stavamichal@gmail.com (changed to ExtSourceSimpleApi)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
If extSource needs to be closed, this method must be called.findSubjectsLogins
(String searchString) Finds all subjects logins in the external source, that contains searchString.findSubjectsLogins
(String searchString, int maxResults) Finds all subjects logins in the external source, that contains searchString, limited by the maxResults.getGroupSubjects
(Map<String, String> attributes) Get the list of the subjects in the external group.getSubjectByLogin
(String login) Finds subject from the external source by the primary login used in external source.getSubjectGroups
(Map<String, String> attributes) Get the list of the subject groups in the external source.Get the list of subjects from the external source.
-
Method Details
-
close
If extSource needs to be closed, this method must be called. -
findSubjectsLogins
List<Map<String,String>> findSubjectsLogins(String searchString, int maxResults) throws ExtSourceUnsupportedOperationException Finds all subjects logins in the external source, that contains searchString, limited by the maxResults.This method is used for getting all logins of subjects in external source and then use them to searching in external source for other subjects attributes
- Parameters:
searchString
-maxResults
- limit returned results- Returns:
- list of maps, which contains attr_name->attr_value but only for login definition eg. login;MichalS
- Throws:
InternalErrorException
ExtSourceUnsupportedOperationException
-
findSubjectsLogins
List<Map<String,String>> findSubjectsLogins(String searchString) throws ExtSourceUnsupportedOperationException Finds all subjects logins in the external source, that contains searchString.This method is used for getting all logins of subjects in external source and then use them to searching in external source for other subjects attributes.
- Parameters:
searchString
-- Returns:
- list of maps, which contains attr_name->attr_value but only for login definition eg. login;MichalS
- Throws:
InternalErrorException
ExtSourceUnsupportedOperationException
-
getGroupSubjects
List<Map<String,String>> getGroupSubjects(Map<String, String> attributes) throws ExtSourceUnsupportedOperationExceptionGet the list of the subjects in the external group.- Parameters:
attributes
- map of attributes used for quering the external source- Returns:
- list of maps, which contains attr_name->attr_value, e.g. firstName->Michal
- Throws:
InternalErrorException
ExtSourceUnsupportedOperationException
-
getSubjectByLogin
Map<String,String> getSubjectByLogin(String login) throws SubjectNotExistsException, ExtSourceUnsupportedOperationException Finds subject from the external source by the primary login used in external source.- Parameters:
login
- login used in the external source- Returns:
- map which contains attr_name -> attr_value, e.g. firstName->Michal
- Throws:
InternalErrorException
SubjectNotExistsException
- if the subject cannot be foundExtSourceUnsupportedOperationException
-
getSubjectGroups
List<Map<String,String>> getSubjectGroups(Map<String, String> attributes) throws ExtSourceUnsupportedOperationExceptionGet the list of the subject groups in the external source.- Parameters:
attributes
- map of attributes used for quering the external source- Returns:
- list of maps, which contains attr name and attr value
- Throws:
InternalErrorException
ExtSourceUnsupportedOperationException
-
getUsersSubjects
Get the list of subjects from the external source.- Returns:
- list of maps, which contains attr_name->attr_value, e.g. firstName->Michal
- Throws:
InternalErrorException
ExtSourceUnsupportedOperationException
-