Class ReadFileService

    • Constructor Detail

      • ReadFileService

        public ReadFileService()
    • Method Detail

      • doService

        public void doService​(AdaptrisMessage message)
                       throws ServiceException
        Description copied from interface: Service

        Apply the service to the message.

        Parameters:
        message - the AdaptrisMessage to process
        Throws:
        ServiceException - wrapping any underlying Exceptions
      • getFilePath

        public java.lang.String getFilePath()
        Get the file path parameter.
        Returns:
        The file path parameter.
      • setFilePath

        public void setFilePath​(java.lang.String filePath)
        Set the file path parameter.
        Parameters:
        filePath - The file path parameter.
      • getContentTypeMetadataKey

        public java.lang.String getContentTypeMetadataKey()
      • setContentTypeMetadataKey

        public void setContentTypeMetadataKey​(java.lang.String contentTypeMetadataKey)
        Sets the metadata key set the content type as, if not provided will not be set. (default: null)
        Parameters:
        contentTypeMetadataKey -
      • setContentTypeProbe

        public void setContentTypeProbe​(ReadFileService.ContentTypeProbe contentTypeProbe)
        If setContentTypeMetadataKey(String) is set, then this interface is used to probe the content type of the file.

        By default Files.probeContentType(java.nio.file.Path) is used which means no additional jars are required. This implementation is platform dependent; so an alternative is available in the com.adaptris:interlok-filesystem module.

        Parameters:
        contentTypeProbe - how to probe for the content type; by default uses Files.probeContentType(java.nio.file.Path) if not explicitly configured.