@PublicApi
public interface CustomFieldService
CustomFieldManager.| Modifier and Type | Method and Description |
|---|---|
ServiceOutcome<List<Long>> |
addToScreenTabs(com.atlassian.crowd.embedded.api.User user,
Long customFieldId,
List<Long> tabIds)
Adds a custom field with the given id to selected tabs.
|
ServiceOutcome<CustomField> |
create(CreateValidationResult createValidationResult)
Creates a custom field using a
CreateValidationResult as parameter. |
ServiceOutcome<CustomField> |
getCustomFieldForEditConfig(ApplicationUser user,
String fieldId)
Return the custom field if the passed user has permission to edit its configuration.
|
Iterable<CustomFieldType<?,?>> |
getCustomFieldTypesForUser(ApplicationUser user)
Return the
CustomFieldTypes that the passed user can use to create a new CustomField. |
CustomFieldSearcher |
getDefaultSearcher(CustomFieldType<?,?> type)
Return the default
CustomFieldSearcher for the passed CustomFieldType. |
ServiceOutcome<List<Long>> |
removeFromScreenTabs(com.atlassian.crowd.embedded.api.User user,
Long customFieldId,
List<Long> tabIds)
Removes a custom field with the given id from selected tabs.
|
void |
updateTranslation(JiraServiceContext jiraServiceContext,
Long customFieldId,
String name,
String description,
String locale)
Sets the current a translation for a custom field.
|
ServiceOutcome<CreateValidationResult> |
validateCreate(com.atlassian.crowd.embedded.api.User user,
CustomFieldDefinition customFieldDefinition)
Validates that the custom field with the provided data can be created.
|
void |
validateDelete(JiraServiceContext jiraServiceContext,
Long customFieldId)
Validates that the custom field with the provided id can be deleted.
|
void |
validateTranslation(JiraServiceContext jiraServiceContext,
Long customFieldId,
String name,
String description,
String locale)
Validates that the parameters to set a translation for a custom field are valid
|
void |
validateUpdate(JiraServiceContext jiraServiceContext,
Long customFieldId,
String name,
String description,
String searcherKey)
Validates that the custom field with the provided id can be updated.
|
ServiceOutcome<CustomField> getCustomFieldForEditConfig(@Nullable ApplicationUser user, String fieldId)
user - the user to check.fieldId - the field to search for.@Nonnull Iterable<CustomFieldType<?,?>> getCustomFieldTypesForUser(@Nullable ApplicationUser user)
CustomFieldTypes that the passed user can use to create a new CustomField.
A CustomFieldType can be hidden if the passed user either does not have permission to see it or when
the type is locked and not meant to be created by users.user - the user to check against.CustomFieldTypes that the passed user can use to create a CustomField.@Nullable CustomFieldSearcher getDefaultSearcher(@Nonnull CustomFieldType<?,?> type)
CustomFieldSearcher for the passed CustomFieldType. The default searcher can
be null if there is no searcher associated with the type.type - the CustomFieldType to query.CustomFieldType. Can be null if the type has no associated
searcher.void validateDelete(JiraServiceContext jiraServiceContext, Long customFieldId)
jiraServiceContext - containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the methodcustomFieldId - the custom field id of the custom field about to be deleted.void validateUpdate(JiraServiceContext jiraServiceContext, Long customFieldId, String name, String description, String searcherKey)
jiraServiceContext - containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the methodcustomFieldId - the custom field id of the customfield about to be updatedname - the updated name of the customfielddescription - the description of the customfieldsearcherKey - the customfield searcher that should be usedServiceOutcome<CreateValidationResult> validateCreate(com.atlassian.crowd.embedded.api.User user, CustomFieldDefinition customFieldDefinition)
CustomFieldDefinition. The result of this operation is
CreateValidationResult which after validation will contain all necessery data to create
a custom field (including user)user - - the user who is performing the validationcustomFieldDefinition - - custom field dataServiceOutcome<CustomField> create(CreateValidationResult createValidationResult) throws DataAccessException
CreateValidationResult as parameter.
CreateValidationResult is an output of createValidation method which should be executed before executing create.createValidationResult - - data needed to create custom field, containing user.DataAccessException - throwed when there is a problem with creating custom field in databaseServiceOutcome<List<Long>> addToScreenTabs(com.atlassian.crowd.embedded.api.User user, Long customFieldId, List<Long> tabIds)
user - user who performs the changecustomFieldId - id of custom fieldtabIds - list of tab's id's to which we want to add custom fieldServiceOutcome<List<Long>> removeFromScreenTabs(com.atlassian.crowd.embedded.api.User user, Long customFieldId, List<Long> tabIds)
user - user who performs the changecustomFieldId - id of custom fieldtabIds - list of tab's ids from which we want to remove custom fieldvoid validateTranslation(JiraServiceContext jiraServiceContext, Long customFieldId, String name, String description, String locale)
jiraServiceContext - containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the methodcustomFieldId - the custom field id of the customfield about to be updatedname - the updated name of the customfielddescription - the description of the customfieldlocale - the locale of the translationvoid updateTranslation(JiraServiceContext jiraServiceContext, Long customFieldId, String name, String description, String locale)
jiraServiceContext - containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the methodcustomFieldId - the custom field id of the customfield about to be updatedname - the updated name of the customfielddescription - the description of the customfieldlocale - the locale of the translationCopyright © 2002-2015 Atlassian. All Rights Reserved.