@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class LDIFExportConfig extends OperationConfig implements Closeable
Constructor and Description |
---|
LDIFExportConfig(OutputStream ldifOutputStream)
Creates a new LDIF export configuration that will write to the provided output stream.
|
LDIFExportConfig(String ldifFile,
ExistingFileBehavior existingFileBehavior)
Creates a new LDIF export configuration that will write to the specified LDIF file.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any resources that this export config might have open.
|
boolean |
encryptData()
Indicates whether the LDIF data should be encrypted as it is written.
|
Set<org.forgerock.opendj.ldap.schema.AttributeType> |
getExcludeAttributes()
Retrieves the set of attributes that should be excluded from the entries written to LDIF.
|
List<org.forgerock.opendj.ldap.Dn> |
getExcludeBranches()
Retrieves the set of base DNs that specify the set of entries to exclude from the export.
|
List<SearchFilter> |
getExcludeFilters()
Retrieves the set of search filters that should be used to determine which entries to exclude from the LDIF.
|
Set<org.forgerock.opendj.ldap.schema.AttributeType> |
getIncludeAttributes()
Retrieves the set of attributes that should be included in the entries written to LDIF.
|
List<org.forgerock.opendj.ldap.Dn> |
getIncludeBranches()
Retrieves the set of base DNs that specify the set of entries to include in the export.
|
List<SearchFilter> |
getIncludeFilters()
Retrieves the set of search filters that should be used to determine which entries to include in the LDIF.
|
int |
getWrapColumn()
Retrieves the column at which long lines should be wrapped.
|
BufferedWriter |
getWriter()
Retrieves the writer that should be used to write the LDIF data.
|
boolean |
hashData()
Indicates whether to generate a cryptographic hash of the data that is written.
|
boolean |
includeAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Indicates whether the specified attribute should be included in the entries written to LDIF.
|
boolean |
includeEntry(Entry entry)
Indicates whether the specified entry should be included in the export based on the configured set of include and
exclude filters.
|
boolean |
includeObjectClasses()
Indicates whether the set of objectclasses should be included in the entries written to LDIF.
|
boolean |
includeOperationalAttributes()
Indicates whether the set of operational attributes should be included in the export.
|
boolean |
includeVirtualAttributes()
Indicates whether virtual attributes should be included in the export.
|
boolean |
invokeExportPlugins()
Indicates whether the LDIF export plugins should be invoked for entries as they are exported.
|
void |
setCompressData(boolean compressData)
Specifies whether the LDIF data should be compressed as it is written.
|
void |
setEncryptData(boolean encryptData)
Specifies whether the LDIF data should be encrypted as it is written.
|
void |
setExcludeAttributes(Set<org.forgerock.opendj.ldap.schema.AttributeType> excludeAttributes)
Specifies the set of attributes that should be excluded from the entries written to LDIF.
|
void |
setExcludeBranches(List<org.forgerock.opendj.ldap.Dn> excludeBranches)
Specifies the set of base DNs that specify the set of entries to exclude from the export.
|
void |
setExcludeFilters(List<SearchFilter> excludeFilters)
Specifies the set of search filters that should be used to determine which entries to exclude from the LDIF.
|
void |
setHashData(boolean hashData)
Specifies whether to generate a cryptographic hash of the data that is written.
|
void |
setIncludeAttributes(Set<org.forgerock.opendj.ldap.schema.AttributeType> includeAttributes)
Specifies the set of attributes that should be included in the entries written to LDIF.
|
void |
setIncludeBranches(List<org.forgerock.opendj.ldap.Dn> includeBranches)
Specifies the set of base DNs that specify the set of entries to include in the export.
|
void |
setIncludeFilters(List<SearchFilter> includeFilters)
Specifies the set of search filters that should be used to determine which entries to include in the LDIF.
|
void |
setIncludeObjectClasses(boolean includeObjectClasses)
Specifies whether the objectclasss attribute should be included in the export.
|
void |
setIncludeOperationalAttributes(boolean includeOperationalAttributes)
Specifies whether the set of operational attributes should be included in the export.
|
void |
setIncludeVirtualAttributes(boolean includeVirtualAttributes)
Specifies whether virtual attributes should be included in the export.
|
void |
setInvokeExportPlugins(boolean invokeExportPlugins)
Specifies whether the LDIF export plugins should be invoked for entries as they are exported.
|
void |
setSignHash(boolean signHash)
Specifies whether to sign the cryptographic hash of the data that is written when the export is complete.
|
void |
setTypesOnly(boolean typesOnly)
Specifies whether the LDIF generated should include attribute types (i.e., attribute names) only or both
attribute types and values.
|
void |
setWrapColumn(int wrapColumn)
Specifies the column at which long lines should be wrapped.
|
boolean |
signHash()
Indicates whether to sign the cryptographic hash of the data that is written when the export is complete.
|
boolean |
typesOnly()
Indicates whether the LDIF generated should include attribute types (i.e., attribute names) only or both
attribute types and values.
|
cancel, isCancelled
public LDIFExportConfig(String ldifFile, ExistingFileBehavior existingFileBehavior)
ldifFile
- The path to the LDIF file to export.existingFileBehavior
- Indicates how to proceed if the specified file already exists.public LDIFExportConfig(OutputStream ldifOutputStream)
ldifOutputStream
- The output stream to which the LDIF data should be written.public BufferedWriter getWriter() throws IOException
IOException
- If a problem occurs while preparing the writer.public boolean invokeExportPlugins()
true
if LDIF export plugins should be invoked for entries as they are exported, or
false
if not.public void setInvokeExportPlugins(boolean invokeExportPlugins)
invokeExportPlugins
- Specifies whether the LDIF export plugins should be invoked for entries as they are exported.public void setCompressData(boolean compressData)
getWriter
for the first time.compressData
- Indicates whether the LDIF data should be compressed as it is written.public boolean encryptData()
true
if the LDIF data should be encrypted as it is written, or false
if not.public void setEncryptData(boolean encryptData)
getWriter
for the first time.encryptData
- Indicates whether the LDIF data should be encrypted as it is written.public boolean hashData()
true
if a hash should be generated as the data is written, or false
if not.public void setHashData(boolean hashData)
getWriter
for the first time.hashData
- Indicates whether to generate a hash of the data as it is written.public boolean signHash()
true
if the hash should be signed when the export is complete, or false
if not.public void setSignHash(boolean signHash)
getWriter
for the first time.signHash
- Indicates whether to generate a hash of the data as it is written.public boolean typesOnly()
true
if only attribute types should be included in the resulting LDIF, or false
if both types and values should be included.public void setTypesOnly(boolean typesOnly)
typesOnly
- Specifies whether the LDIF generated should include attribute types only or both attribute types and
values.public int getWrapColumn()
public void setWrapColumn(int wrapColumn)
wrapColumn
- The column at which long lines should be wrapped.public List<org.forgerock.opendj.ldap.Dn> getExcludeBranches()
public void setExcludeBranches(List<org.forgerock.opendj.ldap.Dn> excludeBranches)
excludeBranches
- The set of base DNs that specify the set of entries to exclude from the export.public List<org.forgerock.opendj.ldap.Dn> getIncludeBranches()
public void setIncludeBranches(List<org.forgerock.opendj.ldap.Dn> includeBranches)
includeBranches
- The set of base DNs that specify the set of entries to include in the export.public boolean includeObjectClasses()
true
if the set of objectclasses should be included in the entries written to LDIF, or
false
if not.public boolean includeOperationalAttributes()
true
if the set of operational attributes should be included in the export.public void setIncludeObjectClasses(boolean includeObjectClasses)
includeObjectClasses
- Specifies whether the objectclass attribute should be included in the export.public void setIncludeOperationalAttributes(boolean includeOperationalAttributes)
includeOperationalAttributes
- Specifies whether the set of operational attributes should be included in the export.public boolean includeVirtualAttributes()
true
if virtual attributes should be included in the export, or false
if not.public void setIncludeVirtualAttributes(boolean includeVirtualAttributes)
includeVirtualAttributes
- Specifies whether virtual attributes should be included in the export.public Set<org.forgerock.opendj.ldap.schema.AttributeType> getExcludeAttributes()
public void setExcludeAttributes(Set<org.forgerock.opendj.ldap.schema.AttributeType> excludeAttributes)
excludeAttributes
- The set of attributes that should be excluded from the entries written to LDIF.public Set<org.forgerock.opendj.ldap.schema.AttributeType> getIncludeAttributes()
public void setIncludeAttributes(Set<org.forgerock.opendj.ldap.schema.AttributeType> includeAttributes)
includeAttributes
- The set of attributes that should be included in the entries written to LDIF.public boolean includeAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type for which to make the determination.true
if the specified attribute should be included in the entries written to LDIF, or
false
if not.public List<SearchFilter> getExcludeFilters()
public void setExcludeFilters(List<SearchFilter> excludeFilters)
excludeFilters
- The set of search filters that should be used to determine which entries to exclude from the LDIF.public List<SearchFilter> getIncludeFilters()
public void setIncludeFilters(List<SearchFilter> includeFilters)
includeFilters
- The set of search filters that should be used to determine which entries to include in the LDIF.public boolean includeEntry(Entry entry) throws DirectoryException
entry
- The entry for which to make the determination.true
if the specified entry should be included in the export, or false
if not.DirectoryException
- If there is a problem with any of the search filters used to make the determination.public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2010–2017 ForgeRock AS. All rights reserved.