Interface ServicesManager
- All Known Implementing Classes:
- ServicesManagerEntry
- Author:
- Michal Prochazka invalid input: '<'michalp@ics.muni.cz>, Slavek Licehammer invalid input: '<'glory@ics.muni.cz>
 Note: ServicesManager is not to be used directly by any client. ServicesManager's functionality is going to be encapsulated in the Controller's GeneralServiceManager. 
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionaddDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) Adds an destination for the facility and service.addDestination(PerunSession perunSession, List<Service> services, Facility facility, Destination destination) Adds an destination for the facility and all services.addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Facility facility) Defines services destination for all hosts using their hostnames.addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Service service, Facility facility) Defines service destination for all hosts using theirs hostnames.addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, List<Service> services, Facility facility) Defines services destination for all hosts using their hostnames.addDestinationsForAllServicesOnFacility(PerunSession perunSession, Facility facility, Destination destination) Adds destination for all services defined on the facility.voidaddRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) Mark the attribute as required for the service.voidaddRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) Batch version of addRequiredAttributevoidblockAllServicesOnDestination(PerunSession perunSession, int destinationId) Block all services currently assigned on this destination.voidblockAllServicesOnFacility(PerunSession perunSession, Facility facility) Block all services currently assigned on this facility.voidblockServiceOnDestination(PerunSession perunSession, Service service, int destinationId) Bans Service on destination.voidblockServiceOnFacility(PerunSession perunSession, Service service, Facility facility) Bans Service on facility.voidblockServicesOnDestinations(PerunSession perunSession, List<RichDestination> richDestinations) Bans the Service on the destination - each pair defined by the rich destination.voidblockServicesOnFacility(PerunSession sess, List<Service> services, Facility facility) Bans services on facility.createService(PerunSession perunSession, Service service) Creates new service.voiddeleteService(PerunSession perunSession, Service service, boolean forceFlag) Deletes the service.voiddeleteServices(PerunSession perunSession, List<Service> services, boolean forceFlag) Deletes given services.booleanforceServicePropagation(PerunSession perunSession, Facility facility, Service service) Forces service propagation on defined facility.booleanforceServicePropagation(PerunSession perunSession, Service service) Forces service propagation on all facilities where the service is defined on.voidforceServicePropagationBulk(PerunSession sess, Facility facility, List<Service> services) Forces services propagation on defined facility.voidforceServicePropagationBulk(PerunSession sess, List<Service> services) Forces services propagation on all facilities where the services are defined on.forceServicePropagationForHostname(PerunSession perunSession, String hostname) Forces service propagation on all facilities for all services where hostname is used.getAllRichDestinations(PerunSession perunSession, Facility facility) Get list of all rich destinations defined for the facility.getAllRichDestinations(PerunSession perunSession, Service service) Get list of all rich destinations defined for the service.getAssignedResources(PerunSession sess, Service service) Get all resources where the service is defined.getAssignedServices(PerunSession perunSession, Facility facility) List all services associated with the facility (via resource).getAssignedServices(PerunSession perunSession, Facility facility, Vo vo) List all services associated with the facility and vo (via resource).getDestinationById(PerunSession perunSession, int id) Get destination by idintgetDestinationIdByName(PerunSession sess, String name, String type) Return ID of Destination by its value (name) and type.getDestinations(PerunSession perunSession) Get list of all destinations.getDestinations(PerunSession perunSession, Service service, Facility facility) Get list of all destinations defined for the service and facility.intGet count of all destinations.getFacilitiesDestinations(PerunSession sess, Vo vo) List all destinations for all facilities which are joined by resources to the VO.getFacilityAssignedServicesForGUI(PerunSession perunSession, Facility facility) Return list of ServiceForGUI assigned on facility, (Service with "allowedOnFacility" property filled). 1 - allowed / 0 - service is denied).getHashedDataWithGroups(PerunSession perunSession, Service service, Facility facility, boolean consentEval, int taskRunId) Generates hashed data with group structure for given service and facility.getHashedHierarchicalData(PerunSession perunSession, Service service, Facility facility, boolean consentEval, int taskRunId) Generates hashed hierarchical data structure for given service and facility.getRichDestinations(PerunSession perunSession, Facility facility, Service service) Get list of all rich destinations defined for the facility and the service.getServiceById(PerunSession perunSession, int id) Get service by id.getServiceByName(PerunSession perunSession, String name) Get service by name.getServices(PerunSession perunSession) get all services in perungetServicesBlockedOnDestination(PerunSession perunSession, int destinationId) List all the Services that are banned on this destination.getServicesBlockedOnFacility(PerunSession perunSession, Facility facility) List all the Services that are banned on this facility.getServicesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) Get all services with given attribute.booleanisServiceBlockedOnDestination(PerunSession sess, Service service, int destinationId) Is this Service denied on the destination?booleanisServiceBlockedOnFacility(PerunSession sess, Service service, Facility facility) Is this Service denied on the facility?booleanplanServicePropagation(PerunSession perunSession, Facility facility, Service service) Plans service propagation on defined facility.booleanplanServicePropagation(PerunSession perunSession, Service service) Forces service propagation on all facilities where the service is defined on.voidremoveAllDestinations(PerunSession perunSession, Service service, Facility facility) Removes all defined destinations for the service and facility.voidremoveAllRequiredAttributes(PerunSession perunSession, Service service) Detate all required attributes from servicevoidremoveDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) Removes an destination from the facility and service.voidremoveDestinationsByRichDestinations(PerunSession perunSession, List<RichDestination> richDestinations) Removes destinations defined by list of rich destinations.voidremoveRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) Remove required attribute from service.voidremoveRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) Batch version of removeRequiredAttributevoidunblockAllServicesOnDestination(PerunSession perunSession, int destinationId) Erase all the possible denials on this destination.voidunblockAllServicesOnDestination(PerunSession sess, String destinationName) Erase all the possible denials on destinations defined by the destinationName.voidunblockAllServicesOnFacility(PerunSession perunSession, Facility facility) Erase all the possible denials on this facility.voidunblockServiceOnDestination(PerunSession perunSession, Service service, int destinationId) Free the denial of the Service on this destination.voidunblockServiceOnFacility(PerunSession perunSession, Service service, Facility facility) Free the denial of the Service on this facility.voidunblockServicesOnDestinations(PerunSession perunSession, List<RichDestination> richDestinations) Free the denial of the Service on the destination - each pair defined by the rich destination.voidunblockServicesOnFacility(PerunSession sess, List<Service> services, Facility facility) Free the denial of the services on this facility.voidupdateService(PerunSession perunSession, Service service) Updates the service.
- 
Field Details- 
SERVICE_NAME_REGEXP- See Also:
 
 
- 
- 
Method Details- 
addDestinationDestination addDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException, DestinationAlreadyAssignedException, WrongPatternException Adds an destination for the facility and service. Destination.id doesn't need to be filled. If destination doesn't exist it will be created.- Parameters:
- perunSession-
- service-
- facility-
- destination- (Id of this destination doesn't need to be filled.)
- Returns:
- destination with it's id set.
- Throws:
- PrivilegeException
- ServiceNotExistsException
- FacilityNotExistsException
- DestinationAlreadyAssignedException
- WrongPatternException
 
- 
addDestinationDestination addDestination(PerunSession perunSession, List<Service> services, Facility facility, Destination destination) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException, WrongPatternException Adds an destination for the facility and all services. Destination id doesn't need to be filled. If destination doesn't exist it will be created.- Parameters:
- perunSession-
- services-
- facility-
- destination- (id of this destination doesn't need to be filled.)
- Returns:
- destination with it's id set
- Throws:
- PrivilegeException
- ServiceNotExistsException
- FacilityNotExistsException
- WrongPatternException
 
- 
addDestinationsDefinedByHostsOnFacilityList<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Service service, Facility facility) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException, DestinationAlreadyAssignedException Defines service destination for all hosts using theirs hostnames.- Parameters:
- perunSession-
- service-
- facility-
- Returns:
- list of added destinations
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
- DestinationAlreadyAssignedException
 
- 
addDestinationsDefinedByHostsOnFacilityList<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, List<Service> services, Facility facility) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException Defines services destination for all hosts using their hostnames. Do it for all services in List.If some destination for service and facility already exist, do not create it but still return back in the list. - Parameters:
- perunSession-
- services-
- facility-
- Returns:
- list of added destinations (even if they already was added before)
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
 
