Class MPasswordRule

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_PasswordRule, I_Persistent, Evaluatee

public class MPasswordRule extends X_AD_PasswordRule
Author:
juliana
See Also:
  • Constructor Details

    • MPasswordRule

      public MPasswordRule(Properties ctx, String AD_PasswordRule_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_PasswordRule_UU - UUID key
      trxName - Transaction
    • MPasswordRule

      public MPasswordRule(Properties ctx, int AD_PasswordRule_ID, String trxName)
      Parameters:
      ctx -
      AD_PasswordRule_ID -
      trxName -
    • MPasswordRule

      public MPasswordRule(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
  • Method Details

    • getRules

      public static MPasswordRule getRules(Properties ctx, String trxName)
      Parameters:
      ctx -
      trxName -
      Returns:
      password rule
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new record
      Returns:
      true if record can be saved
    • validate

      public void validate(String username, String newPassword, List<MPasswordHistory> passwordHistorys) throws AdempiereException
      Validate newPassword against system password rule.
      Parameters:
      username -
      newPassword -
      passwordHistorys -
      Throws:
      AdempiereException - if newPassword fail password rule validation
    • generate

      public String generate()
      Generate new password
      Returns:
      new password generated