Interface ResourceVirtualAttributesModuleImplApi
- All Superinterfaces:
AttributesModuleImplApi
,ResourceAttributesModuleImplApi
,VirtualAttributesModuleImplApi
- All Known Implementing Classes:
ResourceVirtualAttributesModuleAbstract
,urn_perun_resource_attribute_def_virt_assignedGroups
,urn_perun_resource_attribute_def_virt_unixGID
,urn_perun_resource_attribute_def_virt_unixGroupName
,urn_perun_resource_attribute_def_virt_voShortName
public interface ResourceVirtualAttributesModuleImplApi
extends ResourceAttributesModuleImplApi, VirtualAttributesModuleImplApi
This interface serves as a template for virtual attributes.
- Author:
- Slavek Licehammer invalid input: '<'glory@ics.muni.cz>
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(PerunSessionImpl sess, Resource resource, AttributeDefinition attribute) This method will return computed value.boolean
removeAttributeValue
(PerunSessionImpl sess, Resource resource, AttributeDefinition attribute) Currently do nothing.boolean
setAttributeValue
(PerunSessionImpl sess, Resource resource, Attribute attribute) Method sets attributes' values which are dependent on this virtual attribute.Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.AttributesModuleImplApi
getAttributeDefinition, getAuthorizedRoles, getDependencies, resolveVirtualAttributeValueChange
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.ResourceAttributesModuleImplApi
changedAttributeHook, checkAttributeSemantics, checkAttributeSyntax, fillAttribute
Methods inherited from interface cz.metacentrum.perun.core.implApi.modules.attributes.VirtualAttributesModuleImplApi
getStrongDependencies
-
Method Details
-
getAttributeValue
Attribute getAttributeValue(PerunSessionImpl sess, Resource resource, AttributeDefinition attribute) This method will return computed value.- Parameters:
sess
- PerunSessionresource
- resource which is needed for computing the valueattribute
- attribute to operate on- Returns:
- Throws:
InternalErrorException
- if an exception is raised in particular implementation, the exception is wrapped in InternalErrorException
-
removeAttributeValue
boolean removeAttributeValue(PerunSessionImpl sess, Resource resource, AttributeDefinition attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException Currently do nothing.- Parameters:
sess
- PerunSessionresource
- resource which is needed for computing the valueattribute
- attribute to operate on- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception is raised in particular implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
WrongAttributeValueException
-
setAttributeValue
boolean setAttributeValue(PerunSessionImpl sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Method sets attributes' values which are dependent on this virtual attribute.- Parameters:
sess
- PerunSessionresource
- resource which is needed for computing the valueattribute
- attribute to operate on- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception is raised in particular implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
-