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, USERFields inherited from class cz.metacentrum.perun.core.impl.ExtSourceImpl
perunBl -
Constructor Summary
Constructors -
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, querySourceMethods inherited from class cz.metacentrum.perun.core.impl.ExtSourceImpl
getAttributesMethods inherited from class cz.metacentrum.perun.core.api.ExtSource
compareTo, equals, getBeanName, getName, getType, hashCode, serializeToString, setName, setType, toStringMethods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:ExtSourceApiFinds 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:
findSubjectsin interfaceExtSourceApi- Overrides:
findSubjectsin 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:ExtSourceApiFinds 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:
findSubjectsin interfaceExtSourceApi- Overrides:
findSubjectsin 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:ExtSourceSimpleApiFinds 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:
findSubjectsLoginsin interfaceExtSourceSimpleApi- Overrides:
findSubjectsLoginsin 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:ExtSourceSimpleApiFinds 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:
findSubjectsLoginsin interfaceExtSourceSimpleApi- Overrides:
findSubjectsLoginsin 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:ExtSourceSimpleApiGet the list of the subjects in the external group.- Specified by:
getGroupSubjectsin interfaceExtSourceSimpleApi- Overrides:
getGroupSubjectsin 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:ExtSourceSimpleApiFinds subject from the external source by the primary login used in external source.- Specified by:
getSubjectByLoginin interfaceExtSourceSimpleApi- Overrides:
getSubjectByLoginin 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:ExtSourceSimpleApiGet the list of the subject groups in the external source.- Specified by:
getSubjectGroupsin interfaceExtSourceSimpleApi- Overrides:
getSubjectGroupsin 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:ExtSourceSimpleApiGet the list of subjects from the external source.- Specified by:
getUsersSubjectsin interfaceExtSourceSimpleApi- Overrides:
getUsersSubjectsin classExtSourceSql- Returns:
- list of maps, which contains attr_name->attr_value, e.g. firstName->Michal
- Throws:
ExtSourceUnsupportedOperationException
-