Package cz.metacentrum.perun.core.bl
Interface OwnersManagerBl
- All Known Implementing Classes:
OwnersManagerBlImpl
public interface OwnersManagerBl
OwnersManager
- Author:
- Slavek Licehammer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkOwnerExists
(PerunSession sess, Owner owner) createOwner
(PerunSession perunSession, Owner owner) Create owner in the underlaying data sourcevoid
deleteOwner
(PerunSession perunSession, Owner owner) Delete owner from underlaying data source.void
deleteOwner
(PerunSession perunSession, Owner owner, boolean forceDelete) Delete owner from underlaying data source.getOwnerById
(PerunSession perunSession, int id) Find owner by id.getOwnerByName
(PerunSession perunSession, String name) Find owner by name.getOwners
(PerunSession perunSession) Return all owners.
-
Method Details
-
checkOwnerExists
- Throws:
OwnerNotExistsException
-
createOwner
Create owner in the underlaying data source- Parameters:
perunSession
-owner
-- Returns:
- owner with id set
- Throws:
InternalErrorException
-
deleteOwner
void deleteOwner(PerunSession perunSession, Owner owner, boolean forceDelete) throws RelationExistsException, OwnerAlreadyRemovedException Delete owner from underlaying data source.- Parameters:
perunSession
-owner
-forceDelete
-- Throws:
InternalErrorException
RelationExistsException
OwnerAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
deleteOwner
void deleteOwner(PerunSession perunSession, Owner owner) throws RelationExistsException, OwnerAlreadyRemovedException Delete owner from underlaying data source.- Parameters:
perunSession
-owner
-- Throws:
InternalErrorException
RelationExistsException
OwnerAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
getOwnerById
Find owner by id.- Parameters:
perunSession
-id
-- Returns:
- Owner with specified id
- Throws:
InternalErrorException
OwnerNotExistsException
-
getOwnerByName
Find owner by name.- Parameters:
perunSession
- perun sessionname
- name of the owner- Returns:
- Owner with specified name
- Throws:
OwnerNotExistsException
- if owner with given name does not exist
-
getOwners
Return all owners.- Parameters:
perunSession
-- Returns:
- list of owners
- Throws:
InternalErrorException
-