- 
addDestinationsDefinedByHostsOnFacilityList<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Facility facility) throws PrivilegeException, FacilityNotExistsException Defines services destination for all hosts using their hostnames. Use all assigned services to resources for the facility.If some destination for service and facility already exist, do not create it but still return back in the list. - Parameters:
- perunSession-
- facility-
- Returns:
- list of added destinations (even if they already was added before)
- Throws:
- PrivilegeException
- InternalErrorException
- FacilityNotExistsException
 
- 
addDestinationsForAllServicesOnFacilityList<Destination> addDestinationsForAllServicesOnFacility(PerunSession perunSession, Facility facility, Destination destination) throws PrivilegeException, FacilityNotExistsException, DestinationAlreadyAssignedException, WrongPatternException Adds destination for all services defined on the facility.- Parameters:
- perunSession-
- facility-
- destination-
- Returns:
- list of added destinations
- Throws:
- PrivilegeException
- FacilityNotExistsException
- DestinationAlreadyAssignedException
- WrongPatternException
 
- 
addRequiredAttributevoid addRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) throws PrivilegeException, AttributeNotExistsException, ServiceNotExistsException, AttributeAlreadyAssignedException, ServiceAttributesCannotExtend Mark the attribute as required for the service. Required attribues are requisite for Service to run. If you add attribute which has a default attribute then this default attribute will be automatically add too.- Parameters:
- perunSession- perunSession
- service- service to which the attribute will be added
- attribute- attribute to add
- Throws:
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- PrivilegeException- if privileges are not given
- AttributeNotExistsException- if the attribute doesn't exists in underlaying data source
- ServiceNotExistsException- if the service doesn't exists in underlaying data source
- AttributeAlreadyAssignedException- if the attribute is already added
- ServiceAttributesCannotExtend- if trying to add user-related attribute that could invalidate consents
 
