com.atlassian.jira.bc.customfield.CustomFieldService |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Service front for the custom field manager. Implementations of this interface are responsible for
carrying out any validation and permission logic required to carry out a certain task. The actual
work required to do a certain task should be delegated to the CustomFieldManager
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a custom field with the given id to selected tabs.
| |||||||||||
Creates a custom field using a
CreateValidationResult as parameter. | |||||||||||
Return the custom field if the passed user has permission to edit its configuration.
| |||||||||||
Return the
CustomFieldType s that the passed user can use to create a new CustomField . | |||||||||||
Return the default
CustomFieldSearcher for the passed CustomFieldType . | |||||||||||
Removes a custom field with the given id from selected tabs.
| |||||||||||
Sets the current a translation for a custom field.
| |||||||||||
Validates that the custom field with the provided data can be created.
| |||||||||||
Validates that the custom field with the provided id can be deleted.
| |||||||||||
Validates that the parameters to set a translation for a custom field are valid
| |||||||||||
Validates that the custom field with the provided id can be updated.
|
Adds a custom field with the given id to selected tabs. It returns list of ids of tabs on which custom field is present after performing "add" operation.
user | user who performs the change |
---|---|
customFieldId | id of custom field |
tabIds | list of tab's id's to which we want to add custom field |
Creates a custom field using a 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 database |
---|
Return the custom field if the passed user has permission to edit its configuration.
user | the user to check. |
---|---|
fieldId | the field to search for. |
Return the CustomFieldType
s 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. |
---|
CustomFieldType
s that the passed user can use to create a CustomField
.
Return the default 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.
Removes a custom field with the given id from selected tabs. It returns list of ids of tabs on which custom field is present after performing "remove" operation.
user | user who performs the change |
---|---|
customFieldId | id of custom field |
tabIds | list of tab's ids from which we want to remove custom field |
Sets the current a translation for a custom field. The name and description can be empty and if so the translation will be cleared.
jiraServiceContext | containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the method |
---|---|
customFieldId | the custom field id of the customfield about to be updated |
name | the updated name of the customfield |
description | the description of the customfield |
locale | the locale of the translation |
Validates that the custom field with the provided data can be created. Data placeholder is the
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 validation |
---|---|
customFieldDefinition | - custom field data |
Validates that the custom field with the provided id can be deleted. This means we check whether or not the custom field is used in any permission or issue level security schemes. This method will also check that the custom field with the given id exists. The user performing this operation needs to have global admin permission.
jiraServiceContext | containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the method |
---|---|
customFieldId | the custom field id of the custom field about to be deleted. |
Validates that the parameters to set a translation for a custom field are valid
jiraServiceContext | containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the method |
---|---|
customFieldId | the custom field id of the customfield about to be updated |
name | the updated name of the customfield |
description | the description of the customfield |
locale | the locale of the translation |
Validates that the custom field with the provided id can be updated. This means we check whether or not the custom field is used in any permission or issue level security schemes if the custom field's searcher is being set to null. This method will also check that the custom field with the given id exists and that all its attributes are valid. The user performing this operation needs to have global admin permission.
jiraServiceContext | containing the User who is performing the change and
the ErrorCollection that will contain any errors
in calling the method |
---|---|
customFieldId | the custom field id of the customfield about to be updated |
name | the updated name of the customfield |
description | the description of the customfield |
searcherKey | the customfield searcher that should be used |