Class PrefixDispatchDataPathFactory

java.lang.Object
ch.tocco.nice2.model.form.impl.datanavigation.PrefixDispatchDataPathFactory
All Implemented Interfaces:
DataPathFactory

@Component public final class PrefixDispatchDataPathFactory extends Object implements DataPathFactory
Creates DataPath objects by prefix. Default prefix is entity:

The prefixes are contributed via the nice2.module.form.PathEvaluators configuration point.


 <form data="entity:Address">
 


 <form data="simple:MyDataType"/>
 

The amount of prefixes will grow with time. For example

node:Document
is also possible.
  • Constructor Details

    • PrefixDispatchDataPathFactory

      public PrefixDispatchDataPathFactory()
  • Method Details

    • createByPrefix

      public DataPath createByPrefix(String string)
      Asks all evaluator contributions if they want to handle the prefix of the passed string.
      Specified by:
      createByPrefix in interface DataPathFactory
      Parameters:
      string - a data path definition (entity:Address)
      Returns:
      created data path
    • setEvaluators

      @Autowired public void setEvaluators(List<PathEvaluatorContribution> contributions)