Package com.google.enterprise.connector.spi.SpiConstants

Examples of com.google.enterprise.connector.spi.SpiConstants.ActionType


    DocumentList docList =
        getObjectUnderTest(os, docSet, customDeletionSet, deletionEventSet);
    Document doc = null;
    while ((doc = docList.nextDocument()) != null) {
      Property actionProp = doc.findProperty(SpiConstants.PROPNAME_ACTION);
      ActionType actionType = SpiConstants.ActionType.findActionType(
          actionProp.nextValue().toString());

      String id =
          doc.findProperty(SpiConstants.PROPNAME_DOCID).nextValue().toString();
      if (ActionType.ADD.equals(actionType)) {
View Full Code Here


          userProfileChange.getChangedUserProfiles(checkpoint);
      if (updatedProfiles != null && updatedProfiles.size() > 0) {
        LOGGER.info("Number of Changed User Profiles = "
            + updatedProfiles.size());
        for (String updatedUserProfile : updatedProfiles.keySet()) {
          ActionType action = updatedProfiles.get(updatedUserProfile);
          LOGGER.info("Processing Updated User Profile for = "
              + updatedUserProfile);
          SharePointSocialUserProfileDocument doc =
              new SharePointSocialUserProfileDocument(ctxt
                  .getUserProfileCollection());
          doc.setUserKey(updatedUserProfile);
          doc.setProperty(SpiConstants.PROPNAME_ACTION, action.toString());
          doc.setActionType(action);
          if (action == ActionType.DELETE) {
            String url = makeItemUrl(updatedUserProfile);
            LOGGER.info("Deleted User Profile URL = " + url);
            doc.setUserKey(updatedUserProfile);
            doc.setProperty(SpiConstants.PROPNAME_ACTION, action.toString());
            doc.setProperty(SpiConstants.PROPNAME_CONTENT, "");
            doc.setProperty(SpiConstants.PROPNAME_MIMETYPE, "text/plain");
            doc.setProperty(SpiConstants.PROPNAME_DISPLAYURL, url);
          }
          updatedDocuments.add(doc);
View Full Code Here

          final String lastCrawledDocURL = atts.getValue(SPConstants.STATE_URL);

          Calendar lastCrawledDocLastMod = null;
          Folder lastCrawledDocParentFolder = null;
          Folder lastCrawledDocRenamedFolder = null;
          ActionType lastCrawledDocAction = null;

          if (SPType.SP2007 == web.getSharePointType()) {
            String parentFolderPath = atts.getValue(SPConstants.STATE_PARENT_FOLDER_PATH);
            String parentFolderId = atts.getValue(SPConstants.STATE_PARENT_FOLDER_ID);
            String renamedFolderPath = atts.getValue(SPConstants.STATE_RENAMED_FOLDER_PATH);
View Full Code Here

    String displayUrl = DocUtils.getOptionalString(document,
        SpiConstants.PROPNAME_DISPLAYURL);
    XmlUtils.xmlAppendAttr(XML_DISPLAY_URL, displayUrl, prefix);

    ActionType actionType = null;
    String action = DocUtils.getOptionalString(document,
        SpiConstants.PROPNAME_ACTION);
    if (action != null) {
      // Compare to legal action types.
      actionType = ActionType.findActionType(action);
      if (actionType == ActionType.ADD) {
        XmlUtils.xmlAppendAttr(XML_ACTION, actionType.toString(), prefix);
      } else if (actionType == ActionType.DELETE) {
        XmlUtils.xmlAppendAttr(XML_ACTION, actionType.toString(), prefix);
        aclRecordAllowed = false;
        metadataAllowed = false;
        contentAllowed = false;
      } else if (actionType == ActionType.ERROR) {
        LOGGER.log(Level.WARNING, "Illegal tag used for ActionType: " + action);
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.SpiConstants.ActionType

Copyright © 2018 www.massapicom. 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.