Class Exporter
- java.lang.Object
-
- com.djrapitops.plan.delivery.export.Exporter
-
@Singleton public class Exporter extends java.lang.Object
Handles export for different pages.
-
-
Constructor Summary
Constructors Constructor Description Exporter(PlanConfig config, PlayerJSONExporter playerJSONExporter, PlayerPageExporter playerPageExporter, PlayersPageExporter playersPageExporter, ServerPageExporter serverPageExporter, NetworkPageExporter networkPageExporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exportPlayerJSON(java.util.UUID playerUUID, java.lang.String playerName)
Export Raw Data JSON of a player.boolean
exportPlayerPage(java.util.UUID playerUUID, java.lang.String playerName)
Export page of a player.boolean
exportPlayersPage()
boolean
exportServerJSON(Server server)
boolean
exportServerPage(Server server)
Export a page of a server.
-
-
-
Constructor Detail
-
Exporter
@Inject public Exporter(PlanConfig config, PlayerJSONExporter playerJSONExporter, PlayerPageExporter playerPageExporter, PlayersPageExporter playersPageExporter, ServerPageExporter serverPageExporter, NetworkPageExporter networkPageExporter)
-
-
Method Detail
-
exportServerPage
public boolean exportServerPage(Server server) throws ExportException
Export a page of a server.- Parameters:
server
- Server which page is going to be exported- Returns:
- false if the page was not exported due to previous failure or is disabled in config.
- Throws:
ExportException
- If the export failed due to IO, NotFound or GenerationException.
-
exportServerJSON
public boolean exportServerJSON(Server server) throws ExportException
- Throws:
ExportException
-
exportPlayerPage
public boolean exportPlayerPage(java.util.UUID playerUUID, java.lang.String playerName) throws ExportException
Export page of a player.- Parameters:
playerUUID
- UUID of the player.playerName
- Name of the player.- Returns:
- false if the page was not exported due to config settings.
- Throws:
ExportException
- If the export failed due to IO, NotFound or GenerationException.
-
exportPlayersPage
public boolean exportPlayersPage() throws ExportException
- Throws:
ExportException
-
exportPlayerJSON
public boolean exportPlayerJSON(java.util.UUID playerUUID, java.lang.String playerName) throws ExportException
Export Raw Data JSON of a player.- Parameters:
playerUUID
- UUID of the player.playerName
- Name of the player.- Returns:
- false if the json was not exported due to config settings.
- Throws:
ExportException
- If the export failed due to IOException.
-
-