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 Summary
Constructors -
Method Summary
Modifier 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
-
CeitecCrmConnector
public CeitecCrmConnector()
-
-
Method Details
-
checkCrmUserExists
Check 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
-
getLogin
Reads 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 IDeppns- Attribute with all users' EPPNsuser- User to get login for- Returns:
- Existing or generated login to be set to u:d:login-namespace:ceitec
-
getCn
Reads 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 IDeppns- Attribute with all users' EPPNsuser- User to get CN for- Returns:
- Existing or generated CN to be set to u:d:cnCeitecAD
-
isMigrationRunning
public 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.
-