Interface PathNamingService


  • public interface PathNamingService
    Utilities service for directories and files naming methods.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.uberfire.backend.vfs.Path buildTargetPath​(org.uberfire.backend.vfs.Path originalPath, String targetFileName)
      Creates a path by renaming a file or directory, keeping the original file extension (if applicable).
      org.uberfire.backend.vfs.Path buildTargetPath​(org.uberfire.backend.vfs.Path originalPath, org.uberfire.backend.vfs.Path targetParentDirectory, String targetFileName)
      Creates a path to a file or directory in another parent directory, keeping the original file extension (if applicable).
      String getExtension​(String fileName)
      Returns the extension of the passed file name.
    • Method Detail

      • buildTargetPath

        org.uberfire.backend.vfs.Path buildTargetPath​(org.uberfire.backend.vfs.Path originalPath,
                                                      String targetFileName)
        Creates a path by renaming a file or directory, keeping the original file extension (if applicable).
        Parameters:
        originalPath - Original file path
        targetFileName - New file name
        Returns:
        Path for the new file
      • buildTargetPath

        org.uberfire.backend.vfs.Path buildTargetPath​(org.uberfire.backend.vfs.Path originalPath,
                                                      org.uberfire.backend.vfs.Path targetParentDirectory,
                                                      String targetFileName)
        Creates a path to a file or directory in another parent directory, keeping the original file extension (if applicable).
        Parameters:
        originalPath - Original file path
        targetParentDirectory - Parent directory of the created file/directory path
        targetFileName - New file name
        Returns:
        Path for the new file
      • getExtension

        String getExtension​(String fileName)
        Returns the extension of the passed file name.
        Parameters:
        fileName - File name with extension
        Returns:
        The file name extension