public abstract class AbstractObjectResolver extends Object implements ObjectResolver
ObjectResolver.Helper
Modifier and Type | Field and Description |
---|---|
protected Map<String,Serializable> |
parameters |
protected boolean |
validation |
VALIDATION_PARAMETER_KEY
Constructor and Description |
---|
AbstractObjectResolver() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkConfig() |
void |
configure(Map<String,String> parameters)
Configure this resolver.
|
Map<String,Serializable> |
getParameters()
Provides this resolver parameters.
|
boolean |
validate(Object value)
Validates some value references an existing entity.
|
boolean |
validate(Object value,
Object context)
Validates some value references an existing entity, in the given context
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fetch, fetch, fetch, getConstraintErrorMessage, getManagedClasses, getName, getReference
protected Map<String,Serializable> parameters
protected boolean validation
public AbstractObjectResolver()
public void configure(Map<String,String> parameters) throws IllegalArgumentException, IllegalStateException
ObjectResolver
configure
in interface ObjectResolver
parameters
- A map of parameter whose keys are parameter names and map value are corresponding values.IllegalArgumentException
- If some parameter are not compatible with this resolver.IllegalStateException
- If this resolver is already configured.public Map<String,Serializable> getParameters()
ObjectResolver
getParameters
in interface ObjectResolver
public boolean validate(Object value) throws IllegalStateException
ObjectResolver
validate
in interface ObjectResolver
value
- The reference.IllegalStateException
- If this resolver has not been configured.public boolean validate(Object value, Object context) throws IllegalStateException
ObjectResolver
validate
in interface ObjectResolver
value
- The reference.context
- A resolver-specific context allowing resolution of the value.IllegalStateException
- If this resolver has not been configured.protected void checkConfig() throws IllegalStateException
IllegalStateException
Copyright © 2019 Nuxeo. All rights reserved.