public class TwitterUserDAO extends SQLDAO
Constructor and Description |
---|
TwitterUserDAO() |
Modifier and Type | Method and Description |
---|---|
twitter4j.auth.AccessToken |
getAccessToken(UserIdentity authorizedUser) |
RequestToken |
getRequestToken(java.lang.String token) |
java.lang.String |
getTwitterUserId(UserIdentity userId) |
void |
removeRequestToken(RequestToken token) |
void |
removeTokens(UserIdentity userIdentity)
This will remove both the access token and the request token associated with the given user (if any)
|
boolean |
setAccessToken(java.lang.String twitterUserId,
twitter4j.auth.AccessToken token,
UserIdentity userId) |
void |
setRequestToken(RequestToken token) |
getTransactionTemplate, setDataSource, setTnxManager
public TwitterUserDAO()
public void setRequestToken(RequestToken token)
token
- public void removeTokens(UserIdentity userIdentity)
userIdentity
- valid user identitypublic RequestToken getRequestToken(java.lang.String token)
token
- the request token valuepublic void removeRequestToken(RequestToken token)
token
- public twitter4j.auth.AccessToken getAccessToken(UserIdentity authorizedUser)
authorizedUser
- a valid userpublic boolean setAccessToken(java.lang.String twitterUserId, twitter4j.auth.AccessToken token, UserIdentity userId)
twitterUserId
- token
- userId
- public java.lang.String getTwitterUserId(UserIdentity userId)
userId
- non-null, valid userIdCopyright © 2015 Tampere University of Technology, Pori Department.