Interface HvlSessionDataProvider

All Known Implementing Classes:
HvlSessionDataRedisProviderImpl

@Validated public interface HvlSessionDataProvider
A data provider in which includes custom methods session.
  • Method Summary

    Modifier and Type
    Method
    Description
    default tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    begin(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession)
    The method is a service method which is used to store user required session data on key-value data store (redis etc.) after success login attempt.
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    begin(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession, Duration forcedExpirationDuration)
    The method is a service method which is used to store user required session data on key-value data store (redis etc.) with expiration times after success login attempt.
    void
    close(@NotBlank String identifier)
    close is a service method which is used to clean user (via identifier) session data on key-value data store.
    void
    close(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession)
    close is a service method which is used to clean user (via identifier) session data on key-value data store.
    void
    closeAll is a service method which is used to clean all session data.
    void
    closeAll(@NotBlank String username)
    closeAll is a service method which is used to clean all session data associated with username parameter.
    void
    closeAll(@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession)
    closeAll is a service method which is used to clean all session data associated with session parameter.
    void
    closeAllIdentifiers(@NotNull List<@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession> securitySessionList)
    closeAllIdentifiers is a service method which is used to clean all session data associated with list of sessionList's identifier value.
    void
    closeAllUsers(@NotNull Set<@NotBlank String> usernameSet)
    closeAllUser is a service method which is used to clean all session data associated with list of username parameter.
    countByUser(@NotBlank String username)
    Count by user long.
    exist(@NotBlank String identifier, boolean system)
    Exist session.
    List<tr.com.havelsan.javarch.session.common.model.HvlSession>
    findAllByUsername(@NotBlank String username)
    findAll is a service method which is used to get all user session data associated with username parameter.
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    get(@NotBlank String identifier, boolean system)
    get is a service method which is used to get user session data.
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    getWithRenewTtl(@NotBlank String identifier, boolean system)
    Get security session with renewing ttl.
    tr.com.havelsan.javarch.data.commons.pageable.HvlPage<tr.com.havelsan.javarch.session.common.model.HvlSession>
    queryPage(@NotNull HvlSessionQueryModel sessionQueryModel)
    Returns a page of session matching the query criteria.
    tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession
    renewTtl(@NotBlank String identifier, boolean system)
    Renew session time.
  • Method Details

    • begin

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession begin(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession, Duration forcedExpirationDuration) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      The method is a service method which is used to store user required session data on key-value data store (redis etc.) with expiration times after success login attempt.
      Parameters:
      securitySession - the security session
      forcedExpirationDuration - the forced expiration duration
      Returns:
      the security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • begin

      default tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession begin(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      The method is a service method which is used to store user required session data on key-value data store (redis etc.) after success login attempt.
      Parameters:
      securitySession - the security session
      Returns:
      the security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • renewTtl

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession renewTtl(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Renew session time.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • getWithRenewTtl

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession getWithRenewTtl(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Get security session with renewing ttl.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the hvl security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • close

      void close(@NotBlank @NotBlank String identifier) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      close is a service method which is used to clean user (via identifier) session data on key-value data store. (redis etc.)
      Parameters:
      identifier - the identifier
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • close

      void close(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      close is a service method which is used to clean user (via identifier) session data on key-value data store. (redis etc.)
      Parameters:
      securitySession - the security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll() throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      closeAll is a service method which is used to clean all session data.
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll(@NotBlank @NotBlank String username) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      closeAll is a service method which is used to clean all session data associated with username parameter.
      Parameters:
      username - the username
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAll

      void closeAll(@NotNull @Valid @NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession securitySession) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      closeAll is a service method which is used to clean all session data associated with session parameter.
      Parameters:
      securitySession - the security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllUsers

      void closeAllUsers(@NotNull @NotNull Set<@NotBlank String> usernameSet) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      closeAllUser is a service method which is used to clean all session data associated with list of username parameter.
      Parameters:
      usernameSet - the set of username
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • closeAllIdentifiers

      void closeAllIdentifiers(@NotNull @NotNull List<@NotNull @Valid tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession> securitySessionList) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      closeAllIdentifiers is a service method which is used to clean all session data associated with list of sessionList's identifier value.
      Parameters:
      securitySessionList - the list of security session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • get

      tr.com.havelsan.javarch.security.session.provider.model.HvlSecuritySession get(@NotBlank @NotBlank String identifier, boolean system) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      get is a service method which is used to get user session data.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • exist

      Boolean exist(@NotBlank @NotBlank String identifier, boolean system)
      Exist session.
      Parameters:
      identifier - the identifier
      system - the system
      Returns:
      the boolean
    • findAllByUsername

      List<tr.com.havelsan.javarch.session.common.model.HvlSession> findAllByUsername(@NotBlank @NotBlank String username) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      findAll is a service method which is used to get all user session data associated with username parameter.
      Parameters:
      username - the username
      Returns:
      the list of session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • queryPage

      tr.com.havelsan.javarch.data.commons.pageable.HvlPage<tr.com.havelsan.javarch.session.common.model.HvlSession> queryPage(@NotNull @NotNull HvlSessionQueryModel sessionQueryModel) throws tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException
      Returns a page of session matching the query criteria.
      Parameters:
      sessionQueryModel - the session query model
      Returns:
      the page of session
      Throws:
      tr.com.havelsan.javarch.session.data.support.exception.HvlSessionSupportException - the hvl session support exception
    • countByUser

      Long countByUser(@NotBlank @NotBlank String username)
      Count by user long.
      Parameters:
      username - the username
      Returns:
      the long