Package org.europa.together.business.acl
Interface ResourcesDAO
- All Superinterfaces:
org.europa.together.business.GenericDAO<ResourcesDO,
,String> Serializable
@Repository
public interface ResourcesDAO
extends org.europa.together.business.GenericDAO<ResourcesDO,String>
A resource is linked to a permission. This avoid duplications and simplify
the administration.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- elmar.dott@gmail.com
-
Field Summary
Fields inherited from interface org.europa.together.business.GenericDAO
FEATURE_ID
-
Method Summary
Modifier and TypeMethodDescriptionboolean
delete
(ResourcesDO resource) If the resource object exist in the persistence context and is not protected, it will be deleted.Fetch a specific resource defined by the resource name and the view.Return a list of all resources which protected against deleting, to prevent accidents.listResourcesOfSameType
(String resource) Fetch a list of resources with the same name.void
update
(ResourcesDO resource) Overwrite the regular DAO update method, because of composite Primary Key.Methods inherited from interface org.europa.together.business.GenericDAO
countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, find, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update
-
Method Details
-
find
Fetch a specific resource defined by the resource name and the view.- Parameters:
resource
- as Stringview
- as String- Returns:
- ResourceDo as Object
-
update
@API(status=STABLE, since="1.0") void update(ResourcesDO resource) throws jakarta.persistence.EntityNotFoundException Overwrite the regular DAO update method, because of composite Primary Key.- Parameters:
resource
- as ResourceDO- Throws:
jakarta.persistence.EntityNotFoundException
-
delete
@API(status=STABLE, since="1.0") boolean delete(ResourcesDO resource) throws jakarta.persistence.EntityNotFoundException If the resource object exist in the persistence context and is not protected, it will be deleted.- Parameters:
resource
- as ResourceDO- Returns:
- true on success
- Throws:
jakarta.persistence.EntityNotFoundException
-
listResourcesOfSameType
Fetch a list of resources with the same name. A system could contain multiply resources with the same name. To distinguish this resources a view is defined. The default entry for views is default.- Parameters:
resource
- as string- Returns:
- List of ResourcesDO
-
listProtectedResources
Return a list of all resources which protected against deleting, to prevent accidents.- Returns:
- List of ResourcesDO
-