Class WrongAttributeValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
cz.metacentrum.perun.core.api.exceptions.PerunException
cz.metacentrum.perun.core.api.exceptions.AttributeValueException
cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidHtmlInputException
Thrown when the attribute has wrong/illegal value.
- Author:
- Slavek Licehammer
- See Also:
-
Constructor Summary
ConstructorDescriptionWrongAttributeValueException
(Attribute attribute) Constructor with the attributeWrongAttributeValueException
(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary) Constructor with the attribute, primary attributeHolder and secondary attributeHolderWrongAttributeValueException
(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary, String message) Constructor with the attribute, primary attributeHolder, secondary attributeHolder and a messageWrongAttributeValueException
(Attribute attribute, Object attributeHolder, String message) Constructor with the attribute, attributeHolder and a messageWrongAttributeValueException
(Attribute attribute, Object attributeHolder, String message, Throwable cause) Constructor with the attribute, attributeHolder, a message and the Throwable objectWrongAttributeValueException
(Attribute attribute, String message) Constructor with the attribute and a messageWrongAttributeValueException
(Attribute attribute, String message, Throwable cause) Constructor with the attribute, the message and the Throwable objectWrongAttributeValueException
(Attribute attribute, Throwable cause) Constructor with the attribute and the Throwable objectWrongAttributeValueException
(String message) Simple constructor with a messageWrongAttributeValueException
(String message, Throwable cause) Constructor with a message and Throwable objectConstructor with a Throwable object -
Method Summary
Modifier and TypeMethodDescriptionGetter for the attributeGetter for the primary attributeHolderGetter for the secondary attributeHolderReturn template of a message that is more user friendly and can be displayed in GUI.Methods inherited from class cz.metacentrum.perun.core.api.exceptions.PerunException
getErrorId, getMessage, getName, setErrorId
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WrongAttributeValueException
Simple constructor with a message- Parameters:
message
- message with details about the cause
-
WrongAttributeValueException
Constructor with a message and Throwable object- Parameters:
message
- message with details about the causecause
- Throwable that caused throwing of this exception
-
WrongAttributeValueException
Constructor with a Throwable object- Parameters:
cause
- Throwable that caused throwing of this exception
-
WrongAttributeValueException
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 illegalattributeHolder
- primary entity holding the attributeattributeHolderSecondary
- secondary entity holding the attributemessage
- 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 illegalattributeHolder
- primary entity holding the attributeattributeHolderSecondary
- secondary entity holding the attribute
-
WrongAttributeValueException
Constructor with the attribute, attributeHolder and a message- Parameters:
attribute
- the attribute whose value is illegalattributeHolder
- entity holding the attributemessage
- 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 illegalattributeHolder
- entity holding the attributemessage
- message with details about the causecause
- Throwable that caused throwing of this exception
-
WrongAttributeValueException
Constructor with the attribute and the Throwable object- Parameters:
attribute
- attribute whose value is not correctcause
- Throwable that caused throwing of this exception
-
WrongAttributeValueException
Constructor with the attribute and a message- Parameters:
attribute
- attribute whose value is not correctmessage
- message with details about the cause
-
WrongAttributeValueException
Constructor with the attribute, the message and the Throwable object- Parameters:
attribute
- attribute whose value is not correctmessage
- message with details about the causecause
- Throwable that caused throwing of this exception
-
-
Method Details
-
getAttribute
Getter for the attribute- Overrides:
getAttribute
in classAttributeValueException
- Returns:
- the attribute whose value is not correct
-
getAttributeHolder
Getter for the primary attributeHolder- Returns:
- primary entity holding the attribute
-
getAttributeHolderSecondary
Getter for the secondary attributeHolder- Returns:
- secondary entity holding the attribute
-
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 classPerunException
- Returns:
- template of a friendly message or null, if no template is defined for given exception
-