Class MockEditorError
- java.lang.Object
-
- com.google.gwt.editor.client.testing.MockEditorError
-
- All Implemented Interfaces:
EditorError
public class MockEditorError extends java.lang.Object implements EditorError
A trivial implementation ofEditorError
. Most methods returnnull
.
-
-
Constructor Summary
Constructors Constructor Description MockEditorError()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAbsolutePath()
Returns the absolute path location of the error, relative to the object that was passed into the EditorDriver.Editor<?>
getEditor()
Returns the Editor that holds the invalid value.java.lang.String
getMessage()
Returns a message associated with the error.java.lang.String
getPath()
Returns the path of the error relative to the Editor receiving the error.java.lang.Object
getUserData()
Returns the object passed intoEditorDelegate.recordError(java.lang.String, java.lang.Object, java.lang.Object)
.java.lang.Object
getValue()
Returns the value that triggered the error.boolean
isConsumed()
Always returnsfalse
.void
setConsumed(boolean consumed)
No-op.
-
-
-
Method Detail
-
getAbsolutePath
public java.lang.String getAbsolutePath()
Description copied from interface:EditorError
Returns the absolute path location of the error, relative to the object that was passed into the EditorDriver.- Specified by:
getAbsolutePath
in interfaceEditorError
- Returns:
- the absolute path as a String
-
getEditor
public Editor<?> getEditor()
Description copied from interface:EditorError
Returns the Editor that holds the invalid value.- Specified by:
getEditor
in interfaceEditorError
- Returns:
- the Editor instance
-
getMessage
public java.lang.String getMessage()
Description copied from interface:EditorError
Returns a message associated with the error.- Specified by:
getMessage
in interfaceEditorError
- Returns:
- the error message as a String
-
getPath
public java.lang.String getPath()
Description copied from interface:EditorError
Returns the path of the error relative to the Editor receiving the error. If the error concerns the Editor that is receiving the error, this method will return an empty string.- Specified by:
getPath
in interfaceEditorError
- Returns:
- the error path as a String
-
getUserData
public java.lang.Object getUserData()
Description copied from interface:EditorError
Returns the object passed intoEditorDelegate.recordError(java.lang.String, java.lang.Object, java.lang.Object)
.- Specified by:
getUserData
in interfaceEditorError
- Returns:
- the user data Object
-
getValue
public java.lang.Object getValue()
Description copied from interface:EditorError
Returns the value that triggered the error.- Specified by:
getValue
in interfaceEditorError
- Returns:
- the error value Object
-
isConsumed
public boolean isConsumed()
Always returnsfalse
.- Specified by:
isConsumed
in interfaceEditorError
- Returns:
true
if the error will not be propagated- See Also:
EditorError.setConsumed(boolean)
-
setConsumed
public void setConsumed(boolean consumed)
No-op.- Specified by:
setConsumed
in interfaceEditorError
- Parameters:
consumed
-true
if the error will not be propagated- See Also:
EditorError.isConsumed()
-
-