fr.paris.lutece.plugins.mylutece.modules.database.authentication.service.key
Class DatabaseUserKeyService

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.database.authentication.service.key.DatabaseUserKeyService

public final class DatabaseUserKeyService
extends Object

DatabaseUserKeyService


Method Summary
 DatabaseUserKey create(int nUserId)
          Create a new user key from a given user id
 DatabaseUserKey findByPrimaryKey(String strKey)
          Find the key
 DatabaseUserKey findKeyByLogin(String strLogin)
          Get a key of a user by his login
 String getReinitUrl(String strKey, javax.servlet.http.HttpServletRequest request)
          Get reinit url
static DatabaseUserKeyService getService()
          Get the instance of the service
 String getValidationUrl(String strKey, javax.servlet.http.HttpServletRequest request)
          Build the validation url
 void remove(String strKey)
          Remove a key
 void removeByIdUser(int nUserId)
          Remove a key from a given id user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getService

public static DatabaseUserKeyService getService()
Get the instance of the service

Returns:
the instance of the service

create

public DatabaseUserKey create(int nUserId)
Create a new user key from a given user id

Parameters:
nUserId - the id user
Returns:
the key

findByPrimaryKey

public DatabaseUserKey findByPrimaryKey(String strKey)
Find the key

Parameters:
strKey - the key
Returns:
the key

findKeyByLogin

public DatabaseUserKey findKeyByLogin(String strLogin)
Get a key of a user by his login

Parameters:
strLogin - The login of the user
Returns:
A key associated to the user

remove

public void remove(String strKey)
Remove a key

Parameters:
strKey - the key

removeByIdUser

public void removeByIdUser(int nUserId)
Remove a key from a given id user

Parameters:
nUserId - the id user

getValidationUrl

public String getValidationUrl(String strKey,
                               javax.servlet.http.HttpServletRequest request)
Build the validation url

Parameters:
strKey - the key
request - the HTTP request
Returns:
the validation url

getReinitUrl

public String getReinitUrl(String strKey,
                           javax.servlet.http.HttpServletRequest request)
Get reinit url

Parameters:
strKey - the key
request - the HTTP request
Returns:
the url


Copyright © 2014 Mairie de Paris. All Rights Reserved.