Class ValidationProblem


  • public class ValidationProblem
    extends java.lang.Object
    Problem reported by model validation. Provides the details for a specific problem item.
    Version:
    1.0
    Author:
    Dennis M. Sosnoski
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ERROR_LEVEL  
      static int FATAL_LEVEL  
      private java.lang.Object m_component
      Component that reported problem.
      private java.lang.String m_message
      Supplied problem description message.
      private int m_severity
      Problem severity level.
      static int WARNING_LEVEL  
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidationProblem​(int level, java.lang.String msg, java.lang.Object obj)
      Full constructor.
      ValidationProblem​(java.lang.String msg, java.lang.Object obj)
      Constructor using default (error) severity level.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String componentDescription​(java.lang.Object obj)
      Create description text for a component of a binding definition.
      java.lang.Object getComponent()
      Get the main binding definition item for the problem.
      java.lang.String getDescription()
      Get problem description.
      int getSeverity()
      Get problem severity level.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_severity

        private final int m_severity
        Problem severity level.
      • m_message

        private final java.lang.String m_message
        Supplied problem description message.
      • m_component

        private final java.lang.Object m_component
        Component that reported problem.
    • Constructor Detail

      • ValidationProblem

        ValidationProblem​(int level,
                          java.lang.String msg,
                          java.lang.Object obj)
        Full constructor.
        Parameters:
        level - severity level of problem
        msg - problem description
        obj - source object for validation error (may be null if not specific to a particular component)
      • ValidationProblem

        ValidationProblem​(java.lang.String msg,
                          java.lang.Object obj)
        Constructor using default (error) severity level.
        Parameters:
        msg - problem description
        obj - source object for validation error
    • Method Detail

      • componentDescription

        public static java.lang.String componentDescription​(java.lang.Object obj)
        Create description text for a component of a binding definition.
        Parameters:
        obj - binding definition component
        Returns:
        description
      • getComponent

        public java.lang.Object getComponent()
        Get the main binding definition item for the problem.
        Returns:
        element or attribute at root of problem
      • getDescription

        public java.lang.String getDescription()
        Get problem description.
        Returns:
        problem description
      • getSeverity

        public int getSeverity()
        Get problem severity level.
        Returns:
        severity level for problem