java.lang.Object
org.strassburger.subscriptionmanager.view.subscriptions.SubscriptionBase
Direct Known Subclasses:
AddSubscriptionView, EditSubscriptionView

public abstract class SubscriptionBase extends Object
  • Constructor Details

    • SubscriptionBase

      public SubscriptionBase()
  • Method Details

    • setExistingCategories

      public void setExistingCategories(Set<String> categories)
    • readName

      public String readName(org.strassburger.tui4j.input.validationrules.ValidationRule<String> nameAlreadyExistsValidationRule)
      Reads the name of the subscription from the UI
      Parameters:
      nameAlreadyExistsValidationRule - Validation rule to check if the name already exists.
      Returns:
      The name of the subscription.
    • readBillingPeriod

      public BillingPeriod readBillingPeriod()
      Reads the billing period from the UI
      Returns:
      The billing period.
    • readPrice

      public double readPrice()
      Reads the price from the UI
      Returns:
      The price.
    • readStartDate

      public Long readStartDate()
      Reads the start date from the UI
      Returns:
      The start date in milliseconds since epoch.
    • chooseOrAddCategory

      public String chooseOrAddCategory()
      Asks User to choose between categories or to add a new category
      Returns:
      chosen category or runs methode askForNewCategory to add new category