Package cz.metacentrum.perun.core.impl
Class ExtSourceREMS
- All Implemented Interfaces:
ExtSourceApi
,ExtSourceSimpleApi
,Serializable
,Comparable<PerunBean>
ExtSource class for REMS, filters subjects that does not have a corresponding user in Perun by ues REMS or by
additionalueses in format: {extSourceName}|{extSourceClass}|{eppn}|0. The eppn is used as a 'login'.
- Author:
- Vojtech Sassmann <vojtech.sassmann@gmail.com>
- See Also:
-
Field Summary
Fields inherited from class cz.metacentrum.perun.core.impl.ExtSourceSql
DBPOOL, URL, USER
Fields inherited from class cz.metacentrum.perun.core.impl.ExtSourceImpl
perunBl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindSubjects
(String searchString) Finds all subjects with attributes in the external source, that contains searchString.findSubjects
(String searchString, int maxResults) Finds all subjects with attributes in the external source, that contains searchString limited by the maxResultsfindSubjectsLogins
(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.Methods inherited from class cz.metacentrum.perun.core.impl.ExtSourceSql
close, getDataSource, groupQuery, querySource
Methods inherited from class cz.metacentrum.perun.core.impl.ExtSourceImpl
getAttributes
Methods inherited from class cz.metacentrum.perun.core.api.ExtSource
compareTo, equals, getBeanName, getName, getType, hashCode, serializeToString, setName, setType, toString
Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUid
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface cz.metacentrum.perun.core.implApi.ExtSourceSimpleApi
close
-
Constructor Details
-
ExtSourceREMS
public ExtSourceREMS()
-
-
Method Details
-
findSubjects
public List<Map<String,String>> findSubjects(String searchString) throws ExtSourceUnsupportedOperationException Description copied from interface:ExtSourceApi
Finds all subjects with attributes in the external source, that contains searchString.This method is used for getting all logins of subjects in external source with all possible attributes.
- Specified by:
findSubjects
in interfaceExtSourceApi
- Overrides:
findSubjects
in classExtSourceSqlComplex
- Parameters:
searchString
-- Returns:
- list of maps, which contains attr_name->attr_value (for all extSource attributes)
- Throws:
ExtSourceUnsupportedOperationException
-
findSubjects
public List<Map<String,String>> findSubjects(String searchString, int maxResults) throws ExtSourceUnsupportedOperationException Description copied from interface:ExtSourceApi
Finds all subjects with attributes in the external source, that contains searchString limited by the maxResultsThis method is used for getting all logins of subjects in external source with all possible attributes.
- Specified by:
findSubjects
in interfaceExtSourceApi
- Overrides:
findSubjects
in classExtSourceSqlComplex
- Parameters:
searchString
-maxResults
- define max number of returned results, 0 means unlimited- Returns:
- list of maps, which contains attr_name->attr_value (for all extSource attributes)
- Throws:
ExtSourceUnsupportedOperationException
-
findSubjectsLogins
Description copied from interface:ExtSourceSimpleApi
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
- Specified by:
findSubjectsLogins
in interfaceExtSourceSimpleApi
- Overrides:
findSubjectsLogins
in classExtSourceSql
- Parameters:
searchString
-maxResults
- limit returned results- Returns:
- list of maps, which contains attr_name->attr_value but only for login definition eg. login;MichalS
-
findSubjectsLogins
Description copied from interface:ExtSourceSimpleApi
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.
- Specified by:
findSubjectsLogins
in interfaceExtSourceSimpleApi
- Overrides:
findSubjectsLogins
in classExtSourceSql
- Parameters:
searchString
-- Returns:
- list of maps, which contains attr_name->attr_value but only for login definition eg. login;MichalS
-
getGroupSubjects
Description copied from interface:ExtSourceSimpleApi
Get the list of the subjects in the external group.- Specified by:
getGroupSubjects
in interfaceExtSourceSimpleApi
- Overrides:
getGroupSubjects
in classExtSourceSql
- 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
-
getSubjectByLogin
Description copied from interface:ExtSourceSimpleApi
Finds subject from the external source by the primary login used in external source.- Specified by:
getSubjectByLogin
in interfaceExtSourceSimpleApi
- Overrides:
getSubjectByLogin
in classExtSourceSql
- Parameters:
login
- login used in the external source- Returns:
- map which contains attr_name -> attr_value, e.g. firstName->Michal
- Throws:
SubjectNotExistsException
- if the subject cannot be found
-
getSubjectGroups
public List<Map<String,String>> getSubjectGroups(Map<String, String> attributes) throws ExtSourceUnsupportedOperationExceptionDescription copied from interface:ExtSourceSimpleApi
Get the list of the subject groups in the external source.- Specified by:
getSubjectGroups
in interfaceExtSourceSimpleApi
- Overrides:
getSubjectGroups
in classExtSourceSql
- Parameters:
attributes
- map of attributes used for quering the external source- Returns:
- list of maps, which contains attr name and attr value
- Throws:
ExtSourceUnsupportedOperationException
-
getUsersSubjects
Description copied from interface:ExtSourceSimpleApi
Get the list of subjects from the external source.- Specified by:
getUsersSubjects
in interfaceExtSourceSimpleApi
- Overrides:
getUsersSubjects
in classExtSourceSql
- Returns:
- list of maps, which contains attr_name->attr_value, e.g. firstName->Michal
- Throws:
ExtSourceUnsupportedOperationException
-