@PublicApi
public interface ManagedConfigurationItemService
There are a few different states a ManagedConfigurationItem
can be in. These are determined by the properties
ManagedConfigurationItem.isManaged()
and ManagedConfigurationItem.getConfigurationItemAccessLevel()
:
isManaged() == true
- this item is being managed by JIRA or a plugingetConfigurationItemAccessLevel()
- if an item is managed, this property determines who can edit the
item. See ConfigurationItemAccessLevel
for more information.
For a list of which JIRA configuration items can be managed, see ManagedConfigurationItemType
.
Each configuration item can only have one ManagedConfigurationItem
describing it.
ManagedConfigurationItem
,
ManagedConfigurationItemBuilder
,
ManagedConfigurationItemType
,
ConfigurationItemAccessLevel
Modifier and Type | Field and Description |
---|---|
static String |
SOURCE_PREFIX_PLUGIN
Denotes the prefix used in the
ManagedConfigurationItem.getSourceId()
field when items are managed by a plugin. |
static final String SOURCE_PREFIX_PLUGIN
ManagedConfigurationItem.getSourceId()
field when items are managed by a plugin.@Nonnull ManagedConfigurationItem getManagedCustomField(@Nonnull CustomField customField)
CustomField
, attempt to retrieve the ManagedConfigurationItem
that describes it. If it
does not exist, a default implementation will be returned.
If the manager of this item is no longer available (e.g. if a plugin manages a JIRA custom field and the plugin is disabled) then the item can not be considered managed.
customField
- the custom field@Nonnull ManagedConfigurationItem getManagedWorkflow(@Nonnull JiraWorkflow workflow)
JiraWorkflow
, attempt to retrieve the ManagedConfigurationItem
that describes it. If it
does not exist, a default implementation will be returned.
If the manager of this item is no longer available (e.g. if a plugin manages a workflow and the plugin is disabled) then the item can not be considered managed.
workflow
- the workflow@Nonnull ManagedConfigurationItem getManagedWorkflowScheme(@Nonnull WorkflowScheme workflowScheme)
WorkflowScheme
, attempt to retrieve the ManagedConfigurationItem
that describes it. If it
does not exist, a default implementation will be returned.
If the manager of this item is no longer available (e.g. if a plugin manages a workflow scheme and the plugin is disabled) then the item can not be considered managed.
workflowScheme
- the workflow schemegetManagedWorkflowScheme(Long)
@Nonnull ManagedConfigurationItem getManagedWorkflowScheme(@Nonnull Long schemeId)
ManagedConfigurationItem
that describes it. If it
does not exist, a default implementation will be returned.
If the manager of this item is no longer available (e.g. if a plugin manages a workflow scheme and the plugin is disabled) then the item can not be considered managed.
schemeId
- the workflow scheme IDgetManagedWorkflowScheme(WorkflowScheme)
@Nonnull ServiceOutcome<ManagedConfigurationItem> updateManagedConfigurationItem(@Nonnull ManagedConfigurationItem item)
ManagedConfigurationItem
. If the item was not previously managed, it
will now be managed.item
- the item to manage@Nonnull ServiceOutcome<Void> removeManagedConfigurationItem(@Nonnull ManagedConfigurationItem item)
ManagedConfigurationItem
. If the item was not previously managed, an
error will be returned.item
- the item to stop managing@Nonnull Collection<ManagedConfigurationItem> getManagedConfigurationItems(@Nonnull ManagedConfigurationItemType type)
ManagedConfigurationItem
s of the specified type which are currently "available"
(meaning their owner is currently available).type
- the type to retrieveboolean doesUserHavePermission(ApplicationUser user, @Nonnull ManagedConfigurationItem item)
ApplicationUser
would have permission to edit the ManagedConfigurationItem
.user
- the useritem
- the itemboolean doesUserHavePermission(ApplicationUser user, @Nonnull ConfigurationItemAccessLevel configurationItemAccessLevel)
ApplicationUser
would have permission to edit an ManagedConfigurationItem
with the
specified level.user
- the userconfigurationItemAccessLevel
- the levelCopyright © 2002-2016 Atlassian. All Rights Reserved.