Class SocialNetworkService
- java.lang.Object
-
- org.silverpeas.core.socialnetwork.service.SocialNetworkService
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SocialNetworkService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createExternalAccount(SocialNetworkID networkId, String userId, String profileId)
ExternalAccount
getExternalAccount(SocialNetworkID networkId, String profileId)
static SocialNetworkService
getInstance()
SocialNetworkConnector
getSocialNetworkConnector(String networkIdAsString)
Get social network service implementation specific to given social networkSocialNetworkConnector
getSocialNetworkConnector(SocialNetworkID networkId)
Get social network service implementation specific to given social networkSocialNetworkID
getSocialNetworkIDUsedForLogin(javax.servlet.http.HttpSession session)
AccessToken
getStoredAuthorizationToken(javax.servlet.http.HttpSession session, SocialNetworkID networkId)
List<ExternalAccount>
getUserExternalAccounts(String userId)
void
removeAllExternalAccount(String userId)
void
removeAuthorizationToken(javax.servlet.http.HttpSession session)
void
removeExternalAccount(String userId, SocialNetworkID networkId)
void
storeAuthorizationToken(javax.servlet.http.HttpSession session, SocialNetworkID networkId, AccessToken authorizationToken)
-
-
-
Method Detail
-
getInstance
public static SocialNetworkService getInstance()
-
getSocialNetworkConnector
public SocialNetworkConnector getSocialNetworkConnector(SocialNetworkID networkId)
Get social network service implementation specific to given social network- Parameters:
networkId
- enum representing network id- Returns:
- a connector to the specified social network or null if no such social network is supported.
-
getSocialNetworkConnector
public SocialNetworkConnector getSocialNetworkConnector(String networkIdAsString)
Get social network service implementation specific to given social network- Parameters:
networkIdAsString
- network id as String- Returns:
- a connector to the specified social network or null if no such social network is supported.
-
getExternalAccount
public ExternalAccount getExternalAccount(SocialNetworkID networkId, String profileId)
-
createExternalAccount
public void createExternalAccount(SocialNetworkID networkId, String userId, String profileId)
-
getUserExternalAccounts
public List<ExternalAccount> getUserExternalAccounts(String userId)
-
removeAuthorizationToken
public void removeAuthorizationToken(javax.servlet.http.HttpSession session)
-
storeAuthorizationToken
public void storeAuthorizationToken(javax.servlet.http.HttpSession session, SocialNetworkID networkId, AccessToken authorizationToken)
-
getStoredAuthorizationToken
public AccessToken getStoredAuthorizationToken(javax.servlet.http.HttpSession session, SocialNetworkID networkId)
-
getSocialNetworkIDUsedForLogin
public SocialNetworkID getSocialNetworkIDUsedForLogin(javax.servlet.http.HttpSession session)
-
removeExternalAccount
public void removeExternalAccount(String userId, SocialNetworkID networkId)
-
removeAllExternalAccount
public void removeAllExternalAccount(String userId)
-
-