public class DefaultManagedConfigurationItemService extends Object implements ManagedConfigurationItemService
ManagedConfigurationItemService
.SOURCE_PREFIX_PLUGIN
Constructor and Description |
---|
DefaultManagedConfigurationItemService(ManagedConfigurationItemStore managedConfigurationItemStore,
PermissionManager permissionManager,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
public DefaultManagedConfigurationItemService(ManagedConfigurationItemStore managedConfigurationItemStore, PermissionManager permissionManager, com.atlassian.plugin.PluginAccessor pluginAccessor)
@Nonnull public ServiceOutcome<ManagedConfigurationItem> updateManagedConfigurationItem(@Nonnull ManagedConfigurationItem item)
ManagedConfigurationItemService
ManagedConfigurationItem
. If the item was not previously managed, it
will now be managed.updateManagedConfigurationItem
in interface ManagedConfigurationItemService
item
- the item to manage@Nonnull public ServiceOutcome<Void> removeManagedConfigurationItem(@Nonnull ManagedConfigurationItem item)
ManagedConfigurationItemService
ManagedConfigurationItem
. If the item was not previously managed, an
error will be returned.removeManagedConfigurationItem
in interface ManagedConfigurationItemService
item
- the item to stop managing@Nonnull public Collection<ManagedConfigurationItem> getManagedConfigurationItems(@Nonnull ManagedConfigurationItemType type)
ManagedConfigurationItemService
ManagedConfigurationItem
s of the specified type which are currently "available"
(meaning their owner is currently available).getManagedConfigurationItems
in interface ManagedConfigurationItemService
type
- the type to retrieve@Nonnull public ManagedConfigurationItem getManagedCustomField(@Nonnull CustomField customField)
ManagedConfigurationItemService
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.
getManagedCustomField
in interface ManagedConfigurationItemService
customField
- the custom field@Nonnull public ManagedConfigurationItem getManagedWorkflow(@Nonnull JiraWorkflow workflow)
ManagedConfigurationItemService
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.
getManagedWorkflow
in interface ManagedConfigurationItemService
workflow
- the workflow@Nonnull public ManagedConfigurationItem getManagedWorkflowScheme(@Nonnull WorkflowScheme workflowScheme)
ManagedConfigurationItemService
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.
getManagedWorkflowScheme
in interface ManagedConfigurationItemService
workflowScheme
- the workflow schemeManagedConfigurationItemService.getManagedWorkflowScheme(Long)
@Nonnull public ManagedConfigurationItem getManagedWorkflowScheme(@Nonnull Long schemeId)
ManagedConfigurationItemService
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.
getManagedWorkflowScheme
in interface ManagedConfigurationItemService
schemeId
- the workflow scheme IDManagedConfigurationItemService.getManagedWorkflowScheme(WorkflowScheme)
public boolean doesUserHavePermission(ApplicationUser user, @Nonnull ManagedConfigurationItem item)
ManagedConfigurationItemService
ApplicationUser
would have permission to edit the ManagedConfigurationItem
.doesUserHavePermission
in interface ManagedConfigurationItemService
user
- the useritem
- the itempublic boolean doesUserHavePermission(ApplicationUser user, @Nonnull ConfigurationItemAccessLevel configurationItemAccessLevel)
ManagedConfigurationItemService
ApplicationUser
would have permission to edit an ManagedConfigurationItem
with the
specified level.doesUserHavePermission
in interface ManagedConfigurationItemService
user
- the userconfigurationItemAccessLevel
- the levelCopyright © 2002-2017 Atlassian. All Rights Reserved.