Interface SecurityDialogFactory

  • All Known Implementing Classes:
    DefaultSecurityDialogFactory

    public interface SecurityDialogFactory
    A factory for security dialogs.
    Author:
    harald
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static SecurityDialogFactory getInstance()
      The singleton.
      default boolean isDialogAllowed​(org.tentackle.pdo.DomainContext context)
      Returns whether user determined by given domain context is allowed to use the security dialog.
      boolean isDomainContextUsed()
      Returns whether the domain context is used in security rules.
      If used, selectDomainContextObject(javafx.stage.Window, org.tentackle.pdo.DomainContext) must be overridden by the application.
      <T extends org.tentackle.pdo.PersistentDomainObject<T>>
      T
      selectDomainContextObject​(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>>
      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.
      void showDialog​(int classId, org.tentackle.pdo.DomainContext context)
      Shows a dialog to edit security rule sets for a PDO-class.
      void showDialog​(java.lang.Class<?> clazz)
      Shows a dialog to edit security rule sets for a non-PDO-class.
      void showDialog​(org.tentackle.pdo.PersistentDomainObject<?> pdo)
      Shows a dialog to edit security rule sets for a PDO.
    • Method Detail

      • 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

        <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.
        Type Parameters:
        T - the PDO type
        Parameters:
        owner - the owner window
        context - the domain context
        Returns:
        the grantee, null if none selected
      • selectDomainContextObject

        <T extends org.tentackle.pdo.PersistentDomainObject<T>> T selectDomainContextObject​(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.
        Type Parameters:
        T - the PDO type
        Parameters:
        owner - the owner window
        context - the domain context
        Returns:
        the context PDO, 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-ID
        context - 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