Class ResourceAttributesModuleAbstract
java.lang.Object
cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
cz.metacentrum.perun.core.implApi.modules.attributes.ResourceAttributesModuleAbstract
- All Implemented Interfaces:
AttributesModuleImplApi
,ResourceAttributesModuleImplApi
- Direct Known Subclasses:
ResourceVirtualAttributesModuleAbstract
,urn_perun_resource_attribute_def_def_accountExpirationTime
,urn_perun_resource_attribute_def_def_apacheAuthzFile
,urn_perun_resource_attribute_def_def_blockBucketCreation
,urn_perun_resource_attribute_def_def_capabilities
,urn_perun_resource_attribute_def_def_defaultBucketQuota
,urn_perun_resource_attribute_def_def_defaultDataQuotas
,urn_perun_resource_attribute_def_def_defaultFileQuotas
,urn_perun_resource_attribute_def_def_defaultHomeMountPoint
,urn_perun_resource_attribute_def_def_defaultShell
,urn_perun_resource_attribute_def_def_fairshareGroupName
,urn_perun_resource_attribute_def_def_fsScratchDirs
,urn_perun_resource_attribute_def_def_homeMountPoints
,urn_perun_resource_attribute_def_def_k4GroupCode
,urn_perun_resource_attribute_def_def_k4GroupName
,urn_perun_resource_attribute_def_def_k4GroupPriority
,urn_perun_resource_attribute_def_def_k5loginTargetUser
,urn_perun_resource_attribute_def_def_kerberosPrincipalsFileSuffix
,urn_perun_resource_attribute_def_def_m365LicenseGroup
,urn_perun_resource_attribute_def_def_mailaliasesTargetUser
,urn_perun_resource_attribute_def_def_mailingListManagerEmail
,urn_perun_resource_attribute_def_def_maxUserBucketQuota
,urn_perun_resource_attribute_def_def_maxUserDataQuotas
,urn_perun_resource_attribute_def_def_maxUserFileQuotas
,urn_perun_resource_attribute_def_def_projectsBasePath
,urn_perun_resource_attribute_def_def_replicaDestination
,urn_perun_resource_attribute_def_def_replicaDestinationPath
,urn_perun_resource_attribute_def_def_rootMailAliases
,urn_perun_resource_attribute_def_def_shells
,urn_perun_resource_attribute_def_def_sshkeysTargetUser
,urn_perun_resource_attribute_def_def_unixGID_namespace
,urn_perun_resource_attribute_def_def_unixGroupName_namespace
,urn_perun_resource_attribute_def_def_userSettingsDescription
,urn_perun_resource_attribute_def_def_userSettingsName
,urn_perun_resource_attribute_def_def_vomsRoles
public abstract class ResourceAttributesModuleAbstract
extends AttributesModuleAbstract
implements ResourceAttributesModuleImplApi
Abstract class for Resource Attributes modules.
----------------------------------------------------------------------------- Implements methods for modules to
perform default function. In the function that the method in the module does nothing, it is not necessary to
implement it, simply extend this abstract class.
- Author:
- Michal Stava invalid input: '<'stavamichal@gmail.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
changedAttributeHook
(PerunSessionImpl session, Resource resource, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
checkAttributeSemantics
(PerunSessionImpl perunSession, Resource resource, Attribute attribute) Checks if value of this resource attribute has valid semantics.void
checkAttributeSyntax
(PerunSessionImpl perunSession, Resource resource, Attribute attribute) Checks if value of this resource attribute has valid syntax.fillAttribute
(PerunSessionImpl session, Resource resource, AttributeDefinition attribute) This method tries to fill a value of the resource attribute.Methods inherited from class cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleAbstract
getAttributeDefinition, 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
getAttributeDefinition, getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
-
Constructor Details
-
ResourceAttributesModuleAbstract
public ResourceAttributesModuleAbstract()
-
-
Method Details
-
changedAttributeHook
public void changedAttributeHook(PerunSessionImpl session, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:ResourceAttributesModuleImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceResourceAttributesModuleImplApi
- Parameters:
session
- sessionresource
- resourceattribute
- the attribute- Throws:
WrongReferenceAttributeValueException
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Description copied from interface:ResourceAttributesModuleImplApi
Checks if value of this resource attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceResourceAttributesModuleImplApi
- Parameters:
perunSession
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if an referenced attribute against the parameter one is to be compared is not availableWrongAttributeAssignmentException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws WrongAttributeValueException Description copied from interface:ResourceAttributesModuleImplApi
Checks if value of this resource attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceResourceAttributesModuleImplApi
- Parameters:
perunSession
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong / illegal syntax
-
fillAttribute
public Attribute fillAttribute(PerunSessionImpl session, Resource resource, AttributeDefinition attribute) throws WrongAttributeAssignmentException Description copied from interface:ResourceAttributesModuleImplApi
This method tries to fill a value of the resource attribute. Value may be copied from some facility attribute.- Specified by:
fillAttribute
in interfaceResourceAttributesModuleImplApi
- Parameters:
session
- perun sessionresource
- resource, attribute of which you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
-