Package cz.metacentrum.perun.core.bl
Interface ExtSourcesManagerBl
- All Known Implementing Classes:
- ExtSourcesManagerBlImpl
public interface ExtSourcesManagerBl
- Author:
- Michal Prochazka invalid input: '<'michalp@ics.muni.cz>
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddExtSource(PerunSession perunSession, Group group, ExtSource source) Associate external source definition with the GROUP.voidaddExtSource(PerunSession perunSession, Vo vo, ExtSource source) Associate external source definition with the VO.voidaddExtSources(PerunSession perunSession, Group group, List<ExtSource> sources) Associate external source definitions with the GROUP.voidaddExtSources(PerunSession perunSession, Vo vo, List<ExtSource> sources) Associate external source definitions with the VO.voidcheckExtSourceAssignedToVo(PerunSession sess, ExtSource extSource, int voId) Check if extSource is assigned to vo or not.voidcheckExtSourceExists(PerunSession sess, ExtSource extSource) checkOrCreateExtSource(PerunSession perunSession, String extSourceName, String extSourceType) Checks whether the ExtSource exists, if not, then the ExtSource is created.createExtSource(PerunSession perunSession, ExtSource extSource, Map<String, String> attributes) Creates an external source.voiddeleteExtSource(PerunSession perunSession, ExtSource extSource) Deletes an external source.voiddestroy()Destroy manager.generateCandidateGroup(PerunSession perunSession, Map<String, String> groupSubjectData, ExtSource source, String loginPrefix) Generate a candidate group from a group subject data.generateCandidateGroups(PerunSession perunSession, List<Map<String, String>> groupSubjectsData, ExtSource source, String loginPrefix) Generate candidate groups from a group subject data.getAttributes(ExtSource extSource) Gets attributes for external source.getCandidate(PerunSession perunSession, ExtSource source, String login) Get the candidate from the ExtSource.getCandidate(PerunSession perunSession, Map<String, String> subjectData, ExtSource source, String login) Get the candidate from subjectData where at least login must exists.getDataSource(String poolName) Returns a database connection pool.getExtSourceById(PerunSession perunSession, int id) Searches for the external source with specified id.getExtSourceByName(PerunSession perunSession, String name) Searches for the external source using specified name.getExtSources(PerunSession perunSession) Get list of all external sources.getGroupExtSources(PerunSession perunSession, Group group) Get list of external sources associated with the GROUP.getInvalidUsers(PerunSession perunSession, ExtSource source) Returns list of users stored by this ExtSource, which are not valid.getVoExtSources(PerunSession perunSession, Vo vo) Get list of external sources associated with the VO.voidinitialize(PerunSession sess) Initialize manager.voidLoads ext source definitions from the configuration file and updates entries stored in the DB.voidremoveExtSource(PerunSession perunSession, Group group, ExtSource source) Remove association of the external source from the GROUP.voidremoveExtSource(PerunSession perunSession, Vo vo, ExtSource source) Remove association of the external source from the VO.voidremoveExtSources(PerunSession perunSession, Group group, List<ExtSource> sources) Remove associations of external sources from the GROUP.voidremoveExtSources(PerunSession perunSession, Vo vo, List<ExtSource> sources) Remove associations of external sources from the VO.
- 
Method Details- 
addExtSourcevoid addExtSource(PerunSession perunSession, Vo vo, ExtSource source) throws ExtSourceAlreadyAssignedException Associate external source definition with the VO.- Parameters:
- perunSession-
- vo-
- source-
- Throws:
- InternalErrorException
- ExtSourceAlreadyAssignedException
 
- 
addExtSourcevoid addExtSource(PerunSession perunSession, Group group, ExtSource source) throws ExtSourceAlreadyAssignedException Associate external source definition with the GROUP.- Parameters:
- perunSession-
- group-
- source-
- Throws:
- InternalErrorException
- ExtSourceAlreadyAssignedException
 
