|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.makeldif.Branch
public class Branch
This class defines a branch that should be included in the resulting LDIF. A branch may or may not have subordinate entries.
Constructor Summary | |
---|---|
Branch(TemplateFile templateFile,
DN branchDN)
Creates a new branch with the provided information. |
|
Branch(TemplateFile templateFile,
DN branchDN,
java.lang.String[] subordinateTemplateNames,
int[] numEntriesPerTemplate,
TemplateLine[] extraLines)
Creates a new branch with the provided information. |
Method Summary | |
---|---|
void |
addExtraLine(TemplateLine line)
Adds the provided template line to the set of extra lines for this branch. |
void |
addSubordinateTemplate(java.lang.String name,
int numEntries)
Adds a new subordinate template to this branch. |
void |
completeBranchInitialization(java.util.Map<java.lang.String,Template> templates)
Performs any necessary processing to ensure that the branch initialization is completed. |
DN |
getBranchDN()
Retrieves the DN for this branch entry. |
TemplateLine[] |
getExtraLines()
Retrieves the set of extra lines that should be included in this branch entry. |
int[] |
getNumEntriesPerTemplate()
Retrieves the number of entries that should be created below this branch for each subordinate template. |
java.lang.String[] |
getSubordinateTemplateNames()
Retrieves the names of the subordinate templates for this branch. |
Template[] |
getSubordinateTemplates()
Retrieves the set of subordinate templates used to generate entries below this branch. |
boolean |
hasAttribute(AttributeType attributeType)
Indicates whether this branch contains a reference to the specified attribute type, either in the RDN components of the DN or in the extra lines. |
TagResult |
writeEntries(EntryWriter entryWriter)
Writes the entry for this branch, 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 Branch(TemplateFile templateFile, DN branchDN)
templateFile
- The template file in which this branch appears.branchDN
- The DN for this branch entry.public Branch(TemplateFile templateFile, DN branchDN, java.lang.String[] subordinateTemplateNames, int[] numEntriesPerTemplate, TemplateLine[] extraLines)
templateFile
- The template file in which this branch
appears.branchDN
- The DN for this branch entry.subordinateTemplateNames
- The names of the subordinate templates
used to generate entries below this
branch.numEntriesPerTemplate
- The number of entries that should be
created below this branch for each
subordinate template.extraLines
- The set of extra lines that should be
included in this branch entry.Method Detail |
---|
public void completeBranchInitialization(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 DN getBranchDN()
public java.lang.String[] getSubordinateTemplateNames()
public Template[] getSubordinateTemplates()
completeBranchInitialization
method has been called.
public int[] getNumEntriesPerTemplate()
public void addSubordinateTemplate(java.lang.String name, int numEntries)
completeBranchInitialization
has been called.
name
- The name of the template to use to generate the
entries.numEntries
- The number of entries to create based on the template.public TemplateLine[] getExtraLines()
public void addExtraLine(TemplateLine line)
line
- The line to add to the set of extra lines for this branch.public boolean hasAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.
true
if the branch does contain the specified
attribute type, or false
if it does not.public TagResult writeEntries(EntryWriter entryWriter) throws java.io.IOException, MakeLDIFException
entryWriter
- The entry writer to which the entries should be
written.
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 |