Class WrongAttributeValueException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidHtmlInputException

public class WrongAttributeValueException extends AttributeValueException
Thrown when the attribute has wrong/illegal value.
Author:
Slavek Licehammer
See Also:
  • Constructor Details

    • WrongAttributeValueException

      public WrongAttributeValueException(String message)
      Simple constructor with a message
      Parameters:
      message - message with details about the cause
    • WrongAttributeValueException

      public WrongAttributeValueException(String message, Throwable cause)
      Constructor with a message and Throwable object
      Parameters:
      message - message with details about the cause
      cause - Throwable that caused throwing of this exception
    • WrongAttributeValueException

      public WrongAttributeValueException(Throwable cause)
      Constructor with a Throwable object
      Parameters:
      cause - Throwable that caused throwing of this exception
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute)
      Constructor with the attribute
      Parameters:
      attribute - the attribute whose value is illegal
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary, String message)
      Constructor with the attribute, primary attributeHolder, secondary attributeHolder and a message
      Parameters:
      attribute - the attribute whose value is illegal
      attributeHolder - primary entity holding the attribute
      attributeHolderSecondary - secondary entity holding the attribute
      message - message with details about the cause
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary)
      Constructor with the attribute, primary attributeHolder and secondary attributeHolder
      Parameters:
      attribute - the attribute whose value is illegal
      attributeHolder - primary entity holding the attribute
      attributeHolderSecondary - secondary entity holding the attribute
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, Object attributeHolder, String message)
      Constructor with the attribute, attributeHolder and a message
      Parameters:
      attribute - the attribute whose value is illegal
      attributeHolder - entity holding the attribute
      message - message with details about the cause
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, Object attributeHolder, String message, Throwable cause)
      Constructor with the attribute, attributeHolder, a message and the Throwable object
      Parameters:
      attribute - the attribute whose value is illegal
      attributeHolder - entity holding the attribute
      message - message with details about the cause
      cause - Throwable that caused throwing of this exception
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, Throwable cause)
      Constructor with the attribute and the Throwable object
      Parameters:
      attribute - attribute whose value is not correct
      cause - Throwable that caused throwing of this exception
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, String message)
      Constructor with the attribute and a message
      Parameters:
      attribute - attribute whose value is not correct
      message - message with details about the cause
    • WrongAttributeValueException

      public WrongAttributeValueException(Attribute attribute, String message, Throwable cause)
      Constructor with the attribute, the message and the Throwable object
      Parameters:
      attribute - attribute whose value is not correct
      message - message with details about the cause
      cause - Throwable that caused throwing of this exception
  • Method Details

    • getAttribute

      public Attribute getAttribute()
      Getter for the attribute
      Overrides:
      getAttribute in class AttributeValueException
      Returns:
      the attribute whose value is not correct
    • getAttributeHolder

      public Object getAttributeHolder()
      Getter for the primary attributeHolder
      Returns:
      primary entity holding the attribute
    • getAttributeHolderSecondary

      public Object getAttributeHolderSecondary()
      Getter for the secondary attributeHolder
      Returns:
      secondary entity holding the attribute
    • getFriendlyMessageTemplate

      public String getFriendlyMessageTemplate()
      Description copied from class: PerunException
      Return template of a message that is more user friendly and can be displayed in GUI. If an exception doesn't implement this message, returns null as default.

      There can be used placeholder in the template, using format '%{field}%' (e.g.: '%{invalidGroup}%') where the 'group' should be a field of the given exception, that can be accessed.

      Overrides:
      getFriendlyMessageTemplate in class PerunException
      Returns:
      template of a friendly message or null, if no template is defined for given exception