- 
addExtSourcesvoid addExtSources(PerunSession perunSession, Vo vo, List<ExtSource> sources) throws ExtSourceAlreadyAssignedException Associate external source definitions with the VO.- Parameters:
- perunSession- sess
- vo- vo
- sources- list of sources to associate
- Throws:
- ExtSourceAlreadyAssignedException
 
- 
addExtSourcesvoid addExtSources(PerunSession perunSession, Group group, List<ExtSource> sources) throws ExtSourceAlreadyAssignedException Associate external source definitions with the GROUP.- Parameters:
- perunSession- sess
- group- group
- sources- list of sources to associate
- Throws:
- ExtSourceAlreadyAssignedException
 
- 
checkExtSourceAssignedToVovoid checkExtSourceAssignedToVo(PerunSession sess, ExtSource extSource, int voId) throws ExtSourceNotAssignedException, VoNotExistsException Check if extSource is assigned to vo or not. Throw exception if not.- Parameters:
- sess-
- extSource-
- voId-
- Throws:
- InternalErrorException
- ExtSourceNotAssignedException
- VoNotExistsException
 
- 
checkExtSourceExistsvoid checkExtSourceExists(PerunSession sess, ExtSource extSource) throws ExtSourceNotExistsException - Throws:
- ExtSourceNotExistsException
 
- 
checkOrCreateExtSourceExtSource checkOrCreateExtSource(PerunSession perunSession, String extSourceName, String extSourceType) Checks whether the ExtSource exists, if not, then the ExtSource is created.- Parameters:
- perunSession-
- extSourceName-
- extSourceType-
- Returns:
- existing or newly created extSource is returned
- Throws:
- InternalErrorException
 
- 
createExtSourceExtSource createExtSource(PerunSession perunSession, ExtSource extSource, Map<String, String> attributes) throws ExtSourceExistsExceptionCreates an external source.- Parameters:
- perunSession-
- extSource-
- attributes-
- Returns:
- ExtSource object with newly associated ID.
- Throws:
- InternalErrorException
- ExtSourceExistsException
 
- 
deleteExtSourcevoid deleteExtSource(PerunSession perunSession, ExtSource extSource) throws ExtSourceAlreadyRemovedException Deletes an external source.- Parameters:
- perunSession-
- extSource-
- Throws:
- InternalErrorException
- ExtSourceAlreadyRemovedException- if there are 0 rows affected by delete in DB
 
- 
destroyvoid destroy()Destroy manager. Clean resources.
- 
generateCandidateGroupCandidateGroup generateCandidateGroup(PerunSession perunSession, Map<String, String> groupSubjectData, ExtSource source, String loginPrefix) Generate a candidate group from a group subject data.IMPORTANT: expected, that these subjectData was get from the ExtSource before using. - Parameters:
- perunSession-
- groupSubjectData-
- source-
- loginPrefix- login prefix to change group login and parent group login by it
- Returns:
- Candidate group object
- Throws:
- InternalErrorException
 
- 
generateCandidateGroupsList<CandidateGroup> generateCandidateGroups(PerunSession perunSession, List<Map<String, String>> groupSubjectsData, ExtSource source, String loginPrefix) Generate candidate groups from a group subject data.IMPORTANT: expected, that these subjectData was get from the ExtSource before using. - Parameters:
- perunSession-
- groupSubjectsData-
- source-
- loginPrefix- login prefix to change group login and parent group login by it
- Returns:
- Candidate group objects
- Throws:
- InternalErrorException
 
- 
getAttributesGets attributes for external source.- Parameters:
- extSource- External Source
- Returns:
- Map of attributes for external source
- Throws:
- InternalErrorException
 
- 
getCandidateCandidateSync getCandidate(PerunSession perunSession, ExtSource source, String login) throws CandidateNotExistsException, ExtSourceUnsupportedOperationException Get the candidate from the ExtSource. Login of the candidate will be used to gain data from the ExtSource.- Parameters:
- perunSession- Perun session
- source- External source which will be used to get data about the candidate
- login- Login of the candidate
- Returns:
- a Candidate object
- Throws:
- InternalErrorException
- CandidateNotExistsException
- ExtSourceUnsupportedOperationException
 
