Class TOSService
java.lang.Object
fr.paris.lutece.plugins.termofservice.service.TOSService
TOSService
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current Terms of Service (TOS) entry.static Optional<UserAccepted>getUserAcceptedPublishedTOS(String strGuid) Retrieves the Terms of Service (TOS) accepted by the specified user when the TOS publication feature is enabled.static Optional<UserAccepted>getUserAcceptedTOS(String strGuid) Retrieves the Terms of Service (TOS) accepted by the specified user.
-
Method Details
-
getUserAcceptedTOS
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
Optionalcontaining theUserAcceptedobject if the user has accepted the TOS, or an emptyOptionalif no record is found
-
getUserAcceptedPublishedTOS
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
Optionalcontaining theUserAcceptedobject if the user has accepted the published TOS, or an emptyOptionalif no record is found
-
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.
-