The make-ldif utility has been designed in an extensible manner so that new tags can be defined and used in template files.
All tags must be subclasses of the org.opends.server.tools.makeldif.Tag abstract class. Custom tag definitions must include the following methods:
This retrieves the name that should be used to reference the tag. The value that it returns must be unique among all other tags in use by the server.
This indicates whether the tag will be allowed in branch definitions. If it returns a value of true, then the tag may be used in both branch and template definitions. If it returns a value of false, then the tag may be used in template definitions but not branch definitions.
This performs any initialization that may be required if the tag is to be used in a branch definition. This does not need to be implemented if allowedInBranch() returns false.
This performs any initialization that may be required of the tag is to be used in a template definition.
This performs any initialization that may be required before starting to generate entries below a new parent. This does not need to be implemented if no special initialization is required.
This generates the value that will be used to replace the associated tag when generating entries.
All of the tags available in make-ldif are included in the org.opends.server.tools.makeldif package. They may be used for reference to understand what is involved in implementing a custom tag.
Note - If you define a custom tag, ensure that it is available for use in any template file that might need it. This is done using the include statement, that should appear at the top of the template file. For more information, see Custom Tag Includes.