- 
getCandidateCandidateSync getCandidate(PerunSession perunSession, Map<String, String> subjectData, ExtSource source, String login) Get the candidate from subjectData where at least login must exists.IMPORTANT: expected, that these subjectData was get from the ExtSource before using. - Parameters:
- perunSession- Perun session
- subjectData-
- source- External source which will be used to get data about the candidate
- login- Login of the candidate
- Returns:
- a Candidate object
- Throws:
- InternalErrorException
 
- 
getDataSourceReturns a database connection pool.- Parameters:
- poolName- named defined in perun-extSources.xml
- Returns:
- database connection pool
 
- 
getExtSourceByIdSearches for the external source with specified id.- Parameters:
- perunSession-
- id-
- Returns:
- External source with specified id
- Throws:
- InternalErrorException
- ExtSourceNotExistsException
 
- 
getExtSourceByNameExtSource getExtSourceByName(PerunSession perunSession, String name) throws ExtSourceNotExistsException Searches for the external source using specified name.- Parameters:
- perunSession-
- name-
- Returns:
- External source with specified name
- Throws:
- InternalErrorException
- ExtSourceNotExistsException
 
- 
getExtSourcesGet list of all external sources.- Parameters:
- perunSession-
- Returns:
- list of external source
- Throws:
- InternalErrorException
 
- 
getGroupExtSourcesGet list of external sources associated with the GROUP.- Parameters:
- perunSession-
- group-
- Returns:
- list of external sources associated with the VO
- Throws:
- InternalErrorException
 
- 
getInvalidUsersReturns list of users stored by this ExtSource, which are not valid.- Parameters:
- perunSession-
- source-
- Returns:
- list of users, who is not in the extSource anymore
- Throws:
- InternalErrorException
 
- 
getVoExtSourcesGet list of external sources associated with the VO.- Parameters:
- perunSession-
- vo-
- Returns:
- list of external sources associated with the VO
- Throws:
- InternalErrorException
 
- 
initializeInitialize manager.
- 
loadExtSourcesDefinitionsLoads ext source definitions from the configuration file and updates entries stored in the DB.- Parameters:
- sess-
 
- 
removeExtSourcevoid removeExtSource(PerunSession perunSession, Vo vo, ExtSource source) throws ExtSourceNotAssignedException, ExtSourceAlreadyRemovedException Remove association of the external source from the VO.- Parameters:
- perunSession-
- vo-
- source-
- Throws:
- InternalErrorException
- ExtSourceNotAssignedException
- ExtSourceAlreadyRemovedException- if there are 0 rows affected by delete from DB
 
- 
removeExtSourcevoid removeExtSource(PerunSession perunSession, Group group, ExtSource source) throws ExtSourceNotAssignedException, ExtSourceAlreadyRemovedException Remove association of the external source from the GROUP.- Parameters:
- perunSession-
- group-
- source-
- Throws:
- InternalErrorException
- ExtSourceAlreadyRemovedException- when 0 rows affected by removing from DB
- ExtSourceNotAssignedException
 
- 
removeExtSourcesvoid removeExtSources(PerunSession perunSession, Vo vo, List<ExtSource> sources) throws ExtSourceNotAssignedException, ExtSourceAlreadyRemovedException Remove associations of external sources from the VO.- Parameters:
- perunSession-
- vo-
- sources-
- Throws:
- InternalErrorException
- ExtSourceAlreadyRemovedException- when 0 rows affected by removing from DB
- ExtSourceNotAssignedException
 
- 
removeExtSourcesvoid removeExtSources(PerunSession perunSession, Group group, List<ExtSource> sources) throws ExtSourceNotAssignedException, ExtSourceAlreadyRemovedException Remove associations of external sources from the GROUP.- Parameters:
- perunSession-
- group-
- sources-
- Throws:
- InternalErrorException
- ExtSourceAlreadyRemovedException- when 0 rows affected by removing from DB
- ExtSourceNotAssignedException
 
 
-