- 
addRequiredAttributesvoid addRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws PrivilegeException, AttributeNotExistsException, ServiceNotExistsException, AttributeAlreadyAssignedException, ServiceAttributesCannotExtend Batch version of addRequiredAttribute
- 
blockAllServicesOnDestinationvoid blockAllServicesOnDestination(PerunSession perunSession, int destinationId) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException Block all services currently assigned on this destination. From this moment on, there are no Services being allowed on this destination. If you assign a new service to the destination, it will be allowed!- Parameters:
- perunSession-
- destinationId- The id of a destination we want to block all services on.
- Throws:
- InternalErrorException
- PrivilegeException
- DestinationNotExistsException
- FacilityNotExistsException
 
- 
blockAllServicesOnFacilityvoid blockAllServicesOnFacility(PerunSession perunSession, Facility facility) throws FacilityNotExistsException, PrivilegeException Block all services currently assigned on this facility. From this moment on, there are no Services being allowed on this facility. If you assign a new service to the facility, it will be allowed!- Parameters:
- perunSession-
- facility- Facility we want to block all services on.
- Throws:
- InternalErrorException
- FacilityNotExistsException
- PrivilegeException
 
- 
blockServiceOnDestinationvoid blockServiceOnDestination(PerunSession perunSession, Service service, int destinationId) throws PrivilegeException, DestinationNotExistsException, ServiceAlreadyBannedException, FacilityNotExistsException Bans Service on destination. It wouldn't be possible to execute the given Service on this destination, however, it still can be executed on all the other destinations in the facility.- Parameters:
- perunSession-
- service- The Service to be banned on this particular destination
- destinationId- The destination on which we want to ban the Service
- Throws:
- InternalErrorException
- PrivilegeException
- DestinationNotExistsException
- ServiceAlreadyBannedException
- FacilityNotExistsException
 
- 
blockServiceOnFacilityvoid blockServiceOnFacility(PerunSession perunSession, Service service, Facility facility) throws ServiceAlreadyBannedException, PrivilegeException Bans Service on facility. It wouldn't be possible to execute the given Service on the whole facility nor on any of its destinations.- Parameters:
- perunSession-
- service- The Service to be banned on the facility
- facility- The facility on which we want to ban the Service
- Throws:
- InternalErrorException
- ServiceAlreadyBannedException
- PrivilegeException
 
