Package io.meeds.gamification.service
Interface ConnectorService
- All Known Implementing Classes:
ConnectorServiceImpl
public interface ConnectorService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(ConnectorPlugin connectorPlugin) Add a newConnectorPluginfor a given connector nameconnect(String connectorName, String connectorUserId, String accessToken, org.exoplatform.services.security.Identity identity) Connects a user to their connector accountvoiddisconnect(String connectorName, String username) Disconnect a user from their connector accountgetAssociatedUsername(String connectorName, String connectorRemoteId) getConnectorRemoteId(String connectorName, String username) getConnectors(String username) voidremovePlugin(String name) Removes aConnectorPluginidentified by its connectorName
-
Method Details
-
addPlugin
Add a newConnectorPluginfor a given connector name- Parameters:
connectorPlugin-ConnectorPlugin
-
removePlugin
Removes aConnectorPluginidentified by its connectorName- Parameters:
name- connector name
-
getConnectorPlugins
Collection<ConnectorPlugin> getConnectorPlugins()- Returns:
Collectionof configuredConnectorPlugin
-
getConnectors
- Parameters:
username- the user name- Returns:
Collectionof user remote connectors
-
connect
String connect(String connectorName, String connectorUserId, String accessToken, org.exoplatform.services.security.Identity identity) Connects a user to their connector account- Parameters:
connectorName- connector nameaccessToken- Access tokenconnectorUserId- User identifier in connectoridentity- the user identity- Returns:
- the connector identifier
String
-
disconnect
Disconnect a user from their connector account- Parameters:
connectorName- connector nameusername- the user name
-
getConnectorRemoteId
- Parameters:
connectorName- connector nameusername- associated user name- Returns:
- the connector remote id of a user
-
getAssociatedUsername
- Parameters:
connectorName- connector nameconnectorRemoteId- connector remote Id- Returns:
- the associated user name to connector remote id
-