Class StyleFileAccess

java.lang.Object
org.eclnt.jsfserver.util.style.StyleFileAccess

public class StyleFileAccess extends Object
General method to read files in the context of style management.
  • Constructor Details

    • StyleFileAccess

      public StyleFileAccess()
  • Method Details

    • findDirectories

      public static List<String> findDirectories(String webPath)
      Find all style - including the one that are externally store within the stream store.
    • findFiles

      public static List<String> findFiles(String webPath, String extension)
      Find all style - including the one that are externally store within the stream store.
    • readStyleFile

      public static byte[] readStyleFile(String webPath)
      Reads a file from style directory at runtime. First the style is expected to be part of the web archive. If not the style is checked in the stream store.
      Parameters:
      webPath - The path within the webcontent, e.g. "/eclntjsfserver/styles/xyz/xyz.png"
    • readStyleUTF8File

      public static String readStyleUTF8File(String webPath)
      Reads a file from style directory at runtime. First the style is expected to be part of the web archive. If not the style is checked in the stream store.
      Parameters:
      webPath - The path within the webcontent, e.g. "/eclntjsfserver/styles/xyz/xyz.png"
    • writeRuntimeStyleFile

      public static void writeRuntimeStyleFile(String styleName, String fileName, String content)
      Writes a file into the style directory for the corresponding style.
    • writeRuntimeStyleFile

      public static void writeRuntimeStyleFile(String styleName, String fileName, byte[] content)
      Writes a file into the style directory for the corresponding style.