Class DirectoryEntryResolver

  • All Implemented Interfaces:
    Serializable, ObjectResolver

    public class DirectoryEntryResolver
    extends AbstractObjectResolver
    implements ObjectResolver
    This ObjectResolver allows to manage integrity for fields containing references to directory's entry.

    References contains the directory entry id.

    To use it, put the following code in your schema XSD (don't forget the directory name):

     
     <xs:element name="carBrand">
       <xs:simpleType>
         <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="carBrandsDirectory" />
       </xs:simpleType>
     </xs:element>
     
     

    For hierarchical directories, which entries reference other entries. You can manage a specific reference containing the full entry path. You have to specify the parent field and the separator used to encode the reference.

     
     <xs:element name="coverage">
       <xs:simpleType>
         <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="l10ncoverage" ref:parentField="parent" ref:separator="/" />
       </xs:simpleType>
     </xs:element>
     
     

    It's not necessary to define parentField and separator for directory using schema ending by xvocabulary. The feature is automatically enable.

    Since:
    7.1
    See Also:
    Serialized Form