public final class ImportLdif extends TaskTool
canInitializeServer, NOW, OPTION_LONG_COMPRESS, OPTION_LONG_TMP_DIRECTORY, OPTION_SHORT_BACKEND_ID, OPTION_SHORT_COMPRESS
Modifier and Type | Method and Description |
---|---|
void |
addTaskAttributes(Entry taskEntry)
Adds utility specific attributes to the provided task entry that is added to the task backend.
|
protected void |
cleanup()
Cleanup task environment after offline run.
|
Class<?> |
getTaskClass()
Gets the Class that implements the utility to execute.
|
String |
getTaskId()
Gets an arbitrary task id assigned to this task.
|
String |
getTaskObjectclass()
Gets the objectclass used to represent scheduled instances of this utility in the task backend.
|
static void |
importLdifEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments)
This method is used for running the import-ldif tool programmatically against an offline server.
|
static void |
importLdifEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments,
OutputStream outStream,
OutputStream errStream)
This method is used for running the import-ldif tool programmatically against an offline server.
|
protected boolean |
isEmbedded()
Returns
true if the tool is running in embedded mode. |
boolean |
isQuiet()
Indicates whether the user has requested quiet output.
|
static void |
main(String[] args)
The main method for
ImportLdif tool. |
static int |
mainImportLdif(String[] args,
boolean canInitializeServer,
OutputStream outStream,
OutputStream errStream)
Processes the command-line arguments and invokes the import process.
|
protected com.forgerock.opendj.cli.ReturnCode |
processLocal()
Called when this utility should perform its actions locally in this JVM.
|
protected com.forgerock.opendj.cli.ReturnCode |
runTaskTool(String[] args)
Runs the concrete tool implementation with the provided arguments.
|
addAttribute, addAttributeIfArgumentPresent, getArgumentParser, getDependencyIds, getFailedDependencyAction, getNotifyUponCompletionEmailAddresses, getNotifyUponErrorEmailAddresses, getRecurringDateTime, getStartDateTime, process, run, runEmbeddedOffline, runOffline, shutdownBackends, validateArguments, validateTaskArgs
askConfirmation, askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readPassword, readValidatedInput, readValidatedInput, report
public static void main(String[] args)
ImportLdif
tool.args
- The command-line arguments provided to this program.public static int mainImportLdif(String[] args, boolean canInitializeServer, OutputStream outStream, OutputStream errStream)
args
- The command-line arguments provided to this program.canInitializeServer
- true
if the server can be initialized, false
otherwise (basically, because this is
executed in the context of a unit-test).outStream
- The output stream to use for standard output, or null
if standard output is not needed.errStream
- The output stream to use for standard error, or null
if standard error is not needed.public static void importLdifEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments) throws com.forgerock.opendj.cli.ClientException
The --offline and --noPropertyFile arguments are automatically added to
the tool arguments.
Import offline implies that the DirectoryServer
will be initialized.
No modification will be performed to the running JVM JDK logging configuration.
arguments
- The command-line arguments provided to this program.com.forgerock.opendj.cli.ClientException
- If an error occurs during the tool execution.public static void importLdifEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder arguments, OutputStream outStream, OutputStream errStream) throws com.forgerock.opendj.cli.ClientException
The --offline and --noPropertyFile arguments are automatically added to
the tool arguments.
Import offline implies that the DirectoryServer
will be initialized.
No modification will be performed to the running JVM JDK logging configuration.
arguments
- The command-line arguments provided to this programoutStream
- The output stream to use for standard output, or null
if standard output is not needederrStream
- The output stream to use for standard error, or null
if standard error is not neededcom.forgerock.opendj.cli.ClientException
- If an error occurs during the tool execution or if the tool has returned an errorpublic boolean isQuiet()
com.forgerock.opendj.cli.Tool
false
.isQuiet
in class com.forgerock.opendj.cli.Tool
true
if the user has requested quiet output.protected com.forgerock.opendj.cli.ReturnCode runTaskTool(String[] args) throws com.forgerock.opendj.cli.ClientException
TaskTool
runTaskTool
in class TaskTool
args
- The command line arguments.ReturnCode
returned by the tool execution.com.forgerock.opendj.cli.ClientException
- If an error occurs during tool execution.public void addTaskAttributes(Entry taskEntry)
TaskScheduleInformation
taskEntry
- The task Entry
to update.public String getTaskObjectclass()
TaskScheduleInformation
public Class<?> getTaskClass()
TaskScheduleInformation
protected com.forgerock.opendj.cli.ReturnCode processLocal() throws com.forgerock.opendj.cli.ClientException
TaskTool
processLocal
in class TaskTool
com.forgerock.opendj.cli.ClientException
- If an error occurs while running the toolprotected void cleanup()
TaskTool
public String getTaskId()
TaskScheduleInformation
null
otherwise.protected boolean isEmbedded()
TaskTool
true
if the tool is running in embedded mode.
Embedded mode would not change JDK logging configuration and will used running jvm slf4j loggers implementation
isEmbedded
in class TaskTool
true
if the tool is running in embedded mode.Copyright 2010-2022 ForgeRock AS.