public class DefaultManagedConfigurationItemService extends Object implements ManagedConfigurationItemService
ManagedConfigurationItemService
.SOURCE_PREFIX_PLUGIN
Constructor and Description |
---|
DefaultManagedConfigurationItemService(ManagedConfigurationItemStore managedConfigurationItemStore,
PermissionManager permissionManager,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
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
ManagedConfigurationItem s 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 . |
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(com.atlassian.crowd.embedded.api.User user, @Nonnull ManagedConfigurationItem item)
ManagedConfigurationItemService
User
would have permission to edit the ManagedConfigurationItem
.doesUserHavePermission
in interface ManagedConfigurationItemService
user
- the useritem
- the itempublic boolean doesUserHavePermission(com.atlassian.crowd.embedded.api.User user, @Nonnull ConfigurationItemAccessLevel configurationItemAccessLevel)
ManagedConfigurationItemService
User
would have permission to edit an ManagedConfigurationItem
with the
specified level.doesUserHavePermission
in interface ManagedConfigurationItemService
user
- the userconfigurationItemAccessLevel
- the levelCopyright © 2002-2015 Atlassian. All Rights Reserved.