java.lang.Object
es.kukenan.smartfi.microservice.communication.utils.PathHandler

@Component public class PathHandler extends Object
Path Handler class Create the filesystem path for the given path and Stores the given classpath resource into a temporary file.
  • Constructor Details

    • PathHandler

      public PathHandler()
  • Method Details

    • fsPath

      public String fsPath(String path) throws Exception
      Create the filesystem path for the given path. Two types of path are supported:
      • Absolute or relative path
      • Classpath (classpath prefixed with "classpath://")
      Parameters:
      path - the configured path.
      Returns:
      a filesystem absolute path.
      Throws:
      Exception - fs Path
    • temporalStorage

      private String temporalStorage(String classpathResource) throws Exception
      Stores the given classpath resource into a temporary file.
      Parameters:
      classpathResource - resource to store.
      Returns:
      temporary file absolute path.รง
      Throws:
      Exception - temporal Storage