Module org.tentackle.fx.rdc
Package org.tentackle.fx.rdc.security
Class DefaultSecurityDialogFactory
java.lang.Object
org.tentackle.fx.rdc.security.DefaultSecurityDialogFactory
- All Implemented Interfaces:
SecurityDialogFactory
@Service(SecurityDialogFactory.class)
public class DefaultSecurityDialogFactory
extends Object
implements SecurityDialogFactory
Default implementation of the
SecurityDialogFactory.- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the domain context is used in security rules.
If used,SecurityDialogFactory.selectDomainContextObject(javafx.stage.Window, org.tentackle.pdo.DomainContext, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>>)must be overridden by the application.voidselectDomainContextObject(javafx.stage.Window owner, DomainContext context, Consumer<PersistentDomainObject<?>> contextPdo) Selects a domain context PDO.
This is usually a search dialog for PDOs describing a domain context.voidselectGrantee(javafx.stage.Window owner, DomainContext context, Consumer<PersistentDomainObject<?>> grantee) Selects a grantee.
This is usually a search dialog for users and/or usergroups.voidshowDialog(int classId, DomainContext context) Shows a dialog to edit security rule sets for a PDO-class.voidshowDialog(Class<?> clazz) Shows a dialog to edit security rule sets for a non-PDO-class.voidshowDialog(PersistentDomainObject<?> pdo) Shows a dialog to edit security rule sets for a PDO.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tentackle.fx.rdc.security.SecurityDialogFactory
isDialogAllowed
-
Constructor Details
-
DefaultSecurityDialogFactory
public DefaultSecurityDialogFactory()
-
-
Method Details
-
selectGrantee
public void selectGrantee(javafx.stage.Window owner, DomainContext context, Consumer<PersistentDomainObject<?>> grantee) Selects a grantee.
This is usually a search dialog for users and/or usergroups.This needs to be implemented by the application!
- Specified by:
selectGranteein interfaceSecurityDialogFactory- Parameters:
owner- the owner windowcontext- the domain contextgrantee- the grantee consumer, invoked with null if none selected
-
isDomainContextUsed
public boolean isDomainContextUsed()Description copied from interface:SecurityDialogFactoryReturns whether the domain context is used in security rules.
If used,SecurityDialogFactory.selectDomainContextObject(javafx.stage.Window, org.tentackle.pdo.DomainContext, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>>)must be overridden by the application.- Specified by:
isDomainContextUsedin interfaceSecurityDialogFactory- Returns:
- true if used, false by default
-
selectDomainContextObject
public void selectDomainContextObject(javafx.stage.Window owner, DomainContext context, Consumer<PersistentDomainObject<?>> contextPdo) Description copied from interface:SecurityDialogFactorySelects a domain context PDO.
This is usually a search dialog for PDOs describing a domain context.- Specified by:
selectDomainContextObjectin interfaceSecurityDialogFactory- Parameters:
owner- the owner windowcontext- the domain contextcontextPdo- the consumer of the context PDO, invoked with null if none selected
-
showDialog
Description copied from interface:SecurityDialogFactoryShows a dialog to edit security rule sets for a PDO.- Specified by:
showDialogin interfaceSecurityDialogFactory- Parameters:
pdo- the pdo
-
showDialog
Description copied from interface:SecurityDialogFactoryShows a dialog to edit security rule sets for a PDO-class.- Specified by:
showDialogin interfaceSecurityDialogFactory- Parameters:
classId- the class-IDcontext- the domain context
-
showDialog
Description copied from interface:SecurityDialogFactoryShows a dialog to edit security rule sets for a non-PDO-class.- Specified by:
showDialogin interfaceSecurityDialogFactory- Parameters:
clazz- the class
-