Codota Logo
ObjectResolver
Code IndexAdd Codota to your IDE (free)

How to use
ObjectResolver
in
org.nuxeo.ecm.core.schema.types.resolver

Best Java code snippets using org.nuxeo.ecm.core.schema.types.resolver.ObjectResolver (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public Object fetch() {
  return resolver.fetch(property.getValue());
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public List<Class<?>> getManagedClasses() {
  return resolver.getManagedClasses();
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public void setObject(Object object) {
  Object reference = resolver.getReference(object);
  property.setValue(reference);
}
origin: org.nuxeo.ecm.core/nuxeo-core-io

for (Class<?> clazz : resolver.getManagedClasses()) {
  try {
    object = readEntity(clazz, clazz, jn);
  throw new MarshallingException("Unable to parse the property " + property.getXPath());
value = resolver.getReference(object);
if (value == null) {
  throw new MarshallingException("Property " + property.getXPath()
      + " value cannot be resolved by the matching resolver " + resolver.getName());
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public boolean validate(Object context) {
  return resolver.validate(property.getValue(), context);
}
origin: org.nuxeo.ecm.core/nuxeo-core-schema

@Override
public Description getDescription() {
  Map<String, Serializable> parameters = Collections.unmodifiableMap(resolver.getParameters());
  return new Description(resolver.getName(), parameters);
}
origin: org.nuxeo.ecm.core/nuxeo-core-schema

pathTokens.add(Constraint.MESSAGES_KEY);
pathTokens.add("resolver");
pathTokens.add(resolver.getName());
if (suffixCase != null) {
  pathTokens.add(suffixCase);
  return String.format("%s cannot resolve reference %s", resolver.getName(), computedInvalidValue);
origin: org.nuxeo.ecm.core/nuxeo-core-schema

  @Override
  public String getErrorMessage(Object invalidValue, Locale locale) {
    return resolver.getConstraintErrorMessage(invalidValue, locale);
  }
}
origin: org.nuxeo.ecm.core/nuxeo-core-schema

@Override
public ObjectResolver getResolver(String type, Map<String, String> parameters) {
  Class<? extends ObjectResolver> resolverClass = resolvers.get(type);
  if (resolverClass == null) {
    return null;
  }
  ObjectResolver resolver = null;
  try {
    resolver = resolverClass.newInstance();
  } catch (InstantiationException | IllegalAccessException e) {
    log.warn(String.format("Unable to instanciate %s - missing public constructor with no param",
        resolverClass.getCanonicalName()));
    return null;
  }
  try {
    resolver.configure(parameters);
  } catch (IllegalArgumentException e) {
    log.info(String.format("Unable to configure %s with parameters %s", resolverClass.getCanonicalName(),
        parameters));
    return null;
  }
  return resolver;
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public boolean validate(Object context) {
  return resolver.validate(doc.getPropertyValue(xpath), context);
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public <T> T fetch(Class<T> type) {
  return resolver.fetch(type, doc.getPropertyValue(xpath));
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public boolean validate() {
  return resolver.validate(property.getValue());
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public void setObject(Object object) {
  Serializable reference = resolver.getReference(object);
  doc.setPropertyValue(xpath, reference);
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public List<Class<?>> getManagedClasses() {
  return resolver.getManagedClasses();
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public Object fetch(Object context) {
  return resolver.fetch(doc.getPropertyValue(xpath), context);
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public boolean validate() {
  return resolver.validate(doc.getPropertyValue(xpath), doc.getCoreSession());
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public <T> T fetch(Class<T> type) {
  return resolver.fetch(type, property.getValue());
}
origin: org.nuxeo.ecm.core/nuxeo-core-schema

/**
 * Validates some value references an existing entity, in the given context
 *
 * @param value The reference.
 * @param context A resolver-specific context allowing resolution of the value.
 * @return true if value could be resolved as an existing external reference, false otherwise.
 * @throws IllegalStateException If this resolver has not been configured.
 * @since 10.2
 */
default boolean validate(Object value, Object context) {
  return validate(value);
}
origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public Object fetch(Object context) {
  return resolver.fetch(property.getValue(), context);
}
origin: org.nuxeo.ecm.core/nuxeo-core-schema

@Override
public boolean validate(Object object) {
  if (object == null) {
    return true;
  }
  return resolver.validate(object);
}
org.nuxeo.ecm.core.schema.types.resolverObjectResolver

Javadoc

External references are document field with a simple type whose value refers to an external business entity. Objects implementing this interface are able to resolve the entity using the reference.

Most used methods

  • fetch
    Provides the entity referenced by a value, in the given context.
  • getManagedClasses
    Returns the resolved object types.
  • getName
    Provides this resolver name.
  • getReference
    Generates a reference to an entity.
  • validate
    Validates some value references an existing entity, in the given context
  • configure
    Configure this resolver.
  • getConstraintErrorMessage
    Provides an error message to display when some invalid value does not match existing entity.
  • getParameters
    Provides this resolver parameters.

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now