- 
blockServicesOnDestinationsvoid blockServicesOnDestinations(PerunSession perunSession, List<RichDestination> richDestinations) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException Bans the Service on the destination - each pair defined by the rich destination. It wouldn't be possible to execute the given Service on this destination, however, it still can be executed on all the other destinations in the facility.- Parameters:
- perunSession-
- richDestinations- the list of rich destinations
- Throws:
- PrivilegeException
- DestinationNotExistsException
- FacilityNotExistsException
 
- 
blockServicesOnFacilityvoid blockServicesOnFacility(PerunSession sess, List<Service> services, Facility facility) throws ServiceAlreadyBannedException, PrivilegeException, FacilityNotExistsException Bans services on facility. It wouldn't be possible to execute the given services on the whole facility nor on any of their destinations.- Parameters:
- sess- perun session
- services- list of services
- facility- The facility on which we want to ban services
- Throws:
- PrivilegeException- insufficient permissions
- ServiceAlreadyBannedException- when service was already banned
- FacilityNotExistsException- when facility does not exist
 
- 
createServiceService createService(PerunSession perunSession, Service service) throws PrivilegeException, ServiceExistsException Creates new service.- Parameters:
- perunSession-
- service-
- Returns:
- new service
- Throws:
- InternalErrorException
- PrivilegeException
- ServiceExistsException
 
- 
deleteServicevoid deleteService(PerunSession perunSession, Service service, boolean forceFlag) throws ServiceNotExistsException, PrivilegeException, RelationExistsException, ServiceAlreadyRemovedException Deletes the service.- Parameters:
- perunSession-
- service-
- forceFlag- if true, removes all dependant objects from database instead of raising exception
- Throws:
- InternalErrorException
- ServiceNotExistsException
- PrivilegeException
- RelationExistsException
- ServiceAlreadyRemovedException- if there are 0 rows affected by deleting from DB
 
- 
deleteServicesvoid deleteServices(PerunSession perunSession, List<Service> services, boolean forceFlag) throws ServiceNotExistsException, PrivilegeException, RelationExistsException, ServiceAlreadyRemovedException Deletes given services.- Parameters:
- perunSession-
- services- list of services
- forceFlag- if true, removes all dependant objects from database instead of raising exception
- Throws:
- InternalErrorException
- ServiceNotExistsException
- PrivilegeException
- RelationExistsException
- ServiceAlreadyRemovedException- if there are 0 rows affected by deleting from DB
 
- 
forceServicePropagationboolean forceServicePropagation(PerunSession perunSession, Facility facility, Service service) throws PrivilegeException Forces service propagation on defined facility.- Parameters:
- perunSession-
- facility-
- service-
- Returns:
- true if it is possible, false if not
- Throws:
- PrivilegeException
 
- 
forceServicePropagationboolean forceServicePropagation(PerunSession perunSession, Service service) throws PrivilegeException Forces service propagation on all facilities where the service is defined on.- Parameters:
- perunSession-
- service-
- Returns:
- true if it is possible, false if not
- Throws:
- PrivilegeException
 
- 
forceServicePropagationBulkvoid forceServicePropagationBulk(PerunSession sess, Facility facility, List<Service> services) throws PrivilegeException, FacilityNotExistsException, ForceServicePropagationDisabledException Forces services propagation on defined facility.- Parameters:
- sess- perun session
- facility- facility
- services- list of services
- Throws:
- FacilityNotExistsException- when facility does not exist
- PrivilegeException- insufficient permissions
- ForceServicePropagationDisabledException- when forcing propagation is not possible
 
- 
forceServicePropagationBulkvoid forceServicePropagationBulk(PerunSession sess, List<Service> services) throws PrivilegeException, ForceServicePropagationDisabledException Forces services propagation on all facilities where the services are defined on.- Parameters:
- sess- session
- services- list of services
- Throws:
- PrivilegeException- insufficient permissions
- ForceServicePropagationDisabledException- when forcing propagation is not possible
 
