Class InvalidEditException

java.lang.Object
java.lang.Throwable
java.lang.Exception
ro.sync.ecss.extensions.api.InvalidEditException
All Implemented Interfaces:
Serializable

@API(type=EXTENDABLE, src=PUBLIC) public class InvalidEditException extends Exception
Exception thrown by AuthorSchemaAwareEditingHandler methods when an edit is considered invalid and must be rejected.
See Also:
  • 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 - true if the error message must be presented to the user.
      showLinkToSchemaAwarePreferences - If true when the error message is presented to the user a link to the Schema Aware preference page will be added.
    • InvalidEditException

      public InvalidEditException(String title, 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(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 - true if the error message must be presented to the user.
  • Method Details

    • isPresentToUser

      public boolean isPresentToUser()
      Returns:
      true if the error message should be presented to the user.
    • getTitle

      public String getTitle()
      Returns:
      Returns the title.
    • setHtmlMessage

      public void setHtmlMessage(String htmlMessage)
      Parameters:
      htmlMessage - An error message that uses HTML elements for styling.
    • getHtmlMessage

      public 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.