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 TypeMethodDescriptionvoidcheckAttributeSemantics(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.booleansetAttributeValue(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) Method sets attributes' values which are dependent on this virtual attribute.Methods inherited from class UserFacilityVirtualAttributesModuleAbstract
removeAttributeValue, resolveVirtualAttributeValueChangeMethods inherited from class UserFacilityAttributesModuleAbstract
changedAttributeHook, checkAttributeSyntaxMethods inherited from class AttributesModuleAbstract
getAuthorizedRolesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AttributesModuleImplApi
getAuthorizedRoles, resolveVirtualAttributeValueChangeMethods inherited from interface UserFacilityAttributesModuleImplApi
changedAttributeHook, checkAttributeSyntaxMethods inherited from interface 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:
checkAttributeSemanticsin interfaceUserFacilityAttributesModuleImplApi- Overrides:
checkAttributeSemanticsin 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:
fillAttributein interfaceUserFacilityAttributesModuleImplApi- Overrides:
fillAttributein 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:AttributesModuleImplApiReturn attributes definition which is represented by the module- Specified by:
getAttributeDefinitionin interfaceAttributesModuleImplApi- Overrides:
getAttributeDefinitionin 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:
getAttributeValuein interfaceUserFacilityVirtualAttributesModuleImplApi- Overrides:
getAttributeValuein 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:AttributesModuleImplApiGet 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:
getDependenciesin interfaceAttributesModuleImplApi- Overrides:
getDependenciesin classAttributesModuleAbstract- Returns:
- list of attributes this attribute depends on
- See Also:
-
getStrongDependencies
Description copied from interface:VirtualAttributesModuleImplApiGet 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:
getStrongDependenciesin interfaceVirtualAttributesModuleImplApi- Overrides:
getStrongDependenciesin 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:UserFacilityVirtualAttributesModuleImplApiMethod sets attributes' values which are dependent on this virtual attribute.- Specified by:
setAttributeValuein interfaceUserFacilityVirtualAttributesModuleImplApi- Overrides:
setAttributeValuein 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
-