Class PermissionButtonFactory

    • Field Detail

      • onClick

        private String onClick
      • visiblePermission

        private Permission visiblePermission
      • enabledPermission

        private Permission enabledPermission
      • itemToCheck

        private Item itemToCheck
      • enabledClazz

        private String enabledClazz
      • disabledClazz

        private String disabledClazz
      • enabledIcon

        private String enabledIcon
      • disabledIcon

        private String disabledIcon
      • enabledStyle

        private String enabledStyle
      • disabledStyle

        private String disabledStyle
      • enabledTitle

        private String enabledTitle
      • disabledTitle

        private String disabledTitle
      • enabledTooltip

        private String enabledTooltip
      • disabledTooltip

        private String disabledTooltip
    • Constructor Detail

      • PermissionButtonFactory

        public PermissionButtonFactory()
        Create a new factory instance.
    • Method Detail

      • getActions

        public ButtonAction[] getActions​(InvokationContext<? super ButtonAction> context)
        Description copied from interface: ActionFactory
        This method may be called one or several times for each request. This is decided by the extension point. If, for example, the extension point is a pure single-item extension point then this method is probably only called once. If the extension point is a per-item extension point in a list context, then this method may be called once for every item in the list. The context parameter contains all information about the context of the extension point, including the current item, if any.
        Parameters:
        context - The current invokation context
        Returns:
        An array of actions that should be added to the extension point. Returns null or an empty array if there are no actions in the current context.
      • setEnabledPermission

        public void setEnabledPermission​(String permission)
        Set the minimum permission that is required to make the button enabled.
        Parameters:
        permission - One of Permission constants
      • setVisiblePermission

        public void setVisiblePermission​(String permission)
        Set the minimum permission that is required to make the button visible.
        Parameters:
        permission - One of Permission constants
      • setItem

        public void setItem​(String item)
        Set the item type to check the permission for.
        Parameters:
        item - One of Item constants or null to accept all items
      • setEnabledClazz

        public void setEnabledClazz​(String clazz)
        Set the class to use when the button is enabled.
      • setDisabledClazz

        public void setDisabledClazz​(String clazz)
        Set the class to use when the button is disabled.
      • setClazz

        public void setClazz​(String clazz)
        Set the class to use in all cases.
      • setId

        public void setId​(String id)
        Set the ID of the button.
      • setEnabledStyle

        public void setEnabledStyle​(String style)
        Set the style to use when the button is enabled.
      • setDisabledStyle

        public void setDisabledStyle​(String style)
        Set the style to use when the button is disabled.
      • setStyle

        public void setStyle​(String style)
        Set the style to use in all cases.
      • setEnabledTitle

        public void setEnabledTitle​(String title)
        Set the title of the button when it is enabled.
      • setDisabledTitle

        public void setDisabledTitle​(String title)
        Set the title of the button when it is disabled.
      • setTitle

        public void setTitle​(String title)
        Set the title of the button in all cases.
      • setEnabledTooltip

        public void setEnabledTooltip​(String tooltip)
        Set the tooltip of the button when it is enabled.
      • setDisabledTooltip

        public void setDisabledTooltip​(String tooltip)
        Set the tooltip of the button when it is disabled.
      • setTooltip

        public void setTooltip​(String tooltip)
        Set the tooltip of the button in all cases.