Interface IPropErrorItem

All Superinterfaces:
Cloneable
All Known Implementing Classes:
PropErrorItem, PropErrorItemValue

public interface IPropErrorItem extends Cloneable
The generic property item error. A property can have several difference errors for each property, each one with a unique ID. One or more quick-fixes may be available, in which case there are Quick-fix IDs.
Author:
Christopher Mindus
  • Field Details

  • Method Details

    • setIndex

      void setIndex(int index)
      Sets the index for a multi-property.
      Parameters:
      index - 0 for main part, otherwise one-based index for errored property value.
    • getSeverity

      int getSeverity()
      Gets the severity.
      Returns:
      INFO, WARNING or ERROR.
    • getID

      String getID()
      Gets the ID of this error.
    • getMessage

      String getMessage()
      Gets the error message.
      Returns:
      The error message.
    • getLocation

      String getLocation()
      Gets the location of an error, for user info only.
      Returns:
      The location, or null for none.
    • getLocationOrName

      String getLocationOrName()
      Gets the location or property name of an error, for user info only.
      Returns:
      The location, or the property name if none is defined, never null.
    • getText

      String getText(boolean includeID)
      Gets a textual error description as "LEVEL[{\t}id]{\t}text" (where {\t} is the tab character).
      Parameters:
      includeID - Flag to include ID or not.
    • getIndex

      int getIndex()
      Gets the index for a multi-property.
      Returns:
      -1 for none, 0 for main part, otherwise one-based index for errored property value.
    • getQuickFixes

      String[] getQuickFixes()
      Gets the quick-fix ID's.
      Returns:
      The list of quick-fix ID's or null for none.
    • clone

      Clones the error item.
      Returns:
      A clone.
    • equals

      boolean equals(Object o)
      Checks if two error items are equal.
      Overrides:
      equals in class Object
    • load

      void load(Element element) throws Exception
      Initializes the error from XML.
      Parameters:
      element - The errorItem element.
      Throws:
      Exception - For errors in XML.
    • save

      void save(Element element)
      Saves the item to XML.
      Parameters:
      element - The errorItem element to save the data to.
    • isChildPropError

      default boolean isChildPropError()
      Returns the flag indicating this error should be put in a child property with the name returned by getChildPropName().
    • getChildPropName

      default String getChildPropName()
      Gets the name of the child property that is "missing".
      Returns:
      The name of the child property, or null if not a child property error, i.e. isChildPropError() returns false.