Class urn_perun_group_attribute_def_def_uniqueID
java.lang.Object
cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.GroupAttributesModuleAbstract
cz.metacentrum.perun.core.impl.modules.attributes.urn_perun_group_attribute_def_def_uniqueID
- All Implemented Interfaces:
AttributesModuleImplApi
,GroupAttributesModuleImplApi
public class urn_perun_group_attribute_def_def_uniqueID
extends GroupAttributesModuleAbstract
implements GroupAttributesModuleImplApi
Class for checking and filling unique IDs for groups in the Perun. This unique ID is unpredictable and is usable for
identifying of groups in other systems.
- Author:
- Michal Stava stavamichal@gmail.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfillAttribute
(PerunSessionImpl session, Group group, AttributeDefinition attribute) This method MAY fill an attribute at the specified resource.Return attributes definition which is represented by the moduleprotected StringBuilder
sha1HashCount
(Group group) Generate unique ID as hexadecimal string representation of SHA1 digest from group ID.Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.GroupAttributesModuleAbstract
changedAttributeHook, checkAttributeSemantics, checkAttributeSyntax
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.GroupAttributesModuleImplApi
changedAttributeHook, checkAttributeSemantics, checkAttributeSyntax
-
Constructor Details
-
urn_perun_group_attribute_def_def_uniqueID
public urn_perun_group_attribute_def_def_uniqueID()
-
-
Method Details
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl session, Group group, AttributeDefinition attribute) throws WrongAttributeAssignmentException Description copied from interface:GroupAttributesModuleImplApi
This method MAY fill an attribute at the specified resource.- Specified by:
fillAttribute
in interfaceGroupAttributesModuleImplApi
- Overrides:
fillAttribute
in classGroupAttributesModuleAbstract
- Parameters:
session
- perun sessiongroup
- groupattribute
- attribute to fill in- Returns:
- 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
-
sha1HashCount
Generate unique ID as hexadecimal string representation of SHA1 digest from group ID. Input is salted per Perun instance. Effective resulting string consist of [0-9a-f] characters.It is used to generate unique IDs for Perun groups.
- Parameters:
group
- Group to generate ID for- Returns:
- Builder to get string ID
- Throws:
InternalErrorException
- When generation fails
-