Class BasePermissionNodeEditor

    • Field Detail

      • permissionNode

        protected org.uberfire.security.client.authz.tree.PermissionNode permissionNode
      • width

        protected int width
      • leftMargin

        protected int leftMargin
      • treeLevel

        protected int treeLevel
      • padding

        protected int padding
    • Constructor Detail

      • BasePermissionNodeEditor

        public BasePermissionNodeEditor()
    • Method Detail

      • isAnException

        public boolean isAnException​(org.uberfire.security.authz.Permission permission)
        Specified by:
        isAnException in interface PermissionNodeEditor
      • onParentPermissionChanged

        public void onParentPermissionChanged​(org.uberfire.security.authz.Permission permission,
                                              boolean on)
        Invoked when any of the parent permissions of a permission editor changes.

        By default, it does nothing as it is up to each subclass to provide its own implementation.

        Only leaf or intermediate nodes are invoked.

        Specified by:
        onParentPermissionChanged in interface PermissionNodeEditor
      • onChildPermissionChanged

        public void onChildPermissionChanged​(PermissionNodeEditor childEditor,
                                             org.uberfire.security.authz.Permission permission,
                                             boolean on)
        Invoked when any of the permissions of a child editor changes.

        By default, it does nothing as it is up to each subclass to provide its own implementation.

        This method is never invoked on leaf nodes.

        Specified by:
        onChildPermissionChanged in interface PermissionNodeEditor
      • onNodePanelWidthChanged

        protected void onNodePanelWidthChanged()
        Invoked when the width of a node editor panel changes.

        By default, it does nothing as it is up to each subclass to provide its own implementation.

      • onPermissionChanged

        protected void onPermissionChanged​(org.uberfire.security.authz.Permission permission,
                                           boolean on)
        Invoked when a permission toogle switch changes its value.
        Parameters:
        permission - The changing permission
        on - The switch status
      • notifyPermissionChange

        protected void notifyPermissionChange​(org.uberfire.security.authz.Permission permission,
                                              boolean on)
        Invoked when a permission toogle switch changes its value.
        Parameters:
        permission - The changing permission
        on - The switch status
      • processAllPermissionDependencies

        protected void processAllPermissionDependencies()
        Make sure all the permission switch controls are updated according the inter-dependencies declared between them.

        For instance, given an update & delete permissions that depends on a read permission, if the read permission is turned off then the update & delete permission switches are turned off as well.

      • processPermissionDependencies

        protected void processPermissionDependencies​(org.uberfire.security.authz.Permission permission)
        Updates any permission switch which has a dependency with the given permission.
        Parameters:
        permission - The permission which dependencies needs to be revisited.
      • registerPermissionSwitch

        protected void registerPermissionSwitch​(org.uberfire.security.authz.Permission permission,
                                                PermissionSwitchToogle permissionSwitch)
        Links the given switch widget with the specified permission instance.
        Parameters:
        permission - The permission
        permissionSwitch - The switch widget related