@ApiParam(value="A connector name", required=true) @PathParam("connector") String connectorName) {
final SharedConnector sharedConnector = buddiesService.addSharedConnector(AuthHelper.getGuestId(), username, connectorName, "{}");
final ApiKey apiKey = guestService.getApiKey(AuthHelper.getGuestId(), Connector.getConnector(connectorName));
final Class<? extends AbstractUpdater> updaterClass = apiKey.getConnector().getUpdaterClass();
if (SharedConnectorSettingsAwareUpdater.class.isAssignableFrom(updaterClass)) {
final SharedConnectorSettingsAwareUpdater updater = (SharedConnectorSettingsAwareUpdater) beanFactory.getBean(updaterClass);
updater.syncSharedConnectorSettings(apiKey.getId(), sharedConnector);
}
return Response.ok("Successfully added a connector (" + username + "/" + connectorName + ")").build();
}