Package de.xima.fc.common.error_page
Class ErrorPagesConfig
- java.lang.Object
-
- de.xima.fc.common.error_page.ErrorPagesConfig
-
- All Implemented Interfaces:
Serializable
public final class ErrorPagesConfig extends Object implements Serializable
Model for the error pages that should be shown when the app encounters an error.- Since:
- 8.3.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ErrorPagesConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNew()
List<ErrorPageByStatusCode>
getAll()
Gets a list of all error pages mapped to a specific status code.String
getGeneralErrorPageUrl()
Gets the general error page URL used when no more specific error page for a status code was configured.static ErrorPagesConfig
loadFromProperties()
Loads the error page mappings from the application properties and returns a new model with that data.void
removeAtIndex(int index)
Removes the error page mapping at the specified index.void
saveToProperties()
Saves the error page mappings to the application properties.void
setGeneralErrorPageUrl(String generalErrorPageUrl)
Sets the general error page URL used when no more specific error page for a status code was configured.
-
-
-
Method Detail
-
addNew
public void addNew()
-
getAll
public List<ErrorPageByStatusCode> getAll()
Gets a list of all error pages mapped to a specific status code.- Returns:
- A list of all error pages.
-
getGeneralErrorPageUrl
public String getGeneralErrorPageUrl()
Gets the general error page URL used when no more specific error page for a status code was configured.- Returns:
- The general error page URL.
-
setGeneralErrorPageUrl
public void setGeneralErrorPageUrl(String generalErrorPageUrl)
Sets the general error page URL used when no more specific error page for a status code was configured.- Parameters:
generalErrorPageUrl
- The general error page URL.
-
removeAtIndex
public void removeAtIndex(int index)
Removes the error page mapping at the specified index.- Parameters:
index
- The index of the error page mapping to remove.
-
saveToProperties
public void saveToProperties()
Saves the error page mappings to the application properties.
-
loadFromProperties
public static ErrorPagesConfig loadFromProperties()
Loads the error page mappings from the application properties and returns a new model with that data.- Returns:
- A new model with the error page mappings.
-
-