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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addTaskAttributes(Entry taskEntry)
Adds attributes to the task entry before it is sent to the server.default boolean
canInitializeClient()
Indicates whether to initialize a Directory Server client when running online.Class<? extends Task>
getTaskClass()
Returns the task class.String
getTaskObjectClass()
Returns the task's object class.com.forgerock.opendj.cli.ReturnCode
processLocal()
Runs the command in offline mode.default void
validateArguments()
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.ClientException
Validates 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.ClientException
Runs 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 returnfalse
when running tests while a client has already been initialized.- Returns:
- whether to initialize a Directory Server client when running online.
-
-