- 
forceServicePropagationForHostnameString forceServicePropagationForHostname(PerunSession perunSession, String hostname) throws PrivilegeException Forces service propagation on all facilities for all services where hostname is used. Service must be correctly assigned, have destination matching hostname and not be blocked on any level (globally, facility, destination).- Parameters:
- perunSession-
- hostname- Hostname to get facilities for
- Returns:
- message Space separated list of forced services or error message (no facilities found, services are blocked)
- Throws:
- PrivilegeException
 
- 
getAllRichDestinationsList<RichDestination> getAllRichDestinations(PerunSession perunSession, Facility facility) throws PrivilegeException, FacilityNotExistsException Get list of all rich destinations defined for the facility.- Parameters:
- perunSession-
- facility-
- Returns:
- Throws:
- PrivilegeException- if privileges are not given
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- FacilityNotExistsException- if facility which we get from service and destination not exist
- ServiceNotExistsException- if the service not exist
 
- 
getAllRichDestinationsList<RichDestination> getAllRichDestinations(PerunSession perunSession, Service service) throws PrivilegeException, ServiceNotExistsException Get list of all rich destinations defined for the service.- Parameters:
- perunSession-
- service-
- Returns:
- Throws:
- PrivilegeException- if privileges are not given
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- FacilityNotExistsException- if the facility not exist
- ServiceNotExistsException- if service which we get from facility and destination not exist
 
- 
getAssignedResourcesList<Resource> getAssignedResources(PerunSession sess, Service service) throws PrivilegeException, ServiceNotExistsException Get all resources where the service is defined.- Parameters:
- sess-
- service-
- Returns:
- list of resources where the service is defined
- Throws:
- InternalErrorException
- PrivilegeException
- ServiceNotExistsException
 
- 
getAssignedServicesList<Service> getAssignedServices(PerunSession perunSession, Facility facility) throws FacilityNotExistsException, PrivilegeException List all services associated with the facility (via resource).- Parameters:
- perunSession-
- facility-
- Returns:
- list of services assigned to facility
- Throws:
- InternalErrorException
- FacilityNotExistsException
- PrivilegeException
 
- 
getAssignedServicesList<Service> getAssignedServices(PerunSession perunSession, Facility facility, Vo vo) throws FacilityNotExistsException, VoNotExistsException, PrivilegeException List all services associated with the facility and vo (via resource).- Parameters:
- perunSession-
- facility-
- vo-
- Returns:
- list of services assigned to facility and vo
- Throws:
- InternalErrorException
- FacilityNotExistsException
- VoNotExistsException
- PrivilegeException
 
- 
getDestinationByIdDestination getDestinationById(PerunSession perunSession, int id) throws PrivilegeException, DestinationNotExistsException Get destination by id- Parameters:
- perunSession-
- id-
- Returns:
- Destination with the id
- Throws:
- PrivilegeException
- InternalErrorException
- DestinationNotExistsException
 
- 
getDestinationIdByNameint getDestinationIdByName(PerunSession sess, String name, String type) throws DestinationNotExistsException Return ID of Destination by its value (name) and type.- Parameters:
- sess-
- name- Name (value) of Destination
- type- Type of destination
- Returns:
- ID of Destination
- Throws:
- InternalErrorException
- DestinationNotExistsException
 
- 
getDestinationsList<Destination> getDestinations(PerunSession perunSession, Service service, Facility facility) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException Get list of all destinations defined for the service and facility.- Parameters:
- perunSession-
- service-
- facility-
- Returns:
- list list of destinations defined for the service and facility
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
 
- 
getDestinationsGet list of all destinations.- Parameters:
- perunSession-
- Returns:
- list of all destinations for session
- Throws:
- InternalErrorException
- PrivilegeException
 
- 
getFacilityAssignedServicesForGUIList<ServiceForGUI> getFacilityAssignedServicesForGUI(PerunSession perunSession, Facility facility) throws PrivilegeException, FacilityNotExistsException Return list of ServiceForGUI assigned on facility, (Service with "allowedOnFacility" property filled). 1 - allowed / 0 - service is denied).- Parameters:
- perunSession-
- facility-
- Returns:
- list of assigned services with allowed property
- Throws:
- PrivilegeException
- FacilityNotExistsException
- InternalErrorException
 
