Class FileRabbitMQService


  • @Component
    public final class FileRabbitMQService
    extends AbstractRabbitMQService
    The purpose of this class is to provide a possiblities to work with files through OpenIAM groovy extension. This is critical to use this service from Groovy because direct access to native File operaions are blocked from Groovy scripts.
    • Constructor Detail

      • FileRabbitMQService

        public FileRabbitMQService​(FileQueue fileQueue)
    • Method Detail

      • getFile

        public String getFile​(String fName)
        get text file by Name or relative path
        Parameters:
        fName - - name of file
        Returns:
        - file content in String container
      • saveFile

        public File saveFile​(String fileName,
                             String body)
        Save #body to text file named #fileName. if file exists this method overwrites old one
        Parameters:
        fileName - - name of file to save
        body - - the content of text file
        Returns:
        - File to created file, null - if any errors are happend
      • appendContentToFile

        public void appendContentToFile​(String fileName,
                                        String body)