Interface ServicesManagerBl

All Known Implementing Classes:
ServicesManagerBlImpl

public interface ServicesManagerBl
Author:
Michal Prochazka <michalp@ics.muni.cz>, Slavek Licehammer <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.
  • Method Details

    • blockServiceOnFacility

      void blockServiceOnFacility(PerunSession perunSession, Service service, Facility facility) throws ServiceAlreadyBannedException
      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
    • blockServiceOnDestination

      void blockServiceOnDestination(PerunSession perunSession, Service service, int destinationId) throws PrivilegeException, DestinationNotExistsException, ServiceAlreadyBannedException
      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
    • blockAllServicesOnFacility

      void 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
    • blockAllServicesOnDestination

      void blockAllServicesOnDestination(PerunSession perunSession, int destinationId) throws PrivilegeException, DestinationNotExistsException
      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
    • getServicesBlockedOnFacility

      List<Service> getServicesBlockedOnFacility(PerunSession perunSession, Facility facility)
      List all the Services that are banned on this facility.
      Parameters:
      perunSession -
      facility -
      Returns:
      a list of Services that are denied on the facility
    • getServicesBlockedOnDestination

      List<Service> getServicesBlockedOnDestination(PerunSession perunSession, int destinationId)
      List all the Services that are banned on this destination.
      Parameters:
      perunSession -
      destinationId -
      Returns:
      a list of Services that are denied on the destination
    • isServiceBlockedOnFacility

      boolean isServiceBlockedOnFacility(Service service, Facility facility)
      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
    • isServiceBlockedOnDestination

      boolean isServiceBlockedOnDestination(Service service, int destinationId)
      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
    • unblockAllServicesOnFacility

      void unblockAllServicesOnFacility(PerunSession perunSession, Facility facility)
      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.
    • unblockAllServicesOnDestination

      void unblockAllServicesOnDestination(PerunSession sess, String destinationName)
      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.
    • unblockAllServicesOnDestination

      void unblockAllServicesOnDestination(PerunSession perunSession, int destinationId)
      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.
    • unblockServiceOnFacility

      void unblockServiceOnFacility(PerunSession perunSession, Service service, Facility facility)
      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.
    • unblockServiceOnDestination

      void unblockServiceOnDestination(PerunSession perunSession, Service service, int destinationId)
      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.
    • forceServicePropagation

      boolean forceServicePropagation(PerunSession perunSession, Facility facility, Service service)
      Forces service propagation on defined facility.
      Parameters:
      perunSession -
      service -
      facility -
      Returns:
      true if it is possible, false if not
    • forceServicePropagation

      boolean forceServicePropagation(PerunSession perunSession, Service service)
      Forces service propagation on all facilities where the service is defined on.
      Parameters:
      perunSession -
      service -
      Returns:
      true if it is possible, false if not
    • planServicePropagation

      boolean planServicePropagation(PerunSession perunSession, Facility facility, Service service)
      Plans service propagation on defined facility.
      Parameters:
      perunSession -
      facility -
      service -
      Returns:
      true if it is possible, false if not
    • planServicePropagation

      boolean planServicePropagation(PerunSession perunSession, Service service)
      Forces service propagation on all facilities where the service is defined on.
      Parameters:
      perunSession -
      service -
      Returns:
      true if it is possible, false if not
    • getFacilityAssignedServicesForGUI

      List<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
    • createService

      Service createService(PerunSession perunSession, Service service) throws ServiceExistsException
      Creates new service.
      Parameters:
      perunSession -
      service -
      Returns:
      new service
      Throws:
      ServiceExistsException
    • deleteService

      void deleteService(PerunSession perunSession, Service service, boolean forceFlag) throws RelationExistsException, ServiceAlreadyRemovedException
      Deletes the service.
      Parameters:
      perunSession -
      service -
      forceFlag - if set to true, removes the service with all dependendant objects from db instead of raising exception
      Throws:
      RelationExistsException
      InternalErrorException
      ServiceAlreadyRemovedException - if there are 0 rows affected by deleting from DB
    • updateService

      void updateService(PerunSession perunSession, Service service)
      Updates the service.
      Parameters:
      perunSession -
      service -
    • getServiceById

      Service getServiceById(PerunSession perunSession, int id) throws ServiceNotExistsException
      Get service by id.
      Parameters:
      perunSession -
      id -
      Returns:
      service with specified id
      Throws:
      InternalErrorException
      ServiceNotExistsException
    • getServiceByName

      Service getServiceByName(PerunSession perunSession, String name) throws ServiceNotExistsException
      Get service by name.
      Parameters:
      perunSession -
      name - name of the service
      Returns:
      service with specified name
      Throws:
      InternalErrorException
      ServiceNotExistsException
    • getServices

      List<Service> getServices(PerunSession perunSession)
      get all services in perun
      Parameters:
      perunSession -
      Returns:
      all services in perun
      Throws:
      InternalErrorException
    • getServicesByAttributeDefinition

      List<Service> getServicesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition)
      Get all services with given attribute.
      Parameters:
      sess - perun session
      attributeDefinition -
      Returns:
      all services with given attribute
      Throws:
      InternalErrorException
    • getAssignedResources

      List<Resource> getAssignedResources(PerunSession sess, Service service)
      Get all resources where the service is defined.
      Parameters:
      sess -
      service -
      Returns:
      list of resources where the service is defined
      Throws:
      InternalErrorException
    • getHierarchicalData

      ServiceAttributes getHierarchicalData(PerunSession perunSession, Service service, Facility facility)
      Generates the list of attributes per each member associated with the resource.
      Parameters:
      perunSession -
      service - attributes required by this service you will get
      facility - you will get attributes for this facility, resources associated with it and members assigned to the resources
      Returns:
      attributes in special structure. Facility is in the root, facility children are resources. And resource children are members.
      Throws:
      InternalErrorException
    • getHashedHierarchicalData

      HashedGenData getHashedHierarchicalData(PerunSession perunSession, Service service, Facility facility, boolean consentEval)
      Generates hashed hierarchical data structure for given service and resource. 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
      Returns:
      generated hashed data structure
    • getHashedDataWithGroups

      HashedGenData getHashedDataWithGroups(PerunSession perunSession, Service service, Facility facility, boolean consentEval)
      Generates hashed data with group structure for given service and resource. 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
      Returns:
      generated hashed data structure
    • getFlatData

      ServiceAttributes getFlatData(PerunSession perunSession, Service service, Facility facility)
      Generates the list of attributes per each resource associated with the facility and filtered by service. Next it generates list of attributes associated with the facility and service.
      Parameters:
      perunSession -
      service - you will get attributes required by this service
      facility - you will get attributes for this facility, resources associated with it and users assigned to the resources
      Returns:
      attributes in special structure. The facility is in the root. Facility first children is abstract node which contains no attributes and it's children are all resources. Facility second child is abstract node with no attribute and it's children are all users.
      Throws:
      InternalErrorException
    • getDataWithGroups

      ServiceAttributes getDataWithGroups(PerunSession perunSession, Service service, Facility facility)
      Generates the list of attributes per each member associated with the resources and groups. Generate also vo-required attributes for service. Add them to the same structure like resource-required attributes.
      Parameters:
      perunSession -
      service - attributes required by this service you will get
      facility - you will get attributes for this facility, resources associated with it and members assigned to the resources
      Returns:
      attributes in special structure. Facility is in the root, facility children are resources. Resource first child is abstract structure which children are groups. Resource second child is abstract structure which children are members. Group first child is empty structure (services expect members to be second child, here used to be subgroups). Group second child is abstract structure which children are members.
    • getDataWithVos

      ServiceAttributes getDataWithVos(PerunSession perunSession, Service service, Facility facility) throws VoNotExistsException
      Generates the list of attributes per each member associated with the resources and groups.
      Parameters:
      perunSession -
      service - attributes required by this service you will get
      facility - you will get attributes for this facility, resources associated with it and members assigned to the resources
      Returns:
      attributes in special structure. Facility is in the root, facility children are resources. Resource first child is abstract structure which children are groups. Resource second chi is abstract structure which children are members. Group first child is abstract structure which children are groups. Group second chi is abstract structure which children are members.
      Throws:
      InternalErrorException
      VoNotExistsException
    • getServicesPackages

      List<ServicesPackage> getServicesPackages(PerunSession perunSession)
      List packages
      Parameters:
      perunSession -
      Returns:
      list of packages in the DB
      Throws:
      InternalErrorException
    • getServicesPackageById

      ServicesPackage getServicesPackageById(PerunSession perunSession, int servicesPackageId) throws ServicesPackageNotExistsException
      Get package by Id
      Parameters:
      servicesPackageId - id of the package we want to retrieve
      perunSession -
      Returns:
      package
      Throws:
      InternalErrorException
      ServicesPackageNotExistsException
    • getServicesPackageByName

      ServicesPackage getServicesPackageByName(PerunSession perunSession, String name) throws ServicesPackageNotExistsException
      Get package by name
      Parameters:
      name - name of the services package
      perunSession -
      Returns:
      package
      Throws:
      InternalErrorException
      ServicesPackageNotExistsException
    • createServicesPackage

      ServicesPackage createServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage) throws ServicesPackageExistsException
      Insert a new package
      Parameters:
      servicesPackage - package to be inserted
      perunSession -
      Returns:
      ServicesPackage object completely filled (including Id)
      Throws:
      InternalErrorException
      ServicesPackageExistsException
    • updateServicesPackage

      void updateServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage)
      Update package
      Parameters:
      servicesPackage - with which is the old one supposed to be updated :-)
      perunSession -
      Throws:
      InternalErrorException
    • deleteServicesPackage

      void deleteServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage) throws RelationExistsException
      Remove the package
      Parameters:
      perunSession -
      servicesPackage - services package to be removed.
      Throws:
      RelationExistsException
      InternalErrorException
    • addServiceToServicesPackage

      void addServiceToServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage, Service service) throws ServiceAlreadyAssignedException
      Add the service to the package
      Parameters:
      perunSession -
      servicesPackage - services package to which the service supposed to be added
      service - service to be added to the services package
      Throws:
      ServiceAlreadyAssignedException
      InternalErrorException
    • removeServiceFromServicesPackage

      void removeServiceFromServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage, Service service) throws ServiceAlreadyRemovedFromServicePackageException
      Remove Service from Services Package
      Parameters:
      perunSession -
      servicesPackage - services package from which the service supposed to be removed
      service - service that will be removed from the services package
      Throws:
      InternalErrorException
      ServiceAlreadyRemovedFromServicePackageException - there are 0 rows affected by removing service from servicePackage in DB
    • getServicesFromServicesPackage

      List<Service> getServicesFromServicesPackage(PerunSession perunSession, ServicesPackage servicesPackage)
      List services stored in the packages
      Parameters:
      servicesPackage - the package from which we want to list the services
      Returns:
      list consisting services
      Throws:
      InternalErrorException
    • addRequiredAttribute

      void addRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) throws AttributeAlreadyAssignedException, ServiceAttributesCannotExtend
      Mark the attribute as required for the service. Required attributes 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 -
      service -
      attribute -
      Throws:
      InternalErrorException
      AttributeAlreadyAssignedException
      ServiceAttributesCannotExtend
    • addRequiredAttributes

      void addRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws AttributeAlreadyAssignedException, ServiceAttributesCannotExtend
      Batch version of addRequiredAttribute
      Throws:
      AttributeAlreadyAssignedException
      ServiceAttributesCannotExtend
      See Also:
    • removeRequiredAttribute

      void removeRequiredAttribute(PerunSession perunSession, Service service, AttributeDefinition attribute) throws AttributeNotAssignedException
      Remove required attribute from service. TODO If you try to remove attribute which is default for other Required attribute ...
      Parameters:
      perunSession -
      service -
      attribute -
      Throws:
      InternalErrorException
      AttributeNotAssignedException
    • removeRequiredAttributes

      void removeRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws AttributeNotAssignedException
      Batch version of removeRequiredAttribute
      Throws:
      AttributeNotAssignedException
      See Also:
    • removeAllRequiredAttributes

      void removeAllRequiredAttributes(PerunSession perunSession, Service service)
      Detate all required attributes from service.
      Parameters:
      perunSession -
      service -
      Throws:
      InternalErrorException
    • addDestination

      Destination addDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) throws DestinationAlreadyAssignedException
      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
      DestinationAlreadyAssignedException
    • addDestination

      Destination addDestination(PerunSession perunSession, List<Service> services, Facility facility, Destination destination)
      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
    • addDestinationsForAllServicesOnFacility

      List<Destination> addDestinationsForAllServicesOnFacility(PerunSession perunSession, Facility facility, Destination destination) throws DestinationAlreadyAssignedException
      Adds destination for all services defined on the facility.
      Parameters:
      perunSession -
      facility -
      destination -
      Returns:
      list of added destinations
      Throws:
      DestinationAlreadyAssignedException
    • addDestinationsDefinedByHostsOnFacility

      List<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Service service, Facility facility) throws DestinationAlreadyAssignedException
      Defines service destination for all hosts using theirs hostnames.
      Parameters:
      perunSession -
      service -
      facility -
      Returns:
      list of added destinations
      Throws:
      InternalErrorException
      DestinationAlreadyAssignedException
    • addDestinationsDefinedByHostsOnFacility

      List<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, List<Service> services, Facility facility)
      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 -
      facility -
      Returns:
      list of added destinations (even if they already was added before)
      Throws:
      InternalErrorException
    • addDestinationsDefinedByHostsOnFacility

      List<Destination> addDestinationsDefinedByHostsOnFacility(PerunSession perunSession, Facility facility)
      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:
      InternalErrorException
    • removeDestination

      void removeDestination(PerunSession perunSession, Service service, Facility facility, Destination destination) throws DestinationAlreadyRemovedException
      Removes an destination from the facility and service.
      Parameters:
      perunSession -
      service -
      facility -
      destination - string contains destination address (mail, url, hostname, ...)
      Throws:
      InternalErrorException
      DestinationAlreadyRemovedException
    • getDestinationById

      Destination getDestinationById(PerunSession perunSession, int id) throws DestinationNotExistsException
      Get destination by id
      Parameters:
      perunSession -
      id -
      Returns:
      Destination with the id
      Throws:
      InternalErrorException
      DestinationNotExistsException
    • getDestinations

      List<Destination> getDestinations(PerunSession perunSession, Service service, Facility facility)
      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:
      InternalErrorException
    • getDestinations

      List<Destination> getDestinations(PerunSession perunSession)
      Get list of all destinations.
      Parameters:
      perunSession -
      Returns:
      list of all destinations for session
      Throws:
      InternalErrorException
    • getDestinations

      List<Destination> getDestinations(PerunSession perunSession, Facility facility)
      Get lists of all destinations for specific Facility
      Parameters:
      perunSession -
      facility - the facility
      Returns:
      lists of all destinations for specific Facility
      Throws:
      InternalErrorException
    • getAllRichDestinations

      List<RichDestination> getAllRichDestinations(PerunSession perunSession, Facility facility)
      Get list of all rich destinations defined for the facility.
      Parameters:
      perunSession -
      facility -
      Returns:
      list of rich destinations defined for the facility
      Throws:
      InternalErrorException
    • getAllRichDestinations

      List<RichDestination> getAllRichDestinations(PerunSession perunSession, Service service)
      Get list of all rich destinations defined for the service.
      Parameters:
      perunSession -
      service -
      Returns:
      list of rich destinations defined for the service
      Throws:
      InternalErrorException
    • getRichDestinations

      List<RichDestination> getRichDestinations(PerunSession perunSession, Facility facility, Service service)
      Get list of all rich destinations defined for the service and the facility
      Parameters:
      perunSession -
      facility -
      service -
      Returns:
      list of rich destinations defined for the service and the facility
      Throws:
      InternalErrorException
    • removeAllDestinations

      void removeAllDestinations(PerunSession perunSession, Service service, Facility facility)
      Removes all defined destinations for the service and facility.
      Parameters:
      perunSession -
      service -
      facility -
      Throws:
      InternalErrorException
    • removeAllDestinations

      void removeAllDestinations(PerunSession perunSession, Facility facility)
      Removes all defined destinations for the facility.
      Parameters:
      perunSession -
      facility - the facility
      Throws:
      InternalErrorException
    • checkServiceExists

      void checkServiceExists(PerunSession sess, Service service) throws ServiceNotExistsException
      Check if the service exits.
      Parameters:
      sess -
      service -
      Throws:
      InternalErrorException
      ServiceNotExistsException
    • checkServicesPackageExists

      void checkServicesPackageExists(PerunSession sess, ServicesPackage servicesPackage) throws ServicesPackageNotExistsException
      Check if the service package exists.
      Parameters:
      sess -
      servicesPackage -
      Throws:
      InternalErrorException
      ServicesPackageNotExistsException
    • getDestinationIdByName

      int getDestinationIdByName(PerunSession sess, String name, String type) throws DestinationNotExistsException
      Returns Destinations ID based on destination name and type.
      Parameters:
      sess -
      name - Name (value) of destination
      type - type of destination
      Returns:
      Throws:
      InternalErrorException
      DestinationNotExistsException
    • getAssignedServices

      List<Service> getAssignedServices(PerunSession perunSession, Facility facility)
      List all services associated with the facility (via resource).
      Parameters:
      perunSession -
      facility -
      Returns:
      list of services assigned to facility
      Throws:
      InternalErrorException
    • getFacilitiesDestinations

      List<Destination> getFacilitiesDestinations(PerunSession sess, Vo vo)
      List 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
    • getDestinationsCount

      int getDestinationsCount(PerunSession perunSession)
      Get count of all destinations.
      Parameters:
      perunSession -
      Returns:
      count of all destinations
      Throws:
      InternalErrorException
    • deleteDestination

      void deleteDestination(PerunSession sess, Destination destination) throws DestinationAlreadyRemovedException, RelationExistsException
      Deletes destination.
      Parameters:
      sess -
      destination - destination to be deleted
      Throws:
      InternalErrorException
      DestinationAlreadyRemovedException - if there are 0 rows affected by deleting from DB
      RelationExistsException - if the destination is used by some services and facilities