- 
getHashedDataWithGroupsHashedGenData getHashedDataWithGroups(PerunSession perunSession, Service service, Facility facility, boolean consentEval, int taskRunId) throws FacilityNotExistsException, ServiceNotExistsException, PrivilegeException Generates hashed data with group structure for given service and facility. If enforcing consents is turned on on the instance and on the resource's consent hub, generates only the users that granted a consent to all the service required attributes. New UNSIGNED consents are created to users that don't have a consent containing all the service required attributes.Generates data in format: attributes: {...hashes...} hierarchy: { "1": { ** facility id ** members: { ** all members on the facility ** "4" : 5, ** member id : user id ** "6" : 7, ** member id : user id ** ... } children: [ "2": { ** resource id ** voId: 99, children: [ "89": { ** group id ** "children": {}, "members": { "91328": 57986, "91330": 60838 } } ], "members": { ** all members on the resource with id 2 ** "91328": 57986, "91330": 60838 } }, "3": { ... } ] } } - Parameters:
- perunSession- perun session
- service- service
- facility- facility
- consentEval- if the generator should force evaluation of consents
- taskRunId- Integer id of the task run propagation
- Returns:
- generated hashed data structure
- Throws:
- FacilityNotExistsException- if there is no such facility
- ServiceNotExistsException- if there is no such service
- PrivilegeException- insufficient permissions
 
- 
getHashedHierarchicalDataHashedGenData getHashedHierarchicalData(PerunSession perunSession, Service service, Facility facility, boolean consentEval, int taskRunId) throws FacilityNotExistsException, ServiceNotExistsException, PrivilegeException Generates hashed hierarchical data structure for given service and facility. If enforcing consents is turned on on the instance and on the resource's consent hub, generates only the users that granted a consent to all the service required attributes. New UNSIGNED consents are created to users that don't have a consent containing all the service required attributes.attributes: {...hashes...} hierarchy: { "1": { ** facility id ** members: { ** all members on the facility ** "4" : 5, ** member id : user id ** "6" : 7, ** member id : user id ** ... } children: [ "2": { ** resource id ** children: [], voId: 99, members: { ** all members on the resource with id 2 ** "4" : 5 ** member id : user id ** } }, "3": { ... } ] } } - Parameters:
- perunSession- perun session
- service- service
- facility- facility
- consentEval- if the generator should force evaluation of consents
- taskRunId- Integer id of the task run propagation
- Returns:
- generated hashed data structure
- Throws:
- FacilityNotExistsException- if there is no such facility
- ServiceNotExistsException- if there is no such service
- PrivilegeException- insufficient permissions
 
- 
getRichDestinationsList<RichDestination> getRichDestinations(PerunSession perunSession, Facility facility, Service service) throws PrivilegeException, FacilityNotExistsException, ServiceNotExistsException Get list of all rich destinations defined for the facility and the service.- Parameters:
- perunSession-
- facility-
- service-
- Returns:
- Throws:
- PrivilegeException- if privileges are not given
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- FacilityNotExistsException- if the facility not exist
- ServiceNotExistsException- if the service not exist
 
- 
getServiceByIdService getServiceById(PerunSession perunSession, int id) throws PrivilegeException, ServiceNotExistsException Get service by id.- Parameters:
- perunSession-
- id-
- Returns:
- service with specified id
- Throws:
- InternalErrorException
- PrivilegeException
- ServiceNotExistsException
 
- 
getServiceByNameService getServiceByName(PerunSession perunSession, String name) throws PrivilegeException, ServiceNotExistsException Get service by name.- Parameters:
- perunSession-
- name- name of the service
- Returns:
- service with specified name
- Throws:
- InternalErrorException
- PrivilegeException
- ServiceNotExistsException
 
- 
getServicesget all services in perun- Parameters:
- perunSession-
- Returns:
- all services in perun
- Throws:
- InternalErrorException
- PrivilegeException
 
- 
getServicesBlockedOnDestinationList<Service> getServicesBlockedOnDestination(PerunSession perunSession, int destinationId) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException List all the Services that are banned on this destination.- Parameters:
- perunSession-
- destinationId-
- Returns:
- a list of Services that are denied on the destination
- Throws:
- PrivilegeException
- DestinationNotExistsException
- FacilityNotExistsException
 
