Package cz.metacentrum.perun.core.entry
Class FacilitiesManagerEntry
java.lang.Object
cz.metacentrum.perun.core.entry.FacilitiesManagerEntry
- All Implemented Interfaces:
FacilitiesManager
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdmin
(PerunSession sess, Facility facility, Group group) Adds group administrator to the Facility.void
addAdmin
(PerunSession sess, Facility facility, User user) Adds user administrator to the Facility.addHost
(PerunSession sess, Host host, Facility facility) Adds host to the Facility.addHosts
(PerunSession sess, Facility facility, List<String> hosts) Create hosts in Perun and add them to the Facility.addHosts
(PerunSession sess, List<Host> hosts, Facility facility) Adds hosts to the Facility.void
addOwner
(PerunSession sess, Facility facility, Owner owner) Add owner of the facilityvoid
addOwners
(PerunSession sess, Facility facility, List<Owner> owners) Add owners of the facilityvoid
assignSecurityTeam
(PerunSession sess, Facility facility, SecurityTeam securityTeam) Assign given security team to given facility (means the facility trusts the security team)void
copyAttributes
(PerunSession sess, Facility sourceFacility, Facility destinationFacility) Copy all attributes of the source facility to the destination facility.void
copyManagers
(PerunSession sess, Facility sourceFacility, Facility destinationFacility) Copy all managers(admins) of the source facility to the destination facility.void
copyOwners
(PerunSession sess, Facility sourceFacility, Facility destinationFacility) Copy all owners of the source facility to the destination facility.createFacility
(PerunSession sess, Facility facility) Store the facility.void
deleteFacility
(PerunSession sess, Facility facility, Boolean force) Delete the facility by id.getAdminGroups
(PerunSession sess, Facility facility) Gets list of all group administrators of the Facility.getAdmins
(PerunSession sess, Facility facility) Deprecated.getAdmins
(PerunSession perunSession, Facility facility, boolean onlyDirectAdmins) Gets list of all user administrators of the Facility.getAllowedGroups
(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned)getAllowedRichGroupsWithAttributes
(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService, List<String> attrNames) Get all RichGroups which can use this facility (Groups must be assigned to Resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned) We also retrieve attributes specified by attrNames for each returned RichGroup.getAllowedUsers
(PerunSession sess, Facility facility) Return all users who can use this facilitygetAllowedUsers
(PerunSession sess, Facility facility, Vo specificVo, Service specificService) Return all users who can use this facility specificVo and specificService can choose concrete users if specificVo, specificService or both are null, they do not specific (all possible results are returned)getAllowedVos
(PerunSession sess, Facility facility) Return all VO which can use this facility.getAssignedFacilities
(PerunSession sess, Group group) Get facilities which are assigned to Group (via resource).getAssignedFacilities
(PerunSession sess, Member member) Get facilities which have the member access on.getAssignedFacilities
(PerunSession sess, SecurityTeam securityTeam) Get facilities where security team is assigned.getAssignedFacilities
(PerunSession sess, Service service) Get facilities where the service is defined.getAssignedFacilities
(PerunSession sess, User user) Get facilities which have the user access on.getAssignedResources
(PerunSession sess, Facility facility) Returns all resources assigned to the facility.getAssignedResourcesByAssignedService
(PerunSession sess, Facility facility, Service service) Returns resources with specific service assigned to the facility.getAssignedRichResources
(PerunSession sess, Facility facility) Returns all rich resources assigned to the facility with VO property filledgetAssignedRichResources
(PerunSession sess, Facility facility, Service service) Returns all rich resources assigned to the facility and service with VO property filledgetAssignedSecurityTeams
(PerunSession sess, Facility facility) return assigned security teams for specific facilitygetAssignedUsers
(PerunSession sess, Facility facility) Returns list of Users, assigned with chosen Facility.getAssignedUsers
(PerunSession sess, Facility facility, Service service) Returns list of Users assigned with chosen Facility containing resources where service is assigned.getBan
(PerunSession sess, int userId, int faclityId) Get ban by userId and facilityId.getBanById
(PerunSession sess, int banId) Get Ban for user on facility by it's idgetBansForFacility
(PerunSession sess, int facilityId) Get all bans for users on the facilitygetBansForUser
(PerunSession sess, int userId) Get all bans for user on any facility.getDirectAdmins
(PerunSession sess, Facility facility) Deprecated.getDirectRichAdminsWithSpecificAttributes
(PerunSession perunSession, Facility facility, List<String> specificAttributes) Deprecated.getEnrichedBansForFacility
(PerunSession sess, int facilityId, List<String> attrNames) Get all enriched bans for users on the facility.getEnrichedBansForUser
(PerunSession sess, int userId, List<String> attrNames) Get all enriched bans on facility for user.Gets all enriched facilities user has access rights to.getEnrichedHosts
(PerunSession sess, Facility facility, List<String> attrNames) Return all EnrichedHosts of given facility.getFacilities
(PerunSession sess) List facilities by ACCESS RIGHTS: If User is: - PERUNADMIN : all facilities - FACILITYADMIN : only facilities where user is facility admingetFacilitiesByAttribute
(PerunSession sess, String attributeName, String attributeValue) Returns all facilities that have set the attribute 'attributeName' with the value 'attributeValue'.getFacilitiesByAttributeWithAttributes
(PerunSession sess, String searchAttributeName, String searchAttributeValue, List<String> attrNames) Searches (partially!) for facilities with the attribute 'searchAttributeName' and its value 'searchAttributeValue'.getFacilitiesByDestination
(PerunSession sess, String destination) Searches for the Facilities by theirs destination.getFacilitiesByHostName
(PerunSession sess, String hostname) Return all facilities where exists host with the specific hostnamegetFacilitiesByIds
(PerunSession sess, List<Integer> ids) Searches for the Facilities with specified ids.int
Get count of all facilities.Gets the facilitiesManagerBl for this instance.getFacilitiesWhereUserIsAdmin
(PerunSession sess, User user) Get all facilities where the user is admin.getFacilityById
(PerunSession sess, int id) Searches for the Facility with specified id.getFacilityByName
(PerunSession sess, String name) Searches the Facility by its name.getFacilityForHost
(PerunSession sess, Host host) Return facility which has the host.getHostById
(PerunSession sess, int hostId) Get the host by its ID.getHosts
(PerunSession sess, Facility facility) List hosts of Facility.getHostsByHostname
(PerunSession sess, String hostname) Get all hosts with this hostname (from all facilities).int
getHostsCount
(PerunSession sess, Facility facility) Count hosts of Facility.getOwnerFacilities
(PerunSession sess, Owner owner) Returns list of all facilities owned by the owner.getOwners
(PerunSession sess, Facility facility) Returns owners of the facility.getRichAdmins
(PerunSession sess, Facility facility) Deprecated.getRichAdmins
(PerunSession perunSession, Facility facility, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) Gets list of all richUser administrators of the Facility.getRichAdminsWithAttributes
(PerunSession sess, Facility facility) Deprecated.getRichAdminsWithSpecificAttributes
(PerunSession perunSession, Facility facility, List<String> specificAttributes) Deprecated.Get all possible rich Facilities with all their owners.void
removeAdmin
(PerunSession sess, Facility facility, Group group) Removes a group administrator from the Facility.void
removeAdmin
(PerunSession sess, Facility facility, User user) Removes a user administrator from the Facility.void
removeBan
(PerunSession sess, int banId) Remove existing ban by it's id.void
removeBan
(PerunSession sess, int userId, int facilityId) Remove existing ban by id of user and facility.void
removeHost
(PerunSession sess, Host host) Remove hosts from the Facility.void
removeHostByHostname
(PerunSession sess, String hostname) Remove host from the Facility based on hostname.void
removeHosts
(PerunSession sess, List<Host> hosts, Facility facility) Remove hosts from the Facility.void
removeOwner
(PerunSession sess, Facility facility, Owner owner) Remove owner of the facilityvoid
removeOwners
(PerunSession sess, Facility facility, List<Owner> owners) Remove owners of the facilityvoid
removeSecurityTeam
(PerunSession sess, Facility facility, SecurityTeam securityTeam) Remove (Unassign) given security team from given facilitysetBan
(PerunSession sess, BanOnFacility banOnFacility) Set ban for user on facility.void
setFacilitiesManagerBl
(FacilitiesManagerBl facilitiesManagerBl) Sets the facilitiesManagerBl for this instance.void
setOwners
(PerunSession sess, Facility facility, List<Owner> owners) Updates owners of facilityvoid
setPerunBl
(PerunBl perunBl) Sets the perunBl.updateBan
(PerunSession sess, BanOnFacility banOnFacility) Update existing ban (description and validation timestamp)updateFacility
(PerunSession sess, Facility facility) Updates facility.
-
Constructor Details
-
FacilitiesManagerEntry
-
FacilitiesManagerEntry
public FacilitiesManagerEntry()
-
-
Method Details
-
addAdmin
public void addAdmin(PerunSession sess, Facility facility, User user) throws FacilityNotExistsException, UserNotExistsException, PrivilegeException, AlreadyAdminException, RoleCannotBeManagedException, RoleCannotBeSetException Description copied from interface:FacilitiesManager
Adds user administrator to the Facility.- Specified by:
addAdmin
in interfaceFacilitiesManager
- Throws:
FacilityNotExistsException
UserNotExistsException
PrivilegeException
AlreadyAdminException
RoleCannotBeManagedException
RoleCannotBeSetException
-
addAdmin
public void addAdmin(PerunSession sess, Facility facility, Group group) throws FacilityNotExistsException, GroupNotExistsException, PrivilegeException, AlreadyAdminException, RoleCannotBeManagedException, RoleCannotBeSetException Description copied from interface:FacilitiesManager
Adds group administrator to the Facility.- Specified by:
addAdmin
in interfaceFacilitiesManager
- Parameters:
group
- that will become a Facility administrator- Throws:
FacilityNotExistsException
GroupNotExistsException
PrivilegeException
AlreadyAdminException
RoleCannotBeManagedException
RoleCannotBeSetException
-
addHost
public Host addHost(PerunSession sess, Host host, Facility facility) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Adds host to the Facility. Adds host only if host and destination with the same name doesn't exist or if privilege requirements are met.- Specified by:
addHost
in interfaceFacilitiesManager
- Returns:
- host
- Throws:
FacilityNotExistsException
PrivilegeException
-
addHosts
public List<Host> addHosts(PerunSession sess, List<Host> hosts, Facility facility) throws FacilityNotExistsException, PrivilegeException, HostExistsException Description copied from interface:FacilitiesManager
Adds hosts to the Facility. Adds hosts only if host and destination with the same name doesn't exist or if privilege requirements are met. Note: If you wish to add more hosts, it is recommended to prepare a Listof them so as there can be only one database call. - Specified by:
addHosts
in interfaceFacilitiesManager
- Parameters:
hosts
- ID of any host doesn't need to be filled. Hosts will be created.- Returns:
- Hosts with ID's set.
- Throws:
FacilityNotExistsException
PrivilegeException
HostExistsException
-
addHosts
public List<Host> addHosts(PerunSession sess, Facility facility, List<String> hosts) throws FacilityNotExistsException, PrivilegeException, HostExistsException, WrongPatternException Description copied from interface:FacilitiesManager
Create hosts in Perun and add them to the Facility. Adds hosts only if host and destination with the same name doesn't exist or if privilege requirements are met. Names of the hosts can be generative. The pattern is string with square brackets, e.g. "local[1-3]domain". Then the content of the brackets is distributed, so the list is [local1domain, local2domain, local3domain]. Multibrackets are aslo allowed. For example "a[00-01]b[90-91]c" generates [a00b90c, a00b91c, a01b90c, a01b91c].- Specified by:
addHosts
in interfaceFacilitiesManager
- Parameters:
hosts
- list of strings with names of hosts, the name can by generative- Returns:
- Hosts with ID's set.
- Throws:
WrongPatternException
- when syntax of any of the hostnames is wrongFacilityNotExistsException
PrivilegeException
HostExistsException
-
addOwner
public void addOwner(PerunSession sess, Facility facility, Owner owner) throws PrivilegeException, OwnerNotExistsException, FacilityNotExistsException, OwnerAlreadyAssignedException Description copied from interface:FacilitiesManager
Add owner of the facility- Specified by:
addOwner
in interfaceFacilitiesManager
- Throws:
PrivilegeException
OwnerNotExistsException
FacilityNotExistsException
OwnerAlreadyAssignedException
-
addOwners
public void addOwners(PerunSession sess, Facility facility, List<Owner> owners) throws PrivilegeException, OwnerNotExistsException, FacilityNotExistsException, OwnerAlreadyAssignedException Description copied from interface:FacilitiesManager
Add owners of the facility- Specified by:
addOwners
in interfaceFacilitiesManager
- Parameters:
sess
- perun sessionfacility
- facilityowners
- list of owners to be added- Throws:
PrivilegeException
- when the principal does not have sufficient rightsOwnerNotExistsException
- when owner does not existFacilityNotExistsException
- when facility does not existOwnerAlreadyAssignedException
- when owner was already assigned to the facility
-
assignSecurityTeam
public void assignSecurityTeam(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws PrivilegeException, SecurityTeamNotExistsException, FacilityNotExistsException, SecurityTeamAlreadyAssignedException Description copied from interface:FacilitiesManager
Assign given security team to given facility (means the facility trusts the security team)- Specified by:
assignSecurityTeam
in interfaceFacilitiesManager
- Throws:
PrivilegeException
- can do only PerunAdmin or FacilityAdmin of the facilitySecurityTeamNotExistsException
FacilityNotExistsException
SecurityTeamAlreadyAssignedException
-
copyAttributes
public void copyAttributes(PerunSession sess, Facility sourceFacility, Facility destinationFacility) throws PrivilegeException, FacilityNotExistsException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:FacilitiesManager
Copy all attributes of the source facility to the destination facility. The attributes, that are in the destination facility and aren't in the source facility, are retained. The common attributes are replaced with attributes from source facility.- Specified by:
copyAttributes
in interfaceFacilitiesManager
- Throws:
WrongAttributeAssignmentException
- if there is no facility attributeWrongAttributeValueException
- if the attribute value is illegalWrongReferenceAttributeValueException
- if the attribute value is illegalPrivilegeException
FacilityNotExistsException
-
copyManagers
public void copyManagers(PerunSession sess, Facility sourceFacility, Facility destinationFacility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Copy all managers(admins) of the source facility to the destination facility. The admins, that are in the destination facility and aren't in the source facility, are retained. The common admins are also retained in destination facility.- Specified by:
copyManagers
in interfaceFacilitiesManager
- Throws:
PrivilegeException
FacilityNotExistsException
-
copyOwners
public void copyOwners(PerunSession sess, Facility sourceFacility, Facility destinationFacility) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Copy all owners of the source facility to the destination facility. The owners, that are in the destination facility and aren't in the source facility, are retained. The common owners are replaced with owners from source facility.- Specified by:
copyOwners
in interfaceFacilitiesManager
- Throws:
FacilityNotExistsException
PrivilegeException
-
createFacility
public Facility createFacility(PerunSession sess, Facility facility) throws PrivilegeException, FacilityExistsException, ConsentHubExistsException Description copied from interface:FacilitiesManager
Store the facility.- Specified by:
createFacility
in interfaceFacilitiesManager
- Throws:
PrivilegeException
FacilityExistsException
ConsentHubExistsException
-
deleteFacility
public void deleteFacility(PerunSession sess, Facility facility, Boolean force) throws RelationExistsException, FacilityNotExistsException, PrivilegeException, FacilityAlreadyRemovedException, HostAlreadyRemovedException, ResourceAlreadyRemovedException, GroupAlreadyRemovedFromResourceException Description copied from interface:FacilitiesManager
Delete the facility by id.- Specified by:
deleteFacility
in interfaceFacilitiesManager
- Throws:
FacilityAlreadyRemovedException
- if 0 rows affected by delete from DBHostAlreadyRemovedException
- if there is at least 1 hosts not affected by deleting from DBResourceAlreadyRemovedException
- if there is at least 1 resource not affected by deleting from DBGroupAlreadyRemovedFromResourceException
- if there is at least 1 group on any resource affected by removing from DBRelationExistsException
FacilityNotExistsException
PrivilegeException
-
getAdminGroups
public List<Group> getAdminGroups(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Gets list of all group administrators of the Facility.- Specified by:
getAdminGroups
in interfaceFacilitiesManager
- Returns:
- list of Group that are admins in the facility.
- Throws:
FacilityNotExistsException
PrivilegeException
-
getAdmins
public List<User> getAdmins(PerunSession perunSession, Facility facility, boolean onlyDirectAdmins) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Gets list of all user administrators of the Facility. If some group is administrator of the given group, all VALID members are included in the list.If onlyDirectAdmins is true, return only direct users of the group for supported role.
Supported roles: FacilityAdmin
- Specified by:
getAdmins
in interfaceFacilitiesManager
- Parameters:
onlyDirectAdmins
- if true, get only direct user administrators (if false, get both direct and indirect)- Returns:
- list of all user administrators of the given facility for supported role
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAdmins
@Deprecated public List<User> getAdmins(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Deprecated.Description copied from interface:FacilitiesManager
Gets list of all user administrators of the Facility. If some group is administrator of the given group, all members are included in the list.- Specified by:
getAdmins
in interfaceFacilitiesManager
- Returns:
- list of Users who are admins in the facility.
- Throws:
FacilityNotExistsException
PrivilegeException
-
getAllowedGroups
public List<Group> getAllowedGroups(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException, VoNotExistsException Description copied from interface:FacilitiesManager
Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned)- Specified by:
getAllowedGroups
in interfaceFacilitiesManager
- Parameters:
facility
- searching for this facilityspecificVo
- specific only those results which are in specific VO (with null, all results)specificService
- specific only those results, which have resource with assigned specific service (if null, all results)- Returns:
- list of allowed groups
- Throws:
FacilityNotExistsException
- if facility not exist, return this exceptionServiceNotExistsException
- if service is not null and not existVoNotExistsException
- if vo is not null and not existPrivilegeException
-
getAllowedRichGroupsWithAttributes
public List<RichGroup> getAllowedRichGroupsWithAttributes(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService, List<String> attrNames) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException, VoNotExistsException Description copied from interface:FacilitiesManager
Get all RichGroups which can use this facility (Groups must be assigned to Resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned) We also retrieve attributes specified by attrNames for each returned RichGroup.- Specified by:
getAllowedRichGroupsWithAttributes
in interfaceFacilitiesManager
- Parameters:
facility
- searching for this facilityspecificVo
- specific only those results which are in specific VO (with null, all results)specificService
- specific only those results, which have resource with assigned specific service (if null, all results)attrNames
- with each returned RichGroup we get also attributes specified by this list- Returns:
- list of allowed groups
- Throws:
FacilityNotExistsException
- if facility not exist, return this exceptionServiceNotExistsException
- if service is not null and not existVoNotExistsException
- if vo is not null and not existPrivilegeException
-
getAllowedUsers
public List<User> getAllowedUsers(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Return all users who can use this facility- Specified by:
getAllowedUsers
in interfaceFacilitiesManager
- Returns:
- list of users
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAllowedUsers
public List<User> getAllowedUsers(PerunSession sess, Facility facility, Vo specificVo, Service specificService) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException, VoNotExistsException Description copied from interface:FacilitiesManager
Return all users who can use this facility specificVo and specificService can choose concrete users if specificVo, specificService or both are null, they do not specific (all possible results are returned)- Specified by:
getAllowedUsers
in interfaceFacilitiesManager
- Parameters:
specificVo
- specific only those results which are in specific VO (with null, all results)specificService
- specific only those results, which have resource with assigned specific service (if null, all results)- Returns:
- list of users
- Throws:
ServiceNotExistsException
- if service is not null and not existVoNotExistsException
- if vo is not null and not existPrivilegeException
FacilityNotExistsException
-
getAllowedVos
public List<Vo> getAllowedVos(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Return all VO which can use this facility. (VO muset have the resource which belongs to this facility)- Specified by:
getAllowedVos
in interfaceFacilitiesManager
- Returns:
- list of Vos
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAssignedFacilities
public List<Facility> getAssignedFacilities(PerunSession sess, Group group) throws PrivilegeException, GroupNotExistsException Description copied from interface:FacilitiesManager
Get facilities which are assigned to Group (via resource).- Specified by:
getAssignedFacilities
in interfaceFacilitiesManager
- Throws:
PrivilegeException
GroupNotExistsException
-
getAssignedFacilities
public List<Facility> getAssignedFacilities(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Description copied from interface:FacilitiesManager
Get facilities which have the member access on.- Specified by:
getAssignedFacilities
in interfaceFacilitiesManager
- Throws:
PrivilegeException
MemberNotExistsException
-
getAssignedFacilities
public List<Facility> getAssignedFacilities(PerunSession sess, User user) throws PrivilegeException, UserNotExistsException Description copied from interface:FacilitiesManager
Get facilities which have the user access on.- Specified by:
getAssignedFacilities
in interfaceFacilitiesManager
- Throws:
PrivilegeException
UserNotExistsException
-
getAssignedFacilities
public List<Facility> getAssignedFacilities(PerunSession sess, Service service) throws PrivilegeException, ServiceNotExistsException Description copied from interface:FacilitiesManager
Get facilities where the service is defined.- Specified by:
getAssignedFacilities
in interfaceFacilitiesManager
- Throws:
PrivilegeException
ServiceNotExistsException
-
getAssignedFacilities
public List<Facility> getAssignedFacilities(PerunSession sess, SecurityTeam securityTeam) throws PrivilegeException, SecurityTeamNotExistsException Description copied from interface:FacilitiesManager
Get facilities where security team is assigned.- Specified by:
getAssignedFacilities
in interfaceFacilitiesManager
- Throws:
PrivilegeException
SecurityTeamNotExistsException
-
getAssignedResources
public List<Resource> getAssignedResources(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Returns all resources assigned to the facility.- Specified by:
getAssignedResources
in interfaceFacilitiesManager
- Returns:
- list of resources assigned to the facility
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAssignedResourcesByAssignedService
public List<Resource> getAssignedResourcesByAssignedService(PerunSession sess, Facility facility, Service service) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException Description copied from interface:FacilitiesManager
Returns resources with specific service assigned to the facility.- Specified by:
getAssignedResourcesByAssignedService
in interfaceFacilitiesManager
- Parameters:
sess
- perun sessionfacility
- facilityservice
- specific only those results, which have resource with assigned specific service- Returns:
- list of resources assigned to the facility by specific service
- Throws:
FacilityNotExistsException
- if facility does not existServiceNotExistsException
- if service does not existPrivilegeException
-
getAssignedRichResources
public List<RichResource> getAssignedRichResources(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Returns all rich resources assigned to the facility with VO property filled- Specified by:
getAssignedRichResources
in interfaceFacilitiesManager
- Returns:
- list of rich resources assigned to the facility
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAssignedRichResources
public List<RichResource> getAssignedRichResources(PerunSession sess, Facility facility, Service service) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException Description copied from interface:FacilitiesManager
Returns all rich resources assigned to the facility and service with VO property filled- Specified by:
getAssignedRichResources
in interfaceFacilitiesManager
- Returns:
- list of rich resources assigned to the facility and service
- Throws:
PrivilegeException
FacilityNotExistsException
ServiceNotExistsException
-
getAssignedSecurityTeams
public List<SecurityTeam> getAssignedSecurityTeams(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
return assigned security teams for specific facility- Specified by:
getAssignedSecurityTeams
in interfaceFacilitiesManager
- Returns:
- assigned security teams fot given facility
- Throws:
PrivilegeException
- can do only PerunAdmin or FacilityAdmin of the facilityFacilityNotExistsException
-
getAssignedUsers
public List<User> getAssignedUsers(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Returns list of Users, assigned with chosen Facility.- Specified by:
getAssignedUsers
in interfaceFacilitiesManager
- Returns:
- list of users
- Throws:
PrivilegeException
FacilityNotExistsException
-
getAssignedUsers
public List<User> getAssignedUsers(PerunSession sess, Facility facility, Service service) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException Description copied from interface:FacilitiesManager
Returns list of Users assigned with chosen Facility containing resources where service is assigned.- Specified by:
getAssignedUsers
in interfaceFacilitiesManager
- Returns:
- list of users
- Throws:
PrivilegeException
FacilityNotExistsException
ServiceNotExistsException
-
getBan
public BanOnFacility getBan(PerunSession sess, int userId, int faclityId) throws BanNotExistsException, PrivilegeException, UserNotExistsException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Get ban by userId and facilityId.- Specified by:
getBan
in interfaceFacilitiesManager
- Parameters:
userId
- the id of userfaclityId
- the id of facility- Returns:
- specific ban for user on facility
- Throws:
BanNotExistsException
PrivilegeException
UserNotExistsException
FacilityNotExistsException
-
getBanById
public BanOnFacility getBanById(PerunSession sess, int banId) throws BanNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Get Ban for user on facility by it's id- Specified by:
getBanById
in interfaceFacilitiesManager
- Parameters:
banId
- the id of ban- Returns:
- facility ban by it's id
- Throws:
BanNotExistsException
PrivilegeException
-
getBansForFacility
public List<BanOnFacility> getBansForFacility(PerunSession sess, int facilityId) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Get all bans for users on the facility- Specified by:
getBansForFacility
in interfaceFacilitiesManager
- Parameters:
facilityId
- the id of facility- Returns:
- list of bans for all users on the facility
- Throws:
PrivilegeException
FacilityNotExistsException
-
getBansForUser
public List<BanOnFacility> getBansForUser(PerunSession sess, int userId) throws UserNotExistsException Description copied from interface:FacilitiesManager
Get all bans for user on any facility.- Specified by:
getBansForUser
in interfaceFacilitiesManager
- Parameters:
userId
- the id of user- Returns:
- list of bans for user on any facility
- Throws:
UserNotExistsException
-
getDirectAdmins
@Deprecated public List<User> getDirectAdmins(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Deprecated.Description copied from interface:FacilitiesManager
Gets list of direct user administrators of the Facility. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.- Specified by:
getDirectAdmins
in interfaceFacilitiesManager
- Throws:
FacilityNotExistsException
PrivilegeException
-
getDirectRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getDirectRichAdminsWithSpecificAttributes(PerunSession perunSession, Facility facility, List<String> specificAttributes) throws PrivilegeException, FacilityNotExistsException Deprecated.Description copied from interface:FacilitiesManager
Get list of Facility administrators, which are assigned directly (not by group membership), with specific attributes. From list of specificAttributes get all Users Attributes and find those for every RichAdmin (only, other attributes are not searched)- Specified by:
getDirectRichAdminsWithSpecificAttributes
in interfaceFacilitiesManager
- Returns:
- list of RichUsers with specific attributes.
- Throws:
PrivilegeException
FacilityNotExistsException
-
getEnrichedBansForFacility
public List<EnrichedBanOnFacility> getEnrichedBansForFacility(PerunSession sess, int facilityId, List<String> attrNames) throws PrivilegeException, FacilityNotExistsException, AttributeNotExistsException Description copied from interface:FacilitiesManager
Get all enriched bans for users on the facility.- Specified by:
getEnrichedBansForFacility
in interfaceFacilitiesManager
- Parameters:
sess
-facilityId
- id of the facilityattrNames
- list of attribute names, returns all user attributes if null or empty- Returns:
- list of enriched bans on facility
- Throws:
PrivilegeException
FacilityNotExistsException
AttributeNotExistsException
-
getEnrichedBansForUser
public List<EnrichedBanOnFacility> getEnrichedBansForUser(PerunSession sess, int userId, List<String> attrNames) throws PrivilegeException, UserNotExistsException, AttributeNotExistsException Description copied from interface:FacilitiesManager
Get all enriched bans on facility for user.- Specified by:
getEnrichedBansForUser
in interfaceFacilitiesManager
- Parameters:
sess
-userId
- id of userattrNames
- list of attributes names, returns all user/member attributes if null or empty- Returns:
- list of user's enriched bans on assigned facilities
- Throws:
PrivilegeException
UserNotExistsException
AttributeNotExistsException
-
getEnrichedFacilities
Description copied from interface:FacilitiesManager
Gets all enriched facilities user has access rights to. If User is: - PERUNADMIN : all facilities - FACILITYADMIN : only facilities where user is facility admin - FACILITYOBSERVER: only facilities where user is facility observer- Specified by:
getEnrichedFacilities
in interfaceFacilitiesManager
- Parameters:
sess
-- Returns:
- List of all EnrichedFacilities
- Throws:
PrivilegeException
- insufficient permissions
-
getEnrichedHosts
public List<EnrichedHost> getEnrichedHosts(PerunSession sess, Facility facility, List<String> attrNames) throws AttributeNotExistsException, FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Return all EnrichedHosts of given facility. That is host with attributes given by attrNames.- Specified by:
getEnrichedHosts
in interfaceFacilitiesManager
- Parameters:
sess
- perun sessionfacility
- facilityattrNames
- attribute names- Returns:
- list of enriched hosts
- Throws:
AttributeNotExistsException
- if some attribute does not existFacilityNotExistsException
- if facility does not existPrivilegeException
- if user has insufficient permissions
-
getFacilities
Description copied from interface:FacilitiesManager
List facilities by ACCESS RIGHTS: If User is: - PERUNADMIN : all facilities - FACILITYADMIN : only facilities where user is facility admin- Specified by:
getFacilities
in interfaceFacilitiesManager
- Returns:
- List of all Facilities within the Perun
- Throws:
PrivilegeException
-
getFacilitiesByAttribute
public List<Facility> getFacilitiesByAttribute(PerunSession sess, String attributeName, String attributeValue) throws PrivilegeException, AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:FacilitiesManager
Returns all facilities that have set the attribute 'attributeName' with the value 'attributeValue'. Searching only def and opt attributes. Large attributes are not supported.- Specified by:
getFacilitiesByAttribute
in interfaceFacilitiesManager
- Parameters:
attributeName
- name of the attributeattributeValue
- value of the attribute- Returns:
- list of facilities
- Throws:
PrivilegeException
AttributeNotExistsException
WrongAttributeAssignmentException
-
getFacilitiesByAttributeWithAttributes
public List<FacilityWithAttributes> getFacilitiesByAttributeWithAttributes(PerunSession sess, String searchAttributeName, String searchAttributeValue, List<String> attrNames) throws PrivilegeException, AttributeNotExistsException Description copied from interface:FacilitiesManager
Searches (partially!) for facilities with the attribute 'searchAttributeName' and its value 'searchAttributeValue'. Found Facilities are returned along with attributes listed in 'attrNames'.- Specified by:
getFacilitiesByAttributeWithAttributes
in interfaceFacilitiesManager
- Parameters:
sess
-searchAttributeName
- name of the attribute to search bysearchAttributeValue
- value to search forattrNames
- names of attributes to return with facilities- Returns:
- list of facilities with attributes
- Throws:
PrivilegeException
AttributeNotExistsException
- when the attribute to search by does not exist
-
getFacilitiesByDestination
public List<Facility> getFacilitiesByDestination(PerunSession sess, String destination) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Searches for the Facilities by theirs destination.- Specified by:
getFacilitiesByDestination
in interfaceFacilitiesManager
- Returns:
- Facilities with specified name
- Throws:
FacilityNotExistsException
- //FIXME proc tato vyjimka?PrivilegeException
-
getFacilitiesByHostName
Description copied from interface:FacilitiesManager
Return all facilities where exists host with the specific hostname- Specified by:
getFacilitiesByHostName
in interfaceFacilitiesManager
- Parameters:
hostname
- specific hostname
-
getFacilitiesByIds
public List<Facility> getFacilitiesByIds(PerunSession sess, List<Integer> ids) throws PrivilegeException Description copied from interface:FacilitiesManager
Searches for the Facilities with specified ids.- Specified by:
getFacilitiesByIds
in interfaceFacilitiesManager
- Parameters:
sess
-ids
-- Returns:
- list of Facilities with specified ids
- Throws:
PrivilegeException
-
getFacilitiesCount
Description copied from interface:FacilitiesManager
Get count of all facilities.- Specified by:
getFacilitiesCount
in interfaceFacilitiesManager
- Returns:
- count of all facilities
-
getFacilitiesManagerBl
Gets the facilitiesManagerBl for this instance.- Returns:
- The facilitiesManagerBl.
-
getFacilitiesManagerImpl
-
getFacilitiesWhereUserIsAdmin
public List<Facility> getFacilitiesWhereUserIsAdmin(PerunSession sess, User user) throws UserNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Get all facilities where the user is admin. Including facilities, where the user is a VALID member of authorized group.- Specified by:
getFacilitiesWhereUserIsAdmin
in interfaceFacilitiesManager
- Returns:
- list of Facilities, where the user is an admin.
- Throws:
UserNotExistsException
PrivilegeException
-
getFacilityById
public Facility getFacilityById(PerunSession sess, int id) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Searches for the Facility with specified id.- Specified by:
getFacilityById
in interfaceFacilitiesManager
- Returns:
- Facility with specified id
- Throws:
FacilityNotExistsException
PrivilegeException
-
getFacilityByName
public Facility getFacilityByName(PerunSession sess, String name) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Searches the Facility by its name.- Specified by:
getFacilityByName
in interfaceFacilitiesManager
- Returns:
- Facility with specified name
- Throws:
FacilityNotExistsException
PrivilegeException
-
getFacilityForHost
public Facility getFacilityForHost(PerunSession sess, Host host) throws PrivilegeException, HostNotExistsException Description copied from interface:FacilitiesManager
Return facility which has the host.- Specified by:
getFacilityForHost
in interfaceFacilitiesManager
- Returns:
- facility
- Throws:
PrivilegeException
HostNotExistsException
-
getHostById
public Host getHostById(PerunSession sess, int hostId) throws HostNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Get the host by its ID.- Specified by:
getHostById
in interfaceFacilitiesManager
- Returns:
- host
- Throws:
HostNotExistsException
PrivilegeException
-
getHosts
public List<Host> getHosts(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
List hosts of Facility.- Specified by:
getHosts
in interfaceFacilitiesManager
- Returns:
- hosts
- Throws:
FacilityNotExistsException
PrivilegeException
-
getHostsByHostname
Description copied from interface:FacilitiesManager
Get all hosts with this hostname (from all facilities).Facility Admin get only those which are from his facilities.
- Specified by:
getHostsByHostname
in interfaceFacilitiesManager
- Returns:
- list of hosts by hostname
- Throws:
PrivilegeException
-
getHostsCount
public int getHostsCount(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Count hosts of Facility.- Specified by:
getHostsCount
in interfaceFacilitiesManager
- Returns:
- the number of hosts present in the facility
- Throws:
FacilityNotExistsException
PrivilegeException
-
getOwnerFacilities
public List<Facility> getOwnerFacilities(PerunSession sess, Owner owner) throws OwnerNotExistsException, PrivilegeException Description copied from interface:FacilitiesManager
Returns list of all facilities owned by the owner.- Specified by:
getOwnerFacilities
in interfaceFacilitiesManager
- Returns:
- list of facilities owned by the owner
- Throws:
OwnerNotExistsException
PrivilegeException
-
getOwners
public List<Owner> getOwners(PerunSession sess, Facility facility) throws PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Returns owners of the facility.- Specified by:
getOwners
in interfaceFacilitiesManager
- Returns:
- owners of specified facility
- Throws:
PrivilegeException
FacilityNotExistsException
-
getPerunBl
-
getRichAdmins
public List<RichUser> getRichAdmins(PerunSession perunSession, Facility facility, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) throws UserNotExistsException, PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Gets list of all richUser administrators of the Facility. If some group is administrator of the given group, all VALID members are included in the list.Supported roles: FacilityAdmin
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.
- Specified by:
getRichAdmins
in interfaceFacilitiesManager
- Parameters:
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 facility and supported role with attributes
- Throws:
UserNotExistsException
PrivilegeException
FacilityNotExistsException
-
getRichAdmins
@Deprecated public List<RichUser> getRichAdmins(PerunSession sess, Facility facility) throws FacilityNotExistsException, PrivilegeException Deprecated.Description copied from interface:FacilitiesManager
Get all Facility admins without attributes.- Specified by:
getRichAdmins
in interfaceFacilitiesManager
- Returns:
- return list of RichUsers without attributes.
- Throws:
FacilityNotExistsException
PrivilegeException
-
getRichAdminsWithAttributes
@Deprecated public List<RichUser> getRichAdminsWithAttributes(PerunSession sess, Facility facility) throws UserNotExistsException, FacilityNotExistsException, PrivilegeException Deprecated.Description copied from interface:FacilitiesManager
Get all Facility admins with attributes.- Specified by:
getRichAdminsWithAttributes
in interfaceFacilitiesManager
- Returns:
- list of RichUsers who are admins in the facility WITH ATTRIBUTES.
- Throws:
UserNotExistsException
FacilityNotExistsException
PrivilegeException
-
getRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getRichAdminsWithSpecificAttributes(PerunSession perunSession, Facility facility, List<String> specificAttributes) throws PrivilegeException, FacilityNotExistsException Deprecated.Description copied from interface:FacilitiesManager
Get list of Facility administrators with specific attributes. From list of specificAttributes get all Users Attributes and find those for every RichAdmin (only, other attributes are not searched)- Specified by:
getRichAdminsWithSpecificAttributes
in interfaceFacilitiesManager
- Returns:
- list of RichUsers with specific attributes.
- Throws:
PrivilegeException
FacilityNotExistsException
-
getRichFacilities
Description copied from interface:FacilitiesManager
Get all possible rich Facilities with all their owners. For PerunAdmin get All richFacilities. For FacilityAdmin get only richFacilities under his administration.- Specified by:
getRichFacilities
in interfaceFacilitiesManager
- Returns:
- list of RichFacilities with owners
- Throws:
PrivilegeException
-
removeAdmin
public void removeAdmin(PerunSession sess, Facility facility, User user) throws FacilityNotExistsException, UserNotExistsException, PrivilegeException, UserNotAdminException, RoleCannotBeManagedException Description copied from interface:FacilitiesManager
Removes a user administrator from the Facility.- Specified by:
removeAdmin
in interfaceFacilitiesManager
- Throws:
FacilityNotExistsException
UserNotExistsException
PrivilegeException
UserNotAdminException
RoleCannotBeManagedException
-
removeAdmin
public void removeAdmin(PerunSession sess, Facility facility, Group group) throws FacilityNotExistsException, GroupNotExistsException, PrivilegeException, GroupNotAdminException, RoleCannotBeManagedException Description copied from interface:FacilitiesManager
Removes a group administrator from the Facility.- Specified by:
removeAdmin
in interfaceFacilitiesManager
- Parameters:
group
- group that will lose a Facility administrator role- Throws:
FacilityNotExistsException
GroupNotExistsException
PrivilegeException
GroupNotAdminException
RoleCannotBeManagedException
-
removeBan
public void removeBan(PerunSession sess, int banId) throws PrivilegeException, BanNotExistsException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Remove existing ban by it's id.- Specified by:
removeBan
in interfaceFacilitiesManager
- Parameters:
banId
- the id of ban- Throws:
PrivilegeException
BanNotExistsException
FacilityNotExistsException
-
removeBan
public void removeBan(PerunSession sess, int userId, int facilityId) throws BanNotExistsException, PrivilegeException, FacilityNotExistsException Description copied from interface:FacilitiesManager
Remove existing ban by id of user and facility.- Specified by:
removeBan
in interfaceFacilitiesManager
- Parameters:
userId
- the id of userfacilityId
- the id of facility- Throws:
BanNotExistsException
PrivilegeException
FacilityNotExistsException
-
removeHost
public void removeHost(PerunSession sess, Host host) throws HostNotExistsException, PrivilegeException, HostAlreadyRemovedException Description copied from interface:FacilitiesManager
Remove hosts from the Facility.- Specified by:
removeHost
in interfaceFacilitiesManager
- Throws:
HostAlreadyRemovedException
- if there are 0 rows affected by deleting from DBHostNotExistsException
PrivilegeException
-
removeHostByHostname
public void removeHostByHostname(PerunSession sess, String hostname) throws HostNotExistsException, HostAlreadyRemovedException, PrivilegeException Description copied from interface:FacilitiesManager
Remove host from the Facility based on hostname. If there is ambiguity, method throws exception and no host is removed.- Specified by:
removeHostByHostname
in interfaceFacilitiesManager
- Throws:
HostNotExistsException
- if there is ambiguity in host to removeHostAlreadyRemovedException
- if there are 0 rows affected by deleting from DBPrivilegeException
-
removeHosts
public void removeHosts(PerunSession sess, List<Host> hosts, Facility facility) throws FacilityNotExistsException, PrivilegeException, HostAlreadyRemovedException Description copied from interface:FacilitiesManager
Remove hosts from the Facility.- Specified by:
removeHosts
in interfaceFacilitiesManager
- Throws:
HostAlreadyRemovedException
- if there is at least 1 host not affected by deleting from DBFacilityNotExistsException
PrivilegeException
-
removeOwner
public void removeOwner(PerunSession sess, Facility facility, Owner owner) throws PrivilegeException, OwnerNotExistsException, FacilityNotExistsException, OwnerAlreadyRemovedException Description copied from interface:FacilitiesManager
Remove owner of the facility- Specified by:
removeOwner
in interfaceFacilitiesManager
- Throws:
PrivilegeException
OwnerNotExistsException
FacilityNotExistsException
OwnerAlreadyRemovedException
-
removeOwners
public void removeOwners(PerunSession sess, Facility facility, List<Owner> owners) throws PrivilegeException, OwnerNotExistsException, FacilityNotExistsException, OwnerAlreadyRemovedException Description copied from interface:FacilitiesManager
Remove owners of the facility- Specified by:
removeOwners
in interfaceFacilitiesManager
- Parameters:
sess
- perun sessionfacility
- facilityowners
- list of owners to be removed- Throws:
PrivilegeException
- when the principal does not have sufficient rightsOwnerNotExistsException
- when owner does not existFacilityNotExistsException
- when facility does not existOwnerAlreadyRemovedException
- when owner was already removed from the facility
-
removeSecurityTeam
public void removeSecurityTeam(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws PrivilegeException, FacilityNotExistsException, SecurityTeamNotExistsException, SecurityTeamNotAssignedException Description copied from interface:FacilitiesManager
Remove (Unassign) given security team from given facility- Specified by:
removeSecurityTeam
in interfaceFacilitiesManager
- Throws:
PrivilegeException
- can do only PerunAdmin or FacilityAdmin of the facilityFacilityNotExistsException
SecurityTeamNotExistsException
SecurityTeamNotAssignedException
-
setBan
public BanOnFacility setBan(PerunSession sess, BanOnFacility banOnFacility) throws PrivilegeException, BanAlreadyExistsException, FacilityNotExistsException, UserNotExistsException Description copied from interface:FacilitiesManager
Set ban for user on facility.- Specified by:
setBan
in interfaceFacilitiesManager
- Parameters:
banOnFacility
- the ban- Returns:
- ban on facility
- Throws:
PrivilegeException
BanAlreadyExistsException
FacilityNotExistsException
UserNotExistsException
-
setFacilitiesManagerBl
Sets the facilitiesManagerBl for this instance.- Parameters:
facilitiesManagerBl
- The facilitiesManagerBl.
-
setOwners
public void setOwners(PerunSession sess, Facility facility, List<Owner> owners) throws PrivilegeException, FacilityNotExistsException, OwnerNotExistsException Description copied from interface:FacilitiesManager
Updates owners of facility- Specified by:
setOwners
in interfaceFacilitiesManager
- Throws:
PrivilegeException
FacilityNotExistsException
OwnerNotExistsException
-
setPerunBl
Sets the perunBl.- Parameters:
perunBl
- The perunBl.
-
updateBan
public BanOnFacility updateBan(PerunSession sess, BanOnFacility banOnFacility) throws PrivilegeException, FacilityNotExistsException, UserNotExistsException, BanNotExistsException Description copied from interface:FacilitiesManager
Update existing ban (description and validation timestamp)- Specified by:
updateBan
in interfaceFacilitiesManager
- Parameters:
banOnFacility
- the existing ban- Returns:
- updated ban
- Throws:
PrivilegeException
FacilityNotExistsException
UserNotExistsException
BanNotExistsException
-
updateFacility
public Facility updateFacility(PerunSession sess, Facility facility) throws FacilityNotExistsException, FacilityExistsException, PrivilegeException, ConsentHubExistsException Description copied from interface:FacilitiesManager
Updates facility.- Specified by:
updateFacility
in interfaceFacilitiesManager
- Parameters:
facility
- to update- Returns:
- updated facility
- Throws:
FacilityNotExistsException
FacilityExistsException
PrivilegeException
ConsentHubExistsException
-