Class TwitterConsumerServiceImpl
java.lang.Object
io.meeds.gamification.twitter.service.impl.TwitterConsumerServiceImpl
- All Implemented Interfaces:
TwitterConsumerService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckTwitterTokenStatus(String bearerToken) Check Twitter token statusvoidclear remote twitter account entities cachevoidclearCache(TwitterAccount twitterAccount, String bearerToken) clear remote twitter account entity cachegetMentionEvents(TwitterAccount twitterAccount, long lastMentionTweetId, String bearerToken) Retrieve available tweets in which the account identified by its identifier was mentionedretrieveTwitterAccount(long twitterRemoteId, String bearerToken) Retrieve available Twitter account info.retrieveTwitterAccount(String twitterUsername, String bearerToken) Retrieve available Twitter account info.
-
Constructor Details
-
TwitterConsumerServiceImpl
-
-
Method Details
-
retrieveTwitterAccount
public RemoteTwitterAccount retrieveTwitterAccount(String twitterUsername, String bearerToken) throws org.exoplatform.commons.exception.ObjectNotFoundException Description copied from interface:TwitterConsumerServiceRetrieve available Twitter account info.- Specified by:
retrieveTwitterAccountin interfaceTwitterConsumerService- Parameters:
twitterUsername- Twitter account usernamebearerToken- Twitter bearer token- Returns:
RemoteTwitterAccount- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the Twitter account identified by its technical name is not found
-
retrieveTwitterAccount
Description copied from interface:TwitterConsumerServiceRetrieve available Twitter account info.- Specified by:
retrieveTwitterAccountin interfaceTwitterConsumerService- Parameters:
twitterRemoteId- Twitter account remote IdbearerToken- Twitter bearer token- Returns:
RemoteTwitterAccount
-
checkTwitterTokenStatus
Description copied from interface:TwitterConsumerServiceCheck Twitter token status- Specified by:
checkTwitterTokenStatusin interfaceTwitterConsumerService- Parameters:
bearerToken- Twitter bearer token- Returns:
TokenStatus
-
getMentionEvents
public List<TwitterTrigger> getMentionEvents(TwitterAccount twitterAccount, long lastMentionTweetId, String bearerToken) Description copied from interface:TwitterConsumerServiceRetrieve available tweets in which the account identified by its identifier was mentioned- Specified by:
getMentionEventsin interfaceTwitterConsumerService- Parameters:
twitterAccount-TwitterAccountTwitter accountlastMentionTweetId- last mention tweet IdbearerToken- Twitter bearer token
-
clearCache
public void clearCache()Description copied from interface:TwitterConsumerServiceclear remote twitter account entities cache- Specified by:
clearCachein interfaceTwitterConsumerService
-
clearCache
Description copied from interface:TwitterConsumerServiceclear remote twitter account entity cache- Specified by:
clearCachein interfaceTwitterConsumerService- Parameters:
twitterAccount- Twitter accountbearerToken- Twitter bearer token
-