Interface PermissionDAO

All Superinterfaces:
org.europa.together.business.GenericDAO<PermissionDO,String>, Serializable
All Known Implementing Classes:
PermissionHbmDAO

@Repository public interface PermissionDAO extends org.europa.together.business.GenericDAO<PermissionDO,String>
Permissions are linked to roles. Every permission is just to one resource related. A role contains multiply permissions. To avoid configuration inconsistencies, it only allowed to link once a permission with a specific resource and view to a role.
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 Type
    Method
    Description
    find(String permissionId)
    Override the find() method to fetch a permission by the given id.
    find(String roleName, String resource, String view)
    Override the find() method to fetch a permission by the given roleName, resource and view.
    List all permissions of a role.

    Methods inherited from interface org.europa.together.business.GenericDAO

    countAllElements, create, delete, deserializeJsonAsList, deserializeJsonAsObject, getPrimaryKeyOfObject, listAllElements, serializeAsJson, update
  • Method Details

    • find

      @API(status=STABLE, since="1.0") PermissionDO find(String permissionId)
      Override the find() method to fetch a permission by the given id.
      Specified by:
      find in interface org.europa.together.business.GenericDAO<PermissionDO,String>
      Parameters:
      permissionId - as String
      Returns:
      PermissionDO as Object
    • find

      @API(status=STABLE, since="1.0") PermissionDO find(String roleName, String resource, String view)
      Override the find() method to fetch a permission by the given roleName, resource and view.
    • listRolePermissions

      @API(status=STABLE, since="1.0") List<PermissionDO> listRolePermissions(String roleName)
      List all permissions of a role. If a role not exist the result will be an empty list.
      Parameters:
      roleName - as String
      Returns:
      List of PermissionDO