Class FilePathTools

java.lang.Object
sk.iway.iwcm.common.FilePathTools

public class FilePathTools extends Object
FilePathTools.java - trieda pre preklad ciest k statickym suborom Cloudu
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Vrati cestu k adresaru pre aktualnu domenu
    static String
    Vrati cestu k adresaru pre zadanu domenu
    static String
    Hellper pre ziskanie virtual path z realnej cesty, nepouzivat napriamo, len cez IwcmFsDB.getVirtualPath
    static boolean
    isExternalDir(String virtualPath)
    Pre zadanu virtual path vrati true ak sa jedna o cestu k externym suborom (/images, /files, /css, /jscripts)
    static boolean
    writeFileOut(String path, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
     
    static boolean
    writeFileOut(IwcmFile f, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
    Zapise dany subor na vystup vratane riesenia RANGE http hlavicky a odpovede nastavi korektne aj content-type, riesi if-modified-since hlavicku

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FilePathTools

      public FilePathTools()
  • Method Details

    • isExternalDir

      public static boolean isExternalDir(String virtualPath)
      Pre zadanu virtual path vrati true ak sa jedna o cestu k externym suborom (/images, /files, /css, /jscripts)
      Parameters:
      virtualPath -
      Returns:
    • getVirtualPathHellper

      public static String getVirtualPathHellper(String realPath)
      Hellper pre ziskanie virtual path z realnej cesty, nepouzivat napriamo, len cez IwcmFsDB.getVirtualPath
      Parameters:
      realPath -
      Returns:
    • getDomainBaseFolder

      public static String getDomainBaseFolder()
      Vrati cestu k adresaru pre aktualnu domenu
      Returns:
    • getDomainBaseFolder

      public static String getDomainBaseFolder(String domain)
      Vrati cestu k adresaru pre zadanu domenu
      Parameters:
      domain -
      Returns:
    • writeFileOut

      public static boolean writeFileOut(String path, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
    • writeFileOut

      public static boolean writeFileOut(IwcmFile f, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
      Zapise dany subor na vystup vratane riesenia RANGE http hlavicky a odpovede nastavi korektne aj content-type, riesi if-modified-since hlavicku
      Parameters:
      f -
      req -
      res -
      Returns:
      Throws:
      IOException