public abstract class AbstractObjectLocator extends Object implements ObjectLocator
Modifier and Type | Field and Description |
---|---|
protected Object |
object
Object.
|
protected ObjectLocator |
parentLocator
Parent locator.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractObjectLocator(ObjectLocator parentLocator,
Object object)
Constructs a new validation event locator.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber() |
protected abstract String |
getDefaultMessage() |
int |
getLineNumber() |
String |
getMessage()
Returns location message.
|
String |
getMessage(ResourceBundle bundle)
Formats the message using given resource bundle.
|
String |
getMessageCode()
Returns message code.
|
Node |
getNode() |
Object |
getObject() |
int |
getOffset() |
ObjectLocator |
getParentLocator()
Returns parent locator.
|
ObjectLocator[] |
getPath() |
String |
getPathAsString() |
protected abstract String |
getStepAsString() |
URL |
getURL() |
ItemObjectLocator |
item(int index,
Object value)
Creates a locator for the item (like list or array item) relative to this
locator.
|
PropertyObjectLocator |
property(String name,
Object value)
Creates a locator for the property, relative to this locator.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMessageParameters
protected final ObjectLocator parentLocator
protected final Object object
protected AbstractObjectLocator(ObjectLocator parentLocator, Object object)
parentLocator
- parent location (may be null
).object
- object.propertyName
- field name.public ObjectLocator getParentLocator()
getParentLocator
in interface ObjectLocator
public ObjectLocator[] getPath()
getPath
in interface ObjectLocator
public String getPathAsString()
getPathAsString
in interface ObjectLocator
protected abstract String getStepAsString()
public Object getObject()
getObject
in interface ValidationEventLocator
public int getColumnNumber()
getColumnNumber
in interface ValidationEventLocator
public int getLineNumber()
getLineNumber
in interface ValidationEventLocator
public int getOffset()
getOffset
in interface ValidationEventLocator
public URL getURL()
getURL
in interface ValidationEventLocator
public Node getNode()
getNode
in interface ValidationEventLocator
public String getMessageCode()
getMessageCode
in interface Reportable
protected abstract String getDefaultMessage()
public String getMessage(ResourceBundle bundle)
Reportable
getMessage
in interface Reportable
bundle
- bundle to use resources from.public String getMessage()
getMessage
in interface Reportable
public ItemObjectLocator item(int index, Object value)
ObjectLocator
item
in interface ObjectLocator
index
- index of the item.value
- value of the item.public PropertyObjectLocator property(String name, Object value)
ObjectLocator
property
in interface ObjectLocator
name
- name of the property, must not be null
.value
- value of the property, may be null
.Copyright © 2005–2018. All rights reserved.