|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.makeldif.Template
public class Template
This class defines a template, which is a pattern that may be used to generate entries. A template may be used either below a branch or below another template.
Constructor Summary | |
---|---|
Template(TemplateFile templateFile,
java.lang.String name,
AttributeType[] rdnAttributes,
java.lang.String[] subordinateTemplateNames,
int[] numEntriesPerTemplate)
Creates a new template with the provided information. |
|
Template(TemplateFile templateFile,
java.lang.String name,
AttributeType[] rdnAttributes,
java.lang.String[] subordinateTemplateNames,
int[] numEntriesPerTemplate,
TemplateLine[] templateLines)
Creates a new template with the provided information. |
Method Summary | |
---|---|
void |
addTemplateLine(TemplateLine line)
Adds the provided template line to this template. |
void |
completeTemplateInitialization(java.util.Map<java.lang.String,Template> templates)
Performs any necessary processing to ensure that the template initialization is completed. |
java.lang.String |
getName()
Retrieves the name for this template. |
int[] |
getNumEntriesPerTemplate()
Retrieves the number of entries that should be created for each subordinate template. |
AttributeType[] |
getRDNAttributes()
Retrieves the set of attribute types that are used in the RDN for entries generated using this template. |
java.lang.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(AttributeType attributeType)
Indicates whether this template contains any template lines that reference the provided attribute type. |
TagResult |
writeEntries(EntryWriter entryWriter,
DN parentDN,
int count)
Writes the entry for this template, as well as all appropriate subordinate entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Template(TemplateFile templateFile, java.lang.String name, AttributeType[] rdnAttributes, java.lang.String[] subordinateTemplateNames, int[] numEntriesPerTemplate)
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.public Template(TemplateFile templateFile, java.lang.String name, AttributeType[] rdnAttributes, java.lang.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.Method Detail |
---|
public void completeTemplateInitialization(java.util.Map<java.lang.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 java.lang.String getName()
public AttributeType[] getRDNAttributes()
public java.lang.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(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, DN parentDN, int count) throws java.io.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.
java.io.IOException
- If a problem occurs while attempting to write to the
LDIF writer.
MakeLDIFException
- If some other problem occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |