Package it.tidalwave.role.spi
Interface SystemRoleFactory
-
- All Known Implementing Classes:
AnnotationSpringSystemRoleFactory,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 SystemRoleFactoryA service which retrieves DCI Roles for a given object.- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSystemRoleFactory.Inner
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> java.util.List<T>findRoles(java.lang.Object owner, java.lang.Class<? extends T> roleType)Retrieves the roles of the given class for the given owner object.static SystemRoleFactorygetInstance()static voidreset()Removes a previously installedSystemRoleFactory.static voidset(SystemRoleFactory systemRoleFactory)Installs aSystemRoleFactory.
-
-
-
Method Detail
-
getInstance
@Nonnull static SystemRoleFactory getInstance()
-
reset
static void reset()
Removes a previously installedSystemRoleFactory. This method is for testing only (used to clean up a testing context).- See Also:
set(SystemRoleFactory)
-
set
static void set(@Nonnull SystemRoleFactory systemRoleFactory)Installs aSystemRoleFactory. This method is for testing only (used to set up a testing context).- Parameters:
systemRoleFactory- theSystemRoleFactory- See Also:
reset()
-
findRoles
@Nonnull <T> java.util.List<T> findRoles(@Nonnull java.lang.Object owner, @Nonnull java.lang.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 objectroleType- the dynamic type of the roles- Returns:
- a list of roles
-
-