Package org.opends.server.tools
Interface TaskCommand
- All Known Implementing Classes:
ExportLdif
,ImportLdif
,RebuildIndex
public interface TaskCommand
This interface must be implemented by tool commands or sub-commands that offer the possibility to run in offline mode
or via a Directory Server task.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTaskAttributes
(Entry taskEntry) Adds attributes to the task entry before it is sent to the server.default boolean
Indicates whether to initialize a Directory Server client when running online.Returns the task class.Returns the task's object class.com.forgerock.opendj.cli.ReturnCode
Runs the command in offline mode.default void
Validates the argument values before running locally or sending a task to the server.
-
Method Details
-
validateArguments
default void validateArguments() throws com.forgerock.opendj.cli.ClientExceptionValidates the argument values before running locally or sending a task to the server.- Throws:
com.forgerock.opendj.cli.ClientException
- If the user provided arguments are not valid.
-
processLocal
com.forgerock.opendj.cli.ReturnCode processLocal() throws com.forgerock.opendj.cli.ClientExceptionRuns the command in offline mode.- Returns:
- the return code.
- Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs.
-
getTaskClass
Returns the task class.- Returns:
- the task class.
-
getTaskObjectClass
String getTaskObjectClass()Returns the task's object class.- Returns:
- the task's object class
-
addTaskAttributes
Adds attributes to the task entry before it is sent to the server.- Parameters:
taskEntry
- the task entry.
-
canInitializeClient
default boolean canInitializeClient()Indicates whether to initialize a Directory Server client when running online. This method should only returnfalse
when running tests while a client has already been initialized.- Returns:
- whether to initialize a Directory Server client when running online.
-