Package org.opends.server.tools
Interface TaskCommand
-
- All Known Implementing Classes:
ExportLdif,ImportLdif,RebuildIndex
public interface TaskCommandThis 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddTaskAttributes(Entry taskEntry)Adds attributes to the task entry before it is sent to the server.default booleancanInitializeClient()Indicates whether to initialize a Directory Server client when running online.Class<? extends Task>getTaskClass()Returns the task class.StringgetTaskObjectClass()Returns the task's object class.com.forgerock.opendj.cli.ReturnCodeprocessLocal()Runs the command in offline mode.default voidvalidateArguments()Validates the argument values before running locally or sending a task to the server.
-
-
-
Method Detail
-
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.
-
getTaskObjectClass
String getTaskObjectClass()
Returns the task's object class.- Returns:
- the task's object class
-
addTaskAttributes
void addTaskAttributes(Entry taskEntry)
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 returnfalsewhen running tests while a client has already been initialized.- Returns:
- whether to initialize a Directory Server client when running online.
-
-