Package cz.metacentrum.perun.core.impl
Class FacilitiesManagerImpl
java.lang.Object
cz.metacentrum.perun.core.impl.FacilitiesManagerImpl
- All Implemented Interfaces:
FacilitiesManagerImplApi
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final RowMapper
<BanOnFacility> protected static final String
static final String
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddHost
(PerunSession sess, Host host, Facility facility) Adds host to the Facility.void
addOwner
(PerunSession sess, Facility facility, Owner owner) Add owner of the facilityvoid
assignSecurityTeam
(PerunSession sess, Facility facility, SecurityTeam securityTeam) Assign given security team to given facility (means the facility trusts the security team)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 userId, int facilityId) Get true if any ban for user and facility exists.void
checkFacilityExists
(PerunSession sess, Facility facility) Check if facility exists in underlaying data source.void
checkHostExists
(PerunSession sess, Host host) void
checkSecurityTeamAssigned
(PerunSession sess, Facility facility, SecurityTeam securityTeam) Check if security team is assigned to facility.void
checkSecurityTeamNotAssigned
(PerunSession sess, Facility facility, SecurityTeam securityTeam) Check if security team is not assigned to facility.createFacility
(PerunSession sess, Facility facility) Inserts facility into DB.void
deleteFacility
(PerunSession sess, Facility facility) Deletes facility by id.void
deleteFacilityOwners
(PerunSession sess, Facility facility) Deletes all facility owners.boolean
facilityExists
(PerunSession sess, Facility facility) Check if facility exists in underlaying data source.getAdminGroups
(PerunSession sess, Facility facility) Gets list of all group administrators of the Facility.getAdmins
(PerunSession sess, Facility facility) Gets list of all user administrators of the Facility.Get all expired bans on any facility to now dategetAllowedFacilities
(PerunSession sess, Member member) Return all allowed facilities of the member.getAllowedFacilities
(PerunSession sess, User user) Return all allowed facilities of the user.getAllowedMembers
(PerunSession sess, Facility facility) Return all members, which are "allowed" on facility through any resource disregarding their possible expired status in a group.getAllowedMembers
(PerunSession sess, Facility facility, Service service) Return all members, which are "allowed" on facility through any resource assigned to the given service.getAllowedUsers
(PerunSession sess, Facility facility) Return all users, which are "allowed" on facility through any member/resource.getAllowedVos
(PerunSession sess, Facility facility) Return all VO which can use this facility.getAssignedFacilities
(PerunSession sess, SecurityTeam securityTeam) Get facilities where security team is assigned.getAssignedResources
(PerunSession sess, Facility facility) Returns all resources assigned to the facility.getAssignedResources
(PerunSession sess, Facility facility, Vo specificVo, Service specificService) Returns all resources assigned to the facility with optionally VO and Service specified.getAssignedRichResources
(PerunSession sess, Facility facility) Returns all rich resources assigned to the facility.getAssignedRichResources
(PerunSession sess, Facility facility, Service service) Returns all rich resources assigned to the facility and service.getAssignedSecurityTeams
(PerunSession sess, Facility facility) Return all security teams which specific facility trustsgetAssignedUsers
(PerunSession sess, Facility facility) Return all users assigned to Facility.getAssignedUsers
(PerunSession sess, Facility facility, Service service) Returns list of Users assigned with chosen Facility containing resources where service is assigned.getAssociatedMembers
(PerunSession sess, Facility facility, User user) Return all members, which are associated with the facility and belong to given user.getAssociatedUsers
(PerunSession sess, Facility facility) Return all users, which are associated with facility through any member/resource.getBan
(PerunSession sess, int userId, int faclityId) Get specific facility ban.getBanById
(PerunSession sess, int banId) Get Ban for user on facility by it's idgetBansForFacility
(PerunSession sess, int facilityId) Get all users bans for facilitygetBansForUser
(PerunSession sess, int userId) Get all facilities bans for user.getDirectAdmins
(PerunSession sess, Facility facility) Gets list of direct user administrators of the Facility.getFacilities
(PerunSession sess) List all facilities.getFacilitiesByAttribute
(PerunSession sess, Attribute attribute) Returns all facilities which have set the attribute with the value.getFacilitiesByAttributePartialMatch
(PerunSession sess, AttributeDefinition attrDef, String value) Partial search for facilities with the attribute 'attrDef' set to a similar value to 'value'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 perunSession, List<Integer> ids) Gets facilities by their ids.int
Get count of all facilities.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 for the Facility by its name.getFacilityForHost
(PerunSession sess, Host host) Return facility which has the host.getHostById
(PerunSession sess, int id) Get the host by its ID.getHosts
(PerunSession sess, Facility facility) List hosts from facility.getHostsByHostname
(PerunSession sess, String hostname) Get all hosts with this hostname (from all facilities).int
getHostsCount
(PerunSession sess, Facility facility) Count hosts in the 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.boolean
hostExists
(PerunSession sess, Host host) void
removeAllServiceDenials
(int facilityId) Remove all service denials on given facility.void
removeBan
(PerunSession sess, int banId) Remove ban by id from facilities bans.void
removeBan
(PerunSession sess, int userId, int facilityId) Remove ban by user_id and facility_id.void
removeHost
(PerunSession sess, Host host) Remove hosts from the Facility.void
removeOwner
(PerunSession sess, Facility facility, Owner owner) Remove owner 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 facilityvoid
setOwners
(PerunSession sess, Facility facility, List<Owner> owners) Updates owners of facilityupdateBan
(PerunSession sess, BanOnFacility banOnFacility) Update description and validity timestamp of specific ban.updateFacility
(PerunSession sess, Facility facility) Updates facility in DB.
-
Field Details
-
FACILITY_MAPPING_SELECT_QUERY
- See Also:
-
FACILITY_MAPPER
-
HOST_MAPPING_SELECT_QUERY
- See Also:
-
BAN_ON_FACILITY_MAPPING_SELECT_QUERY
- See Also:
-
BAN_ON_FACILITY_MAPPER
-
-
Constructor Details
-
FacilitiesManagerImpl
-
-
Method Details
-
addHost
Description copied from interface:FacilitiesManagerImplApi
Adds host to the Facility.- Specified by:
addHost
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-host
-facility
- return host
-
addOwner
public void addOwner(PerunSession sess, Facility facility, Owner owner) throws OwnerAlreadyAssignedException Description copied from interface:FacilitiesManagerImplApi
Add owner of the facility- Specified by:
addOwner
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-owner
-- Throws:
OwnerAlreadyAssignedException
-
assignSecurityTeam
Description copied from interface:FacilitiesManagerImplApi
Assign given security team to given facility (means the facility trusts the security team)- Specified by:
assignSecurityTeam
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-securityTeam
-
-
banExists
Description copied from interface:FacilitiesManagerImplApi
Get true if any ban for user and facility exists.- Specified by:
banExists
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-userId
- id of userfacilityId
- id of facility- Returns:
- true if ban exists
-
banExists
Description copied from interface:FacilitiesManagerImplApi
Get true if any band defined by id exists for any user and facility.- Specified by:
banExists
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-banId
- id of ban- Returns:
- true if ban exists
-
checkFacilityExists
public void checkFacilityExists(PerunSession sess, Facility facility) throws FacilityNotExistsException Check if facility exists in underlaying data source.- Specified by:
checkFacilityExists
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Throws:
FacilityNotExistsException
- See Also:
-
checkHostExists
- Specified by:
checkHostExists
in interfaceFacilitiesManagerImplApi
- Throws:
HostNotExistsException
-
checkSecurityTeamAssigned
public void checkSecurityTeamAssigned(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws SecurityTeamNotAssignedException Description copied from interface:FacilitiesManagerImplApi
Check if security team is assigned to facility. Throw exception info not.- Specified by:
checkSecurityTeamAssigned
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-securityTeam
-- Throws:
SecurityTeamNotAssignedException
-
checkSecurityTeamNotAssigned
public void checkSecurityTeamNotAssigned(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws SecurityTeamAlreadyAssignedException Description copied from interface:FacilitiesManagerImplApi
Check if security team is not assigned to facility. Throw exception info is.- Specified by:
checkSecurityTeamNotAssigned
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-securityTeam
-- Throws:
SecurityTeamAlreadyAssignedException
-
createFacility
Description copied from interface:FacilitiesManagerImplApi
Inserts facility into DB.- Specified by:
createFacility
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-
-
deleteFacility
public void deleteFacility(PerunSession sess, Facility facility) throws FacilityAlreadyRemovedException Description copied from interface:FacilitiesManagerImplApi
Deletes facility by id.- Specified by:
deleteFacility
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Throws:
FacilityAlreadyRemovedException
- if there are 0 rows affected by delete from DB
-
deleteFacilityOwners
Description copied from interface:FacilitiesManagerImplApi
Deletes all facility owners.- Specified by:
deleteFacilityOwners
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-
-
facilityExists
Description copied from interface:FacilitiesManagerImplApi
Check if facility exists in underlaying data source.- Specified by:
facilityExists
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- true if facility exists in underlaying data source, false otherwise
-
getAdminGroups
Description copied from interface:FacilitiesManagerImplApi
Gets list of all group administrators of the Facility.- Specified by:
getAdminGroups
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of groups who are admins in the facility
-
getAdmins
Description copied from interface:FacilitiesManagerImplApi
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.- Specified by:
getAdmins
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of users who are admins in the facility
-
getAllExpiredBansOnFacilities
Description copied from interface:FacilitiesManagerImplApi
Get all expired bans on any facility to now date- Specified by:
getAllExpiredBansOnFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-- Returns:
- list of expired bans for any facility
-
getAllowedFacilities
Description copied from interface:FacilitiesManagerImplApi
Return all allowed facilities of the user. It means all facilities, where is assigned through some resource and member is allowed on such resource.- Specified by:
getAllowedFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-user
-- Returns:
- List of allowed facilities of the user.
-
getAllowedFacilities
Description copied from interface:FacilitiesManagerImplApi
Return all allowed facilities of the member. It means all facilities, where is assigned through some resource and member is allowed.- Specified by:
getAllowedFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-member
-- Returns:
- List of allowed facilities of the member.
-
getAllowedMembers
Description copied from interface:FacilitiesManagerImplApi
Return all members, which are "allowed" on facility through any resource disregarding their possible expired status in a group. All members include all group statuses, through which they can be filtered if necessary.- Specified by:
getAllowedMembers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of allowed members
-
getAllowedMembers
Description copied from interface:FacilitiesManagerImplApi
Return all members, which are "allowed" on facility through any resource assigned to the given service. Service settings decide whether expired group and expired VO members are returned as well. Disabled and invalid VO members are always ignored.- Specified by:
getAllowedMembers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-service
-- Returns:
- list of allowed members
-
getAllowedUsers
Description copied from interface:FacilitiesManagerImplApi
Return all users, which are "allowed" on facility through any member/resource.- Specified by:
getAllowedUsers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of allowed users
-
getAllowedVos
Description copied from interface:FacilitiesManagerImplApi
Return all VO which can use this facility. (VO must have the resource which belongs to this facility).- Specified by:
getAllowedVos
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of Vos
-
getAssignedFacilities
Description copied from interface:FacilitiesManagerImplApi
Get facilities where security team is assigned.- Specified by:
getAssignedFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-securityTeam
-- Returns:
-
getAssignedResources
Description copied from interface:FacilitiesManagerImplApi
Returns all resources assigned to the facility.- Specified by:
getAssignedResources
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of resources assigned to the facility
-
getAssignedResources
public List<Resource> getAssignedResources(PerunSession sess, Facility facility, Vo specificVo, Service specificService) Description copied from interface:FacilitiesManagerImplApi
Returns all resources assigned to the facility with optionally VO and Service specified.- Specified by:
getAssignedResources
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-specificVo
-specificService
-- Returns:
- list of resources assigned to the facility with optionally filter for VO and Service.
-
getAssignedRichResources
Description copied from interface:FacilitiesManagerImplApi
Returns all rich resources assigned to the facility.- Specified by:
getAssignedRichResources
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of rich resources assigned to the facility
-
getAssignedRichResources
public List<RichResource> getAssignedRichResources(PerunSession sess, Facility facility, Service service) Description copied from interface:FacilitiesManagerImplApi
Returns all rich resources assigned to the facility and service.- Specified by:
getAssignedRichResources
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-service
-- Returns:
- list of rich resources assigned to the facility and service
-
getAssignedSecurityTeams
Description copied from interface:FacilitiesManagerImplApi
Return all security teams which specific facility trusts- Specified by:
getAssignedSecurityTeams
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
- specific facility- Returns:
- list of assigned security teams
-
getAssignedUsers
Description copied from interface:FacilitiesManagerImplApi
Return all users assigned to Facility.- Specified by:
getAssignedUsers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of user
-
getAssignedUsers
Description copied from interface:FacilitiesManagerImplApi
Returns list of Users assigned with chosen Facility containing resources where service is assigned.- Specified by:
getAssignedUsers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-service
-- Returns:
- list of Users
-
getAssociatedMembers
Description copied from interface:FacilitiesManagerImplApi
Return all members, which are associated with the facility and belong to given user. Does not require ACTIVE group-resource status or any specific member status.- Specified by:
getAssociatedMembers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-user
-- Returns:
- list of associated members
-
getAssociatedUsers
Description copied from interface:FacilitiesManagerImplApi
Return all users, which are associated with facility through any member/resource. Does not require ACTIVE group-resource status.- Specified by:
getAssociatedUsers
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- list of allowed users
-
getBan
public BanOnFacility getBan(PerunSession sess, int userId, int faclityId) throws BanNotExistsException Description copied from interface:FacilitiesManagerImplApi
Get specific facility ban.- Specified by:
getBan
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-userId
- the user idfaclityId
- the facility id- Returns:
- specific facility ban
- Throws:
BanNotExistsException
-
getBanById
Description copied from interface:FacilitiesManagerImplApi
Get Ban for user on facility by it's id- Specified by:
getBanById
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-banId
- the ban id- Returns:
- facility ban by it's id
- Throws:
BanNotExistsException
-
getBansForFacility
Description copied from interface:FacilitiesManagerImplApi
Get all users bans for facility- Specified by:
getBansForFacility
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facilityId
- the facility id- Returns:
- list of all users bans on facility
-
getBansForUser
Description copied from interface:FacilitiesManagerImplApi
Get all facilities bans for user.- Specified by:
getBansForUser
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-userId
- the user id- Returns:
- list of bans for user on any facility
-
getDirectAdmins
Description copied from interface:FacilitiesManagerImplApi
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 interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-
-
getFacilities
Description copied from interface:FacilitiesManagerImplApi
List all facilities.- Specified by:
getFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-- Returns:
- List of all Facilities within the Perun
-
getFacilitiesByAttribute
Description copied from interface:FacilitiesManagerImplApi
Returns all facilities which have set the attribute with the value. Searching only def and opt attributes.- Specified by:
getFacilitiesByAttribute
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-attribute
-- Returns:
-
getFacilitiesByAttributePartialMatch
public List<Facility> getFacilitiesByAttributePartialMatch(PerunSession sess, AttributeDefinition attrDef, String value) Description copied from interface:FacilitiesManagerImplApi
Partial search for facilities with the attribute 'attrDef' set to a similar value to 'value'- Specified by:
getFacilitiesByAttributePartialMatch
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-attrDef
-- Returns:
-
getFacilitiesByDestination
public List<Facility> getFacilitiesByDestination(PerunSession sess, String destination) throws FacilityNotExistsException Description copied from interface:FacilitiesManagerImplApi
Searches for the Facilities by theirs destination.- Specified by:
getFacilitiesByDestination
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-destination
-- Returns:
- Facility with specified name
- Throws:
FacilityNotExistsException
-
getFacilitiesByHostName
Description copied from interface:FacilitiesManagerImplApi
Return all facilities where exists host with the specific hostname- Specified by:
getFacilitiesByHostName
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-hostname
- specific hostname- Returns:
-
getFacilitiesByIds
Description copied from interface:FacilitiesManagerImplApi
Gets facilities by their ids. Silently skips non-existing facilities.- Specified by:
getFacilitiesByIds
in interfaceFacilitiesManagerImplApi
- Parameters:
perunSession
-ids
-- Returns:
- list of facilities with specified ids
-
getFacilitiesCount
Description copied from interface:FacilitiesManagerImplApi
Get count of all facilities.- Specified by:
getFacilitiesCount
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-- Returns:
- count of all facilities
-
getFacilitiesWhereUserIsAdmin
Description copied from interface:FacilitiesManagerImplApi
Get all facilities where the user is admin. Including facilities, where the user is a VALID member of authorized group.- Specified by:
getFacilitiesWhereUserIsAdmin
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-user
-- Returns:
- list of facilities
-
getFacilityById
Description copied from interface:FacilitiesManagerImplApi
Searches for the Facility with specified id.- Specified by:
getFacilityById
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-id
-- Returns:
- Facility with specified id
- Throws:
FacilityNotExistsException
-
getFacilityByName
Description copied from interface:FacilitiesManagerImplApi
Searches for the Facility by its name.- Specified by:
getFacilityByName
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-name
-- Returns:
- Facility with specified name
- Throws:
FacilityNotExistsException
-
getFacilityForHost
Description copied from interface:FacilitiesManagerImplApi
Return facility which has the host.- Specified by:
getFacilityForHost
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-host
-- Returns:
- facility
-
getHostById
Description copied from interface:FacilitiesManagerImplApi
Get the host by its ID.- Specified by:
getHostById
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-id
-- Returns:
- host
- Throws:
HostNotExistsException
-
getHosts
Description copied from interface:FacilitiesManagerImplApi
List hosts from facility.- Specified by:
getHosts
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- hosts Hosts' id from the Cluster
-
getHostsByHostname
Description copied from interface:FacilitiesManagerImplApi
Get all hosts with this hostname (from all facilities).- Specified by:
getHostsByHostname
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-hostname
-- Returns:
- list of hosts by hostname
-
getHostsCount
Description copied from interface:FacilitiesManagerImplApi
Count hosts in the facility.- Specified by:
getHostsCount
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- int The number of hosts present in the Cluster.
-
getOwnerFacilities
Description copied from interface:FacilitiesManagerImplApi
Returns list of all facilities owned by the owner.- Specified by:
getOwnerFacilities
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-owner
-- Returns:
- list of facilities owned by the owner
-
getOwners
Description copied from interface:FacilitiesManagerImplApi
Returns owners of the facility.- Specified by:
getOwners
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Returns:
- owners of specified facility
-
hostExists
- Specified by:
hostExists
in interfaceFacilitiesManagerImplApi
-
removeAllServiceDenials
public void removeAllServiceDenials(int facilityId) Description copied from interface:FacilitiesManagerImplApi
Remove all service denials on given facility.WARNING: this method should be removed in the future if the tasks module is merged into core module.
- Specified by:
removeAllServiceDenials
in interfaceFacilitiesManagerImplApi
- Parameters:
facilityId
- facility id
-
removeBan
Description copied from interface:FacilitiesManagerImplApi
Remove ban by id from facilities bans.- Specified by:
removeBan
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-banId
- id of specific ban- Throws:
BanNotExistsException
-
removeBan
Description copied from interface:FacilitiesManagerImplApi
Remove ban by user_id and facility_id.- Specified by:
removeBan
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-userId
- the id of userfacilityId
- the id of facility- Throws:
BanNotExistsException
-
removeHost
Description copied from interface:FacilitiesManagerImplApi
Remove hosts from the Facility.- Specified by:
removeHost
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-host
-- Throws:
HostAlreadyRemovedException
- if 0 rows affected by deleting from DB
-
removeOwner
public void removeOwner(PerunSession sess, Facility facility, Owner owner) throws OwnerAlreadyRemovedException Description copied from interface:FacilitiesManagerImplApi
Remove owner of the facility- Specified by:
removeOwner
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-owner
-- Throws:
OwnerAlreadyRemovedException
-
removeSecurityTeam
Description copied from interface:FacilitiesManagerImplApi
Remove (Unassign) given security team from given facility- Specified by:
removeSecurityTeam
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-securityTeam
-
-
setBan
Description copied from interface:FacilitiesManagerImplApi
Set ban for user on facility- Specified by:
setBan
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-banOnFacility
- the ban- Returns:
- ban on facility
-
setOwners
Description copied from interface:FacilitiesManagerImplApi
Updates owners of facility- Specified by:
setOwners
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-owners
-
-
updateBan
Description copied from interface:FacilitiesManagerImplApi
Update description and validity timestamp of specific ban.- Specified by:
updateBan
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-banOnFacility
- ban to be updated- Returns:
- updated ban
-
updateFacility
Description copied from interface:FacilitiesManagerImplApi
Updates facility in DB.- Specified by:
updateFacility
in interfaceFacilitiesManagerImplApi
- Parameters:
sess
-facility
-- Throws:
FacilityExistsException
- if the name of facility has been already used for different Facility
-