Interface WidgetInstancePermissionService


  • public interface WidgetInstancePermissionService
    Service delivering user permissions for widget instances.
    • Method Detail

      • canCreateInstance

        boolean canCreateInstance​(Widget widget,
                                  WidgetInstance parentInstance)
        Checks if it is possible to create a new instance of the given widget as a child of the given parent instance according to rules.
        Parameters:
        widget - the widget to create instances for
        parentInstance - the parent instance of the to-be-created instance
        Returns:
        true if possible to create new instance according to rules of false otherwise
      • canRemoveInstance

        boolean canRemoveInstance​(WidgetInstance instance)
        Checks if it is possible to remove given widget instance of the given widget according to rules.
        Parameters:
        instance - the widget instance to be removed
        Returns:
        true if possible to remove the instance according to rules of false otherwise