Class ManageSubscriptions

All Implemented Interfaces:
ErrorCollection, I18nHelper, FilterOperationsAction, HttpServletVariables, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class ManageSubscriptions extends AbstractFilterAction implements FilterOperationsAction
Action class for Managing Subscriptions. Was previously a command of ManageFilters, but has been extracted for increase security. Action now is protected by the user role.
See Also:
  • Constructor Details

  • Method Details

    • doExecute

      protected String doExecute() throws Exception
      Overrides:
      doExecute in class webwork.action.ActionSupport
      Throws:
      Exception
    • doDefault

      public String doDefault() throws Exception
      Overrides:
      doDefault in class webwork.action.ActionSupport
      Throws:
      Exception
    • getSubscriptionCount

      public int getSubscriptionCount()
    • getSubscriptions

      public Collection getSubscriptions()
    • isMailConfigured

      public boolean isMailConfigured()
    • doView

      public String doView()
    • getSubscriber

      public String getSubscriber(FilterSubscription subscription)
    • loggedInUserHasEditRights

      public boolean loggedInUserHasEditRights(FilterSubscription subscription)
      Subscriptions are editable by their creator and admins.
    • getCronTooltip

      public String getCronTooltip(FilterSubscription sub)
      Get the tooltip for the for a subscription.
      Parameters:
      sub - The subscrion to get the tooltip for
      Returns:
      The tooltip
    • getPrettySchedule

      public String getPrettySchedule(FilterSubscription sub)
      Get a pretty version of the cron trigger. E.g. Every day at 12
      Parameters:
      sub - The subscription to get the value for.
      Returns:
      A description of the cron trigger id pretty format`
    • getLastSent

      public String getLastSent(FilterSubscription sub)
      Get the las sent date for a subscription
      Parameters:
      sub - The subscription to get last send for
      Returns:
      A date suitable for displaying
    • getNextSend

      public String getNextSend(FilterSubscription sub)
      Get the next sent date for a subscription
      Parameters:
      sub - The subscription to get next send for
      Returns:
      A date suitable for displaying
    • isGroupValid

      public boolean isGroupValid(FilterSubscription sub)