Class TOSService


  • public class TOSService
    extends java.lang.Object
    TOSService
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<Entry> getCurrentEntry()
      Retrieves the current Terms of Service (TOS) entry.
      static java.util.Optional<UserAccepted> getUserAcceptedPublishedTOS​(java.lang.String strGuid)
      Retrieves the Terms of Service (TOS) accepted by the specified user when the TOS publication feature is enabled.
      static java.util.Optional<UserAccepted> getUserAcceptedTOS​(java.lang.String strGuid)
      Retrieves the Terms of Service (TOS) accepted by the specified user.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getUserAcceptedTOS

        public static java.util.Optional<UserAccepted> getUserAcceptedTOS​(java.lang.String strGuid)
        Retrieves the Terms of Service (TOS) accepted by the specified user.

        If the TOS publication feature is enabled, this method returns the acceptance record associated with the currently published TOS. Otherwise, it returns the user's general TOS acceptance record.

        Parameters:
        strGuid - the unique identifier of the user
        Returns:
        an Optional containing the UserAccepted object if the user has accepted the TOS, or an empty Optional if no record is found
      • getUserAcceptedPublishedTOS

        public static java.util.Optional<UserAccepted> getUserAcceptedPublishedTOS​(java.lang.String strGuid)
        Retrieves the Terms of Service (TOS) accepted by the specified user when the TOS publication feature is enabled.

        This method looks for the currently published TOS entry and returns the record of acceptance corresponding to that published version, if it exists.

        Parameters:
        strGuid - the guid
        Returns:
        an Optional containing the UserAccepted object if the user has accepted the published TOS, or an empty Optional if no record is found
      • getCurrentEntry

        public static java.util.Optional<Entry> getCurrentEntry()
        Retrieves the current Terms of Service (TOS) entry.

        If the TOS publication feature is enabled, this method returns the currently published entry. Otherwise, it returns the last available version.

        Returns:
        an Optional containing the current Entry if found, or an empty Optional otherwise