Class AdminTask
- java.lang.Object
-
- com.atlassian.confluence.admin.tasks.AdminTask
-
public class AdminTask extends Object
A discrete, actionable task that an administrator should be aware of.
An AdminTask aims to encapsulate goals around (correctly) affecting high-value changes to Confluence that could or should be made in order to get the best out of Confluence.At a glance, an AdminTask should provide an administrator with a clear, concise description for something that needs an administrator's attention. The title of the task should be a clear call to action for that task's goal.
An AdminTask must include goals which are automatically verifiable. This is accomplished by injecting
AdminConfigurationCriteria
in to an AdminTask'sAdminTaskConfig
.
Without success criteria, there is no way a user can satisfy or dismiss a task.Once an AdminTask's goals have been addressed, the task is completed, and in doing so, the AdminTask records metadata for when the task was completed.
Tasks may be ignored (dismissed) by the admin. Note that tasks that are ignored are NOT also considered completed. It is up to the consuming service to decide whether to group ignored tasks with completed tasks.
All AdminTask objects are handled by the
AdminTasklistManager
.
-
-
Constructor Summary
Constructors Constructor Description AdminTask(AdminTaskConfig adminTaskConfig, AdminTaskData adminTaskData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActionTextKey()
AdminTaskConfig
getAdminTaskConfig()
AdminTaskData
getAdminTaskData()
List<String>
getAllConfigurationUris()
A collection of locations in Confluence at which the task's goals may be satisfied.Date
getCompletedAt()
String
getCompletedByFullName()
String
getCompletedByUsername()
String
getConfigurationCurrentValueKey()
String
getConfiguredValue()
String
getDescriptionKey()
String
getFirstConfigurationUri()
A location in Confluence at which the task's goals may be satisfied.boolean
getHasSuccessCriteria()
Check to see if this task has automatic success criteria or not, as defined by anAdminConfigurationCriteria
.boolean
getHasValue()
Whether the criteria has a value to display, such as "Current Status: Incomplete" or "Current Value: http://...".boolean
getIsCompleted()
Whether this task has been completed.boolean
getIsCriteriaMet()
Whether this task's success criteria have been met or not.String
getKey()
The unique handle for this admin task.String
getTitleKey()
boolean
isIgnorable()
Whether this task can be ignored or not.boolean
isIgnored()
Whether this task has been ignored.void
setIgnored(boolean value)
Set whether this task should be ignored.String
toString()
-
-
-
Constructor Detail
-
AdminTask
public AdminTask(AdminTaskConfig adminTaskConfig, AdminTaskData adminTaskData)
-
-
Method Detail
-
getAdminTaskConfig
public AdminTaskConfig getAdminTaskConfig()
-
getAdminTaskData
public AdminTaskData getAdminTaskData()
-
getKey
public String getKey()
The unique handle for this admin task. Used for retrieval and i18n purposes.- Returns:
- The key set by this task's
AdminTaskConfig
.
-
getTitleKey
public String getTitleKey()
-
getActionTextKey
public String getActionTextKey()
-
getDescriptionKey
public String getDescriptionKey()
-
getConfigurationCurrentValueKey
public String getConfigurationCurrentValueKey()
-
getFirstConfigurationUri
public String getFirstConfigurationUri()
A location in Confluence at which the task's goals may be satisfied.- Returns:
- A string representation of a relative URL.
-
getAllConfigurationUris
public List<String> getAllConfigurationUris()
A collection of locations in Confluence at which the task's goals may be satisfied.- Returns:
- A list of string representations of a relative URL.
-
isIgnorable
public boolean isIgnorable()
Whether this task can be ignored or not.- Returns:
- true if the task has the capacity to be ignored and dismissed.
-
isIgnored
public boolean isIgnored()
Whether this task has been ignored.- Returns:
- true if the admin task has been ignored.
-
setIgnored
public void setIgnored(boolean value)
Set whether this task should be ignored.- Parameters:
value
- set to true if this task should be ignored, or false to reinstate the task.
-
getHasValue
public boolean getHasValue()
Whether the criteria has a value to display, such as "Current Status: Incomplete" or "Current Value: http://...".- Returns:
- true if there is a value.
-
getIsCompleted
public boolean getIsCompleted()
Whether this task has been completed.- Returns:
- true if the task is considered complete.
-
getCompletedAt
public Date getCompletedAt()
- Returns:
- The time at which the task was completed.
-
getCompletedByFullName
public String getCompletedByFullName()
- Returns:
- The full name of the user who completed the task.
-
getCompletedByUsername
public String getCompletedByUsername()
- Returns:
- The username of the user who completed the task.
-
getHasSuccessCriteria
public boolean getHasSuccessCriteria()
Check to see if this task has automatic success criteria or not, as defined by anAdminConfigurationCriteria
.- Returns:
- true if this task has automatic success critiera.
-
getConfiguredValue
public String getConfiguredValue()
- Returns:
- The value of the configuration option this admin task pertains to.
If the task is complete, this will return the value at the time it was completed.
This will always return the currently configured value in Confluence if both
getHasSuccessCriteria()
andAdminConfigurationCriteria.hasLiveValue()
return true.
-
getIsCriteriaMet
public boolean getIsCriteriaMet()
Whether this task's success criteria have been met or not.- Returns:
- true if the criteria are met for success.
-
-