Class PageFactory
- java.lang.Object
-
- com.djrapitops.plan.delivery.rendering.pages.PageFactory
-
@Singleton public class PageFactory extends java.lang.Object
Factory for creating differentPage
objects.
-
-
Constructor Summary
Constructors Constructor Description PageFactory(dagger.Lazy<VersionChecker> versionChecker, dagger.Lazy<PlanFiles> files, dagger.Lazy<PlanConfig> config, dagger.Lazy<Locale> locale, dagger.Lazy<Theme> theme, dagger.Lazy<DBSystem> dbSystem, dagger.Lazy<ServerInfo> serverInfo, dagger.Lazy<JSONStorage> jsonStorage, dagger.Lazy<Formatters> formatters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page
errorPage(Icon icon, java.lang.String title, java.lang.String error)
Page
errorPage(java.lang.String title, java.lang.String error)
Page
errorsPage()
java.lang.String
getResource(java.lang.String name)
PlayerPluginTab
inspectPluginTabs(java.util.UUID playerUUID)
Page
internalErrorPage(java.lang.String message, java.lang.Throwable error)
Page
loginPage()
NetworkPage
networkPage()
PlayerPage
playerPage(java.util.UUID playerUUID)
PlayersPage
playersPage()
Page
queryPage()
Page
registerPage()
Page
serverPage(ServerUUID serverUUID)
Create a server page.
-
-
-
Constructor Detail
-
PageFactory
@Inject public PageFactory(dagger.Lazy<VersionChecker> versionChecker, dagger.Lazy<PlanFiles> files, dagger.Lazy<PlanConfig> config, dagger.Lazy<Locale> locale, dagger.Lazy<Theme> theme, dagger.Lazy<DBSystem> dbSystem, dagger.Lazy<ServerInfo> serverInfo, dagger.Lazy<JSONStorage> jsonStorage, dagger.Lazy<Formatters> formatters)
-
-
Method Detail
-
playersPage
public PlayersPage playersPage() throws java.io.IOException
- Throws:
java.io.IOException
-
serverPage
public Page serverPage(ServerUUID serverUUID) throws java.io.IOException
Create a server page.- Parameters:
serverUUID
- UUID of the server- Returns:
Page
that matches the server page.- Throws:
NotFoundException
- If the server can not be found in the database.java.io.IOException
- If the template files can not be read.
-
playerPage
public PlayerPage playerPage(java.util.UUID playerUUID) throws java.io.IOException
- Throws:
java.io.IOException
-
inspectPluginTabs
public PlayerPluginTab inspectPluginTabs(java.util.UUID playerUUID)
-
networkPage
public NetworkPage networkPage() throws java.io.IOException
- Throws:
java.io.IOException
-
internalErrorPage
public Page internalErrorPage(java.lang.String message, java.lang.Throwable error)
-
errorPage
public Page errorPage(java.lang.String title, java.lang.String error) throws java.io.IOException
- Throws:
java.io.IOException
-
errorPage
public Page errorPage(Icon icon, java.lang.String title, java.lang.String error) throws java.io.IOException
- Throws:
java.io.IOException
-
getResource
public java.lang.String getResource(java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
loginPage
public Page loginPage() throws java.io.IOException
- Throws:
java.io.IOException
-
registerPage
public Page registerPage() throws java.io.IOException
- Throws:
java.io.IOException
-
queryPage
public Page queryPage() throws java.io.IOException
- Throws:
java.io.IOException
-
errorsPage
public Page errorsPage() throws java.io.IOException
- Throws:
java.io.IOException
-
-