Package cz.metacentrum.perun.core.entry
Class OwnersManagerEntry
java.lang.Object
cz.metacentrum.perun.core.entry.OwnersManagerEntry
- All Implemented Interfaces:
OwnersManager
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateOwner
(PerunSession sess, Owner owner) Create owner in the underlaying data sourcevoid
deleteOwner
(PerunSession sess, Owner owner) Delete owner from underlaying data source.void
deleteOwner
(PerunSession sess, Owner owner, boolean forceDelete) Delete owner from underlaying data source.void
deleteOwners
(PerunSession sess, List<Owner> owners, boolean forceDelete) Delete owners from underlaying data source.getOwnerById
(PerunSession sess, int id) Find owner by id.getOwnerByName
(PerunSession sess, String name) Find owner by name.getOwners
(PerunSession sess) Return all owners.Gets the owners managervoid
setOwnersManagerBl
(OwnersManagerBl ownersManagerBl) Sets the ownersManagerBl for this instance.void
setPerunBl
(PerunBl perunBl) Sets the perunBl for this instance.
-
Constructor Details
-
OwnersManagerEntry
Constructor. -
OwnersManagerEntry
public OwnersManagerEntry()
-
-
Method Details
-
createOwner
Description copied from interface:OwnersManager
Create owner in the underlaying data source- Specified by:
createOwner
in interfaceOwnersManager
- Parameters:
sess
-owner
-- Returns:
- owner with id set
- Throws:
PrivilegeException
-
deleteOwner
public void deleteOwner(PerunSession sess, Owner owner) throws OwnerNotExistsException, PrivilegeException, RelationExistsException, OwnerAlreadyRemovedException Description copied from interface:OwnersManager
Delete owner from underlaying data source.- Specified by:
deleteOwner
in interfaceOwnersManager
- Parameters:
sess
-owner
-- Throws:
OwnerNotExistsException
PrivilegeException
RelationExistsException
OwnerAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
deleteOwner
public void deleteOwner(PerunSession sess, Owner owner, boolean forceDelete) throws OwnerNotExistsException, PrivilegeException, RelationExistsException, OwnerAlreadyRemovedException Description copied from interface:OwnersManager
Delete owner from underlaying data source.- Specified by:
deleteOwner
in interfaceOwnersManager
- Parameters:
sess
-owner
-forceDelete
-- Throws:
OwnerNotExistsException
PrivilegeException
RelationExistsException
OwnerAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
deleteOwners
public void deleteOwners(PerunSession sess, List<Owner> owners, boolean forceDelete) throws OwnerNotExistsException, PrivilegeException, RelationExistsException, OwnerAlreadyRemovedException Description copied from interface:OwnersManager
Delete owners from underlaying data source.- Specified by:
deleteOwners
in interfaceOwnersManager
- Parameters:
sess
- perun sessionowners
- list of ownersforceDelete
-- Throws:
OwnerNotExistsException
PrivilegeException
RelationExistsException
OwnerAlreadyRemovedException
- if there are 0 rows affected by deleting from DB
-
getOwnerById
public Owner getOwnerById(PerunSession sess, int id) throws OwnerNotExistsException, PrivilegeException Description copied from interface:OwnersManager
Find owner by id.- Specified by:
getOwnerById
in interfaceOwnersManager
- Parameters:
sess
-id
-- Returns:
- Owner with specified id
- Throws:
OwnerNotExistsException
PrivilegeException
-
getOwnerByName
public Owner getOwnerByName(PerunSession sess, String name) throws OwnerNotExistsException, PrivilegeException Description copied from interface:OwnersManager
Find owner by name.- Specified by:
getOwnerByName
in interfaceOwnersManager
- Parameters:
sess
- perun sessionname
- name of the owner- Returns:
- Owner with specified name
- Throws:
OwnerNotExistsException
- if owner with given name does not existPrivilegeException
- if user does not have sufficient permissions
-
getOwners
Description copied from interface:OwnersManager
Return all owners.- Specified by:
getOwners
in interfaceOwnersManager
- Parameters:
sess
-- Returns:
- list of owners
- Throws:
PrivilegeException
-
getOwnersManagerBl
Gets the owners manager- Returns:
- The ownersManagerBl.
-
getOwnersManagerImpl
-
getPerunBl
-
setOwnersManagerBl
Sets the ownersManagerBl for this instance.- Parameters:
ownersManagerBl
- The ownersManagerBl.
-
setPerunBl
Sets the perunBl for this instance.- Parameters:
perunBl
- The perunBl.
-