org.silverpeas.authentication.verifier
Class UserMustAcceptTermsOfServiceVerifier

java.lang.Object
  extended by org.silverpeas.authentication.verifier.UserMustAcceptTermsOfServiceVerifier

public class UserMustAcceptTermsOfServiceVerifier
extends Object

Class that provides tools to verify if the user must accept terms of service. User: Yohann Chastagnier Date: 10/09/13


Field Summary
static String ERROR_USER_TOS_REFUSED
           
static String ERROR_USER_TOS_TIMEOUT
           
protected static Map<String,ResourceLocator> multilang
           
protected static ResourceLocator otherSettings
           
protected static ResourceLocator settings
           
 
Constructor Summary
protected UserMustAcceptTermsOfServiceVerifier(UserDetail user)
          Default constructor.
 
Method Summary
 UserMustAcceptTermsOfServiceVerifier clearCache()
          Clearing the cache associated to the verifier.
protected static UserMustAcceptTermsOfServiceVerifier get(String tosToken)
          Gets the verifier with the given token.
 String getDestination(javax.servlet.http.HttpServletRequest request)
          Gets the destination.
protected static String getString(String key, String language, String... params)
          Gets a string message according to the given language.
 UserDetail getUser()
          Gets the user.
protected static UserDetail getUserByCredential(AuthenticationCredential credential)
          Gets a user from its credentials.
protected static UserDetail getUserById(String userId)
          Gets a user from its identifier.
 void setUser(UserDetail user)
          Sets the user.
 UserMustAcceptTermsOfServiceVerifier verify()
          Verify user connection attempts and block user account if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_USER_TOS_REFUSED

public static final String ERROR_USER_TOS_REFUSED
See Also:
Constant Field Values

ERROR_USER_TOS_TIMEOUT

public static final String ERROR_USER_TOS_TIMEOUT
See Also:
Constant Field Values

multilang

protected static final Map<String,ResourceLocator> multilang

settings

protected static final ResourceLocator settings

otherSettings

protected static final ResourceLocator otherSettings
Constructor Detail

UserMustAcceptTermsOfServiceVerifier

protected UserMustAcceptTermsOfServiceVerifier(UserDetail user)
Default constructor.

Parameters:
user -
Method Detail

getDestination

public String getDestination(javax.servlet.http.HttpServletRequest request)
Gets the destination.

Returns:

verify

public UserMustAcceptTermsOfServiceVerifier verify()
                                            throws AuthenticationUserMustAcceptTermsOfService
Verify user connection attempts and block user account if necessary.

Throws:
AuthenticationUserMustAcceptTermsOfService

clearCache

public UserMustAcceptTermsOfServiceVerifier clearCache()
Clearing the cache associated to the verifier.


get

protected static UserMustAcceptTermsOfServiceVerifier get(String tosToken)
Gets the verifier with the given token.

Parameters:
tosToken -
Returns:

setUser

public void setUser(UserDetail user)
Sets the user.

Parameters:
user -

getUser

public UserDetail getUser()
Gets the user.

Returns:

getUserByCredential

protected static UserDetail getUserByCredential(AuthenticationCredential credential)
Gets a user from its credentials.

Parameters:
credential -
Returns:
Throws:
AuthenticationException

getUserById

protected static UserDetail getUserById(String userId)
Gets a user from its identifier.

Parameters:
userId -
Returns:

getString

protected static String getString(String key,
                                  String language,
                                  String... params)
Gets a string message according to the given language.

Parameters:
key -
language -
params -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.