public class UniqueValueChecker
extends java.lang.Object
Used to enforce SchemaPaths that are configured in the framework configuration as "uniqueValue" paths.
Constructor and Description |
---|
UniqueValueChecker(javax.servlet.ServletContext servletContext)
Constructor for the UniqueValueChecker object, requiring ServletContext.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDateString()
Gets a formated date string for current time.
|
java.util.List |
getDupValues(java.lang.String referenceValue,
XMLDocReader referenceDocReader,
java.lang.String xpath)
Returns a list of RecordIds in a that contain a value equal to provided
referenceValue at the provided xpath
|
public UniqueValueChecker(javax.servlet.ServletContext servletContext) throws java.lang.Exception
servletContext
- java.lang.Exception
- if required helper objects cannot be found in the
servlet context initialized.public java.util.List getDupValues(java.lang.String referenceValue, XMLDocReader referenceDocReader, java.lang.String xpath)
NOTE: This check is only performed if the framework configuration defines a schemaPath with valueType of "uniqueValue".
referenceValue
- The value for which we try to find dupsreferenceDocReader
- docReader for the record containing
referenceValuexpath
- xpath at which value is foundpublic static java.lang.String getDateString()