ApplicationPermissionRepository

API

ApplicationPermissionRepository.java
interface ApplicationPermissionRepository {
  Optional<ApplicationPermission> findByUserAndPermissionValue(String username, ApplicationPermissionValue changingPermissionValue)
  Optional<ApplicationPermission> findByRoleAndRuleAndFeature(ApplicationRole holder, ApplicationPermissionRule rule, ApplicationFeatureSort type, String featureFqn)
  Collection<ApplicationPermission> allPermissions()
  Collection<ApplicationPermission> findOrphaned()
  Collection<ApplicationPermission> findByFeatureCached(ApplicationFeatureId featureId)
  Collection<ApplicationPermission> findByRoleAndRuleAndFeatureTypeCached(ApplicationRole holder, ApplicationPermissionRule rule, ApplicationFeatureSort type)
  ApplicationPermission newApplicationPermission()     (1)
  ApplicationPermission newPermission(ApplicationRole role, ApplicationPermissionRule rule, ApplicationPermissionMode mode, String packageFqn, String className, String memberName)
  ApplicationPermission newPermission(ApplicationRole role, ApplicationPermissionRule rule, ApplicationPermissionMode mode, ApplicationFeatureSort featureSort, String featureFqn)
  ApplicationPermission newPermission(ApplicationRole role, ApplicationPermissionRule rule, ApplicationPermissionMode mode, ApplicationFeatureId featureId)
  ApplicationPermission newPermissionNoCheck(ApplicationRole role, ApplicationPermissionRule rule, ApplicationPermissionMode mode, ApplicationFeatureSort sort, String featureFqn)     (2)
  List<ApplicationPermission> findByUser(ApplicationUser applicationUser)     (3)
  List<ApplicationPermission> findByRole(ApplicationRole applicationRole)
  List<ApplicationPermission> findByUserMemento(UserMemento user)     (4)
  List<ApplicationPermission> findByRoleNames(List<String> roleNames)     (5)
}
1 newApplicationPermission()
2 newPermissionNoCheck(ApplicationRole, ApplicationPermissionRule, ApplicationPermissionMode, ApplicationFeatureSort, String)

Intended for use by fixture scripts.

3 findByUser(ApplicationUser)

Uses the ApplicationRole s associated with the ApplicationUser .

4 findByUserMemento(UserMemento)

Uses the UserMemento#getRoles() roles held within the provided UserMemento .

5 findByRoleNames(List)

Returns the set of permissions associated with the provided list of roles (identified by their role name).

Members

newApplicationPermission()

newPermissionNoCheck(ApplicationRole, ApplicationPermissionRule, ApplicationPermissionMode, ApplicationFeatureSort, String)

Intended for use by fixture scripts.

findByUser(ApplicationUser)

Uses the ApplicationRole s associated with the ApplicationUser .

findByUserMemento(UserMemento)

Uses the UserMemento#getRoles() roles held within the provided UserMemento .

Added to support org.apache.causeway.applib.services.user.ImpersonateMenu.impersonateWithRoles#act(String, List, String) impersonation by role .

findByRoleNames(List)

Returns the set of permissions associated with the provided list of roles (identified by their role name).