Class PasswordResetServiceFactory

java.lang.Object
org.adempiere.base.PasswordResetServiceFactory

public class PasswordResetServiceFactory extends Object
Resolves the IPasswordResetService implementation to use.

By default the first registered OSGi DS provider is returned. Setting the MSysConfig.PASSWORD_RESET_SERVICE_CLASS config (per tenant) to the DS component name of another registered IPasswordResetService selects that implementation instead, so a third-party plugin can swap the password-reset logic without changing any caller. If the configured component is not registered, the built-in default is used.

Author:
d-ruiz - IDEMPIERE-7060
  • Field Details

    • DEFAULT_SERVICE_NAME

      public static final String DEFAULT_SERVICE_NAME
      DS component name of the built-in implementation
      See Also:
  • Constructor Details

    • PasswordResetServiceFactory

      public PasswordResetServiceFactory()
  • Method Details

    • getService

      public static IPasswordResetService getService(int AD_Client_ID)
      Resolve the password-reset service for the tenant. Reads MSysConfig.PASSWORD_RESET_SERVICE_CLASS (a DS component name); if set and registered, returns that provider; otherwise the built-in default.
      Parameters:
      AD_Client_ID - tenant used to resolve the config (may be 0 for system)
      Returns:
      the resolved service, or null if none is registered