パッケージ io.digdag.util

クラス Workspace

  • すべての実装されたインタフェース:
    java.io.Closeable, java.lang.AutoCloseable

    public class Workspace
    extends java.lang.Object
    implements java.io.Closeable
    • ネストされたクラスの概要

      ネストされたクラス 
      修飾子とタイプ クラス 説明
      static interface  Workspace.ExceptionFactory<E>  
    • メソッドの概要

      すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 
      修飾子とタイプ メソッド 説明
      void close()  
      java.nio.file.Path createTempDir​(java.lang.String prefix)
      Create new directory and return the absolute path
      java.nio.file.Path createTempFile​(java.lang.String prefix, java.lang.String suffix)
      Create new file and return the absolute path
      java.io.File getFile​(java.lang.String relative)  
      java.nio.file.Path getPath()  
      java.nio.file.Path getPath​(java.lang.String fileName)  
      java.nio.file.Path getProjectPath()  
      java.io.BufferedReader newBufferedReader​(java.lang.String fileName, java.nio.charset.Charset cs)  
      java.io.BufferedWriter newBufferedWriter​(java.lang.String fileName, java.nio.charset.Charset cs)  
      java.io.InputStream newInputStream​(java.lang.String fileName)  
      java.io.OutputStream newOutputStream​(java.lang.String fileName)  
      static Workspace of​(java.nio.file.Path projectPath, java.lang.String workdir)  
      static Workspace ofTaskRequest​(java.nio.file.Path projectPath, io.digdag.spi.TaskRequest taskRequest)  
      static <E extends java.lang.RuntimeException>
      E
      propagateIoException​(java.io.IOException ex, java.lang.String fileName, Workspace.ExceptionFactory<E> factory)  
      java.lang.String templateCommand​(io.digdag.spi.TemplateEngine templateEngine, io.digdag.client.config.Config params, java.lang.String aliasKey, java.nio.charset.Charset fileCharset)  
      java.lang.String templateFile​(io.digdag.spi.TemplateEngine templateEngine, java.lang.String fileName, java.nio.charset.Charset fileCharset, io.digdag.client.config.Config params)  
      • クラスから継承されたメソッド java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • メソッドの詳細

      • ofTaskRequest

        public static Workspace ofTaskRequest​(java.nio.file.Path projectPath,
                                              io.digdag.spi.TaskRequest taskRequest)
      • of

        public static Workspace of​(java.nio.file.Path projectPath,
                                   java.lang.String workdir)
      • getProjectPath

        public java.nio.file.Path getProjectPath()
      • getPath

        public java.nio.file.Path getPath()
      • getPath

        public java.nio.file.Path getPath​(java.lang.String fileName)
      • getFile

        public java.io.File getFile​(java.lang.String relative)
      • createTempDir

        public java.nio.file.Path createTempDir​(java.lang.String prefix)
                                         throws java.io.IOException
        Create new directory and return the absolute path
        パラメータ:
        prefix -
        戻り値:
        例外:
        java.io.IOException
      • createTempFile

        public java.nio.file.Path createTempFile​(java.lang.String prefix,
                                                 java.lang.String suffix)
                                          throws java.io.IOException
        Create new file and return the absolute path
        パラメータ:
        prefix -
        suffix -
        戻り値:
        例外:
        java.io.IOException
      • newInputStream

        public java.io.InputStream newInputStream​(java.lang.String fileName)
                                           throws java.io.IOException
        例外:
        java.io.IOException
      • newBufferedReader

        public java.io.BufferedReader newBufferedReader​(java.lang.String fileName,
                                                        java.nio.charset.Charset cs)
                                                 throws java.io.IOException
        例外:
        java.io.IOException
      • newOutputStream

        public java.io.OutputStream newOutputStream​(java.lang.String fileName)
                                             throws java.io.IOException
        例外:
        java.io.IOException
      • newBufferedWriter

        public java.io.BufferedWriter newBufferedWriter​(java.lang.String fileName,
                                                        java.nio.charset.Charset cs)
                                                 throws java.io.IOException
        例外:
        java.io.IOException
      • templateFile

        public java.lang.String templateFile​(io.digdag.spi.TemplateEngine templateEngine,
                                             java.lang.String fileName,
                                             java.nio.charset.Charset fileCharset,
                                             io.digdag.client.config.Config params)
                                      throws java.io.IOException,
                                             io.digdag.spi.TemplateException
        例外:
        java.io.IOException
        io.digdag.spi.TemplateException
      • templateCommand

        public java.lang.String templateCommand​(io.digdag.spi.TemplateEngine templateEngine,
                                                io.digdag.client.config.Config params,
                                                java.lang.String aliasKey,
                                                java.nio.charset.Charset fileCharset)
      • close

        public void close()
        定義:
        close インタフェース内 java.lang.AutoCloseable
        定義:
        close インタフェース内 java.io.Closeable
      • propagateIoException

        public static <E extends java.lang.RuntimeException> E propagateIoException​(java.io.IOException ex,
                                                                                    java.lang.String fileName,
                                                                                    Workspace.ExceptionFactory<E> factory)