context.setSupportsInheritedAcls(true);
spContext.setTraversalContext(context);
assertNotNull(webState);
List<SPDocument> docsToPass = new ArrayList<SPDocument>();
//Get Web application policy document.
AclHelper aclHelper = new AclHelper(spContext, webState.getWebUrl());
// Load Document for Root Web Home Page.
SPDocument webDoc = siteData.getSiteData(webState);
assertNotNull(webDoc);
docsToPass.add(webDoc);
// Load Documents scenarios for ACLs
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID401, "401"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID402, "402"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID403, "403"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID404, "404"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID405, "405"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID406, "406"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID407, "407"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID408, "408"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID409, "409"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID410, "410"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID411, "411"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID412, "412"));
docsToPass.add(getDocumentForUrl(TestConfiguration.SearchDocID413, "413"));
SPDocumentList docList = new SPDocumentList(docsToPass, globalState);
assertNotNull(docList);
System.out.println("\n...Processing doclist..." + docList);
aclHelper.fetchAclForDocuments(docList, webState);
for (SPDocument document : docList.getDocuments()) {
assertNotNull(document);
if (document.getUrl().
equalsIgnoreCase(TestConfiguration.SearchDocID401)) {
// Search Doc ID 401 - List item with Inheriting permissions.