public class ModifyEntryTask extends Task
Task.State, Task.Type
errorLogs, errorPrintStream, lastException, logs, outPrintStream, outputLogs, process, returnCode, state
Constructor and Description |
---|
ModifyEntryTask(ControlPanelInfo info,
ProgressDialog dlg,
Entry newEntry,
CustomSearchResult oldEntry,
BrowserController controller,
TreePath path)
Constructor of the task.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canLaunch(Task taskToBeLaunched,
Collection<LocalizableMessage> incompatibilityReasons)
Informs of whether the task to be launched can be launched or not.
|
Set<String> |
getBackends()
Returns the names of the backends that are affected by the task.
|
protected ArrayList<String> |
getCommandLineArguments()
Returns the list of command-line arguments.
|
protected String |
getCommandLinePath()
Returns the full path of the command-line associated with this task or
null if there is not a command-line (or a single command-line)
associated with the task. |
static ArrayList<ModificationItem> |
getModifications(Entry newEntry,
CustomSearchResult oldEntry,
ControlPanelInfo info)
Gets the modifications to apply between two entries.
|
LocalizableMessage |
getTaskDescription()
The description of the task.
|
Task.Type |
getType()
Returns the type of the task.
|
boolean |
hasModifications()
Tells whether there actually modifications on the entry.
|
void |
postOperation()
Method that is called when everything is finished after updating the
progress dialog.
|
boolean |
regenerateDescriptor()
Tells whether a new server descriptor should be regenerated when the task
is over.
|
void |
runTask()
Execute the task.
|
addConfigurationElementCreatedListener, displayBase64, executeCommandLine, getBinaryDir, getCommandLinePath, getCommandLineToDisplay, getConfigCommandLineArguments, getConnectionCommandLineArguments, getConnectionCommandLineArguments, getEquivalentCommandLine, getErrorLogs, getErrorPrintStream, getIncompatibilityMessage, getInfo, getLastException, getLogs, getNoPropertiesFileArgument, getObfuscatedCommandLineArguments, getOutPrintStream, getOutputLogs, getProcess, getProgressDialog, getReturnCode, getServer, getState, isServerRunning, notifyConfigurationElementCreated, obfuscateAttributeStringValue, obfuscateLDIFLine, printEquivalentCommandLine, printEquivalentCommandToModify, printEquivalentCommandToModify, printEquivalentRenameCommand, removeConfigurationElementCreatedListener, runningOnSameServer
public ModifyEntryTask(ControlPanelInfo info, ProgressDialog dlg, Entry newEntry, CustomSearchResult oldEntry, BrowserController controller, TreePath path)
info
- the control panel information.dlg
- the progress dialog where the task progress will be displayed.newEntry
- the entry containing the new values.oldEntry
- the old entry as we retrieved using JNDI.controller
- the BrowserController.path
- the TreePath corresponding to the node in the tree that we
want to modify.public boolean hasModifications()
true
if there are modifications and false
otherwise.public Set<String> getBackends()
getBackends
in class Task
public LocalizableMessage getTaskDescription()
getTaskDescription
in class Task
protected String getCommandLinePath()
null
if there is not a command-line (or a single command-line)
associated with the task.getCommandLinePath
in class Task
protected ArrayList<String> getCommandLineArguments()
getCommandLineArguments
in class Task
public boolean canLaunch(Task taskToBeLaunched, Collection<LocalizableMessage> incompatibilityReasons)
true
.canLaunch
in class Task
taskToBeLaunched
- the Task that we are trying to launch.incompatibilityReasons
- the list of incompatibility reasons that
must be updated.true
if the task that we are trying to launch can be
launched in parallel with this task and false
otherwise.public boolean regenerateDescriptor()
true
so that the configuration will be re-read and
all the ConfigChangeListeners will receive a notification with the new
configuration.regenerateDescriptor
in class Task
true
if a new server descriptor must be regenerated
when the task is over and false
otherwise.public void runTask()
public void postOperation()
postOperation
in class Task
public static ArrayList<ModificationItem> getModifications(Entry newEntry, CustomSearchResult oldEntry, ControlPanelInfo info)
newEntry
- the new entry.oldEntry
- the old entry.info
- the ControlPanelInfo, used to retrieve the schema for instance.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.