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 java.lang.Object implements SecurityDialogFactory
Default implementation of theSecurityDialogFactory.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description DefaultSecurityDialogFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDomainContextUsed()Returns whether the domain context is used in security rules.
If used,SecurityDialogFactory.selectDomainContextObject(javafx.stage.Window, org.tentackle.pdo.DomainContext)must be overridden by the application.<T extends org.tentackle.pdo.PersistentDomainObject<T>>
TselectDomainContextObject(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context)Selects a domain context PDO.
This is usually a search dialog for PDOs describing a domain context.<T extends org.tentackle.pdo.PersistentDomainObject<T>>
TselectGrantee(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context)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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.tentackle.fx.rdc.security.SecurityDialogFactory
isDialogAllowed
-
-
-
-
Method Detail
-
selectGrantee
public <T extends org.tentackle.pdo.PersistentDomainObject<T>> T selectGrantee(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context)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- Type Parameters:
T- the PDO type- Parameters:
owner- the owner windowcontext- the domain context- Returns:
- the grantee, 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)must be overridden by the application.- Specified by:
isDomainContextUsedin interfaceSecurityDialogFactory- Returns:
- true if used, false by default
-
selectDomainContextObject
public <T extends org.tentackle.pdo.PersistentDomainObject<T>> T selectDomainContextObject(javafx.stage.Window owner, org.tentackle.pdo.DomainContext context)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- Type Parameters:
T- the PDO type- Parameters:
owner- the owner windowcontext- the domain context- Returns:
- the context PDO, null if none selected
-
showDialog
public void showDialog(org.tentackle.pdo.PersistentDomainObject<?> pdo)
Description copied from interface:SecurityDialogFactoryShows a dialog to edit security rule sets for a PDO.- Specified by:
showDialogin interfaceSecurityDialogFactory- Parameters:
pdo- the pdo
-
showDialog
public void showDialog(int classId, org.tentackle.pdo.DomainContext context)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
public void showDialog(java.lang.Class<?> clazz)
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
-
-