Class SubjectImpl

    • Constructor Detail

      • SubjectImpl

        public SubjectImpl()
    • Method Detail

      • getName

        @NotNull(message="{validation.notNull}")
        @Pattern(regexp="^((((CN|cn)=[^,]+),?)*(((OU|ou)=[^,]+),?)*(((DC|dc)=[^,]+),?)*)|(([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?)$",
                 message="{validation.usernameGroup}")
        @Size(max=255,
              message="{validation.string.max}")
        public @NotNull(message="{validation.notNull}") @Pattern(regexp="^((((CN|cn)=[^,]+),?)*(((OU|ou)=[^,]+),?)*(((DC|dc)=[^,]+),?)*)|(([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?)$",message="{validation.usernameGroup}") @Size(max=255,message="{validation.string.max}") String getName()
        Description copied from interface: Nameable
        Returns the name.
        Specified by:
        getName in interface Nameable
        Returns:
        the name
      • getDescription

        @Size(max=8192,
              message="{validation.string.max}")
        public @Size(max=8192,message="{validation.string.max}") String getDescription()
        Description copied from interface: Nameable
        Returns the description.
        Specified by:
        getDescription in interface Nameable
        Returns:
        the description
      • getLanguage

        @NotNull(message="{validation.notNull}")
        @Size(min=2,
              max=3,
              message="{validation.string.min.max}")
        public @NotNull(message="{validation.notNull}") @Size(min=2,max=3,message="{validation.string.min.max}") String getLanguage()
        Description copied from interface: Account
        Returns the language tag for this Account in the IETF BCP 47 notation: <lang>-<country>.
        Examples:
        • en
        • en-US
        • de
        • de-CH
        Specified by:
        getLanguage in interface Account
        Returns:
        the language
        See Also:
        Locale.forLanguageTag(String)
      • getRealname

        @NotNull(message="{validation.notNull}")
        @Size(max=64,
              message="{validation.string.max}")
        public @NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String getRealname()
        Description copied from interface: Account
        Returns the real name of this Account, e.g. 'appNG Administrator'.
        Specified by:
        getRealname in interface Account
        Returns:
        the real name
      • getEmail

        @Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",
                 message="{validation.email}")
        public @Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",message="{validation.email}") String getEmail()
        Description copied from interface: Account
        Returns the email for this Account, e.g. 'admin@example.com'.
        Specified by:
        getEmail in interface Account
        Returns:
        the email
      • setEmail

        public void setEmail​(String email)
      • isExpired

        public boolean isExpired​(Date date)
      • getExpiryDate

        public Date getExpiryDate()
        Description copied from interface: Subject
        The date on which the subject expires.
        Specified by:
        getExpiryDate in interface Subject
        Returns:
        the date, if any (may be null)
      • getLastLogin

        public Date getLastLogin()
        Description copied from interface: Subject
        Returns the date of the last login, if any.
        Specified by:
        getLastLogin in interface Subject
        Returns:
        the date.
      • getPasswordLastChanged

        public Date getPasswordLastChanged()
        Description copied from interface: Subject
        Returns the date when the password was last changed. Default to the creation date of the subject.
        Specified by:
        getPasswordLastChanged in interface Subject
        Returns:
        the date.
      • isLocked

        public boolean isLocked()
        Description copied from interface: Subject
        Whether or not the subject is locked.
        Specified by:
        isLocked in interface Subject
        Returns:
        true if the subject is locked.
      • getFailedLoginAttempts

        public Integer getFailedLoginAttempts()
        Description copied from interface: Subject
        Returns the number of failed login attempts for this subject.
        Specified by:
        getFailedLoginAttempts in interface Subject
        Returns:
        the number of failed login attempts
      • isAuthenticated

        public boolean isAuthenticated()
        Description copied from interface: Subject
        Checks whether this Subject is authenticated.
        Specified by:
        isAuthenticated in interface Subject
        Returns:
        true if this Subject is authenticated, false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getTimeZone

        public String getTimeZone()
        Description copied from interface: Account
        Returns the timezone for this Account, e.g. 'Europe/Berlin'.
        Specified by:
        getTimeZone in interface Account
        Returns:
        the timezone
      • getAuthName

        public String getAuthName()
        Description copied from interface: Account
        Returns the username of this Account, e.g. 'admin'.
        Specified by:
        getAuthName in interface Account
        Returns:
        the username
      • getTypeName

        public String getTypeName()
      • isInactive

        public boolean isInactive​(Date now,
                                  Integer inactiveLockPeriod)