Interface SystemRoleFactory

All Known Implementing Classes:
SystemRoleFactorySupport
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SystemRoleFactory
A service which retrieves DCI Roles for a given object.
Author:
Fabrizio Giudici
  • Method Details

    • getInstance

      @Nonnull static SystemRoleFactory getInstance()
    • reset

      static void reset()
      Removes a previously installed SystemRoleFactory. This method is for testing only (used to clean up a testing context).
      See Also:
    • set

      static void set(@Nonnull SystemRoleFactory systemRoleFactory)
      Installs a SystemRoleFactory. This method is for testing only (used to set up a testing context).
      Parameters:
      systemRoleFactory - the SystemRoleFactory
      See Also:
    • findRoles

      @Nonnull <T> List<T> findRoles(@Nonnull Object owner, @Nonnull Class<? extends T> roleType)
      Retrieves the roles of the given class for the given owner object.
      Type Parameters:
      T - the static type of the roles
      Parameters:
      owner - the owner object
      roleType - the dynamic type of the roles
      Returns:
      a list of roles