Class CeitecCrmConnector
java.lang.Object
cz.metacentrum.perun.core.impl.modules.CeitecCrmConnector
Connector class used to call CEITEC CRM API.
 It supports check for users existence and retrieval of existing or newly generated login and CN
 to be later set to a proper attributes.
- Author:
- Pavel Zlámal invalid input: '<'zlamal@cesnet.cz>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancheckCrmUserExists(String ceitecId) Check whether user with specified CEITEC ID exists in CRM.Reads CN (common name) attribute from user entry in CRM.Reads CEITEC "login" from user entry in CRM.booleanReads configuration from /etc/perun/modules/Ceitec.yaml and returns TRUE if migration of CEITEC users is currently running.
- 
Constructor Details- 
CeitecCrmConnectorpublic CeitecCrmConnector()
 
- 
- 
Method Details- 
checkCrmUserExistsCheck whether user with specified CEITEC ID exists in CRM.- Parameters:
- ceitecId- ID to check
- Returns:
- TRUE when CRM API response is 200, FALSE when 404, throws exception otherwise
 
- 
getLoginReads CEITEC "login" from user entry in CRM. "CEITEC\" prefix is dropped. Returns existing login if user is matched or generates new by pre-defined rules.- Parameters:
- ceitecId- CEITEC ID
- eppns- Attribute with all users' EPPNs
- user- User to get login for
- Returns:
- Existing or generated login to be set to u:d:login-namespace:ceitec
 
- 
getCnReads CN (common name) attribute from user entry in CRM. Returns existing CN if user is matched or generates new by pre-defined rules.- Parameters:
- ceitecId- CEITEC ID
- eppns- Attribute with all users' EPPNs
- user- User to get CN for
- Returns:
- Existing or generated CN to be set to u:d:cnCeitecAD
 
- 
isMigrationRunningpublic boolean isMigrationRunning()Reads configuration from /etc/perun/modules/Ceitec.yaml and returns TRUE if migration of CEITEC users is currently running.- Returns:
- TRUE if migration is running, FALSE otherwise.
 
 
-