Package org.apache.wicket.settings
Class ApplicationSettings
- java.lang.Object
-
- org.apache.wicket.settings.ApplicationSettings
-
public class ApplicationSettings extends Object
* Settings class for application settings.internalErrorPage - You can override this with your own page class to display internal errors in a different way.
pageExpiredErrorPage - You can override this with your own bookmarkable page class to display expired page errors in a different way. You can set property homePageRenderStrategy to choose from different ways the home page url shows up in your browser.
A Converter Factory - By overriding getConverterFactory(), you can provide your own factory which creates locale sensitive Converter instances.
- Author:
- Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman
-
-
Constructor Summary
Constructors Constructor Description ApplicationSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Page>
getAccessDeniedPage()
Gets the access denied page class.IClassResolver
getClassResolver()
Gets the default resolver to use when finding classes and resources.Bytes
getDefaultMaximumUploadSize()
Gets the default maximum size for uploads.IFeedbackMessageFilter
getFeedbackMessageCleanupFilter()
Returns the cleanup feedback message filter.Class<? extends Page>
getInternalErrorPage()
Gets internal error page class.Class<? extends Page>
getPageExpiredErrorPage()
Gets the page expired page class.boolean
isUploadProgressUpdatesEnabled()
Gets whether wicket is providing updates about the upload progress or not.ApplicationSettings
setAccessDeniedPage(Class<? extends Page> accessDeniedPage)
Sets the access denied page class.ApplicationSettings
setClassResolver(IClassResolver defaultClassResolver)
Sets the default class resolver to use when finding classes and resources.ApplicationSettings
setDefaultMaximumUploadSize(Bytes defaultMaximumUploadSize)
Sets the default maximum size for uploads.ApplicationSettings
setFeedbackMessageCleanupFilter(IFeedbackMessageFilter filter)
Sets the cleanup feedback message filter.ApplicationSettings
setInternalErrorPage(Class<? extends Page> internalErrorPage)
Sets internal error page class.ApplicationSettings
setPageExpiredErrorPage(Class<? extends Page> pageExpiredErrorPage)
Sets the page expired page class.ApplicationSettings
setUploadProgressUpdatesEnabled(boolean uploadProgressUpdatesEnabled)
Sets whether wicket should provide updates about the upload progress or not.
-
-
-
Constructor Detail
-
ApplicationSettings
public ApplicationSettings()
-
-
Method Detail
-
getAccessDeniedPage
public Class<? extends Page> getAccessDeniedPage()
Gets the access denied page class.- Returns:
- Returns the accessDeniedPage.
-
getClassResolver
public IClassResolver getClassResolver()
Gets the default resolver to use when finding classes and resources.- Returns:
- Default class resolver
-
getDefaultMaximumUploadSize
public Bytes getDefaultMaximumUploadSize()
Gets the default maximum size for uploads. This is used byForm.getMaxSize()
if no value is explicitly set throughForm.setMaxSize(Bytes)
.- Returns:
- the default maximum size for uploads
-
getInternalErrorPage
public Class<? extends Page> getInternalErrorPage()
Gets internal error page class.- Returns:
- Returns the internalErrorPage.
-
getPageExpiredErrorPage
public Class<? extends Page> getPageExpiredErrorPage()
Gets the page expired page class.- Returns:
- Returns the pageExpiredErrorPage.
-
isUploadProgressUpdatesEnabled
public boolean isUploadProgressUpdatesEnabled()
Gets whether wicket is providing updates about the upload progress or not.- Returns:
- if true upload progress monitoring is enabled
-
setAccessDeniedPage
public ApplicationSettings setAccessDeniedPage(Class<? extends Page> accessDeniedPage)
Sets the access denied page class. The class must be bookmarkable and must extend Page.- Parameters:
accessDeniedPage
- The accessDeniedPage to set.- Returns:
this
object for chaining
-
setClassResolver
public ApplicationSettings setClassResolver(IClassResolver defaultClassResolver)
Sets the default class resolver to use when finding classes and resources.- Parameters:
defaultClassResolver
- The default class resolver- Returns:
this
object for chaining
-
setDefaultMaximumUploadSize
public ApplicationSettings setDefaultMaximumUploadSize(Bytes defaultMaximumUploadSize)
Sets the default maximum size for uploads. This is used byForm.getMaxSize()
if no value is explicitly set throughForm.setMaxSize(Bytes)
.- Parameters:
defaultMaximumUploadSize
- the default maximum size for uploads- Returns:
this
object for chaining
-
setInternalErrorPage
public ApplicationSettings setInternalErrorPage(Class<? extends Page> internalErrorPage)
Sets internal error page class. The class must be bookmarkable and must extendPage
.Consider using custom
request cycle listener
if you need to pass some extra information to the error page. By usingIRequestCycleListener
the application has more flexibility in the instantiation of the error page.- Parameters:
internalErrorPage
- The internalErrorPage to set.- Returns:
this
object for chaining- See Also:
IRequestCycleListener.onException(RequestCycle, Exception)
-
setPageExpiredErrorPage
public ApplicationSettings setPageExpiredErrorPage(Class<? extends Page> pageExpiredErrorPage)
Sets the page expired page class. The class must be bookmarkable and must extend Page.- Parameters:
pageExpiredErrorPage
- The pageExpiredErrorPage to set.- Returns:
this
object for chaining
-
setUploadProgressUpdatesEnabled
public ApplicationSettings setUploadProgressUpdatesEnabled(boolean uploadProgressUpdatesEnabled)
Sets whether wicket should provide updates about the upload progress or not.- Parameters:
uploadProgressUpdatesEnabled
- if true upload progress monitoring is enabled- Returns:
this
object for chaining
-
setFeedbackMessageCleanupFilter
public ApplicationSettings setFeedbackMessageCleanupFilter(IFeedbackMessageFilter filter)
Sets the cleanup feedback message filter. seegetFeedbackMessageCleanupFilter()
for more details.- Parameters:
filter
-- Returns:
this
object for chaining
-
getFeedbackMessageCleanupFilter
public IFeedbackMessageFilter getFeedbackMessageCleanupFilter()
Returns the cleanup feedback message filter. At the end of request all messages are ran through this filter, and the ones accepted are removed. The default implementation accepts (and therefore removes) all rendered messages.- Returns:
- feedback message filter
-
-