Class AttachmentServiceImpl

java.lang.Object
org.kuali.rice.krad.service.impl.AttachmentServiceImpl
All Implemented Interfaces:
org.kuali.rice.krad.service.AttachmentService
Direct Known Subclasses:
S3AttachmentServiceImpl

@Transactional public class AttachmentServiceImpl extends Object implements org.kuali.rice.krad.service.AttachmentService
Attachment service implementation
  • Field Details

    • kualiConfigurationService

      protected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService
    • dataObjectService

      protected org.kuali.rice.krad.data.DataObjectService dataObjectService
  • Constructor Details

    • AttachmentServiceImpl

      public AttachmentServiceImpl()
  • Method Details

    • getAttachmentByNoteId

      public org.kuali.rice.krad.bo.Attachment getAttachmentByNoteId(Long noteId)
      Retrieves an Attachment by note identifier.
      Specified by:
      getAttachmentByNoteId in interface org.kuali.rice.krad.service.AttachmentService
      See Also:
      • AttachmentService.getAttachmentByNoteId(java.lang.Long)
    • createAttachment

      public org.kuali.rice.krad.bo.Attachment createAttachment(org.kuali.rice.core.api.mo.common.GloballyUnique parent, String uploadedFileName, String mimeType, int fileSize, InputStream fileContents, String attachmentTypeCode) throws IOException
      Specified by:
      createAttachment in interface org.kuali.rice.krad.service.AttachmentService
      Throws:
      IOException
      See Also:
      • AttachmentService.createAttachment(GloballyUnique, String, String, int, java.io.InputStream, String)
    • writeInputStreamToFileStorage

      protected void writeInputStreamToFileStorage(InputStream fileContents, String fullPathUniqueFileName) throws IOException
      Throws:
      IOException
    • moveAttachmentWherePending

      public void moveAttachmentWherePending(org.kuali.rice.krad.bo.Note note)
      Specified by:
      moveAttachmentWherePending in interface org.kuali.rice.krad.service.AttachmentService
    • moveAttachmentFromPending

      protected void moveAttachmentFromPending(org.kuali.rice.krad.bo.Attachment attachment, String objectId) throws IOException
      Throws:
      IOException
    • deleteAttachmentContents

      public void deleteAttachmentContents(org.kuali.rice.krad.bo.Attachment attachment)
      Specified by:
      deleteAttachmentContents in interface org.kuali.rice.krad.service.AttachmentService
    • getDocumentDirectory

      protected String getDocumentDirectory(String objectId)
    • retrieveAttachmentContents

      public InputStream retrieveAttachmentContents(org.kuali.rice.krad.bo.Attachment attachment) throws IOException
      /* (non-Javadoc)
      Specified by:
      retrieveAttachmentContents in interface org.kuali.rice.krad.service.AttachmentService
      Throws:
      IOException
      See Also:
      • AttachmentService.retrieveAttachmentContents(org.kuali.rice.krad.bo.Attachment)
    • deletePendingAttachmentsModifiedBefore

      public void deletePendingAttachmentsModifiedBefore(long modificationTime)
      Specified by:
      deletePendingAttachmentsModifiedBefore in interface org.kuali.rice.krad.service.AttachmentService
      See Also:
      • AttachmentService.deletePendingAttachmentsModifiedBefore(long)
    • getKualiConfigurationService

      public org.kuali.rice.core.api.config.property.ConfigurationService getKualiConfigurationService()
      Gets the configService attribute.
      Returns:
      Returns the configService.
    • setKualiConfigurationService

      public void setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configService)
      Sets the configService attribute value.
      Parameters:
      configService - The configService to set.
    • setDataObjectService

      public void setDataObjectService(org.kuali.rice.krad.data.DataObjectService dataObjectService)