Package it.tidalwave.role.spi
Interface OwnerRoleFactoryProvider
-
- All Known Implementing Classes:
OwnerRoleFactoryProvider.SimpleOwnerRoleFactoryProvider
- 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 OwnerRoleFactoryProviderThe provider of the singletonOwnerRoleFactory.- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOwnerRoleFactoryProvider.EmptyOwnerRoleFactorystatic classOwnerRoleFactoryProvider.Innerstatic classOwnerRoleFactoryProvider.SimpleOwnerRoleFactoryProvider
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description OwnerRoleFactorycreateRoleFactory(java.lang.Object owner)Creates anOwnerRoleFactoryfor the given objectstatic OwnerRoleFactoryemptyRoleFactory()Returns an empty implementation of factory.static OwnerRoleFactoryProvidergetInstance()Returns the singleton instance ofOwnerRoleFactoryProviderstatic voidreset()Removes a previously installedOwnerRoleFactory.static voidset(OwnerRoleFactory ownerRoleFactory)Installs aOwnerRoleFactory.
-
-
-
Method Detail
-
getInstance
@Nonnull static OwnerRoleFactoryProvider getInstance()
Returns the singleton instance ofOwnerRoleFactoryProvider- Returns:
- the singleton instance
-
createRoleFactory
@Nonnull OwnerRoleFactory createRoleFactory(@Nonnull java.lang.Object owner)
Creates anOwnerRoleFactoryfor the given object- Parameters:
owner- the object- Returns:
AsDelegate
-
set
static void set(@Nonnull OwnerRoleFactory ownerRoleFactory)Installs aOwnerRoleFactory. This method is for testing only (used to set up a testing context).- Parameters:
ownerRoleFactory- theOwnerRoleFactory- See Also:
reset()
-
reset
static void reset()
Removes a previously installedOwnerRoleFactory. This method is for testing only (used to clean up a testing context).- See Also:
set(OwnerRoleFactory)
-
emptyRoleFactory
@Nonnull static OwnerRoleFactory emptyRoleFactory()
Returns an empty implementation of factory. Useful for setting up a test environment.- Returns:
- the empty implementation
- Since:
- 3.2-ALPHA-1
-
-