Package ro.sync.ecss.extensions.api
Class InvalidEditException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ro.sync.ecss.extensions.api.InvalidEditException
- All Implemented Interfaces:
Serializable
Exception thrown by
AuthorSchemaAwareEditingHandler methods when an edit is considered invalid and must be rejected.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidEditException(String title, String description, boolean presentToUser) Constructor.InvalidEditException(String title, String description, boolean presentToUser, boolean showLinkToSchemaAwarePreferences) Constructor.InvalidEditException(String title, String description, Throwable cause, boolean presentToUser) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetTitle()booleanbooleanvoidsetHtmlMessage(String htmlMessage) voidsetPresentToUser(boolean presentToUser) Choose not to present the exception to the user.voidsetShowLinkToSchemaAwarePreferences(boolean showLinkToSchemaAwarePreferences) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidEditException
public InvalidEditException(String title, String description, boolean presentToUser, boolean showLinkToSchemaAwarePreferences) Constructor.- Parameters:
title- Title to be presented to the user.description- Error message.presentToUser-trueif the error message must be presented to the user.showLinkToSchemaAwarePreferences- Iftruewhen the error message is presented to the user a link to the Schema Aware preference page will be added.
-
InvalidEditException
Constructor.- Parameters:
title- Title to be presented to the user.description- Error message.presentToUser-trueif the error message must be presented to the user.
-
InvalidEditException
public InvalidEditException(String title, String description, Throwable cause, boolean presentToUser) Constructor.- Parameters:
title- Title to be presented to the user.description- Error message.cause- The exception cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.presentToUser-trueif the error message must be presented to the user.
-
-
Method Details
-
isPresentToUser
public boolean isPresentToUser()- Returns:
trueif the error message should be presented to the user.
-
getTitle
- Returns:
- Returns the title.
-
setHtmlMessage
- Parameters:
htmlMessage- An error message that uses HTML elements for styling.
-
getHtmlMessage
- Returns:
- Returns the error message using HTML elements to style.
nullif a styled message is not available.
-
setShowLinkToSchemaAwarePreferences
public void setShowLinkToSchemaAwarePreferences(boolean showLinkToSchemaAwarePreferences) - Parameters:
showLinkToSchemaAwarePreferences- The showLinkToSchemaAwarePreferences to set.
-
isShowLinkToSchemaAwarePreferences
public boolean isShowLinkToSchemaAwarePreferences()- Returns:
- Returns the showLinkToSchemaAwarePreferences.
-
setPresentToUser
public void setPresentToUser(boolean presentToUser) Choose not to present the exception to the user.- Parameters:
presentToUser- The presentToUser to set.
-