Class FilesystemExportContext


  • public class FilesystemExportContext
    extends Object
    Stores states when generating Filesystem URLs. As we generate URLs for passed Resources we also export them to the filesystem at the same time.
    Since:
    7.2M1
    Version:
    $Id: e6a0a5cd06ec7f20e647f07f410f94840a6c08d9 $
    • Constructor Detail

      • FilesystemExportContext

        public FilesystemExportContext()
    • Method Detail

      • getCSSParentLevel

        public int getCSSParentLevel()
        Returns:
        the number of relative parent levels in the path to find the CSS file
      • getDocParentLevel

        public int getDocParentLevel()
        Returns:
        the number of relative parent levels in the path to find the root of the pages directory
        Since:
        8.4.5, 9.0
      • pushCSSParentLevels

        public void pushCSSParentLevels​(int depth)
        Pushes a new CSS parent's levels.
        Parameters:
        depth - the number of relative parent levels in the path to find the CSS file
      • setDocParentLevels

        public void setDocParentLevels​(int depth)
        Set the current document's nesting level.
        Parameters:
        depth - the number of relative parent levels in the path to find the root of the pages directory
        Since:
        8.4.5, 9.0
      • popCSSParentLevels

        public void popCSSParentLevels()
        Pops the last CSS parent's levels.
      • getNeededSkins

        public Set<String> getNeededSkins()
        Returns:
        the names of skins needed by rendered page(s)
      • getExportDir

        public File getExportDir()
        Returns:
        the base directory where the exported files are stored (attachments, resource files, etc)
      • getExportedPages

        public Set<String> getExportedPages()
        Returns:
        the pages for which to convert URLs to local
      • hasExportedPage

        public boolean hasExportedPage​(String page)
        Parameters:
        page - the page to check
        Returns:
        true if the page URLs should be converted to local references
      • setExportDir

        public void setExportDir​(File exportDir)
        Parameters:
        exportDir - See getExportDir()
      • getExportedSkinFiles

        public Collection<String> getExportedSkinFiles()
        Returns:
        the list of custom skin files
      • hasExportedSkinFile

        public boolean hasExportedSkinFile​(String filePath)
        Parameters:
        filePath - the skin file path to check
        Returns:
        true if the skin file path is a custom skin file
      • addExportedSkinFile

        public void addExportedSkinFile​(String filePath)
        Parameters:
        filePath - see getExportedPages()