Class urn_perun_user_attribute_def_def_login_namespace_vsup
java.lang.Object
cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleAbstract
cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_attribute_def_def_login_namespace
cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_attribute_def_def_login_namespace_vsup
- All Implemented Interfaces:
AttributesModuleImplApi,UserAttributesModuleImplApi
public class urn_perun_user_attribute_def_def_login_namespace_vsup
extends urn_perun_user_attribute_def_def_login_namespace
Class for checking logins uniqueness in the namespace and filling vsup id.
- Author:
- Pavel Zlámal invalid input: '<'zlamal@cesnet.cz>
-
Field Summary
Fields inherited from class cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_attribute_def_def_login_namespace
generatedNamespaces -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangedAttributeHook(PerunSessionImpl session, User user, Attribute attribute) When login changes: first set / changed always change eduroam-vsup login too !!voidcheckAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) Check if the user's login is in the correct format and if it is permitted to use.fillAttribute(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) Filling implemented for: - namespaces configured in /etc/perun/perun.properties as property: "perun.loginNamespace.generated"Return attributes definition which is represented by the moduleMethods inherited from class cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_attribute_def_def_login_namespace
checkAttributeSemantics, sha1HashCountMethods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleAbstract
deletedEntityHook, getAnonymizedValueMethods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleImplApi
getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChangeMethods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleImplApi
deletedEntityHook, getAnonymizedValue
-
Constructor Details
-
urn_perun_user_attribute_def_def_login_namespace_vsup
public urn_perun_user_attribute_def_def_login_namespace_vsup()
-
-
Method Details
-
changedAttributeHook
public void changedAttributeHook(PerunSessionImpl session, User user, Attribute attribute) throws WrongReferenceAttributeValueException When login changes: first set / changed always change eduroam-vsup login too !! When login is set add UserExtSource, since logins are generated in Perun. When login is set, set also school mail u:d:vsupMail- Specified by:
changedAttributeHookin interfaceUserAttributesModuleImplApi- Overrides:
changedAttributeHookin classUserAttributesModuleAbstract- Parameters:
session-user-attribute-- Throws:
InternalErrorExceptionWrongReferenceAttributeValueException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) throws WrongAttributeValueException Check if the user's login is in the correct format and if it is permitted to use. Check if maximum length is 20 chars, because of MSAD limitations.- Specified by:
checkAttributeSyntaxin interfaceUserAttributesModuleImplApi- Overrides:
checkAttributeSyntaxin classurn_perun_user_attribute_def_def_login_namespace- Parameters:
sess- PerunSessionuser- User to check attribute forattribute- Attribute to check value to- Throws:
InternalErrorExceptionWrongAttributeValueException
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) throws WrongAttributeAssignmentException Filling implemented for: - namespaces configured in /etc/perun/perun.properties as property: "perun.loginNamespace.generated"Resulting format/rules: - "first char of firstName + up to 5 chars of lastName + [number]" where number is opt and start with 1 when same login is already present. - Only first part of "firstName" and last part of "lastName" is taken. - All accented chars are unaccented and all non (a-z,A-Z) chars are removed from name and value is lowered.
- Specified by:
fillAttributein interfaceUserAttributesModuleImplApi- Overrides:
fillAttributein classurn_perun_user_attribute_def_def_login_namespace- Parameters:
perunSession- PerunSessionuser- User to fill attribute forattribute- Attribute to fill value to- Returns:
- Filled attribute
- Throws:
InternalErrorExceptionWrongAttributeAssignmentException
-
getAttributeDefinition
Description copied from interface:AttributesModuleImplApiReturn attributes definition which is represented by the module- Specified by:
getAttributeDefinitionin interfaceAttributesModuleImplApi- Overrides:
getAttributeDefinitionin classAttributesModuleAbstract- Returns:
- attribute definition
-