-
- All Known Implementing Classes:
DefaultSecurityDialogFactory
public interface SecurityDialogFactoryA factory for security dialogs.- Author:
- harald
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SecurityDialogFactorygetInstance()The singleton.default booleanisDialogAllowed(org.tentackle.pdo.DomainContext context)Returns whether user determined by given domain context is allowed to use the security dialog.booleanisDomainContextUsed()Returns whether the domain context is used in security rules.
If used,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, org.tentackle.pdo.DomainContext context, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>> contextPdo)Selects a domain context PDO.
This is usually a search dialog for PDOs describing a domain context.voidselectGrantee(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>> grantee)Selects a grantee.
This is usually a search dialog for users and/or usergroups.voidshowDialog(int classId, org.tentackle.pdo.DomainContext context)Shows a dialog to edit security rule sets for a PDO-class.voidshowDialog(java.lang.Class<?> clazz)Shows a dialog to edit security rule sets for a non-PDO-class.voidshowDialog(org.tentackle.pdo.PersistentDomainObject<?> pdo)Shows a dialog to edit security rule sets for a PDO.
-
-
-
Method Detail
-
getInstance
static SecurityDialogFactory getInstance()
The singleton.- Returns:
- the singleton
-
isDialogAllowed
default boolean isDialogAllowed(org.tentackle.pdo.DomainContext context)
Returns whether user determined by given domain context is allowed to use the security dialog.- Parameters:
context- the domain context- Returns:
- true if allowed
-
selectGrantee
void selectGrantee(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>> grantee)Selects a grantee.
This is usually a search dialog for users and/or usergroups.- Parameters:
owner- the owner windowcontext- the domain contextgrantee- the grantee consumer, invoked with null if none selected
-
isDomainContextUsed
boolean isDomainContextUsed()
Returns whether the domain context is used in security rules.
If used,selectDomainContextObject(javafx.stage.Window, org.tentackle.pdo.DomainContext, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>>)must be overridden by the application.- Returns:
- true if used, false by default
-
selectDomainContextObject
void selectDomainContextObject(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context, java.util.function.Consumer<org.tentackle.pdo.PersistentDomainObject<?>> contextPdo)Selects a domain context PDO.
This is usually a search dialog for PDOs describing a domain context.- Parameters:
owner- the owner windowcontext- the domain contextcontextPdo- the consumer of the context PDO, invoked with null if none selected
-
showDialog
void showDialog(org.tentackle.pdo.PersistentDomainObject<?> pdo)
Shows a dialog to edit security rule sets for a PDO.- Parameters:
pdo- the pdo
-
showDialog
void showDialog(int classId, org.tentackle.pdo.DomainContext context)Shows a dialog to edit security rule sets for a PDO-class.- Parameters:
classId- the class-IDcontext- the domain context
-
showDialog
void showDialog(java.lang.Class<?> clazz)
Shows a dialog to edit security rule sets for a non-PDO-class.- Parameters:
clazz- the class
-
-