Class urn_perun_user_facility_attribute_def_virt_UID
java.lang.Object
cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityAttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityVirtualAttributesModuleAbstract
cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_user_facility_attribute_def_virt_UID
- All Implemented Interfaces:
AttributesModuleImplApi
,UserFacilityAttributesModuleImplApi
,UserFacilityVirtualAttributesModuleImplApi
,VirtualAttributesModuleImplApi
public class urn_perun_user_facility_attribute_def_virt_UID
extends UserFacilityVirtualAttributesModuleAbstract
implements UserFacilityVirtualAttributesModuleImplApi
Checks and fills at specified facility users UID.
- Author:
- Lukáš Pravda invalid input: '<'luky.pravda@gmail.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAttributeSemantics
(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) Checks the new UID of the user at the specified facility.fillAttribute
(PerunSessionImpl sess, User user, Facility facility, AttributeDefinition attribute) Fills the new UID for the user at the specified facility.Return attributes definition which is represented by the modulegetAttributeValue
(PerunSessionImpl sess, User user, Facility facility, AttributeDefinition attributeDefinition) Gets the value of the attribute f:uid-namespace and then finds the value of the attribute u:uid-namespace:[uid-namespace]Get list of attributes whose value are used in checking of validity of this attribute.Get list of attributes which this attribute value is computed from.boolean
setAttributeValue
(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) Method sets attributes' values which are dependent on this virtual attribute.Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityVirtualAttributesModuleAbstract
removeAttributeValue, resolveVirtualAttributeValueChange
Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityAttributesModuleAbstract
changedAttributeHook, checkAttributeSyntax
Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
getAuthorizedRoles
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, resolveVirtualAttributeValueChange
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityAttributesModuleImplApi
changedAttributeHook, checkAttributeSyntax
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.UserFacilityVirtualAttributesModuleImplApi
removeAttributeValue
-
Constructor Details
-
urn_perun_user_facility_attribute_def_virt_UID
public urn_perun_user_facility_attribute_def_virt_UID()
-
-
Method Details
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Checks the new UID of the user at the specified facility. The new UID must not be lower than the min UID or greater than the max UID. Also no collision between existing user and the new user is allowed.- Specified by:
checkAttributeSemantics
in interfaceUserFacilityAttributesModuleImplApi
- Overrides:
checkAttributeSemantics
in classUserFacilityAttributesModuleAbstract
- Parameters:
sess
- Perun sessionuser
- User of the facility.facility
- Facility to be used by a user.attribute
- Attribute in relationship between facility and user.- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl sess, User user, Facility facility, AttributeDefinition attribute) throws WrongAttributeAssignmentException Fills the new UID for the user at the specified facility. First empty slot in range (minUID, maxUID) is returned.- Specified by:
fillAttribute
in interfaceUserFacilityAttributesModuleImplApi
- Overrides:
fillAttribute
in classUserFacilityAttributesModuleAbstract
- Parameters:
sess
- Perun Sessionuser
- User of the facilityfacility
- Facility to be used by user.attribute
- 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
-
getAttributeValue
public Attribute getAttributeValue(PerunSessionImpl sess, User user, Facility facility, AttributeDefinition attributeDefinition) Gets the value of the attribute f:uid-namespace and then finds the value of the attribute u:uid-namespace:[uid-namespace]- Specified by:
getAttributeValue
in interfaceUserFacilityVirtualAttributesModuleImplApi
- Overrides:
getAttributeValue
in classUserFacilityVirtualAttributesModuleAbstract
- Parameters:
sess
- perun sessionuser
- user which is needed for computing the valuefacility
- facility which is needed for computing the valueattributeDefinition
- attribute to operate on- Returns:
-
getDependencies
Description copied from interface:AttributesModuleImplApi
Get list of attributes whose value are used in checking of validity of this attribute. In other words any change of these attributes' values can cause that value of this attribute is no longer valid.An attribute should depend on all attributes which values are used in method "checkAttributeSemantics" defined in attribute module.
- Specified by:
getDependencies
in interfaceAttributesModuleImplApi
- Overrides:
getDependencies
in classAttributesModuleAbstract
- Returns:
- list of attributes this attribute depends on
- See Also:
-
getStrongDependencies
Description copied from interface:VirtualAttributesModuleImplApi
Get list of attributes which this attribute value is computed from. In other words attributes whose values change can also directly affect value of this attribute.An attribute should strongly depend on all attributes which values are used in method "getAttributeValue" defined in attribute module for virtual attributes.
- Specified by:
getStrongDependencies
in interfaceVirtualAttributesModuleImplApi
- Overrides:
getStrongDependencies
in classUserFacilityVirtualAttributesModuleAbstract
- Returns:
- list of attributes this attribute strongly depends on
- See Also:
-
setAttributeValue
public boolean setAttributeValue(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:UserFacilityVirtualAttributesModuleImplApi
Method sets attributes' values which are dependent on this virtual attribute.- Specified by:
setAttributeValue
in interfaceUserFacilityVirtualAttributesModuleImplApi
- Overrides:
setAttributeValue
in classUserFacilityVirtualAttributesModuleAbstract
- Parameters:
sess
-user
- user which is needed for computing the valuefacility
- facility which is needed for computing the valueattribute
- attribute to operate on- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-