Search in sources :

Example 1 with ResourceTagNotAssignedException

use of cz.metacentrum.perun.core.api.exceptions.ResourceTagNotAssignedException in project perun by CESNET.

the class ResourcesManagerBlImpl method removeResourceTagFromResource.

@Override
public void removeResourceTagFromResource(PerunSession perunSession, ResourceTag resourceTag, Resource resource) throws ResourceTagNotAssignedException {
    List<ResourceTag> allResourceTags = this.getAllResourcesTagsForResource(perunSession, resource);
    if (!allResourceTags.contains(resourceTag))
        throw new ResourceTagNotAssignedException(resourceTag);
    getResourcesManagerImpl().removeResourceTagFromResource(perunSession, resourceTag, resource);
}
Also used : ResourceTag(cz.metacentrum.perun.core.api.ResourceTag) ResourceTagNotAssignedException(cz.metacentrum.perun.core.api.exceptions.ResourceTagNotAssignedException)

Aggregations

ResourceTag (cz.metacentrum.perun.core.api.ResourceTag)1 ResourceTagNotAssignedException (cz.metacentrum.perun.core.api.exceptions.ResourceTagNotAssignedException)1