- 
getServicesBlockedOnFacilityList<Service> getServicesBlockedOnFacility(PerunSession perunSession, Facility facility) throws PrivilegeException List all the Services that are banned on this facility.- Parameters:
- perunSession-
- facility-
- Returns:
- a list of Services that are denied on the facility
- Throws:
- PrivilegeException
 
- 
getServicesByAttributeDefinitionList<Service> getServicesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) throws PrivilegeException Get all services with given attribute.- Parameters:
- sess- perun session
- attributeDefinition-
- Returns:
- all services with given attribute
- Throws:
- InternalErrorException
- PrivilegeException
 
- 
isServiceBlockedOnDestinationboolean isServiceBlockedOnDestination(PerunSession sess, Service service, int destinationId) throws PrivilegeException, DestinationNotExistsException, FacilityNotExistsException Is this Service denied on the destination?- Parameters:
- service- The Service, the denial of which we want to examine
- destinationId- The destination on which we want to look up the denial of the Service
- Returns:
- true - in case the Service is denied on the destination false - in case the Service in NOT denied on the destination
- Throws:
- PrivilegeException
- DestinationNotExistsException
- FacilityNotExistsException
 
- 
isServiceBlockedOnFacilityboolean isServiceBlockedOnFacility(PerunSession sess, Service service, Facility facility) throws PrivilegeException Is this Service denied on the facility?- Parameters:
- service- The Service, the denial of which we want to examine
- facility- The facility on which we want to look up the denial of the Service
- Returns:
- true - in case the Service is denied on the facility false - in case the Service in NOT denied on the facility
- Throws:
- PrivilegeException
 
- 
planServicePropagationboolean planServicePropagation(PerunSession perunSession, Facility facility, Service service) throws PrivilegeException Plans service propagation on defined facility.- Parameters:
- perunSession-
- facility-
- service-
- Returns:
- true if it is possible, false if not
- Throws:
- PrivilegeException
 
- 
planServicePropagationboolean planServicePropagation(PerunSession perunSession, Service service) throws PrivilegeException Forces service propagation on all facilities where the service is defined on.- Parameters:
- perunSession-
- service-
- Returns:
- true if it is possible, false if not
- Throws:
- PrivilegeException
 
- 
removeAllDestinationsvoid removeAllDestinations(PerunSession perunSession, Service service, Facility facility) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException Removes all defined destinations for the service and facility.- Parameters:
- perunSession-
- service-
- facility-
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
 
- 
removeAllRequiredAttributesvoid removeAllRequiredAttributes(PerunSession perunSession, Service service) throws PrivilegeException, ServiceNotExistsException Detate all required attributes from service- Parameters:
- perunSession- perunSession
- service- service from which the attributes will be removed
- Throws:
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- PrivilegeException- if privileges are not given
- ServiceNotExistsException- if the service doesn't exists in underlaying data source
 
- 
removeDestinationvoid removeDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException, DestinationAlreadyRemovedException Removes an destination from the facility and service.- Parameters:
- perunSession-
- service-
- facility-
- destination- string contains destination address (mail, url, hostname, ...)
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
- DestinationAlreadyRemovedException
 
- 
removeDestinationsByRichDestinationsvoid removeDestinationsByRichDestinations(PerunSession perunSession, List<RichDestination> richDestinations) throws PrivilegeException, ServiceNotExistsException, FacilityNotExistsException, DestinationAlreadyRemovedException Removes destinations defined by list of rich destinations. Each destination is removed from the rich destination's facility and service.- Parameters:
- perunSession-
- richDestinations- list of rich destinations
- Throws:
- PrivilegeException
- InternalErrorException
- ServiceNotExistsException
- FacilityNotExistsException
- DestinationAlreadyRemovedException
 
- 
removeRequiredAttributevoid removeRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) throws PrivilegeException, AttributeNotExistsException, ServiceNotExistsException, AttributeNotAssignedException Remove required attribute from service. TODO If you try to remove attribute which is default for other Required attribute ...- Parameters:
- perunSession- perunSession
- service- service from which the attribute will be removed
- attribute- attribute to remove
- Throws:
- InternalErrorException- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
- PrivilegeException- if privileges are not given
- AttributeNotExistsException
- AttributeNotAssignedException
- ServiceNotExistsException- if the service doesn't exists in underlaying data source
 
