Constructor and Description |
---|
Template(TemplateFile templateFile,
String name,
org.forgerock.opendj.ldap.schema.AttributeType[] rdnAttributes,
String[] subordinateTemplateNames,
int[] numEntriesPerTemplate,
TemplateLine[] templateLines)
Creates a new template with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addTemplateLine(TemplateLine line)
Adds the provided template line to this template.
|
void |
completeTemplateInitialization(Map<String,Template> templates)
Performs any necessary processing to ensure that the template
initialization is completed.
|
String |
getName()
Retrieves the name for this template.
|
int[] |
getNumEntriesPerTemplate()
Retrieves the number of entries that should be created for each subordinate
template.
|
org.forgerock.opendj.ldap.schema.AttributeType[] |
getRDNAttributes()
Retrieves the set of attribute types that are used in the RDN for entries
generated using this template.
|
String[] |
getSubordinateTemplateNames()
Retrieves the names of the subordinate templates used to generate entries
below entries created by this template.
|
Template[] |
getSubordinateTemplates()
Retrieves the subordinate templates used to generate entries below entries
created by this template.
|
TemplateLine[] |
getTemplateLines()
Retrieves the set of template lines for this template.
|
boolean |
hasAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Indicates whether this template contains any template lines that reference
the provided attribute type.
|
TagResult |
writeEntries(EntryWriter entryWriter,
org.forgerock.opendj.ldap.Dn parentDN,
int count)
Writes the entry for this template, as well as all appropriate subordinate
entries.
|
public Template(TemplateFile templateFile, String name, org.forgerock.opendj.ldap.schema.AttributeType[] rdnAttributes, String[] subordinateTemplateNames, int[] numEntriesPerTemplate, TemplateLine[] templateLines)
templateFile
- The template file that contains this
template.name
- The name for this template.rdnAttributes
- The set of attribute types that are used
in the RDN for entries generated using
this template.subordinateTemplateNames
- The names of the subordinate templates
below this template.numEntriesPerTemplate
- The number of entries to create below
each subordinate template.templateLines
- The set of template lines for this
template.public void completeTemplateInitialization(Map<String,Template> templates) throws MakeLDIFException
templates
- The set of templates defined in the template file.MakeLDIFException
- If any of the subordinate templates are not
defined in the template file.public String getName()
public org.forgerock.opendj.ldap.schema.AttributeType[] getRDNAttributes()
public String[] getSubordinateTemplateNames()
public Template[] getSubordinateTemplates()
public int[] getNumEntriesPerTemplate()
public TemplateLine[] getTemplateLines()
public void addTemplateLine(TemplateLine line)
line
- The template line to add to this template.public boolean hasAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.true
if this template contains one or more template
lines that reference the provided attribute type, or
false
if not.public TagResult writeEntries(EntryWriter entryWriter, org.forgerock.opendj.ldap.Dn parentDN, int count) throws IOException, MakeLDIFException
entryWriter
- The entry writer that will be used to write the
entries.parentDN
- The DN of the entry below which the subordinate
entries should be generated.count
- The number of entries to generate based on this
template.IOException
- If a problem occurs while attempting to write to the
LDIF writer.MakeLDIFException
- If some other problem occurs.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.