Class BaseIdentity

java.lang.Object
overit.geocall.util.Identity
overit.geocallapp.utilities.system.BaseIdentity
All Implemented Interfaces:
Serializable, Cloneable, Scoped

public abstract class BaseIdentity extends Identity
Abstract base class that extends Identity to provide user identity management functionality.
This class stores information about the currently logged-in user and provides methods to retrieve and set that information.
Implementations must define permission validation behavior through the abstract method.
Since:
1.0
See Also:
  • Constructor Details

    • BaseIdentity

      public BaseIdentity(Long factory)
    • BaseIdentity

      protected BaseIdentity(Identity id)
      Creates a new BaseIdentity instance from an existing Identity.
      Parameters:
      id - the Identity to copy from
    • BaseIdentity

      protected BaseIdentity(String pkg)
      Creates a new BaseIdentity instance with the specified package name.
      Parameters:
      pkg - the package name
    • BaseIdentity

      protected BaseIdentity(Company t)
      Creates a new BaseIdentity instance for the specified Company.
      Parameters:
      t - the Company to associate with this identity
  • Method Details

    • isPermissionValidationActive

      public abstract boolean isPermissionValidationActive()
      Determines whether permission validation is active for this identity. Implementation-specific behavior must be defined by subclasses.
      Returns:
      true if permission validation is active, false otherwise
    • getCurrentUser

      public Long getCurrentUser()
      Gets the current user identifier.
      Returns:
      the current user ID, or null if no user is set
    • getDefaultLang

      public Lang getDefaultLang()
      Gets the language defined as default for the system. The default language is English, but if not defined the first language of the configuration is retrieved.
      Overrides:
      getDefaultLang in class Identity
      Returns:
      the default Lang