java.lang.Object
org.tentackle.fx.rdc.DefaultGuiProviderFactory
- All Implemented Interfaces:
GuiProviderFactory
@Service(GuiProviderFactory.class)
public class DefaultGuiProviderFactory
extends Object
implements GuiProviderFactory
The default GUI provider factory.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends PersistentDomainObject<T>>
GuiProvider<T>createGuiProvider(T pdo) Creates a service object that provides methods related to the rdc gui.protected <T extends PersistentDomainObject<T>>
Optional<Constructor>getConstructor(Class<T> pdoClass) Creates theGuiProvider's constructor for a PDO class.<T extends PersistentDomainObject<T>>
booleanisGuiProviderAvailable(Class<T> pdoClass) Returns whether aGuiProviderServiceis available for the given PDO class.
-
Constructor Details
-
DefaultGuiProviderFactory
public DefaultGuiProviderFactory()Creates the factory.
-
-
Method Details
-
createGuiProvider
Description copied from interface:GuiProviderFactoryCreates a service object that provides methods related to the rdc gui.Throws a
PdoRuntimeExceptionif provider could not be created, or noGuiProviderServicefound at all.- Specified by:
createGuiProviderin interfaceGuiProviderFactory- Type Parameters:
T- the PDO type- Parameters:
pdo- the PDO- Returns:
- the GUI provider, never null
-
isGuiProviderAvailable
Description copied from interface:GuiProviderFactoryReturns whether aGuiProviderServiceis available for the given PDO class.Throws a
PdoRuntimeExceptionif provider could not be created.- Specified by:
isGuiProviderAvailablein interfaceGuiProviderFactory- Type Parameters:
T- the PDO type- Parameters:
pdoClass- the PDO class- Returns:
- true if provider exists, false if no
GuiProviderServicefound
-
getConstructor
protected <T extends PersistentDomainObject<T>> Optional<Constructor> getConstructor(Class<T> pdoClass) Creates theGuiProvider's constructor for a PDO class.Throws
PdoRuntimeExceptionif no matching constructor found.- Type Parameters:
T- the PDO type- Parameters:
pdoClass- the PDO class- Returns:
- the constructor's optional, empty if no such
GuiProviderServicefound at all
-