Class urn_perun_user_attribute_def_def_vsupPreferredMail
- All Implemented Interfaces:
AttributesModuleImplApi
,UserAttributesModuleImplApi
It is by default filled from u:d:vsupExchangeMail or u:d:vsupMail (changing domain in value to @umprum.cz), but it can be set manually to any value (even outside of @vsup.cz and @umprum.cz domains) or can be empty.
If it is empty, value might be set by setting source attributes u:d:vsupMail or u:d:vsupExchangeMail.
On value change, map of usedMails in entityless attributes is checked and updated. Also, value is copied to u:d:preferredMail so admin can see preferred mail in old GUI.
Since filled value by this module might be NULL at the time of processing, we must allow NULL value in checkAttributeSemantics(), because when all mail attributes are required and set at once, we can't ensure correct processing order of related attributes and it might perform check on old value, because of setRequiredAttributes() implementation uses in memory value instead of refreshing from DB.
- Author:
- Pavel Zlámal <zlamal@cesnet.cz>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changedAttributeHook
(PerunSessionImpl session, User user, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
checkAttributeSyntax
(PerunSessionImpl sess, User user, Attribute attribute) Checks if assigned attribute value to the user has valid syntax.fillAttribute
(PerunSessionImpl session, User user, AttributeDefinition attribute) Tries to fill an attribute to the specified user.Return attributes definition which is represented by the moduleMethods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleAbstract
checkAttributeSemantics, getAnonymizedValue
Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleImplApi
getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.UserAttributesModuleImplApi
checkAttributeSemantics, getAnonymizedValue
-
Constructor Details
-
urn_perun_user_attribute_def_def_vsupPreferredMail
public urn_perun_user_attribute_def_def_vsupPreferredMail()
-
-
Method Details
-
changedAttributeHook
public void changedAttributeHook(PerunSessionImpl session, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:UserAttributesModuleImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceUserAttributesModuleImplApi
- Overrides:
changedAttributeHook
in classUserAttributesModuleAbstract
- Parameters:
session
- sessionuser
- the userattribute
- the attribute- Throws:
WrongReferenceAttributeValueException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) throws WrongAttributeValueException Description copied from interface:UserAttributesModuleImplApi
Checks if assigned attribute value to the user has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceUserAttributesModuleImplApi
- Overrides:
checkAttributeSyntax
in classUserAttributesModuleAbstract
- Parameters:
sess
- PerunSessionuser
- Userattribute
- Attribute of the user.- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl session, User user, AttributeDefinition attribute) throws WrongAttributeAssignmentException Description copied from interface:UserAttributesModuleImplApi
Tries to fill an attribute to the specified user.- Specified by:
fillAttribute
in interfaceUserAttributesModuleImplApi
- Overrides:
fillAttribute
in classUserAttributesModuleAbstract
- Parameters:
session
- PerunSessionuser
- Userattribute
- Attribute in relationship between facility and user to be filled in.- Returns:
- Attribute which MAY be filled in
- Throws:
WrongAttributeAssignmentException
-
getAttributeDefinition
Description copied from interface:AttributesModuleImplApi
Return attributes definition which is represented by the module- Specified by:
getAttributeDefinition
in interfaceAttributesModuleImplApi
- Overrides:
getAttributeDefinition
in classAttributesModuleAbstract
- Returns:
- attribute definition
-