Class ImportTask
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.tasks.Task
-
- com.unboundid.ldap.sdk.unboundidds.tasks.ImportTask
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ImportTask extends Task
This class defines a Directory Server task that can be used to import LDIF content into a backend.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
The properties that are available for use with this type of task include:- The paths (on the server system) to the LDIF files containing the data to be imported. At least one LDIF file path must be provided.
- The backend ID for the backend into which the data should be imported. It may be omitted only if at least one include branch is provided.
- A flag that indicates whether to append to the existing data in the backend rather than destroying any existing data before beginning the import.
- A flag that indicates whether to replace entries that already exist when operating in append mode.
- An optional path (on the server system) to a file to which the server should write copies of any entries that are rejected, along with a message explaining why they were rejected.
- A flag that indicates whether to overwrite the reject file rather than append to it if it already exists.
- A flag that indicates whether to clear the entire contents of the backend even if it has multiple base DNs but only a subset of them were provided in the set of include branches.
- An optional list of base DNs for branches to include in the import.
- An optional list of base DNs for branches to exclude from the import.
- An optional list of search filters that may be used to determine whether an entry should be included in the import.
- An optional list of search filters that may be used to determine whether an entry should be excluded from the import.
- An optional list of attributes that should be included in the entries that are imported.
- An optional list of attributes that should be excluded from the entries that are imported.
- A flag that indicates whether the LDIF data to import is compressed.
- A flag that indicates whether the LDIF data to import is encrypted.
- A flag that indicates whether to skip schema validation for the data that is imported.
- The path to a file containing a passphrase to use to generate the encryption key.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImportTask()
Creates a new uninitialized import task instance which should only be used for obtaining general information about this task, including the task name, description, and supported properties.ImportTask(Entry entry)
Creates a new import task from the provided entry.ImportTask(java.lang.String taskID, java.lang.String backendID, java.lang.String ldifFile)
Creates a new import task with the provided backend.ImportTask(java.lang.String taskID, java.util.List<java.lang.String> ldifFiles, java.lang.String backendID, boolean append, boolean replaceExisting, java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, java.util.List<java.lang.String> includeBranches, java.util.List<java.lang.String> excludeBranches, java.util.List<java.lang.String> includeFilters, java.util.List<java.lang.String> excludeFilters, java.util.List<java.lang.String> includeAttributes, java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, boolean skipSchemaValidation, boolean stripTrailingSpaces, java.util.Date scheduledStartTime, java.util.List<java.lang.String> dependencyIDs, FailedDependencyAction failedDependencyAction, java.util.List<java.lang.String> notifyOnCompletion, java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.ImportTask(java.lang.String taskID, java.util.List<java.lang.String> ldifFiles, java.lang.String backendID, boolean append, boolean replaceExisting, java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, java.util.List<java.lang.String> includeBranches, java.util.List<java.lang.String> excludeBranches, java.util.List<java.lang.String> includeFilters, java.util.List<java.lang.String> excludeFilters, java.util.List<java.lang.String> includeAttributes, java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, boolean skipSchemaValidation, java.util.Date scheduledStartTime, java.util.List<java.lang.String> dependencyIDs, FailedDependencyAction failedDependencyAction, java.util.List<java.lang.String> notifyOnCompletion, java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.ImportTask(java.lang.String taskID, java.util.List<java.lang.String> ldifFiles, java.lang.String backendID, boolean append, boolean replaceExisting, java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, java.util.List<java.lang.String> includeBranches, java.util.List<java.lang.String> excludeBranches, java.util.List<java.lang.String> includeFilters, java.util.List<java.lang.String> excludeFilters, java.util.List<java.lang.String> includeAttributes, java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, java.lang.String encryptionPassphraseFile, boolean skipSchemaValidation, boolean stripTrailingSpaces, java.util.Date scheduledStartTime, java.util.List<java.lang.String> dependencyIDs, FailedDependencyAction failedDependencyAction, java.util.List<java.lang.String> notifyOnCompletion, java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.ImportTask(java.lang.String taskID, java.util.List<java.lang.String> ldifFiles, java.lang.String backendID, boolean append, boolean replaceExisting, java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, java.util.List<java.lang.String> includeBranches, java.util.List<java.lang.String> excludeBranches, java.util.List<java.lang.String> includeFilters, java.util.List<java.lang.String> excludeFilters, java.util.List<java.lang.String> includeAttributes, java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, java.lang.String encryptionPassphraseFile, boolean skipSchemaValidation, boolean stripTrailingSpaces, java.util.Date scheduledStartTime, java.util.List<java.lang.String> dependencyIDs, FailedDependencyAction failedDependencyAction, java.util.List<java.lang.String> notifyOnStart, java.util.List<java.lang.String> notifyOnCompletion, java.util.List<java.lang.String> notifyOnSuccess, java.util.List<java.lang.String> notifyOnError, java.lang.Boolean alertOnStart, java.lang.Boolean alertOnSuccess, java.lang.Boolean alertOnError)
Creates a new import task with the provided information.ImportTask(java.util.Map<TaskProperty,java.util.List<java.lang.Object>> properties)
Creates a new import task from the provided set of task properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
append()
Indicates whether the import should append to the data in the backend rather than clearing the backend before performing the import.boolean
clearBackend()
Indicates whether data below all base DNs defined in the backend should be cleared before performing the import.protected java.util.List<Attribute>
getAdditionalAttributes()
Retrieves a list of the additional attributes (other than attributes common to all task types) that should be included when creating new task entries of this type.protected java.util.List<java.lang.String>
getAdditionalObjectClasses()
Retrieves a list of the additional object classes (other than the base "top" and "ds-task" classes) that should be included when creating new task entries of this type.java.lang.String
getBackendID()
Retrieves the backend ID of the backend into which the data should be imported.java.lang.String
getEncryptionPassphraseFile()
Retrieves the path to a file that contains the passphrase to use to generate the encryption key.java.util.List<java.lang.String>
getExcludeAttributes()
Retrieves the list of attributes that should be excluded from the imported entries.java.util.List<java.lang.String>
getExcludeBranches()
Retrieves the list of base DNs of branches that should be excluded from the import.java.util.List<java.lang.String>
getExcludeFilters()
Retrieves the list of search filters that may be used to identify which entries should be excluded from the import.java.util.List<java.lang.String>
getIncludeAttributes()
Retrieves the list of attributes that should be included in the imported entries.java.util.List<java.lang.String>
getIncludeBranches()
Retrieves the list of base DNs for branches that should be included in the import.java.util.List<java.lang.String>
getIncludeFilters()
Retrieves the list of search filters that may be used to identify which entries should be included in the import.java.util.List<java.lang.String>
getLDIFFiles()
Retrieves the paths to the LDIF files containing the data to be imported.java.lang.String
getRejectFile()
Retrieves the path to a file to which rejected entries should be written.java.lang.String
getTaskDescription()
Retrieves a human-readable description for this task.java.lang.String
getTaskName()
Retrieves a human-readable name for this task.java.util.Map<TaskProperty,java.util.List<java.lang.Object>>
getTaskPropertyValues()
Retrieves the values of the task properties for this task.java.util.List<TaskProperty>
getTaskSpecificProperties()
Retrieves a list of task-specific properties that may be provided when scheduling a task of this type.boolean
isCompressed()
Indicates whether the LDIF data to import is compressed.boolean
isEncrypted()
Indicates whether the LDIF data to import is encrypted.boolean
overwriteRejectFile()
Indicates whether an existing reject file should be overwritten rather than appending to it.boolean
replaceExistingEntries()
Indicates whether to replace existing entries when appending data to the backend.boolean
skipSchemaValidation()
Indicates whether the server should skip schema validation processing when performing the import.boolean
stripTrailingSpaces()
Indicates whether the server should strip off any illegal trailing spaces found in LDIF records rather than rejecting those records.-
Methods inherited from class com.unboundid.ldap.sdk.unboundidds.tasks.Task
createTaskEntry, decodeTask, getActualStartTime, getAlertOnError, getAlertOnStart, getAlertOnSuccess, getAvailableTaskTypes, getCommonTaskProperties, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getLogMessages, getNotifyOnCompletionAddresses, getNotifyOnErrorAddresses, getNotifyOnStartAddresses, getNotifyOnSuccessAddresses, getScheduledStartTime, getState, getTaskClassName, getTaskEntry, getTaskEntryDN, getTaskID, isCompleted, isPending, isRunning, parseBoolean, parseBooleanValue, parseDate, parseLong, parseString, parseStringList, parseStrings, toString, toString
-
-
-
-
Constructor Detail
-
ImportTask
public ImportTask()
Creates a new uninitialized import task instance which should only be used for obtaining general information about this task, including the task name, description, and supported properties. Attempts to use a task created with this constructor for any other reason will likely fail.
-
ImportTask
public ImportTask(@Nullable java.lang.String taskID, @NotNull java.lang.String backendID, @NotNull java.lang.String ldifFile)
Creates a new import task with the provided backend. It will overwrite the contents of the backend with the data in the provided LDIF file.- Parameters:
taskID
- The task ID to use for this task. If it isnull
then a UUID will be generated for use as the task ID.backendID
- The backend ID of the backend into which the data should be imported. It must not benull
.ldifFile
- The path to the LDIF file containing the data to be imported. It may be an absolute path or a path relative to the server install root. It must not benull
.
-
ImportTask
public ImportTask(@Nullable java.lang.String taskID, @NotNull java.util.List<java.lang.String> ldifFiles, @Nullable java.lang.String backendID, boolean append, boolean replaceExisting, @Nullable java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, @Nullable java.util.List<java.lang.String> includeBranches, @Nullable java.util.List<java.lang.String> excludeBranches, @Nullable java.util.List<java.lang.String> includeFilters, @Nullable java.util.List<java.lang.String> excludeFilters, @Nullable java.util.List<java.lang.String> includeAttributes, @Nullable java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, boolean skipSchemaValidation, @Nullable java.util.Date scheduledStartTime, @Nullable java.util.List<java.lang.String> dependencyIDs, @Nullable FailedDependencyAction failedDependencyAction, @Nullable java.util.List<java.lang.String> notifyOnCompletion, @Nullable java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.- Parameters:
taskID
- The task ID to use for this task. If it isnull
then a UUID will be generated for use as the task ID.ldifFiles
- The paths to the LDIF file containing the data to be imported. The paths may be either absolute or relative to the server install root. It must not benull
or empty.backendID
- The backend ID of the backend into which the data should be imported. It may benull
only if one or more include branches was specified.append
- Indicates whether to append to the existing data rather than overwriting it.replaceExisting
- Indicates whether to replace existing entries when appending to the database.rejectFile
- The path to a file into which information will be written about rejected entries. It may benull
if no reject file is to be maintained.overwriteRejects
- Indicates whether to overwrite an existing rejects file rather than appending to it.clearBackend
- Indicates whether to clear data below all base DNs in the backend. It must betrue
if the backend was specified using a backend ID and no include branches are specified andappend
isfalse
. If include branches were specified, or if data is being appended to the backend, then it may be eithertrue
orfalse
.includeBranches
- The set of base DNs below which to import the data. It may benull
or empty if a backend ID was specified and data should be imported below all base DNs defined in the backend. Otherwise, at least one include branch must be provided, and any data not under one of the include branches will be excluded from the import. All include branches must be within the scope of the same backend.excludeBranches
- The set of base DNs to exclude from the import. It may benull
or empty if no data is to be excluded based on its location.includeFilters
- The set of filters to use to determine which entries should be included in the import. It may benull
or empty if no data is to be excluded based on its content.excludeFilters
- The set of filters to use to determine which entries should be excluded from the import. It may benull
or empty if no data is to be excluded based on its content.includeAttributes
- The set of attributes to include in the entries being imported. It may benull
or empty if no attributes should be excluded from the import.excludeAttributes
- The set of attributes to exclude from the entries being imported. It may benull
or empty if no attributes should be excluded from the import.isCompressed
- Indicates whether the data in the LDIF file(s) is compressed.isEncrypted
- Indicates whether the data in the LDIF file(s) is encrypted.skipSchemaValidation
- Indicates whether to skip schema validation during the import.scheduledStartTime
- The time that this task should start running.dependencyIDs
- The list of task IDs that will be required to complete before this task will be eligible to start.failedDependencyAction
- Indicates what action should be taken if any of the dependencies for this task do not complete successfully.notifyOnCompletion
- The list of e-mail addresses of individuals that should be notified when this task completes.notifyOnError
- The list of e-mail addresses of individuals that should be notified if this task does not complete successfully.
-
ImportTask
public ImportTask(@Nullable java.lang.String taskID, @NotNull java.util.List<java.lang.String> ldifFiles, @Nullable java.lang.String backendID, boolean append, boolean replaceExisting, @Nullable java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, @Nullable java.util.List<java.lang.String> includeBranches, @Nullable java.util.List<java.lang.String> excludeBranches, @Nullable java.util.List<java.lang.String> includeFilters, @Nullable java.util.List<java.lang.String> excludeFilters, @Nullable java.util.List<java.lang.String> includeAttributes, @Nullable java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, boolean skipSchemaValidation, boolean stripTrailingSpaces, @Nullable java.util.Date scheduledStartTime, @Nullable java.util.List<java.lang.String> dependencyIDs, @Nullable FailedDependencyAction failedDependencyAction, @Nullable java.util.List<java.lang.String> notifyOnCompletion, @Nullable java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.- Parameters:
taskID
- The task ID to use for this task. If it isnull
then a UUID will be generated for use as the task ID.ldifFiles
- The paths to the LDIF file containing the data to be imported. The paths may be either absolute or relative to the server install root. It must not benull
or empty.backendID
- The backend ID of the backend into which the data should be imported. It may benull
only if one or more include branches was specified.append
- Indicates whether to append to the existing data rather than overwriting it.replaceExisting
- Indicates whether to replace existing entries when appending to the database.rejectFile
- The path to a file into which information will be written about rejected entries. It may benull
if no reject file is to be maintained.overwriteRejects
- Indicates whether to overwrite an existing rejects file rather than appending to it.clearBackend
- Indicates whether to clear data below all base DNs in the backend. It must betrue
if the backend was specified using a backend ID and no include branches are specified andappend
isfalse
. If include branches were specified, or if data is being appended to the backend, then it may be eithertrue
orfalse
.includeBranches
- The set of base DNs below which to import the data. It may benull
or empty if a backend ID was specified and data should be imported below all base DNs defined in the backend. Otherwise, at least one include branch must be provided, and any data not under one of the include branches will be excluded from the import. All include branches must be within the scope of the same backend.excludeBranches
- The set of base DNs to exclude from the import. It may benull
or empty if no data is to be excluded based on its location.includeFilters
- The set of filters to use to determine which entries should be included in the import. It may benull
or empty if no data is to be excluded based on its content.excludeFilters
- The set of filters to use to determine which entries should be excluded from the import. It may benull
or empty if no data is to be excluded based on its content.includeAttributes
- The set of attributes to include in the entries being imported. It may benull
or empty if no attributes should be excluded from the import.excludeAttributes
- The set of attributes to exclude from the entries being imported. It may benull
or empty if no attributes should be excluded from the import.isCompressed
- Indicates whether the data in the LDIF file(s) is compressed.isEncrypted
- Indicates whether the data in the LDIF file(s) is encrypted.skipSchemaValidation
- Indicates whether to skip schema validation during the import.stripTrailingSpaces
- Indicates whether to strip illegal trailing spaces found in LDIF records rather than rejecting those records.scheduledStartTime
- The time that this task should start running.dependencyIDs
- The list of task IDs that will be required to complete before this task will be eligible to start.failedDependencyAction
- Indicates what action should be taken if any of the dependencies for this task do not complete successfully.notifyOnCompletion
- The list of e-mail addresses of individuals that should be notified when this task completes.notifyOnError
- The list of e-mail addresses of individuals that should be notified if this task does not complete successfully.
-
ImportTask
public ImportTask(@Nullable java.lang.String taskID, @NotNull java.util.List<java.lang.String> ldifFiles, @Nullable java.lang.String backendID, boolean append, boolean replaceExisting, @Nullable java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, @Nullable java.util.List<java.lang.String> includeBranches, @Nullable java.util.List<java.lang.String> excludeBranches, @Nullable java.util.List<java.lang.String> includeFilters, @Nullable java.util.List<java.lang.String> excludeFilters, @Nullable java.util.List<java.lang.String> includeAttributes, @Nullable java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, @Nullable java.lang.String encryptionPassphraseFile, boolean skipSchemaValidation, boolean stripTrailingSpaces, @Nullable java.util.Date scheduledStartTime, @Nullable java.util.List<java.lang.String> dependencyIDs, @Nullable FailedDependencyAction failedDependencyAction, @Nullable java.util.List<java.lang.String> notifyOnCompletion, @Nullable java.util.List<java.lang.String> notifyOnError)
Creates a new import task with the provided information.- Parameters:
taskID
- The task ID to use for this task. If it isnull
then a UUID will be generated for use as the task ID.ldifFiles
- The paths to the LDIF file containing the data to be imported. The paths may be either absolute or relative to the server install root. It must not benull
or empty.backendID
- The backend ID of the backend into which the data should be imported. It may benull
only if one or more include branches was specified.append
- Indicates whether to append to the existing data rather than overwriting it.replaceExisting
- Indicates whether to replace existing entries when appending to the database.rejectFile
- The path to a file into which information will be written about rejected entries. It may benull
if no reject file is to be maintained.overwriteRejects
- Indicates whether to overwrite an existing rejects file rather than appending to it.clearBackend
- Indicates whether to clear data below all base DNs in the backend. It must betrue
if the backend was specified using a backend ID and no include branches are specified andappend
isfalse
. If include branches were specified, or if data is being appended to the backend, then it may be eithertrue
orfalse
.includeBranches
- The set of base DNs below which to import the data. It may benull
or empty if a backend ID was specified and data should be imported below all base DNs defined in the backend. Otherwise, at least one include branch must be provided, and any data not under one of the include branches will be excluded from the import. All include branches must be within the scope of the same backend.excludeBranches
- The set of base DNs to exclude from the import. It may benull
or empty if no data is to be excluded based on its location.includeFilters
- The set of filters to use to determine which entries should be included in the import. It may benull
or empty if no data is to be excluded based on its content.excludeFilters
- The set of filters to use to determine which entries should be excluded from the import. It may benull
or empty if no data is to be excluded based on its content.includeAttributes
- The set of attributes to include in the entries being imported. It may benull
or empty if no attributes should be excluded from the import.excludeAttributes
- The set of attributes to exclude from the entries being imported. It may benull
or empty if no attributes should be excluded from the import.isCompressed
- Indicates whether the data in the LDIF file(s) is compressed.isEncrypted
- Indicates whether the data in the LDIF file(s) is encrypted.encryptionPassphraseFile
- The path to a file containing the passphrase to use to generate the encryption key. It amy benull
if the backup is not to be encrypted, or if the key should be obtained in some other way.skipSchemaValidation
- Indicates whether to skip schema validation during the import.stripTrailingSpaces
- Indicates whether to strip illegal trailing spaces found in LDIF records rather than rejecting those records.scheduledStartTime
- The time that this task should start running.dependencyIDs
- The list of task IDs that will be required to complete before this task will be eligible to start.failedDependencyAction
- Indicates what action should be taken if any of the dependencies for this task do not complete successfully.notifyOnCompletion
- The list of e-mail addresses of individuals that should be notified when this task completes.notifyOnError
- The list of e-mail addresses of individuals that should be notified if this task does not complete successfully.
-
ImportTask
public ImportTask(@Nullable java.lang.String taskID, @NotNull java.util.List<java.lang.String> ldifFiles, @Nullable java.lang.String backendID, boolean append, boolean replaceExisting, @Nullable java.lang.String rejectFile, boolean overwriteRejects, boolean clearBackend, @Nullable java.util.List<java.lang.String> includeBranches, @Nullable java.util.List<java.lang.String> excludeBranches, @Nullable java.util.List<java.lang.String> includeFilters, @Nullable java.util.List<java.lang.String> excludeFilters, @Nullable java.util.List<java.lang.String> includeAttributes, @Nullable java.util.List<java.lang.String> excludeAttributes, boolean isCompressed, boolean isEncrypted, @Nullable java.lang.String encryptionPassphraseFile, boolean skipSchemaValidation, boolean stripTrailingSpaces, @Nullable java.util.Date scheduledStartTime, @Nullable java.util.List<java.lang.String> dependencyIDs, @Nullable FailedDependencyAction failedDependencyAction, @Nullable java.util.List<java.lang.String> notifyOnStart, @Nullable java.util.List<java.lang.String> notifyOnCompletion, @Nullable java.util.List<java.lang.String> notifyOnSuccess, @Nullable java.util.List<java.lang.String> notifyOnError, @Nullable java.lang.Boolean alertOnStart, @Nullable java.lang.Boolean alertOnSuccess, @Nullable java.lang.Boolean alertOnError)
Creates a new import task with the provided information.- Parameters:
taskID
- The task ID to use for this task. If it isnull
then a UUID will be generated for use as the task ID.ldifFiles
- The paths to the LDIF file containing the data to be imported. The paths may be either absolute or relative to the server install root. It must not benull
or empty.backendID
- The backend ID of the backend into which the data should be imported. It may benull
only if one or more include branches was specified.append
- Indicates whether to append to the existing data rather than overwriting it.replaceExisting
- Indicates whether to replace existing entries when appending to the database.rejectFile
- The path to a file into which information will be written about rejected entries. It may benull
if no reject file is to be maintained.overwriteRejects
- Indicates whether to overwrite an existing rejects file rather than appending to it.clearBackend
- Indicates whether to clear data below all base DNs in the backend. It must betrue
if the backend was specified using a backend ID and no include branches are specified andappend
isfalse
. If include branches were specified, or if data is being appended to the backend, then it may be eithertrue
orfalse
.includeBranches
- The set of base DNs below which to import the data. It may benull
or empty if a backend ID was specified and data should be imported below all base DNs defined in the backend. Otherwise, at least one include branch must be provided, and any data not under one of the include branches will be excluded from the import. All include branches must be within the scope of the same backend.excludeBranches
- The set of base DNs to exclude from the import. It may benull
or empty if no data is to be excluded based on its location.includeFilters
- The set of filters to use to determine which entries should be included in the import. It may benull
or empty if no data is to be excluded based on its content.excludeFilters
- The set of filters to use to determine which entries should be excluded from the import. It may benull
or empty if no data is to be excluded based on its content.includeAttributes
- The set of attributes to include in the entries being imported. It may benull
or empty if no attributes should be excluded from the import.excludeAttributes
- The set of attributes to exclude from the entries being imported. It may benull
or empty if no attributes should be excluded from the import.isCompressed
- Indicates whether the data in the LDIF file(s) is compressed.isEncrypted
- Indicates whether the data in the LDIF file(s) is encrypted.encryptionPassphraseFile
- The path to a file containing the passphrase to use to generate the encryption key. It amy benull
if the backup is not to be encrypted, or if the key should be obtained in some other way.skipSchemaValidation
- Indicates whether to skip schema validation during the import.stripTrailingSpaces
- Indicates whether to strip illegal trailing spaces found in LDIF records rather than rejecting those records.scheduledStartTime
- The time that this task should start running.dependencyIDs
- The list of task IDs that will be required to complete before this task will be eligible to start.failedDependencyAction
- Indicates what action should be taken if any of the dependencies for this task do not complete successfully.notifyOnStart
- The list of e-mail addresses of individuals that should be notified when this task starts running.notifyOnCompletion
- The list of e-mail addresses of individuals that should be notified when this task completes.notifyOnSuccess
- The list of e-mail addresses of individuals that should be notified if this task completes successfully.notifyOnError
- The list of e-mail addresses of individuals that should be notified if this task does not complete successfully.alertOnStart
- Indicates whether the server should send an alert notification when this task starts.alertOnSuccess
- Indicates whether the server should send an alert notification if this task completes successfully.alertOnError
- Indicates whether the server should send an alert notification if this task fails to complete successfully.
-
ImportTask
public ImportTask(@NotNull Entry entry) throws TaskException
Creates a new import task from the provided entry.- Parameters:
entry
- The entry to use to create this import task.- Throws:
TaskException
- If the provided entry cannot be parsed as an import task entry.
-
ImportTask
public ImportTask(@NotNull java.util.Map<TaskProperty,java.util.List<java.lang.Object>> properties) throws TaskException
Creates a new import task from the provided set of task properties.- Parameters:
properties
- The set of task properties and their corresponding values to use for the task. It must not benull
.- Throws:
TaskException
- If the provided set of properties cannot be used to create a valid import task.
-
-
Method Detail
-
getTaskName
@NotNull public java.lang.String getTaskName()
Retrieves a human-readable name for this task.- Overrides:
getTaskName
in classTask
- Returns:
- A human-readable name for this task.
-
getTaskDescription
@NotNull public java.lang.String getTaskDescription()
Retrieves a human-readable description for this task.- Overrides:
getTaskDescription
in classTask
- Returns:
- A human-readable description for this task.
-
getLDIFFiles
@NotNull public java.util.List<java.lang.String> getLDIFFiles()
Retrieves the paths to the LDIF files containing the data to be imported. The paths may be absolute or relative to the server root.- Returns:
- The paths to the LDIF files containing the data to be imported.
-
getBackendID
@Nullable public java.lang.String getBackendID()
Retrieves the backend ID of the backend into which the data should be imported.- Returns:
- The backend ID of the backend into which the data should be
imported, or
null
if no backend ID was specified and the backend will be identified from the include branches.
-
append
public boolean append()
Indicates whether the import should append to the data in the backend rather than clearing the backend before performing the import.- Returns:
true
if the contents of the existing backend should be retained and the new data appended to it, orfalse
if the existing content should be cleared prior to performing the import.
-
replaceExistingEntries
public boolean replaceExistingEntries()
Indicates whether to replace existing entries when appending data to the backend. This is only applicable ifappend()
returnstrue
.- Returns:
true
if entries already present in the backend should be replaced if that entry is also present in the LDIF file, orfalse
if entries already present in the backend should be retained and the corresponding entry contained in the LDIF should be skipped.
-
getRejectFile
@Nullable public java.lang.String getRejectFile()
Retrieves the path to a file to which rejected entries should be written.- Returns:
- The path to a file to which rejected entries should be written, or
null
if a rejected entries file should not be maintained.
-
overwriteRejectFile
public boolean overwriteRejectFile()
Indicates whether an existing reject file should be overwritten rather than appending to it.- Returns:
true
if an existing reject file should be overwritten, orfalse
if the server should append to it.
-
clearBackend
public boolean clearBackend()
Indicates whether data below all base DNs defined in the backend should be cleared before performing the import. This is not applicable if the import is to append to the backend, or if the backend only has a single base DN.- Returns:
true
if data below all base DNs in the backend should be cleared, orfalse
if only data below the base DNs that correspond to the configured include branches should be cleared.
-
getIncludeBranches
@NotNull public java.util.List<java.lang.String> getIncludeBranches()
Retrieves the list of base DNs for branches that should be included in the import.- Returns:
- The set of base DNs for branches that should be included in the import, or an empty list if data should be imported from all base DNs in the associated backend.
-
getExcludeBranches
@NotNull public java.util.List<java.lang.String> getExcludeBranches()
Retrieves the list of base DNs of branches that should be excluded from the import.- Returns:
- The list of base DNs of branches that should be excluded from the import, or an empty list if no entries should be excluded from the import based on their location.
-
getIncludeFilters
@NotNull public java.util.List<java.lang.String> getIncludeFilters()
Retrieves the list of search filters that may be used to identify which entries should be included in the import.- Returns:
- The list of search filters that may be used to identify which entries should be included in the import, or an empty list if no entries should be excluded from the import based on their content.
-
getExcludeFilters
@NotNull public java.util.List<java.lang.String> getExcludeFilters()
Retrieves the list of search filters that may be used to identify which entries should be excluded from the import.- Returns:
- The list of search filters that may be used to identify which entries should be excluded from the import, or an empty list if no entries should be excluded from the import based on their content.
-
getIncludeAttributes
@NotNull public java.util.List<java.lang.String> getIncludeAttributes()
Retrieves the list of attributes that should be included in the imported entries.- Returns:
- The list of attributes that should be included in the imported entries, or an empty list if no attributes should be excluded.
-
getExcludeAttributes
@NotNull public java.util.List<java.lang.String> getExcludeAttributes()
Retrieves the list of attributes that should be excluded from the imported entries.- Returns:
- The list of attributes that should be excluded from the imported entries, or an empty list if no attributes should be excluded.
-
isCompressed
public boolean isCompressed()
Indicates whether the LDIF data to import is compressed.- Returns:
true
if the LDIF data to import is compressed, orfalse
if not.
-
isEncrypted
public boolean isEncrypted()
Indicates whether the LDIF data to import is encrypted.- Returns:
true
if the LDIF data to import is encrypted, orfalse
if not.
-
getEncryptionPassphraseFile
@NotNull public java.lang.String getEncryptionPassphraseFile()
Retrieves the path to a file that contains the passphrase to use to generate the encryption key.- Returns:
- The path to a file that contains the passphrase to use to
generate the encryption key, or
null
if the LDIF file is not encrypted or if the encryption key should be obtained through some other means.
-
skipSchemaValidation
public boolean skipSchemaValidation()
Indicates whether the server should skip schema validation processing when performing the import.- Returns:
true
if the server should skip schema validation processing when performing the import, orfalse
if not.
-
stripTrailingSpaces
public boolean stripTrailingSpaces()
Indicates whether the server should strip off any illegal trailing spaces found in LDIF records rather than rejecting those records.- Returns:
true
if the server should strip off any illegal trailing spaces found in LDIF records, orfalse
if it should reject any records containing illegal trailing spaces.
-
getAdditionalObjectClasses
@NotNull protected java.util.List<java.lang.String> getAdditionalObjectClasses()
Retrieves a list of the additional object classes (other than the base "top" and "ds-task" classes) that should be included when creating new task entries of this type.- Overrides:
getAdditionalObjectClasses
in classTask
- Returns:
- A list of the additional object classes that should be included in new task entries of this type, or an empty list if there do not need to be any additional classes.
-
getAdditionalAttributes
@NotNull protected java.util.List<Attribute> getAdditionalAttributes()
Retrieves a list of the additional attributes (other than attributes common to all task types) that should be included when creating new task entries of this type.- Overrides:
getAdditionalAttributes
in classTask
- Returns:
- A list of the additional attributes that should be included in new task entries of this type, or an empty list if there do not need to be any additional attributes.
-
getTaskSpecificProperties
@NotNull public java.util.List<TaskProperty> getTaskSpecificProperties()
Retrieves a list of task-specific properties that may be provided when scheduling a task of this type. This method should be overridden by subclasses in order to provide an appropriate set of properties.- Overrides:
getTaskSpecificProperties
in classTask
- Returns:
- A list of task-specific properties that may be provided when scheduling a task of this type.
-
getTaskPropertyValues
@NotNull public java.util.Map<TaskProperty,java.util.List<java.lang.Object>> getTaskPropertyValues()
Retrieves the values of the task properties for this task. The data type of the values will vary based on the data type of the corresponding task property and may be one of the following types:Boolean
,Date
,Long
, orString
. Task properties which do not have any values will be included in the map with an empty value list.
Note that subclasses which have additional task properties should override this method and return a map which contains both the property values from this class (obtained fromsuper.getTaskPropertyValues()
and the values of their own task-specific properties.- Overrides:
getTaskPropertyValues
in classTask
- Returns:
- A map of the task property values for this task.
-
-