public abstract class ValidateMarkerByPossibleValue extends GenericService implements MarkerValidator
The following options can be configured.
1. Accept all values as valid by setting acceptAllValues to true.
2. Accept only specific values as valid by setting nullValueValid to false and returning valid values from getValidValuesForKey.
3. Accept only a null value as valid by setting nullValueValid to true and returning null from getValidValuesForKey.
4. Accept null and specific values as valid by setting nullValueValid to true and returning valid values from getValidValuesForKey.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected boolean |
mAcceptAllValues |
protected boolean |
mNullValueValid |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
ValidateMarkerByPossibleValue() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List |
getValidValuesForKey(java.lang.String pMarkerKey)
This method should return the possible marker values for the
the provided marker key.
|
boolean |
isAcceptAllValues()
Boolean property for determining if all marker values are valid.
|
boolean |
isNullValueValid()
Boolean property for determining if a marker value of null is valid.
|
boolean |
isValidMarker(RepositoryMarkerManager pRepositoryMarkerManager,
RepositoryItem pMarkedItem,
RepositoryItem pMarkerToValidate)
This method determines if a marker is considered valid.
|
boolean |
isValidValueForKey(java.lang.String pKey,
java.lang.String pValue)
Determines if the value is valid for the key
|
void |
setAcceptAllValues(boolean pAcceptAllValues)
Sets the boolean property for determining if all marker values are valid.
|
void |
setNullValueValid(boolean pNullValueValid)
Sets the boolean property for determining if the marker value is allowed to be null.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected boolean mNullValueValid
protected boolean mAcceptAllValues
public boolean isValidMarker(RepositoryMarkerManager pRepositoryMarkerManager, RepositoryItem pMarkedItem, RepositoryItem pMarkerToValidate) throws MarkerException
isValidMarker
in interface MarkerValidator
pRepositoryMarkerManager
- the marker manager making the validation requestpMarkedItem
- the item being markedpMarkerToValidate
- the marker to validateMarkerException
public abstract java.util.List getValidValuesForKey(java.lang.String pMarkerKey)
pMarkerKey
- the marker keypublic boolean isNullValueValid()
public void setNullValueValid(boolean pNullValueValid)
public boolean isAcceptAllValues()
public void setAcceptAllValues(boolean pAcceptAllValues)
public boolean isValidValueForKey(java.lang.String pKey, java.lang.String pValue)