Interface ResourcesManagerBl
- All Known Implementing Classes:
ResourcesManagerBlImpl
- Author:
- Slavek Licehammer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateGroupResourceAssignment
(PerunSession sess, Group group, Resource resource, boolean async) Try to activate the group-resource status.void
addResourceSelfServiceGroup
(PerunSession sess, Resource resource, Group group) Sets ResourceSelfService role to given group for given resource.void
addResourceSelfServiceUser
(PerunSession sess, Resource resource, User user) Sets ResourceSelfService role to given user for given resource.void
assignAutomaticGroupToResource
(PerunSession perunSession, Group sourceGroup, Group groupToAssign, Resource resource) Asynchronously assigns single subgroup to resource as automatically assigned source group's subgroup.void
assignGroupsToResource
(PerunSession perunSession, Iterable<Group> groups, Resource resource, boolean async, boolean assignInactive, boolean autoAssignSubgroups) Assign groups to a resource.void
assignGroupToResource
(PerunSession perunSession, Group group, Resource resource, boolean async, boolean assignInactive, boolean autoAssignSubgroups) Assign group to a resource.void
assignGroupToResources
(PerunSession perunSession, Group group, List<Resource> resources, boolean async, boolean assignInactive, boolean autoAssignSubgroups) Assign group to the resources.void
assignResourceTagsToResource
(PerunSession perunSession, List<ResourceTag> resourceTags, Resource resource) Assign existing ResourceTags on existing Resource.void
assignResourceTagToResource
(PerunSession perunSession, ResourceTag resourceTag, Resource resource) Assign existing ResourceTag on existing Resource.void
assignService
(PerunSession perunSession, Resource resource, Service service) Assign service to resource.void
assignServices
(PerunSession perunSession, Resource resource, List<Service> services) Assign services to resource.void
assignServicesPackage
(PerunSession perunSession, Resource resource, ServicesPackage servicesPackage) Assign all services from services package to resource.boolean
banExists
(PerunSession sess, int banId) Get true if any band defined by id exists for any user and facility.boolean
banExists
(PerunSession sess, int memberId, int resourceId) Get true if any ban for member and resource exists.void
checkBanExists
(PerunSession sess, int banId) Check if ban already exists.void
checkBanExists
(PerunSession sess, int memberId, int resourceId) Check if ban already exists.void
checkResourceExists
(PerunSession sess, Resource resource) void
checkResourceTagExists
(PerunSession sess, ResourceTag resourceTag) convertToEnrichedResource
(PerunSession sess, Resource resource, List<String> attrNames) Creates enrichedResource from given resource and load attributes with given names.void
copyAttributes
(PerunSession sess, Resource sourceResource, Resource destinationResource) Copy all attributes of the source resource to the destination resource.void
copyGroups
(PerunSession sess, Resource sourceResource, Resource destinationResource) Copy all groups of the source resource to the destination resource.copyResource
(PerunSession perunSession, Resource templateResource, Resource destinationResource, boolean withGroups) Copy "template" settings from user's another existing resource and create new resource with this template.void
copyServices
(PerunSession sess, Resource sourceResource, Resource destinationResource) Copy all services of the source resource to the destination resource.createResource
(PerunSession perunSession, Resource resource, Vo vo, Facility facility) Inserts resource into DB.createResourceTag
(PerunSession perunSession, ResourceTag resourceTag, Vo vo) Create new Resource tag.void
deactivateGroupResourceAssignment
(PerunSession sess, Group group, Resource resource) Deactivates the group-resource assignment.void
deleteAllResources
(PerunSession perunSession, Vo vo) Deletes all resources for the VO.void
deleteAllResourcesTagsForVo
(PerunSession perunSession, Vo vo) Delete all ResourcesTags for specific VO.void
deleteResource
(PerunSession perunSession, Resource resource) Deletes resource by id.void
deleteResourceTag
(PerunSession perunSession, ResourceTag resourceTag) Delete existing Resource tag.filterOnlyAllowedAttributes
(PerunSession sess, EnrichedResource enrichedResource) Filter attributes in given enrichedResources, which are allowed for current principal.getAdminGroups
(PerunSession sess, Resource resource) Gets list of all group administrators of the Resource.getAdmins
(PerunSession perunSession, Resource resource, boolean onlyDirectAdmins) Gets list of all user administrators of the Resource.Get all expired bans on any resource to now dategetAllowedMembers
(PerunSession perunSession, Resource resource) Returns all members who can access the resource.getAllowedMembersNotExpiredInGroups
(PerunSession perunSession, Resource resource) Returns all members who can access the resource and who are also valid in at least one group associated to the resource.getAllowedResources
(PerunSession sess, Facility facility, User user) Return all resources which are under the facility and has member of the user with status other than INVALID.getAllowedResources
(PerunSession sess, Member member) Get all resources which have the member access on.getAllowedUsers
(PerunSession sess, Resource resource) Get all users, who can assess the resource.getAllowedUsersNotExpiredInGroups
(PerunSession sess, Resource resource) Get all users, who can assess the resource and who are not expired in at least one group associated to the resource.getAllResources
(PerunSession sess) Get all resources from database.getAllResourcesByResourceTag
(PerunSession perunSession, ResourceTag resourceTag) Get all resources in specific Vo (specific by resourceTag.getVoId) for existing resourceTaggetAllResourcesTagsForResource
(PerunSession perunSession, Resource resource) Get all resourcesTags for existing ResourcegetAllResourcesTagsForVo
(PerunSession perunSession, Vo vo) Get all resourcesTags for existing Vo.getAssignedGroups
(PerunSession perunSession, Resource resource) List all groups associated with the resource.getAssignedGroups
(PerunSession perunSession, Resource resource, Member member) List all groups associated with the resource where Member is a member.getAssignedMembers
(PerunSession perunSession, Resource resource) Returns all members assigned to the resource.getAssignedMembersWithStatus
(PerunSession sess, Resource resource) Returns members of groups assigned to resource with status of group-resource assignment.getAssignedResources
(PerunSession perunSession, Group group) List all resources to which the group is assigned.getAssignedResources
(PerunSession sess, Member member) Get all resources where the member is assigned.getAssignedResources
(PerunSession sess, Member member, Service service) Get all resources where the member and the service are assigned.getAssignedResources
(PerunSession sess, User user, Vo vo) Return List of assigned resources to user on the vo.getAssignedResourcesWithStatus
(PerunSession sess, Member member) Returns all assigned resources where member is assigned through the groups.getAssignedRichMembers
(PerunSession perunSession, Resource resource) Returns all members assigned to the resource as RichMembers.getAssignedRichResources
(PerunSession perunSession, Group group) List all rich resources associated with the group with facility property filled.getAssignedRichResources
(PerunSession sess, Member member) Get all rich resources where the member is assigned with facility property filled.getAssignedRichResources
(PerunSession sess, Member member, Service service) Get all rich resources where the service and the member are assigned with facility property filled.getAssignedServices
(PerunSession perunSession, Resource resource) List all services associated with the resource.getAssignedUsers
(PerunSession perunSession, Resource resource) Returns all users assigned to the resource.getAssociatedGroups
(PerunSession perunSession, Resource resource, Member member) Return list of groups associated with the resource with specified member.getAssociatedMembers
(PerunSession sess, Resource resource) Returns all members who are associated with the resource.getAssociatedResources
(PerunSession perunSession, Group group) List all resources associated with the group.getAssociatedResources
(PerunSession sess, Member member) Returns all resources with which the member is associated through the groups.getAssociatedUsers
(PerunSession sess, Resource resource) Returns all users who are associated with the defined resource.getBan
(PerunSession sess, int memberId, int resourceId) Get specific resource ban.getBanById
(PerunSession sess, int banId) Get Ban for member on resource by it's idgetBansForMember
(PerunSession sess, int memberId) Get all resources bans for member.getBansForResource
(PerunSession sess, int resourceId) Get all members bans for resourcegetEnrichedBansForResource
(PerunSession sess, Resource resource, List<String> attrNames) Get all enriched bans for members on the resource with user and member attributesgetEnrichedBansForUser
(PerunSession sess, User user, List<String> attrNames) Get enriched bans for user on all resources where user is assigned with user and member attributesgetEnrichedResourceById
(PerunSession sess, int id, List<String> attrNames) Find resource for given id and returns it with given attributes.getEnrichedRichResourcesForFacility
(PerunSession sess, Facility facility, List<String> attrNames) Find resources for given facility and attributes for given names.getEnrichedRichResourcesForVo
(PerunSession sess, Vo vo, List<String> attrNames) Find resources for given vo and attributes for given names.getFacility
(PerunSession perunSession, Resource resource) Get facility which belongs to the concrete resource.getGroupAssignments
(PerunSession sess, Resource resource, List<String> attrNames) Lists all of the assigned groups for the given resource.getGroupResourceAssignments
(PerunSession sess, List<GroupResourceStatus> statuses) Lists all group-resource assignments with given statuses.getMailingServiceRichResourcesWithMember
(PerunSession perunSession, Member member) Return all rich resources with mailing service(s) where given member is assigned.getResourceAssignments
(PerunSession sess, Group group, List<String> attrNames) Lists all of the resource assignments for the given group.getResourceById
(PerunSession perunSession, int id) Searches for the Resource with specified id.getResourceByName
(PerunSession sess, Vo vo, Facility facility, String name) Return resource by its name.getResources
(PerunSession sess) Finds all resources.getResources
(PerunSession sess, User user, List<Status> memberStatuses, List<MemberGroupStatus> memberGroupStatuses, List<GroupResourceStatus> groupResourceStatuses) Return all resources where user is assigned.getResources
(PerunSession perunSession, Vo vo) Get all VO resources.getResourcesByAttribute
(PerunSession sess, Attribute attribute) Returns all resource which have set the attribute with the value.getResourcesByIds
(PerunSession perunSession, List<Integer> ids) Searches for the Resources with specified ids.int
getResourcesCount
(PerunSession perunSession) Get count of all resources.int
getResourcesCount
(PerunSession perunSession, Vo vo) Get all VO resources count.getResourcesWhereGroupIsAdmin
(PerunSession sess, Facility facility, Vo vo, Group authorizedGroup) Return all resources for the facility and the vo where the group is authorized as resource manager.getResourcesWhereUserIsAdmin
(PerunSession sess, Facility facility, Vo vo, User authorizedUser) Return all resources for the facility and the vo where user is authorized as resource manager.getResourcesWhereUserIsAdmin
(PerunSession sess, User user) Returns list of resources, where the user is an admin.getResourcesWhereUserIsAdmin
(PerunSession sess, Vo vo, User authorizedUser) Return all resources for the vo where user is authorized as resource manager.getRichAdmins
(PerunSession perunSession, Resource resource, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) Gets list of all richUser administrators of the Resource.getRichResourceById
(PerunSession perunSession, int id) Searches for the RichResource with specified id.getRichResources
(PerunSession perunSession, Vo vo) Get all VO rich resources with facility property filled.getRichResourcesByIds
(PerunSession perunSession, List<Integer> ids) Searches for the RichResources with specified ids.getVo
(PerunSession perunSession, Resource resource) Get Vo which is tied to specified resource.boolean
groupResourceAssignmentExists
(PerunSession sess, Resource resource, Group group) Returns true if the group is assigned to the current resource with any status, false otherwise.boolean
isGroupAssigned
(PerunSession sess, Resource resource, Group group) Returns true if the group is assigned to the current resource with ACTIVE status, false otherwise.boolean
isGroupManuallyAssigned
(PerunSession sess, Group group, Resource resource) Returns true if the group is assigned to the given resource manually, false otherwise.boolean
isUserAllowed
(PerunSession sess, User user, Resource resource) Returns true if the user is allowed to the current resource, false otherwise.boolean
isUserAssigned
(PerunSession sess, User user, Resource resource) Returns true if the user is assigned to the current resource, false otherwise.void
processGroupResourceActivationAsync
(PerunSession sess, Group group, Resource resource) Asynchronously processes group-resource activation.void
Remove all expired bans on resources to now date.void
removeAllResourcesTagFromResource
(PerunSession perunSession, Resource resource) Remove all existing Resource tags for specific resource.void
removeAutomaticGroupFromResource
(PerunSession perunSession, Group group, Resource resource, int sourceGroupId) Remove automatically assigned group from resource.void
removeBan
(PerunSession sess, int banId) Remove ban by id from resources bans.void
removeBan
(PerunSession sess, int memberId, int resourceId) Remove ban by member_id and facility_idvoid
removeGroupFromResource
(PerunSession perunSession, Group group, Resource resource) Remove group from a resource.void
removeGroupFromResources
(PerunSession perunSession, Group group, List<Resource> resources) Remove group from resources.void
removeGroupsFromResource
(PerunSession perunSession, List<Group> groups, Resource resource) Remove groups from a resource.void
removeResourceSelfServiceGroup
(PerunSession sess, Resource resource, Group group) Unset ResourceSelfService role to given group for given resource.void
removeResourceSelfServiceUser
(PerunSession sess, Resource resource, User user) Unset ResourceSelfService role to given user for given resource.void
removeResourceTagFromResource
(PerunSession perunSession, ResourceTag resourceTag, Resource resource) Remove specific ResourceTag from existing Resource.void
removeResourceTagsFromResource
(PerunSession perunSession, List<ResourceTag> resourceTags, Resource resource) Remove specific ResourceTags from existing Resource.void
removeService
(PerunSession perunSession, Resource resource, Service service) Remove service from resource.void
removeServices
(PerunSession perunSession, Resource resource, List<Service> services) Remove services from resource.void
removeServicesPackage
(PerunSession perunSession, Resource resource, ServicesPackage servicesPackage) Remove from resource all services from services package.setBan
(PerunSession sess, BanOnResource banOnresource) Set ban for member on resourceupdateBan
(PerunSession sess, BanOnResource banOnResource) Update description and validity timestamp of specific ban.updateResource
(PerunSession perunSession, Resource resource) Updates Resource.updateResourceTag
(PerunSession perunSession, ResourceTag resourceTag) Update existing Resource tag.
-
Method Details
-
activateGroupResourceAssignment
void activateGroupResourceAssignment(PerunSession sess, Group group, Resource resource, boolean async) throws WrongReferenceAttributeValueException, GroupResourceMismatchException, WrongAttributeValueException, GroupNotDefinedOnResourceException Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a successful synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED.- Parameters:
sess
- sessiongroup
- groupresource
- resourceasync
- if true the validation is performed asynchronously- Throws:
WrongAttributeValueException
- when an attribute value has wrong/illegal syntaxWrongReferenceAttributeValueException
- when an attribute value has wrong/illegal semanticsGroupResourceMismatchException
- when the given group and resource are not from the same VOGroupNotDefinedOnResourceException
- when the group-resource assignment doesn't exist
-
addResourceSelfServiceGroup
void addResourceSelfServiceGroup(PerunSession sess, Resource resource, Group group) throws AlreadyAdminException Sets ResourceSelfService role to given group for given resource.- Parameters:
sess
- sessionresource
- resourcegroup
- group- Throws:
AlreadyAdminException
- already has roleInternalErrorException
- internal error
-
addResourceSelfServiceUser
void addResourceSelfServiceUser(PerunSession sess, Resource resource, User user) throws AlreadyAdminException Sets ResourceSelfService role to given user for given resource.- Parameters:
sess
- sessionresource
- resourceuser
- user- Throws:
AlreadyAdminException
- already has roleInternalErrorException
- internal error
-
assignAutomaticGroupToResource
void assignAutomaticGroupToResource(PerunSession perunSession, Group sourceGroup, Group groupToAssign, Resource resource) throws GroupResourceMismatchException, GroupAlreadyAssignedException, WrongReferenceAttributeValueException, WrongAttributeValueException Asynchronously assigns single subgroup to resource as automatically assigned source group's subgroup. Source group must have existing assignment on resource with autoAssignSubgroups set to true.- Parameters:
perunSession
- sesssourceGroup
- source group (containing groupToAssign in hierarchy as a subgroup)groupToAssign
- source group's subgroup to be assigned on resource as by automatic assignmentresource
- resource- Throws:
GroupResourceMismatchException
GroupAlreadyAssignedException
WrongReferenceAttributeValueException
WrongAttributeValueException
-
assignGroupToResource
void assignGroupToResource(PerunSession perunSession, Group group, Resource resource, boolean async, boolean assignInactive, boolean autoAssignSubgroups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, GroupResourceMismatchException Assign group to a resource. Check if attributes for each member form group are valid. Fill members' attributes with missing value. Provide options for creating inactive or automatic subgroups group-resource assignments.- Parameters:
perunSession
-group
-resource
-async
-assignInactive
-autoAssignSubgroups
-- Throws:
InternalErrorException
WrongAttributeValueException
WrongReferenceAttributeValueException
GroupResourceMismatchException
-
assignGroupToResources
void assignGroupToResources(PerunSession perunSession, Group group, List<Resource> resources, boolean async, boolean assignInactive, boolean autoAssignSubgroups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, GroupResourceMismatchException Assign group to the resources. Check if attributes for each member from group are valid. Fill members' attributes with missing values. Provide options for creating inactive or automatic subgroups group-resource assignments.If the group is already assigned to some of the resources, the assignment is silently skipped.
- Parameters:
perunSession
-group
- the groupresources
- list of resourcesasync
-assignInactive
-autoAssignSubgroups
-- Throws:
InternalErrorException
WrongAttributeValueException
WrongReferenceAttributeValueException
GroupResourceMismatchException
-
assignGroupsToResource
void assignGroupsToResource(PerunSession perunSession, Iterable<Group> groups, Resource resource, boolean async, boolean assignInactive, boolean autoAssignSubgroups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, GroupResourceMismatchException Assign groups to a resource. Check if attributes for each member from all groups are valid. Fill members' attributes with missing values. Provide options for creating inactive or automatic subgroups group-resource assignments.Already assigned groups are silently skipped.
- Parameters:
perunSession
-groups
- groups to assignresource
-async
-assignInactive
-autoAssignSubgroups
-- Throws:
InternalErrorException
WrongAttributeValueException
WrongReferenceAttributeValueException
GroupResourceMismatchException
-
assignResourceTagToResource
void assignResourceTagToResource(PerunSession perunSession, ResourceTag resourceTag, Resource resource) throws ResourceTagAlreadyAssignedException Assign existing ResourceTag on existing Resource.- Parameters:
perunSession
-resourceTag
-resource
-- Throws:
InternalErrorException
ResourceTagAlreadyAssignedException
-
assignResourceTagsToResource
void assignResourceTagsToResource(PerunSession perunSession, List<ResourceTag> resourceTags, Resource resource) throws ResourceTagAlreadyAssignedException Assign existing ResourceTags on existing Resource.- Parameters:
perunSession
-resourceTags
-resource
-- Throws:
InternalErrorException
ResourceTagAlreadyAssignedException
-
assignService
void assignService(PerunSession perunSession, Resource resource, Service service) throws ServiceAlreadyAssignedException, WrongAttributeValueException, WrongReferenceAttributeValueException Assign service to resource.- Parameters:
perunSession
-resource
-service
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
WrongAttributeValueException
ServiceAlreadyAssignedException
-
assignServices
void assignServices(PerunSession perunSession, Resource resource, List<Service> services) throws ServiceAlreadyAssignedException, WrongAttributeValueException, WrongReferenceAttributeValueException Assign services to resource.- Parameters:
perunSession
- sessionresource
- resourceservices
- services to be assigned- Throws:
WrongReferenceAttributeValueException
WrongAttributeValueException
ServiceAlreadyAssignedException
-
assignServicesPackage
void assignServicesPackage(PerunSession perunSession, Resource resource, ServicesPackage servicesPackage) throws WrongAttributeValueException, WrongReferenceAttributeValueException Assign all services from services package to resource.- Parameters:
perunSession
-resource
-servicesPackage
-- Throws:
WrongReferenceAttributeValueException
WrongAttributeValueException
InternalErrorException
-
banExists
Get true if any ban for member and resource exists.- Parameters:
sess
-memberId
- id of memberresourceId
- id of resource- Returns:
- true if ban exists
- Throws:
InternalErrorException
-
banExists
Get true if any band defined by id exists for any user and facility.- Parameters:
sess
-banId
- id of ban- Returns:
- true if ban exists
- Throws:
InternalErrorException
-
checkBanExists
Check if ban already exists.Throw exception if no.
- Parameters:
sess
-memberId
- user idresourceId
- facility id- Throws:
InternalErrorException
BanNotExistsException
-
checkBanExists
Check if ban already exists.Throw exception if no.
- Parameters:
sess
-banId
- ban id- Throws:
InternalErrorException
BanNotExistsException
-
checkResourceExists
- Throws:
ResourceNotExistsException
-
checkResourceTagExists
void checkResourceTagExists(PerunSession sess, ResourceTag resourceTag) throws ResourceTagNotExistsException - Throws:
ResourceTagNotExistsException
-
convertToEnrichedResource
EnrichedResource convertToEnrichedResource(PerunSession sess, Resource resource, List<String> attrNames) Creates enrichedResource from given resource and load attributes with given names. If the attrNames are null or emtpy, all resource attributes are added.- Parameters:
sess
- sessionresource
- resourceattrNames
- names of attributes to return- Returns:
- EnrichedResource for given resource with desired attributes
-
copyAttributes
void copyAttributes(PerunSession sess, Resource sourceResource, Resource destinationResource) throws WrongReferenceAttributeValueException Copy all attributes of the source resource to the destination resource. The attributes, that are in the destination resource and aren't in the source resource, are retained. The common attributes are replaced with attributes from the source resource. The virtual attributes are not copied.- Parameters:
sess
-sourceResource
-destinationResource
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
copyGroups
Copy all groups of the source resource to the destination resource. The groups, that are in the destination resource and aren't in the source resource, are retained. The common groups are replaced with the groups from source resource.- Parameters:
sourceResource
-destinationResource
-- Throws:
InternalErrorException
-
copyResource
Resource copyResource(PerunSession perunSession, Resource templateResource, Resource destinationResource, boolean withGroups) throws ResourceExistsException Copy "template" settings from user's another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user's facilities.- Parameters:
perunSession
-templateResource
- template resource to copydestinationResource
- destination resource containing IDs of destination facility, VO and resource name.withGroups
- if set to true and resources ARE from the same VO we also copy all group-resource and member-resource attributes and assign all groups same as on templateResource, if set to true and resources ARE NOT from the same VO InternalErrorException is thrown, if set to false we will NOT copy groups and group related attributes.- Throws:
ResourceExistsException
InternalErrorException
-
copyServices
void copyServices(PerunSession sess, Resource sourceResource, Resource destinationResource) throws WrongAttributeValueException, WrongReferenceAttributeValueException Copy all services of the source resource to the destination resource. The services, that are in the destination resource and aren't in the source resource, are retained. The common services are replaced with services from source resource.- Parameters:
sourceResource
-destinationResource
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
WrongAttributeValueException
-
createResource
Resource createResource(PerunSession perunSession, Resource resource, Vo vo, Facility facility) throws ResourceExistsException Inserts resource into DB.- Parameters:
resource
- resource to create- Throws:
InternalErrorException
ResourceExistsException
-
createResourceTag
Create new Resource tag.- Parameters:
perunSession
-resourceTag
-vo
-- Returns:
- new created resourceTag
- Throws:
InternalErrorException
-
deactivateGroupResourceAssignment
void deactivateGroupResourceAssignment(PerunSession sess, Group group, Resource resource) throws GroupNotDefinedOnResourceException, GroupResourceStatusException Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource.- Parameters:
group
- groupresource
- resource- Throws:
GroupNotDefinedOnResourceException
- when the group-resource assignment doesn't existGroupResourceStatusException
- when trying to deactivate an assignment in PROCESSING state
-
deleteAllResources
void deleteAllResources(PerunSession perunSession, Vo vo) throws ResourceAlreadyRemovedException, GroupAlreadyRemovedFromResourceException Deletes all resources for the VO.- Parameters:
perunSession
-vo
-- Throws:
InternalErrorException
ResourceAlreadyRemovedException
- if there is at least 1 resource not affected by deleting from DBGroupAlreadyRemovedFromResourceException
- if there is at least 1 group not affected by deleting from DB
-
deleteAllResourcesTagsForVo
void deleteAllResourcesTagsForVo(PerunSession perunSession, Vo vo) throws ResourceTagAlreadyAssignedException Delete all ResourcesTags for specific VO.- Parameters:
perunSession
-vo
-- Throws:
InternalErrorException
ResourceTagAlreadyAssignedException
-
deleteResource
void deleteResource(PerunSession perunSession, Resource resource) throws ResourceAlreadyRemovedException, GroupAlreadyRemovedFromResourceException Deletes resource by id.- Parameters:
perunSession
-resource
-- Throws:
InternalErrorException
ResourceAlreadyRemovedException
- if there are 0 rows affected by deleting from DBGroupAlreadyRemovedFromResourceException
- if there is at least 1 group not affected by deleting from DB
-
deleteResourceTag
void deleteResourceTag(PerunSession perunSession, ResourceTag resourceTag) throws ResourceTagAlreadyAssignedException Delete existing Resource tag.- Parameters:
perunSession
-resourceTag
-- Throws:
InternalErrorException
ResourceTagAlreadyAssignedException
-
filterOnlyAllowedAttributes
Filter attributes in given enrichedResources, which are allowed for current principal.- Parameters:
sess
- sessionenrichedResource
- resource with attributes to filter- Returns:
- resource with attributes that are allowed for current principal
-
getAdminGroups
Gets list of all group administrators of the Resource.- Parameters:
sess
-resource
-- Returns:
- list of Groups that are admins in the resource
- Throws:
InternalErrorException
-
getAdmins
Gets list of all user administrators of the Resource. If some group is administrator of the given resource, all VALID members are included in the list.If onlyDirectAdmins is true, return only direct users of the group for supported role.
Supported roles: ResourceAdmin, VOAdmin
- Parameters:
perunSession
-resource
-onlyDirectAdmins
- if true, get only direct user administrators (if false, get both direct and indirect)- Returns:
- list of all user administrators of the given resource for supported role
- Throws:
InternalErrorException
-
getAllExpiredBansOnResources
Get all expired bans on any resource to now date- Parameters:
sess
-- Returns:
- list of expired bans for any resource
- Throws:
InternalErrorException
-
getAllResources
Get all resources from database.- Parameters:
sess
- Perun session- Returns:
- list of all resources
-
getAllResourcesByResourceTag
Get all resources in specific Vo (specific by resourceTag.getVoId) for existing resourceTag- Parameters:
perunSession
-resourceTag
-- Returns:
- list of Resources
- Throws:
InternalErrorException
-
getAllResourcesTagsForResource
Get all resourcesTags for existing Resource- Parameters:
perunSession
-resource
-- Returns:
- list of ResourcesTags
- Throws:
InternalErrorException
-
getAllResourcesTagsForVo
Get all resourcesTags for existing Vo.- Parameters:
perunSession
-vo
-- Returns:
- list of all resourcesTags for existing Vo
- Throws:
InternalErrorException
-
getAllowedMembers
Returns all members who can access the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of members assigned to the resource
- Throws:
InternalErrorException
-
getAllowedMembersNotExpiredInGroups
Returns all members who can access the resource and who are also valid in at least one group associated to the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of members assigned to the resource
- Throws:
InternalErrorException
-
getAllowedResources
Get all resources which have the member access on.- Parameters:
sess
-member
-- Returns:
- list of resources which have the member access on
- Throws:
InternalErrorException
-
getAllowedResources
Return all resources which are under the facility and has member of the user with status other than INVALID.- Parameters:
sess
-facility
-user
-- Returns:
- list of resources allowed for user (user has there member with status other than INVALID)
- Throws:
InternalErrorException
-
getAllowedUsers
Get all users, who can assess the resource.- Parameters:
sess
-resource
-- Returns:
- list of users
- Throws:
InternalErrorException
-
getAllowedUsersNotExpiredInGroups
Get all users, who can assess the resource and who are not expired in at least one group associated to the resource.- Parameters:
sess
-resource
-- Returns:
- list of users
- Throws:
InternalErrorException
-
getAssignedGroups
List all groups associated with the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of assigned group
- Throws:
InternalErrorException
-
getAssignedGroups
List all groups associated with the resource where Member is a member.- Parameters:
perunSession
-resource
-member
-- Returns:
- list of assigned groups
- Throws:
InternalErrorException
-
getAssignedMembers
Returns all members assigned to the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of members assigned to the resource
- Throws:
InternalErrorException
-
getAssignedMembersWithStatus
Returns members of groups assigned to resource with status of group-resource assignment.- Parameters:
sess
- perunSessionresource
- resource- Returns:
- list of members of groups assigned to given resource
-
getAssignedResources
List all resources to which the group is assigned.- Parameters:
perunSession
-group
-- Returns:
- list of assigned resources
- Throws:
InternalErrorException
-
getAssignedResources
Get all resources where the member is assigned.- Parameters:
sess
-member
-- Returns:
- Throws:
InternalErrorException
-
getAssignedResources
Get all resources where the member and the service are assigned.- Parameters:
sess
-member
-service
-- Returns:
- list of resources
- Throws:
InternalErrorException
-
getAssignedResources
Return List of assigned resources to user on the vo. If user is not member of Vo, return empty List;- Parameters:
sess
-user
-vo
-- Returns:
- return list of assigned resources or empty list if user is not member of Vo
- Throws:
InternalErrorException
-
getAssignedResourcesWithStatus
Returns all assigned resources where member is assigned through the groups.- Parameters:
sess
- perun sessionmember
- member- Returns:
- list of assigned resources
-
getAssignedRichMembers
Returns all members assigned to the resource as RichMembers.- Parameters:
perunSession
-resource
-- Returns:
- list of rich members assigned to the resource
- Throws:
InternalErrorException
-
getAssignedRichResources
List all rich resources associated with the group with facility property filled.- Parameters:
perunSession
-group
-- Returns:
- list of assigned rich resources
- Throws:
InternalErrorException
-
getAssignedRichResources
Get all rich resources where the member is assigned with facility property filled.- Parameters:
sess
-member
-- Returns:
- list of resources
- Throws:
InternalErrorException
-
getAssignedRichResources
Get all rich resources where the service and the member are assigned with facility property filled.- Parameters:
sess
-member
-service
-- Returns:
- list of resources
- Throws:
InternalErrorException
-
getAssignedServices
List all services associated with the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of assigned resources
- Throws:
InternalErrorException
-
getAssignedUsers
Returns all users assigned to the resource.- Parameters:
perunSession
-resource
-- Returns:
- list of users assigned to the resource
- Throws:
InternalErrorException
-
getAssociatedGroups
Return list of groups associated with the resource with specified member. Does not require ACTIVE group-resource status.- Parameters:
perunSession
-resource
-member
-- Returns:
- list of groups, which are associated with the resource with specified member
- Throws:
InternalErrorException
-
getAssociatedMembers
Returns all members who are associated with the resource. Does not require ACTIVE group-resource status or any specific member status.- Parameters:
sess
-resource
-- Returns:
- list of members
- Throws:
InternalErrorException
-
getAssociatedResources
List all resources associated with the group. Does not require ACTIVE group-resource status.- Parameters:
perunSession
-group
-- Returns:
- list of associated resources
- Throws:
InternalErrorException
-
getAssociatedResources
Returns all resources with which the member is associated through the groups. Does not require ACTIVE group-resource status.- Parameters:
sess
-member
-- Returns:
- list of resources
- Throws:
InternalErrorException
-
getAssociatedUsers
Returns all users who are associated with the defined resource. Does not require ACTIVE group-resource status.- Parameters:
sess
-resource
-- Returns:
- list of users
- Throws:
InternalErrorException
-
getBan
Get specific resource ban.- Parameters:
sess
-memberId
- the member idresourceId
- the resource id- Returns:
- specific resource ban
- Throws:
InternalErrorException
BanNotExistsException
-
getBanById
Get Ban for member on resource by it's id- Parameters:
sess
-banId
- the ban id- Returns:
- resource ban by it's id
- Throws:
InternalErrorException
BanNotExistsException
-
getBansForMember
Get all resources bans for member.- Parameters:
sess
-memberId
- the member id- Returns:
- list of bans for member on any resource
- Throws:
InternalErrorException
-
getBansForResource
Get all members bans for resource- Parameters:
sess
-resourceId
- the resource id- Returns:
- list of all members bans on resource
- Throws:
InternalErrorException
-
getEnrichedBansForResource
List<EnrichedBanOnResource> getEnrichedBansForResource(PerunSession sess, Resource resource, List<String> attrNames) throws AttributeNotExistsException Get all enriched bans for members on the resource with user and member attributes- Parameters:
sess
-resource
- resourceattrNames
- names of attributes- Returns:
- list of all enriched bans on resource
- Throws:
AttributeNotExistsException
-
getEnrichedBansForUser
List<EnrichedBanOnResource> getEnrichedBansForUser(PerunSession sess, User user, List<String> attrNames) throws AttributeNotExistsException Get enriched bans for user on all resources where user is assigned with user and member attributes- Parameters:
sess
-user
- userattrNames
- names of attributes- Returns:
- list of all user's bans on resources
- Throws:
AttributeNotExistsException
-
getEnrichedResourceById
EnrichedResource getEnrichedResourceById(PerunSession sess, int id, List<String> attrNames) throws ResourceNotExistsException Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned.- Parameters:
sess
- sessionid
- resource idattrNames
- names of attributes to return- Returns:
- resource for given id with desired attributes
- Throws:
ResourceNotExistsException
- if there is no resource with given id
-
getEnrichedRichResourcesForFacility
List<EnrichedResource> getEnrichedRichResourcesForFacility(PerunSession sess, Facility facility, List<String> attrNames) Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes.- Parameters:
sess
- sessionfacility
- facilityattrNames
- names of attributes to return- Returns:
- resources with desired attributes
-
getEnrichedRichResourcesForVo
List<EnrichedResource> getEnrichedRichResourcesForVo(PerunSession sess, Vo vo, List<String> attrNames) Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes.- Parameters:
sess
- sessionvo
- voattrNames
- names of attributes to return- Returns:
- resources with desired attributes
-
getFacility
Get facility which belongs to the concrete resource.- Parameters:
perunSession
-resource
-- Returns:
- facility belonging to the resource
- Throws:
InternalErrorException
-
getGroupAssignments
List<AssignedGroup> getGroupAssignments(PerunSession sess, Resource resource, List<String> attrNames) Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. If attrNames are null, all group attributes are returned.- Parameters:
sess
- sessionresource
- resourceattrNames
- names of attributes to return- Returns:
- list of assigned groups for given resource with specified attributes
-
getGroupResourceAssignments
List<GroupResourceAssignment> getGroupResourceAssignments(PerunSession sess, List<GroupResourceStatus> statuses) Lists all group-resource assignments with given statuses. If statuses are empty or null, lists assignments with all statuses.- Parameters:
sess
- sessionstatuses
- list of allowed statuses- Returns:
- list of group-resource assignments with given statuses
-
getMailingServiceRichResourcesWithMember
List<RichResource> getMailingServiceRichResourcesWithMember(PerunSession perunSession, Member member) Return all rich resources with mailing service(s) where given member is assigned.- Parameters:
perunSession
- sessionmember
- member- Returns:
- list of corresponding rich resources
-
getResourceAssignments
List<AssignedResource> getResourceAssignments(PerunSession sess, Group group, List<String> attrNames) Lists all of the resource assignments for the given group. Also, returns specified attributes and resource tags for the resources. If attrNames are null or empty, all resource attributes are returned.- Parameters:
sess
- sessiongroup
- groupattrNames
- names of attributes to return- Returns:
- list of assigned resources for given group with specified attributes and resource tags
-
getResourceById
Searches for the Resource with specified id.- Parameters:
perunSession
-id
-- Returns:
- Resource with specified id
- Throws:
InternalErrorException
ResourceNotExistsException
-
getResourceByName
Resource getResourceByName(PerunSession sess, Vo vo, Facility facility, String name) throws ResourceNotExistsException Return resource by its name.- Parameters:
sess
-vo
-facility
-name
-- Returns:
- resource
- Throws:
InternalErrorException
ResourceNotExistsException
-
getResources
Get all VO resources.- Parameters:
perunSession
-vo
-- Returns:
- list of resources
- Throws:
InternalErrorException
-
getResources
List<Resource> getResources(PerunSession sess, User user, List<Status> memberStatuses, List<MemberGroupStatus> memberGroupStatuses, List<GroupResourceStatus> groupResourceStatuses) Return all resources where user is assigned. Checks member's status in VO and group and status of group-resource assignment. If statuses are null or empty all statuses are used.- Parameters:
sess
-user
-memberStatuses
- allowed member's statuses in VOmemberGroupStatuses
- allowed member's statuses in groupgroupResourceStatuses
- allowed statuses of group-resource assignment- Returns:
- List of allowed resources for the user
- Throws:
InternalErrorException
-
getResources
Finds all resources.- Parameters:
sess
- session- Returns:
- list of all resources
- Throws:
InternalErrorException
- internal error
-
getResourcesByAttribute
List<Resource> getResourcesByAttribute(PerunSession sess, Attribute attribute) throws WrongAttributeAssignmentException Returns all resource which have set the attribute with the value. Searching only def and opt attributes.- Parameters:
sess
-attribute
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
getResourcesByIds
Searches for the Resources with specified ids.- Parameters:
perunSession
-ids
-- Returns:
- Resources with specified ids
- Throws:
InternalErrorException
-
getResourcesCount
Get all VO resources count.- Parameters:
perunSession
-vo
-- Returns:
- count fo vo resources
- Throws:
InternalErrorException
-
getResourcesCount
Get count of all resources.- Parameters:
perunSession
-- Returns:
- count of all resources
- Throws:
InternalErrorException
-
getResourcesWhereGroupIsAdmin
List<Resource> getResourcesWhereGroupIsAdmin(PerunSession sess, Facility facility, Vo vo, Group authorizedGroup) Return all resources for the facility and the vo where the group is authorized as resource manager.- Parameters:
sess
-facility
- the facility to which resources should be assigned tovo
- the vo to which resources should be assigned toauthorizedGroup
- group with resource manager role for all those resources- Returns:
- list of defined resources where groups has role resource manager
- Throws:
InternalErrorException
-
getResourcesWhereUserIsAdmin
Returns list of resources, where the user is an admin. Including resources, where the user is a VALID member of authorized group.- Parameters:
sess
-user
-- Returns:
- list of resources, where the user is an admin.
- Throws:
InternalErrorException
-
getResourcesWhereUserIsAdmin
List<Resource> getResourcesWhereUserIsAdmin(PerunSession sess, Facility facility, Vo vo, User authorizedUser) Return all resources for the facility and the vo where user is authorized as resource manager. Including resources, where the user is a VALID member of authorized group.- Parameters:
sess
-facility
- the facility to which resources should be assigned tovo
- the vo to which resources should be assigned toauthorizedUser
- user with resource manager role for all those resources- Returns:
- list of defined resources where user has role resource manager
- Throws:
InternalErrorException
-
getResourcesWhereUserIsAdmin
Return all resources for the vo where user is authorized as resource manager. Including resources, where the user is a VALID member of authorized group.- Parameters:
sess
-vo
- the vo to which resources should be assigned toauthorizedUser
- user with resource manager role for all those resources- Returns:
- list of defined resources where user has role resource manager
- Throws:
InternalErrorException
-
getRichAdmins
List<RichUser> getRichAdmins(PerunSession perunSession, Resource resource, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) throws UserNotExistsException Gets list of all richUser administrators of the Resource. If some group is administrator of the given resource, all VALID members are included in the list.Supported roles: ResourceAdmin, VOAdmin
If "onlyDirectAdmins" is "true", return only direct users of the group for supported role with specific attributes. If "allUserAttributes" is "true", do not specify attributes through list and return them all in objects richUser . Ignoring list of specific attributes.
- Parameters:
perunSession
-resource
-specificAttributes
- list of specified attributes which are needed in object richUserallUserAttributes
- if true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes)onlyDirectAdmins
- if true, get only direct user administrators (if false, get both direct and indirect)- Returns:
- list of RichUser administrators for the resource and supported role with attributes
- Throws:
InternalErrorException
UserNotExistsException
-
getRichResourceById
RichResource getRichResourceById(PerunSession perunSession, int id) throws ResourceNotExistsException Searches for the RichResource with specified id.- Parameters:
perunSession
-id
-- Returns:
- RichResource with specified id
- Throws:
InternalErrorException
ResourceNotExistsException
-
getRichResources
Get all VO rich resources with facility property filled.- Parameters:
perunSession
-vo
-- Returns:
- list of rich resources
- Throws:
InternalErrorException
-
getRichResourcesByIds
Searches for the RichResources with specified ids.- Parameters:
perunSession
-ids
-- Returns:
- RichResources with specified ids
- Throws:
InternalErrorException
-
getVo
Get Vo which is tied to specified resource.- Parameters:
perunSession
-resource
-- Returns:
- vo tied to specified resource
- Throws:
InternalErrorException
-
groupResourceAssignmentExists
Returns true if the group is assigned to the current resource with any status, false otherwise.- Parameters:
sess
-resource
-group
-- Returns:
- true if the group is assigned to the current resource.
- Throws:
InternalErrorException
-
isGroupAssigned
Returns true if the group is assigned to the current resource with ACTIVE status, false otherwise.- Parameters:
sess
-resource
-group
-- Returns:
- true if the group is assigned to the current resource with active status.
- Throws:
InternalErrorException
-
isGroupManuallyAssigned
Returns true if the group is assigned to the given resource manually, false otherwise.- Parameters:
sess
-group
-resource
-- Returns:
- true if the group is assigned to the given resource manually.
- Throws:
InternalErrorException
-
isUserAllowed
Returns true if the user is allowed to the current resource, false otherwise.- Parameters:
sess
-user
-resource
-- Returns:
- true if the user is allowed to the current resource.
- Throws:
InternalErrorException
-
isUserAssigned
Returns true if the user is assigned to the current resource, false otherwise.- Parameters:
sess
-user
-resource
-- Returns:
- true if the user is assigned to the current resource.
- Throws:
InternalErrorException
-
processGroupResourceActivationAsync
Asynchronously processes group-resource activation. Sets assignment status of given group and resource to ACTIVE. Check if attributes for each member from group are valid. Fill members' attributes with missing values. In case of error during activation, the group-resource assignment status is set to FAILED.- Parameters:
sess
- sessiongroup
- groupresource
- resource
-
removeAllExpiredBansOnResources
Remove all expired bans on resources to now date.Get all expired bans and remove them one by one with auditing process. This method is for purpose of removing expired bans using some cron tool.
- Parameters:
sess
-- Throws:
InternalErrorException
-
removeAllResourcesTagFromResource
Remove all existing Resource tags for specific resource.- Parameters:
perunSession
-resource
-- Throws:
InternalErrorException
-
removeAutomaticGroupFromResource
void removeAutomaticGroupFromResource(PerunSession perunSession, Group group, Resource resource, int sourceGroupId) throws GroupNotDefinedOnResourceException, GroupAlreadyRemovedFromResourceException Remove automatically assigned group from resource. After removing, check attributes and fix them if it is needed.- Parameters:
perunSession
-group
- the groupresource
- the resourcesourceGroupId
- id of a source group through which was the group automatically assigned- Throws:
InternalErrorException
GroupNotDefinedOnResourceException
- when there is no such automatic group-resource assignmentGroupAlreadyRemovedFromResourceException
- when the group was already removed
-
removeBan
Remove ban by id from resources bans.- Parameters:
sess
-banId
- id of specific ban- Throws:
InternalErrorException
BanNotExistsException
-
removeBan
Remove ban by member_id and facility_id- Parameters:
sess
-memberId
- the id of memberresourceId
- the id of resource- Throws:
InternalErrorException
BanNotExistsException
-
removeGroupFromResource
void removeGroupFromResource(PerunSession perunSession, Group group, Resource resource) throws GroupNotDefinedOnResourceException, GroupAlreadyRemovedFromResourceException Remove group from a resource. After removing, check attributes and fix them if it is needed.- Parameters:
perunSession
-group
-resource
-- Throws:
InternalErrorException
- Raise when group and resource not belong to the same VO or cant properly fix attributes of group's members after removing group from resource.ResourceNotExistsException
GroupNotDefinedOnResourceException
- Group was never assigned to this resourceGroupAlreadyRemovedFromResourceException
- there are 0 rows affected by deleting from DB
-
removeGroupFromResources
void removeGroupFromResources(PerunSession perunSession, Group group, List<Resource> resources) throws GroupNotDefinedOnResourceException, GroupAlreadyRemovedFromResourceException Remove group from resources. After removing, check attributes and fix them if it is needed.- Parameters:
perunSession
-group
- the groupresources
- list of resources- Throws:
InternalErrorException
GroupNotDefinedOnResourceException
GroupAlreadyRemovedFromResourceException
-
removeGroupsFromResource
void removeGroupsFromResource(PerunSession perunSession, List<Group> groups, Resource resource) throws GroupNotDefinedOnResourceException, GroupAlreadyRemovedFromResourceException Remove groups from a resource. After removing, check attributes and fix them if it is needed.- Parameters:
perunSession
-groups
- list of groupsresource
-- Throws:
InternalErrorException
GroupNotDefinedOnResourceException
GroupAlreadyRemovedFromResourceException
-
removeResourceSelfServiceGroup
void removeResourceSelfServiceGroup(PerunSession sess, Resource resource, Group group) throws GroupNotAdminException Unset ResourceSelfService role to given group for given resource.- Parameters:
sess
- sessionresource
- resourcegroup
- group- Throws:
GroupNotAdminException
- group did not have the roleInternalErrorException
- internal error
-
removeResourceSelfServiceUser
void removeResourceSelfServiceUser(PerunSession sess, Resource resource, User user) throws UserNotAdminException Unset ResourceSelfService role to given user for given resource.- Parameters:
sess
- sessionresource
- resourceuser
- user- Throws:
UserNotAdminException
- user did not have the roleInternalErrorException
- internal error
-
removeResourceTagFromResource
void removeResourceTagFromResource(PerunSession perunSession, ResourceTag resourceTag, Resource resource) throws ResourceTagNotAssignedException Remove specific ResourceTag from existing Resource.- Parameters:
perunSession
-resourceTag
-resource
-- Throws:
InternalErrorException
ResourceTagNotAssignedException
-
removeResourceTagsFromResource
void removeResourceTagsFromResource(PerunSession perunSession, List<ResourceTag> resourceTags, Resource resource) throws ResourceTagNotAssignedException Remove specific ResourceTags from existing Resource.- Parameters:
perunSession
-resourceTags
-resource
-- Throws:
InternalErrorException
ResourceTagNotAssignedException
-
removeService
void removeService(PerunSession perunSession, Resource resource, Service service) throws ServiceNotAssignedException Remove service from resource.- Parameters:
perunSession
-resource
-service
-- Throws:
InternalErrorException
ServiceNotAssignedException
-
removeServices
void removeServices(PerunSession perunSession, Resource resource, List<Service> services) throws ServiceNotAssignedException Remove services from resource.- Parameters:
perunSession
-resource
-services
-- Throws:
InternalErrorException
ServiceNotAssignedException
-
removeServicesPackage
void removeServicesPackage(PerunSession perunSession, Resource resource, ServicesPackage servicesPackage) Remove from resource all services from services package.- Parameters:
perunSession
-resource
-servicesPackage
-- Throws:
InternalErrorException
-
setBan
BanOnResource setBan(PerunSession sess, BanOnResource banOnresource) throws BanAlreadyExistsException Set ban for member on resource- Parameters:
sess
-banOnresource
- the ban- Returns:
- ban on resource
- Throws:
InternalErrorException
BanAlreadyExistsException
-
updateBan
Update description and validity timestamp of specific ban.- Parameters:
sess
-banOnResource
- ban to be updated- Returns:
- updated ban
- Throws:
InternalErrorException
-
updateResource
Resource updateResource(PerunSession perunSession, Resource resource) throws ResourceExistsException Updates Resource.- Parameters:
perunSession
-resource
-- Returns:
- returns updated Resource
- Throws:
InternalErrorException
ResourceExistsException
-
updateResourceTag
Update existing Resource tag.- Parameters:
perunSession
-resourceTag
-- Returns:
- updated ResourceTag
- Throws:
InternalErrorException
-