Package org.xwiki.url.filesystem
Class FilesystemExportContext
- java.lang.Object
-
- org.xwiki.url.filesystem.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 Summary
Constructors Constructor Description FilesystemExportContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExportedPage(String page)
void
addExportedSkinFile(String filePath)
void
addNeededSkin(String skin)
int
getCSSParentLevel()
int
getDocParentLevel()
File
getExportDir()
Set<String>
getExportedPages()
Collection<String>
getExportedSkinFiles()
Set<String>
getNeededSkins()
boolean
hasExportedPage(String page)
boolean
hasExportedSkinFile(String filePath)
void
popCSSParentLevels()
Pops the last CSS parent's levels.void
pushCSSParentLevels(int depth)
Pushes a new CSS parent's levels.void
setDocParentLevels(int depth)
Set the current document's nesting level.void
setExportDir(File exportDir)
-
-
-
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)
-
addNeededSkin
public void addNeededSkin(String skin)
- Parameters:
skin
- seegetNeededSkins()
-
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
-
addExportedPage
public void addExportedPage(String page)
- Parameters:
page
- seegetExportedPages()
-
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
- SeegetExportDir()
-
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
- seegetExportedPages()
-
-