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

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


      jsonAtt.put("original", original);
      jsonAtt.put("data", data);
    }
   
    // Save document
    conversionContext.saveDocument();
   
    // Delete upload request
    documentDbDesign.getDatabase().deleteDocument(uploadRequestDoc);
  }
View Full Code Here


        attDescription.setFileClass(fileClass);
      }

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

 
  /**
 
View Full Code Here

      // 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

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.