* @return Instance of client context
* @throws SharepointException
*/
public static SharepointClientContext initContext(
ClientFactory clientFactory) throws SharepointException {
final SharepointClientContext sharepointClientContext = new SharepointClientContext(
clientFactory, TestConfiguration.sharepointUrl, TestConfiguration.domain,
TestConfiguration.kdcserver, TestConfiguration.username,
TestConfiguration.password, TestConfiguration.googleConnectorWorkDir,
TestConfiguration.googleGlobalNamespace,
TestConfiguration.googleLocalNamespace,
TestConfiguration.includedURls, TestConfiguration.excludedURls,
TestConfiguration.mySiteBaseURL, TestConfiguration.aliasMap,
TestConfiguration.feedType, useSPSearchVisibility);
sharepointClientContext.setIncluded_metadata(TestConfiguration.whiteList);
sharepointClientContext.setExcluded_metadata(TestConfiguration.blackList);
sharepointClientContext.setLdapConnectionSettings(TestConfiguration.getLdapConnetionSettings());
sharepointClientContext.setPushAcls(TestConfiguration.pushAcls);
sharepointClientContext.setLdapConnectionSettings(TestConfiguration.getLdapConnetionSettings());
sharepointClientContext.setUseCacheToStoreLdapUserGroupsMembership(
useCacheToStoreLdapUserGroupsMembership);
sharepointClientContext.setInitialCacheSize(TestConfiguration.cacheSize);
sharepointClientContext.setCacheRefreshInterval(TestConfiguration.refreshInterval);
String socialOptionLc = TestConfiguration.getSocialOption().toLowerCase();
if (socialOptionLc.equals("yes")) {
sharepointClientContext.setSocialOption(SocialOption.YES);
} else if (socialOptionLc.equals("no")) {
sharepointClientContext.setSocialOption(SocialOption.NO);
} else if (socialOptionLc.equals("only")) {
sharepointClientContext.setSocialOption(SocialOption.ONLY);
}
sharepointClientContext.setTraversalContext(new SimpleTraversalContext());
return sharepointClientContext;
}