protected Content doGetContent(ContentItem contentItem) {
   try {
     return contentStore.getContent(contentItem.getSpaceId(), contentItem.getContentId());
   } catch (ContentStoreException e) {
     throw new RuntimeException(
         "Unable to get content for " + contentItem.toString() + " due to: " + e.getMessage());
   }
 }
 @Override
 public Map<String, String> getSourceProperties(ContentItem contentItem) {
   try {
     Map<String, String> properties =
         contentStore.getContentProperties(contentItem.getSpaceId(), contentItem.getContentId());
     return properties;
   } catch (ContentStoreException e) {
     throw new RuntimeException(
         "Unable to get checksum for " + contentItem.toString() + " due to: " + e.getMessage());
   }
 }
Exemplo n.º 3
0
 private List<String> retryBuildContentList(String lastItem) throws ContentStoreException {
   ContentStoreException lastException = null;
   for (int i = 0; i <= maxRetries; i++) {
     try {
       return buildContentList(lastItem);
     } catch (ContentStoreException e) {
       lastException = e;
       log.warn(e.getMessage());
       WaitUtil.wait(i);
     }
   }
   throw lastException;
 }
 protected void getNextSpace() {
   if (spaceIds.hasNext()) {
     currentSpaceId = spaceIds.next();
     try {
       currentContentList = contentStore.getSpaceContents(currentSpaceId);
     } catch (ContentStoreException e) {
       logger.error(
           "Unable to get contents of space: "
               + currentSpaceId
               + " due to error: "
               + e.getMessage());
       currentContentList = null;
     }
   }
 }