Class AccountLifecycle

java.lang.Object
org.apache.wiki.auth.AccountLifecycle

public final class AccountLifecycle extends Object
What happens to a user account as the password of its owner gets older, on top of PasswordExpiry. Each stage is optional and is counted in days from the last time the password was changed (UserProfile.getPasswordChanged()): A stage has to come after the ones before it, in the order of the list and of the expiry of the password; if it does not, it is logged and the stage is off. apply(Date) goes through all the accounts once. The password that has no date yet gets it, which is when its clock starts.
Since:
3.0.1
  • Field Details

  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
      Tells if any stage is on.
      Returns:
      true if there is something to do for the accounts
    • getWarnDays

      public int getWarnDays()
      Returns the days after which the owner is told that the password is going to expire.
      Returns:
      the days, or 0 if the owner is not told
    • getLockDays

      public int getLockDays()
      Returns the days after which an account is locked.
      Returns:
      the days, or 0 if accounts are not locked
    • getDeleteDays

      public int getDeleteDays()
      Returns the days after which an account is deleted.
      Returns:
      the days, or 0 if accounts are not deleted
    • apply

      public void apply(Date now)
      Goes through all the accounts once and does what their age calls for. An account that cannot be dealt with is logged and left for the next pass.
      Parameters:
      now - the time to count the age from