} else if (attributes.containsKey(REFRESH_INTERVAL)) {
throw new RepositoryException("Duplicate attribute '" + REFRESH_INTERVAL + "'.");
}
RefreshStrategy refreshStrategy = createRefreshStrategy(refreshInterval);
ContentSession contentSession = contentRepository.login(credentials, workspaceName);
SessionDelegate sessionDelegate = createSessionDelegate(refreshStrategy, contentSession);
SessionContext context = createSessionContext(
securityProvider, createAttributes(refreshInterval), sessionDelegate);
return context.getSession();
} catch (LoginException e) {