- 
removeRequiredAttributesvoid removeRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws PrivilegeException, AttributeNotExistsException, ServiceNotExistsException, AttributeNotAssignedException Batch version of removeRequiredAttribute
- 
unblockAllServicesOnDestinationvoid unblockAllServicesOnDestination(PerunSession sess, String destinationName) throws FacilityNotExistsException, PrivilegeException Erase all the possible denials on destinations defined by the destinationName. From this moment on, there are no Services being denied on these destinations.- Parameters:
- sess-
- destinationName- The name of destinations we want to clear of all the denials.
- Throws:
- FacilityNotExistsException
- PrivilegeException
 
- 
unblockAllServicesOnDestinationvoid unblockAllServicesOnDestination(PerunSession perunSession, int destinationId) throws PrivilegeException, FacilityNotExistsException, DestinationNotExistsException Erase all the possible denials on this destination. From this moment on, there are no Services being denied on this destination.- Parameters:
- perunSession-
- destinationId- The id of a destination we want to clear of all the denials.
- Throws:
- PrivilegeException
- FacilityNotExistsException
- DestinationNotExistsException
 
- 
unblockAllServicesOnFacilityvoid unblockAllServicesOnFacility(PerunSession perunSession, Facility facility) throws PrivilegeException Erase all the possible denials on this facility. From this moment on, there are no Services being denied on this facility.- Parameters:
- perunSession-
- facility- Facility we want to clear of all the denials.
- Throws:
- PrivilegeException
 
- 
unblockServiceOnDestinationvoid unblockServiceOnDestination(PerunSession perunSession, Service service, int destinationId) throws PrivilegeException, FacilityNotExistsException, DestinationNotExistsException Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen.- Parameters:
- perunSession-
- service- The Service, the denial of which we want to free on this destination.
- destinationId- The id of a destination on which we want to free the denial of the Service.
- Throws:
- PrivilegeException
- FacilityNotExistsException
- DestinationNotExistsException
 
- 
unblockServiceOnFacilityvoid unblockServiceOnFacility(PerunSession perunSession, Service service, Facility facility) throws PrivilegeException Free the denial of the Service on this facility. If the Service was banned on this facility, it will be freed. In case the Service was not banned on this facility, nothing will happen.- Parameters:
- perunSession-
- service- The Service, the denial of which we want to free on this facility.
- facility- The facility on which we want to free the denial of the Service.
- Throws:
- PrivilegeException
 
- 
unblockServicesOnDestinationsvoid unblockServicesOnDestinations(PerunSession perunSession, List<RichDestination> richDestinations) throws PrivilegeException, FacilityNotExistsException, DestinationNotExistsException Free the denial of the Service on the destination - each pair defined by the rich destination. If the Service was banned on the destination, it will be freed. In case the Service was not banned on the destination, nothing will happen.- Parameters:
- perunSession-
- richDestinations- the list of rich destinations
- Throws:
- PrivilegeException
- FacilityNotExistsException
- DestinationNotExistsException
 
- 
unblockServicesOnFacilityvoid unblockServicesOnFacility(PerunSession sess, List<Service> services, Facility facility) throws PrivilegeException, FacilityNotExistsException, ServiceIsNotBannedException Free the denial of the services on this facility.- Parameters:
- sess- perun session
- services- list of services
- facility- facility
- Throws:
- PrivilegeException- insufficient permissions
- FacilityNotExistsException- when facility does not exist
- ServiceIsNotBannedException- when unblocking service which is not blocked
 
- 
updateServicevoid updateService(PerunSession perunSession, Service service) throws ServiceNotExistsException, PrivilegeException Updates the service.- Parameters:
- perunSession-
- service-
- Throws:
- InternalErrorException
- ServiceNotExistsException
- PrivilegeException
 
- 
getFacilitiesDestinationsList all destinations for all facilities which are joined by resources to the VO.- Parameters:
- sess-
- vo- vo for which we are searching destinations
- Returns:
- list of destinations
- Throws:
- InternalErrorException
- VoNotExistsException
 
- 
getDestinationsCountGet count of all destinations.- Parameters:
- sess- PerunSession
- Returns:
- count of all destinations
- Throws:
- InternalErrorException
 
 
-