@PublicApi
public interface ManagedConfigurationItemService
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.ManagedConfigurationItemType.
Each configuration item can only have one ManagedConfigurationItem describing it.| 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. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doesUserHavePermission(com.atlassian.crowd.embedded.api.User user,
ConfigurationItemAccessLevel configurationItemAccessLevel)
Determine if the specified
User would have permission to edit an ManagedConfigurationItem with the
specified level. |
boolean |
doesUserHavePermission(com.atlassian.crowd.embedded.api.User user,
ManagedConfigurationItem item)
Determine if the specified
User would have permission to edit the ManagedConfigurationItem. |
Collection<ManagedConfigurationItem> |
getManagedConfigurationItems(ManagedConfigurationItemType type)
Retrieves all of the
ManagedConfigurationItems of the specified type which are currently "available"
(meaning their owner is currently available). |
ManagedConfigurationItem |
getManagedCustomField(CustomField customField)
Given the
CustomField, attempt to retrieve the ManagedConfigurationItem that describes it. |
ManagedConfigurationItem |
getManagedWorkflow(JiraWorkflow workflow)
Given the
JiraWorkflow, attempt to retrieve the ManagedConfigurationItem that describes it. |
ManagedConfigurationItem |
getManagedWorkflowScheme(Long schemeId)
Given the workflow scheme ID, attempt to retrieve the
ManagedConfigurationItem that describes it. |
ManagedConfigurationItem |
getManagedWorkflowScheme(WorkflowScheme workflowScheme)
Given the
WorkflowScheme, attempt to retrieve the ManagedConfigurationItem that describes it. |
ServiceOutcome<Void> |
removeManagedConfigurationItem(ManagedConfigurationItem item)
Remove the registration of this
ManagedConfigurationItem. |
ServiceOutcome<ManagedConfigurationItem> |
updateManagedConfigurationItem(ManagedConfigurationItem item)
Update the registration of this
ManagedConfigurationItem. |
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)
ManagedConfigurationItems of the specified type which are currently "available"
(meaning their owner is currently available).type - the type to retrieveboolean doesUserHavePermission(com.atlassian.crowd.embedded.api.User user,
@Nonnull
ManagedConfigurationItem item)
User would have permission to edit the ManagedConfigurationItem.user - the useritem - the itemboolean doesUserHavePermission(com.atlassian.crowd.embedded.api.User user,
@Nonnull
ConfigurationItemAccessLevel configurationItemAccessLevel)
User would have permission to edit an ManagedConfigurationItem with the
specified level.user - the userconfigurationItemAccessLevel - the levelCopyright © 2002-2015 Atlassian. All Rights Reserved.