Package ca.carleton.gcrc.couch.onUpload.conversion

Examples of ca.carleton.gcrc.couch.onUpload.conversion.FileConversionContext.saveDocument()


      // Delete current attachment
      attDescription.removeFile();

      // Update status
      attDescription.setStatus(UploadConstants.UPLOAD_STATUS_SUBMITTED);
      conversionContext.saveDocument();
    }
  }

  private void performAnalyzedWork(Work work) throws Exception {
    String attachmentName = work.getAttachmentName();
View Full Code Here


        attDescription.setStatus(UploadConstants.UPLOAD_STATUS_APPROVED);
      } else {
        attDescription.setStatus(UploadConstants.UPLOAD_STATUS_WAITING_FOR_APPROVAL);
        shouldSendNotification = true;
      }
      conversionContext.saveDocument();
     
      // Notify that upload is available
      if( shouldSendNotification ) {
        sendVettingNotification(work.getDocId(), work.getDocument(), attachmentName);
      }
View Full Code Here

          );
      }

      // Update status
      attDescription.setStatus(UploadConstants.UPLOAD_STATUS_ATTACHED);
      conversionContext.saveDocument();
    }
  }
 
  private void performOrientationWork(Work work) throws Exception {
    String attachmentName = work.getAttachmentName();
View Full Code Here

        if( false == pluginFound ) {
          logger.info("No plugin found for uploaded file class: "+fileClass);
        }
 
        // Update status
        conversionContext.saveDocument();
      }
    }
  }
 
  private void performThumbnailWork(Work work) throws Exception {
View Full Code Here

        // with legacy documents.
        // In this case, update server work and save document.
        serverDescription.setThumbnailLevel(UploadConstants.SERVER_THUMBNAIL_VALUE);
       
        // Update status
        conversionContext.saveDocument();
       
        logger.info("Updated server thumbnail status");

      } else {
View Full Code Here

        if( false == pluginFound ) {
          logger.info("No plugin found for thumbnail creation, file class: "+fileClass);
        }

        // Update status
        conversionContext.saveDocument();
      }
    }
  }
 
  private void performUploadOriginalImageWork(Work work) throws Exception {
View Full Code Here

      if( false == pluginFound ) {
        workDescription.setStringAttribute(UploadConstants.UPLOAD_WORK_UPLOAD_ORIGINAL_IMAGE, "No plugin found for thumbnail creation, file class: "+fileClass);
      }

      // Update status
      conversionContext.saveDocument();
    }
  }
 
  private void performRotateWork(String workType, Work work) throws Exception {
    String attachmentName = work.getAttachmentName();
View Full Code Here

      if( false == pluginFound ) {
        workDescription.setStringAttribute(UploadConstants.UPLOAD_WORK_UPLOAD_ORIGINAL_IMAGE, "No plugin found for thumbnail creation, file class: "+fileClass);
      }

      // Update status
      conversionContext.saveDocument();
    }
  }
 
  private void sendVettingNotification(String docId, JSONObject doc, String attachmentName) {
    // Notify that upload is available
View Full Code Here

      }
     
      logger.debug("Updating layer definition document: "+doc.getString("_id"));
     
      // Save changes to document
      approvedContext.saveDocument();
     
      logger.debug("Uploading file: "+attDescription.getAttachmentName());
     
      // Upload original file
      approvedContext.uploadFile(
View Full Code Here

      context.setSourceDocumentId( doc.getString("_id") );
     
      convertGpx(attDescription, context, gpx, doc);
     
      // Save changes to document
      approvedContext.saveDocument();
     
      // Upload original file
      approvedContext.uploadFile(
        attDescription.getAttachmentName()
        ,attDescription.getMediaFile()
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.