Class ServerPageExporter
- java.lang.Object
-
- com.djrapitops.plan.delivery.export.ServerPageExporter
-
@Singleton public class ServerPageExporter extends java.lang.Object
Handles exporting of /server page html, data and resources.
-
-
Constructor Summary
Constructors Constructor Description ServerPageExporter(PlanFiles files, PageFactory pageFactory, DBSystem dbSystem, RootJSONResolver jsonHandler, Theme theme, ServerInfo serverInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
export(java.nio.file.Path toDirectory, Server server)
Perform export for a server page.void
exportJSON(java.nio.file.Path toDirectory, Server server)
Perform export for a server page json payload.
-
-
-
Constructor Detail
-
ServerPageExporter
@Inject public ServerPageExporter(PlanFiles files, PageFactory pageFactory, DBSystem dbSystem, RootJSONResolver jsonHandler, Theme theme, ServerInfo serverInfo)
-
-
Method Detail
-
export
public void export(java.nio.file.Path toDirectory, Server server) throws java.io.IOException
Perform export for a server page.- Parameters:
toDirectory
- Path to Export directoryserver
- Server to export- Throws:
java.io.IOException
- If a template can not be read from jar/disk or the result writtenNotFoundException
- If a file or resource that is being exported can not be found
-
exportJSON
public void exportJSON(java.nio.file.Path toDirectory, Server server) throws java.io.IOException
Perform export for a server page json payload.- Parameters:
toDirectory
- Path to Export directoryserver
- Server to export- Throws:
java.io.IOException
- If a template can not be read from jar/disk or the result writtenNotFoundException
- If a file or resource that is being exported can not be found
-
-