Class InvalidEditException

  • All Implemented Interfaces:
    java.io.Serializable

    @API(type=EXTENDABLE,
         src=PUBLIC)
    public class InvalidEditException
    extends java.lang.Exception
    Exception thrown by AuthorSchemaAwareEditingHandler 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)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 - 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​(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.