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:
java.io.Serializable
@API(type=EXTENDABLE, src=PUBLIC) public class InvalidEditException extends java.lang.Exception
Exception thrown byAuthorSchemaAwareEditingHandler
methods when an edit is considered invalid and must be rejected.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidEditException(java.lang.String title, java.lang.String description, boolean presentToUser)
Constructor.InvalidEditException(java.lang.String title, java.lang.String description, boolean presentToUser, boolean showLinkToSchemaAwarePreferences)
Constructor.InvalidEditException(java.lang.String title, java.lang.String description, java.lang.Throwable cause, boolean presentToUser)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHtmlMessage()
java.lang.String
getTitle()
boolean
isPresentToUser()
boolean
isShowLinkToSchemaAwarePreferences()
void
setHtmlMessage(java.lang.String htmlMessage)
void
setPresentToUser(boolean presentToUser)
Choose not to present the exception to the user.void
setShowLinkToSchemaAwarePreferences(boolean showLinkToSchemaAwarePreferences)
-
-
-
Constructor Detail
-
InvalidEditException
public InvalidEditException(java.lang.String title, java.lang.String description, boolean presentToUser, boolean showLinkToSchemaAwarePreferences)
Constructor.- Parameters:
title
- Title to be presented to the user.description
- Error message.presentToUser
-true
if the error message must be presented to the user.showLinkToSchemaAwarePreferences
- Iftrue
when the error message is presented to the user a link to the Schema Aware preference page will be added.
-
InvalidEditException
public InvalidEditException(java.lang.String title, java.lang.String description, boolean presentToUser)
Constructor.- Parameters:
title
- Title to be presented to the user.description
- Error message.presentToUser
-true
if the error message must be presented to the user.
-
InvalidEditException
public InvalidEditException(java.lang.String title, java.lang.String description, java.lang.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
-true
if the error message must be presented to the user.
-
-
Method Detail
-
isPresentToUser
public boolean isPresentToUser()
- Returns:
true
if the error message should be presented to the user.
-
getTitle
public java.lang.String getTitle()
- Returns:
- Returns the title.
-
setHtmlMessage
public void setHtmlMessage(java.lang.String htmlMessage)
- Parameters:
htmlMessage
- An error message that uses HTML elements for styling.
-
getHtmlMessage
public java.lang.String getHtmlMessage()
- Returns:
- Returns the error message using HTML elements to style.
null
if 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.
-
-