Examples of GssGetListItemsWithInheritingRoleAssignments


Examples of com.google.enterprise.connector.sharepoint.generated.gssacl.GssGetListItemsWithInheritingRoleAssignments

  public List<SPDocument> getListItemsForAclChangeAndUpdateState(
      ListState listState, ListsHelper listsHelper) {
    List<SPDocument> aclChangedDocs = null;
    List<SPDocument> attachmentsForChangedDocs = new ArrayList<SPDocument>();
    if (sharepointClientContext.isPushAcls() && listState.isAclChanged()) {
      GssGetListItemsWithInheritingRoleAssignments wsResult =
          GetListItemsWithInheritingRoleAssignments(listState.getPrimaryKey(),
          String.valueOf(listState.getLastDocIdCrawledForAcl()));
      if (null != wsResult) {
        aclChangedDocs = listsHelper.parseCustomWSResponseForListItemNodes(
            wsResult.getDocXml(), listState);
        if (null != aclChangedDocs) {
          LOGGER.log(Level.INFO, "Found " + aclChangedDocs.size()
              + " documents from list [ " + listState
              + " ] under ACL based crawling. Crawling status: FromID [ "
              + listState.getLastDocIdCrawledForAcl() + " ], ToID [ "
              + wsResult.getLastIdVisited() + " ], moreDocs [ "
              + wsResult.isMoreDocs() + " ] ");
          boolean lookForAttachment = listState.canContainAttachments();
          for (SPDocument document : aclChangedDocs) {
            document.setForAclChange(true);
            if (lookForAttachment) {
              // Get attachments for ACL changed documents
              attachmentsForChangedDocs.addAll(
                  listsHelper.getAttachments(listState, document));
            }
          }
        }

        if (attachmentsForChangedDocs.size() > 0) {
          for(SPDocument attachment : attachmentsForChangedDocs) {
            attachment.setForAclChange(true);
          }
          aclChangedDocs.addAll(attachmentsForChangedDocs);
        }

        if (wsResult.isMoreDocs()) {
          listState.updateAclCrawlStatus(true, wsResult.getLastIdVisited());
        } else {
          SPDocument listDoc = listState.getDocumentInstance(sharepointClientContext.getFeedType());
          listDoc.setForAclChange(true);
          aclChangedDocs.add(listDoc);
          if (null != aclChangedDocs && aclChangedDocs.size() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.