public class DeleteSchemaElementsTask extends Task
Task.State, Task.Type
errorPrintStream, lastException, outPrintStream, returnCode, state
Constructor and Description |
---|
DeleteSchemaElementsTask(ControlPanelInfo info,
ProgressDialog dlg,
Set<ObjectClass> ocsToDelete,
Set<AttributeType> attrsToDelete)
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.
|
static Map<String,List<String>> |
cloneExtraProperties(SchemaElement element)
Clones the extra properties of the provided schema element.
|
Set<String> |
getBackends()
Returns the names of the backends that are affected by the task.
|
static LinkedHashSet<AttributeType> |
getOrderedAttributesToDelete(Collection<AttributeType> attrsToDelete,
Schema schema)
Returns an ordered set of the attributes that must be deleted.
|
static LinkedHashSet<ObjectClass> |
getOrderedObjectClassesToDelete(Collection<ObjectClass> ocsToDelete,
Schema schema)
Returns an ordered list of the object classes that must be deleted.
|
static LinkedHashSet<ObjectClass> |
getOrderedObjectClassesToDeleteFromAttrs(Collection<AttributeType> attrsToDelete,
Schema schema)
Returns an ordered list of the object classes that must be deleted when deleting a list of attributes that must
be deleted.
|
LocalizableMessage |
getTaskDescription()
The description of the task.
|
Task.Type |
getType()
Returns the type of the task.
|
void |
runTask()
Execute the task.
|
addConfigurationElementCreatedListener, executeCommandLine, getCommandLineArguments, getCommandLinePath, getCommandLinePath, getCommandLineToDisplay, getConfigCommandLineArguments, getConnectionCommandLineArguments, getConnectionCommandLineArguments, getDsConfigCommandLinePath, getEquivalentCommandLine, getErrorPrintStream, getIncompatibilityMessage, getInfo, getLastException, getLogs, getNoPropertiesFileArgument, getObfuscatedCommandLineArguments, getOutPrintStream, getProcess, getProgressDialog, getReturnCode, getServer, getState, isServerRunning, notifyConfigurationElementCreated, postOperation, printEquivalentCommandLine, regenerateDescriptor, runningOnSameServer, startPollingAndInitializeConfiguration, stopPollingAndInitializeConfiguration
public DeleteSchemaElementsTask(ControlPanelInfo info, ProgressDialog dlg, Set<ObjectClass> ocsToDelete, Set<AttributeType> attrsToDelete)
info
- the control panel information.dlg
- the progress dialog where the task progress will be displayed.ocsToDelete
- the object classes that must be deleted (ordered).attrsToDelete
- the attributes that must be deleted (ordered).public Set<String> getBackends()
Task
getBackends
in class Task
public boolean canLaunch(Task taskToBeLaunched, Collection<LocalizableMessage> incompatibilityReasons)
Task
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 Task.Type getType()
Task
public void runTask()
Task
public LocalizableMessage getTaskDescription()
Task
getTaskDescription
in class Task
public static LinkedHashSet<AttributeType> getOrderedAttributesToDelete(Collection<AttributeType> attrsToDelete, Schema schema)
attrsToDelete
- the attributes to be deleted.schema
- the server schema.public static LinkedHashSet<ObjectClass> getOrderedObjectClassesToDelete(Collection<ObjectClass> ocsToDelete, Schema schema)
ocsToDelete
- the object classes to be deleted.schema
- the server schema.public static LinkedHashSet<ObjectClass> getOrderedObjectClassesToDeleteFromAttrs(Collection<AttributeType> attrsToDelete, Schema schema)
attrsToDelete
- the attributes to be deleted.schema
- the server schema.public static Map<String,List<String>> cloneExtraProperties(SchemaElement element)
element
- the schema element.Copyright 2010-2020 ForgeRock AS.