Package org.apache.wicket.settings
Class ApplicationSettings
- java.lang.Object
-
- org.apache.wicket.settings.ApplicationSettings
-
public class ApplicationSettings extends java.lang.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 java.lang.Class<? extends Page>getAccessDeniedPage()Gets the access denied page class.IClassResolvergetClassResolver()Gets the default resolver to use when finding classes and resources.org.apache.wicket.util.lang.BytesgetDefaultMaximumUploadSize()Gets the default maximum size for uploads.IFeedbackMessageFiltergetFeedbackMessageCleanupFilter()Returns the cleanup feedback message filter.java.lang.Class<? extends Page>getInternalErrorPage()Gets internal error page class.java.lang.Class<? extends Page>getPageExpiredErrorPage()Gets the page expired page class.booleanisUploadProgressUpdatesEnabled()Gets whether wicket is providing updates about the upload progress or not.ApplicationSettingssetAccessDeniedPage(java.lang.Class<? extends Page> accessDeniedPage)Sets the access denied page class.ApplicationSettingssetClassResolver(IClassResolver defaultClassResolver)Sets the default class resolver to use when finding classes and resources.ApplicationSettingssetDefaultMaximumUploadSize(org.apache.wicket.util.lang.Bytes defaultMaximumUploadSize)Sets the default maximum size for uploads.ApplicationSettingssetFeedbackMessageCleanupFilter(IFeedbackMessageFilter filter)Sets the cleanup feedback message filter.ApplicationSettingssetInternalErrorPage(java.lang.Class<? extends Page> internalErrorPage)Sets internal error page class.ApplicationSettingssetPageExpiredErrorPage(java.lang.Class<? extends Page> pageExpiredErrorPage)Sets the page expired page class.ApplicationSettingssetUploadProgressUpdatesEnabled(boolean uploadProgressUpdatesEnabled)Sets whether wicket should provide updates about the upload progress or not.
-
-
-
Method Detail
-
getAccessDeniedPage
public java.lang.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 org.apache.wicket.util.lang.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 java.lang.Class<? extends Page> getInternalErrorPage()
Gets internal error page class.- Returns:
- Returns the internalErrorPage.
-
getPageExpiredErrorPage
public java.lang.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(java.lang.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:
thisobject 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:
thisobject for chaining
-
setDefaultMaximumUploadSize
public ApplicationSettings setDefaultMaximumUploadSize(org.apache.wicket.util.lang.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:
thisobject for chaining
-
setInternalErrorPage
public ApplicationSettings setInternalErrorPage(java.lang.Class<? extends Page> internalErrorPage)
Sets internal error page class. The class must be bookmarkable and must extendPage.Consider using custom
request cycle listenerif you need to pass some extra information to the error page. By usingIRequestCycleListenerthe application has more flexibility in the instantiation of the error page.- Parameters:
internalErrorPage- The internalErrorPage to set.- Returns:
thisobject for chaining- See Also:
IRequestCycleListener.onException(RequestCycle, Exception)
-
setPageExpiredErrorPage
public ApplicationSettings setPageExpiredErrorPage(java.lang.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:
thisobject 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:
thisobject for chaining
-
setFeedbackMessageCleanupFilter
public ApplicationSettings setFeedbackMessageCleanupFilter(IFeedbackMessageFilter filter)
Sets the cleanup feedback message filter. seegetFeedbackMessageCleanupFilter()for more details.- Parameters:
filter-- Returns:
thisobject 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
-
-