@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class GenerateServerProfileTask extends Task
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
Constructor and Description |
---|
GenerateServerProfileTask()
Creates a new uninitialized generate server profile task instance that
should only be used for obtaining general information about this task,
including the task name, description, and supported properties.
|
GenerateServerProfileTask(Entry entry)
Creates a new generate server profile task from the provided entry.
|
GenerateServerProfileTask(java.util.Map<TaskProperty,java.util.List<java.lang.Object>> properties)
Creates a generate server profile task from the provided set of task
properties.
|
GenerateServerProfileTask(java.lang.String taskID,
java.lang.String profileRoot,
java.util.List<java.lang.String> includePaths,
java.lang.Boolean zipProfile,
java.lang.Integer retainCount,
java.lang.Long retainAgeMillis)
Creates a new generate server profile task with the provided information.
|
GenerateServerProfileTask(java.lang.String taskID,
java.lang.String profileRoot,
java.util.List<java.lang.String> includePaths,
java.lang.Boolean zipProfile,
java.lang.Integer retainCount,
java.lang.Long retainAgeMillis,
java.util.Date scheduledStartTime,
java.util.List<java.lang.String> dependencyIDs,
FailedDependencyAction failedDependencyAction,
java.util.List<java.lang.String> notifyOnStart,
java.util.List<java.lang.String> notifyOnCompletion,
java.util.List<java.lang.String> notifyOnSuccess,
java.util.List<java.lang.String> notifyOnError,
java.lang.Boolean alertOnStart,
java.lang.Boolean alertOnSuccess,
java.lang.Boolean alertOnError)
Creates a new generate server profile task with the provided information.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Attribute> |
getAdditionalAttributes()
Retrieves a list of the additional attributes (other than attributes common
to all task types) that should be included when creating new task entries
of this type.
|
protected java.util.List<java.lang.String> |
getAdditionalObjectClasses()
Retrieves a list of the additional object classes (other than the base
"top" and "ds-task" classes) that should be included when creating new task
entries of this type.
|
java.util.List<java.lang.String> |
getIncludePaths()
Retrieves a list of additional paths to files or directories within the
instance root that should be included in the generated server profile.
|
java.lang.String |
getProfileRoot()
Retrieves the path on the server filesystem to the zip file or directory to
which the generated server profile will be written.
|
java.lang.String |
getRetainAge()
Retrieves the maximum age of preexisting server profile zip files to
retain after a new profile is successfully generated, if defined.
|
java.lang.Long |
getRetainAgeMillis()
Retrieves the maximum age in milliseconds of preexisting server profile zip
files to retain after a new profile is successfully generated, if defined.
|
java.lang.Integer |
getRetainCount()
Retrieves the maximum number of preexisting server profile zip files to
retain after a new profile is successfully generated, if defined.
|
java.lang.String |
getTaskDescription()
Retrieves a human-readable description for this task.
|
java.lang.String |
getTaskName()
Retrieves a human-readable name for this task.
|
java.util.Map<TaskProperty,java.util.List<java.lang.Object>> |
getTaskPropertyValues()
Retrieves the values of the task properties for this task.
|
java.util.List<TaskProperty> |
getTaskSpecificProperties()
Retrieves a list of task-specific properties that may be provided when
scheduling a task of this type.
|
java.lang.Boolean |
getZipProfile()
Retrieves a flag that indicates whether the server should package the
generated server profile into a zip file.
|
createTaskEntry, decodeTask, getActualStartTime, getAlertOnError, getAlertOnStart, getAlertOnSuccess, getAvailableTaskTypes, getCommonTaskProperties, getCompletionTime, getDependencyIDs, getFailedDependencyAction, getLogMessages, getNotifyOnCompletionAddresses, getNotifyOnErrorAddresses, getNotifyOnStartAddresses, getNotifyOnSuccessAddresses, getScheduledStartTime, getState, getTaskClassName, getTaskEntry, getTaskEntryDN, getTaskID, isCompleted, isPending, isRunning, parseBoolean, parseBooleanValue, parseDate, parseLong, parseString, parseStringList, parseStrings, toString, toString
public GenerateServerProfileTask()
public GenerateServerProfileTask(@Nullable java.lang.String taskID, @Nullable java.lang.String profileRoot, @Nullable java.util.List<java.lang.String> includePaths, @Nullable java.lang.Boolean zipProfile, @Nullable java.lang.Integer retainCount, @Nullable java.lang.Long retainAgeMillis)
taskID
- The task ID to use for this task. If it is
null
then a UUID will be generated for use
as the task ID.profileRoot
- The path on the server filesystem to the zip file
or directory to which the generated server profile
will be written. This may be an absolute path or
a relative path that will be interpreted as
relative to the instance root. If the generated
server profile will be packaged into a zip file,
then this must either be the path to the zip file
to be created (which must not yet exist, although
its parent directory must exist) or the path to
the directory (which must already exists) in which
the zip file is to be created. If the server
profile will not e zipped, then this must be the
path to an empty or nonexistent directory in a
parent directory that does exist. If this is not
provided, the server will create the zip file or
profile directory in the instance root with a
name that it generates.includePaths
- An optional list of paths to additional files or
directories that exist within the instance root
that should be included in the generated server
profile. Relative paths will be interpreted as
relative to the instance root. This may be
null
or empty if no additional include
paths should be used.zipProfile
- Indicates whether the generated server profile
should be packaged into a zip file. If this is
Boolean.TRUE
, then the profile will be
packaged into a zip file. If this is
Boolean.FALSE
, then the profile will be
written as a directory structure. It may be
null
if the server should choose whether
to package the profile into a zip file.retainCount
- The minimum number of preexisting server profile
zip files to retain. This may only be provided if
the profile is to be packaged into a zip file and
the profile root is specified as a directory so
that the server will generate the zip file name.
This may be null
if only the retain age
will be used to identify which files may be
deleted (if a retain age is given), or if no
preexisting profile zip files should be removed
(if no retain age is given).retainAgeMillis
- The minimum age in milliseconds of preexisting
server profile zip files to retain. This may only
be provided if the profile is to be packaged into
a zip file and the profile root is specified as a
directory so that the server will generate the zip
file name. This may be null
if only the
retain count will be used to identify which files
may be deleted (if a retain count is given), or if
no preexisting profile zip files should be removed
(if no retain count is given).public GenerateServerProfileTask(@Nullable java.lang.String taskID, @Nullable java.lang.String profileRoot, @Nullable java.util.List<java.lang.String> includePaths, @Nullable java.lang.Boolean zipProfile, @Nullable java.lang.Integer retainCount, @Nullable java.lang.Long retainAgeMillis, @Nullable java.util.Date scheduledStartTime, @Nullable java.util.List<java.lang.String> dependencyIDs, @Nullable FailedDependencyAction failedDependencyAction, @Nullable java.util.List<java.lang.String> notifyOnStart, @Nullable java.util.List<java.lang.String> notifyOnCompletion, @Nullable java.util.List<java.lang.String> notifyOnSuccess, @Nullable java.util.List<java.lang.String> notifyOnError, @Nullable java.lang.Boolean alertOnStart, @Nullable java.lang.Boolean alertOnSuccess, @Nullable java.lang.Boolean alertOnError)
taskID
- The task ID to use for this task. If it is
null
then a UUID will be generated
for use as the task ID.profileRoot
- The path on the server filesystem to the
zip file or directory to which the
generated server profile will be written.
This may be an absolute path or a relative
path that will be interpreted as relative
to the instance root. If the generated
server profile will be packaged into a zip
file, then this must either be the path to
the zip file to be created (which must not
yet exist, although its parent directory
must exist) or the path to the directory
(which must already exists) in which the
zip file is to be created. If the server
profile will not e zipped, then this must
be the path to an empty or nonexistent
directory in a parent directory that does
exist. If this is not provided, the server
will create the zip file or profile
directory in the instance root with a name
that it generates.includePaths
- An optional list of paths to additional
files or directories that exist within the
instance root that should be included in
the generated server profile. Relative
paths will be interpreted as relative to
the instance root. This may be
null
or empty if no additional
include paths should be used.zipProfile
- Indicates whether the generated server
profile should be packaged into a zip file.
If this is Boolean.TRUE
, then the
profile will be packaged into a zip file.
If this is Boolean.FALSE
, then the
profile will be written as a directory
structure. It may be null
if the
server should choose whether to package the
profile into a zip file.retainCount
- The minimum number of preexisting server
profile zip files to retain. This may only
be provided if the profile is to be
packaged into a zip file and the profile
root is specified as a directory so that
the server will generate the zip file name.
This may be null
if only the retain
age will be used to identify which files
may be deleted (if a retain age is given),
or if no preexisting profile zip files
should be removed (if no retain age is
given).retainAgeMillis
- The minimum age in milliseconds of
preexisting server profile zip files to
retain. This may only be provided if the
profile is to be packaged into a zip file
and the profile root is specified as a
directory so that the server will generate
the zip file name. This may be
null
if only the retain count will
be used to identify which files may be
deleted (if a retain count is given), or if
no preexisting profile zip files should be
removed (if no retain count is given).scheduledStartTime
- The time that this task should start
running.dependencyIDs
- The list of task IDs that will be required
to complete before this task will be
eligible to start.failedDependencyAction
- Indicates what action should be taken if
any of the dependencies for this task do
not complete successfully.notifyOnStart
- The list of e-mail addresses of individuals
that should be notified when this task
starts running.notifyOnCompletion
- The list of e-mail addresses of individuals
that should be notified when this task
completes.notifyOnSuccess
- The list of e-mail addresses of individuals
that should be notified if this task
completes successfully.notifyOnError
- The list of e-mail addresses of individuals
that should be notified if this task does
not complete successfully.alertOnStart
- Indicates whether the server should send an
alert notification when this task starts.alertOnSuccess
- Indicates whether the server should send an
alert notification if this task completes
successfully.alertOnError
- Indicates whether the server should send an
alert notification if this task fails to
complete successfully.public GenerateServerProfileTask(@NotNull Entry entry) throws TaskException
entry
- The entry to use to create this generate server profile
task.TaskException
- If the provided entry cannot be parsed as a
generate server profile task entry.public GenerateServerProfileTask(@NotNull java.util.Map<TaskProperty,java.util.List<java.lang.Object>> properties) throws TaskException
properties
- The set of task properties and their corresponding
values to use for the task. It must not be
null
.TaskException
- If the provided set of properties cannot be used to
create a valid generate server profile task.@NotNull public java.lang.String getTaskName()
getTaskName
in class Task
@NotNull public java.lang.String getTaskDescription()
getTaskDescription
in class Task
@Nullable public java.lang.String getProfileRoot()
null
if the server will create the zip file or profile
directory in the instance root with a generated name.@NotNull public java.util.List<java.lang.String> getIncludePaths()
@Nullable public java.lang.Boolean getZipProfile()
Boolean.TRUE
if the generated server profile should be
packaged into a zip file, Boolean.FALSE
if the server
profile should be written as a directory structure, or
null
if this is not specified and the server will decide
which behavior to exhibit.@Nullable public java.lang.Integer getRetainCount()
null
if file retention processing should depend only on
the retain age (if defined) or if no retention processing should
be performed.@Nullable public java.lang.String getRetainAge()
DurationArgument
class, which is an integer followed by a time
unit (millisecond, second, minute, hour, day, or week, or one of their
plurals).null
if file retention processing should depend only on
the retain count (if defined) or if no retention processing should
be performed.@Nullable public java.lang.Long getRetainAgeMillis() throws TaskException
null
if file retention processing should depend only on
the retain count (if defined) or if no retention processing should
be performed.TaskException
- If a problem is encountered while attempting to
parse the retain age as a duration.@NotNull protected java.util.List<java.lang.String> getAdditionalObjectClasses()
getAdditionalObjectClasses
in class Task
@NotNull protected java.util.List<Attribute> getAdditionalAttributes()
getAdditionalAttributes
in class Task
@NotNull public java.util.List<TaskProperty> getTaskSpecificProperties()
getTaskSpecificProperties
in class Task
@NotNull public java.util.Map<TaskProperty,java.util.List<java.lang.Object>> getTaskPropertyValues()
Boolean
,
Date
, Long
, or String
. Task properties which do
not have any values will be included in the map with an empty value list.
super.getTaskPropertyValues()
and the
values of their own task-specific properties.getTaskPropertyValues
in class Task