java.lang.Object | |
↳ | com.atlassian.jira.issue.fields.MockFieldManager |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.issue.fields.FieldManager
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return all the searchable fields in the system.
| |||||||||||
Retrieves custom fields in scope for the given issue
| |||||||||||
Gets all the available fields that the user can see, this is providing no context scope.
| |||||||||||
Gets all the available fields within the defined scope of the QueryContext.
| |||||||||||
Get a CustomField by its text key (eg 'customfield_10000').
| |||||||||||
Get a field by its id.
| |||||||||||
Retrieve the IssueType system Field.
| |||||||||||
Retrieve the Project system Field.
| |||||||||||
Return all the searchable systems fields.
| |||||||||||
Returns all the visible FieldLayouts for the given user.
| |||||||||||
Returns true if the given ID is a Custom Field that actually exists in JIRA.
| |||||||||||
Returns true if the given field ID is in the custom field format.
| |||||||||||
Returns true if the given ID is a Custom Field that actually exists in JIRA.
| |||||||||||
Determines whether the field with id of fieldId is NOT hidden in AT LEAST one
FieldLayout that the user can see
(assigned to projects for which the user has the BROWSE_PROJECTS permission). | |||||||||||
Checks whether the given field is hidden in all of the given Field Layouts.
| |||||||||||
Invalidates all field-related caches in JIRA.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.issue.fields.FieldManager
|
Return all the searchable fields in the system. This set will included all defined custom fields.
Retrieves custom fields in scope for the given issue
remoteUser | Remote com.atlassian.jira.user.ApplicationUser |
---|---|
issue | Issue |
FieldException |
---|
FieldException |
---|
Gets all the available fields that the user can see, this is providing no context scope.
user | the remote user. |
---|
FieldException |
---|
Gets all the available fields within the defined scope of the QueryContext.
user | the user making the request |
---|---|
queryContext | the context of the search request. |
FieldException |
---|
Get a CustomField by its text key (eg 'customfield_10000').
id | Eg. 'customfield_10000' |
---|
CustomField
or null if not found.
Get a field by its id.
id | An IssueFieldConstants constant, or custom field key (eg. "customfield_10010") |
---|
Retrieve the IssueType system Field.
Retrieve the Project system Field.
Return all the searchable systems fields. This set will *NOT* include defined custom fields.
Returns all the visible FieldLayouts for the given user.
This is used in conjunction with isFieldHidden(Set, Field)
as a performance optimisation in usages that want to call isFieldHidden(com.atlassian.jira.user.ApplicationUser, Field)
multiple times.
Instead, it is more efficient to do something like:
SetfieldLayouts = fieldManager.getVisibleFieldLayouts(loggedInUser); for (Field field: myFields) { if (fieldManager.isFieldHidden(fieldLayouts1, field)) { ... } }
user | the user whose project browsing permissions are used to limit visible FieldLayouts. |
---|
Returns true if the given ID is a Custom Field that actually exists in JIRA.
id | the field ID |
---|
Returns true if the given field ID is in the custom field format.
This method just checks that the ID looks like a Custom Field (it starts with "customfield_") but not that the custom field actually exists (it could have been deleted).
id | the field ID |
---|
Returns true if the given ID is a Custom Field that actually exists in JIRA.
Checking for existance comes with a performance price, so use where possible
.
id | the field ID |
---|
Determines whether the field with id of fieldId is NOT hidden in AT LEAST one FieldLayout
that the user can see
(assigned to projects for which the user has the BROWSE_PROJECTS
permission).
remoteUser | the remote user. |
---|---|
fieldId | The Field ID |
Checks whether the given field is hidden in all of the given Field Layouts.
This method can be used in conjunction with getVisibleFieldLayouts(com.atlassian.jira.user.ApplicationUser)
to provide a more performant way of looking up isFieldHidden(com.atlassian.jira.user.ApplicationUser, Field)
multiple times.
Instead, it is more efficient to do something like:
SetfieldLayouts = fieldManager.getVisibleFieldLayouts(loggedInUser); for (Field field: myFields) { if (fieldManager.isFieldHidden(fieldLayouts1, field)) { ... } }
fieldLayouts | The FieldLayouts to check |
---|---|
field | The field to check |
Invalidates all field-related caches in JIRA.
WARNING
This method invalidates a whole lot of JIRA caches, which means that JIRA performance significantly degrades
after this method has been called. For this reason, you should avoid calling this method at all costs.
The correct approach to invalidate the cache entries is to do it in the "store" inside the FooStore.updateFoo()
method, where you can invalidate a single cache entry. If the cache lives in another class then the store
should raise a FooUpdatedEvent
which that class can listen to in order to keep its caches up to date.
If you add any calls to this method in JIRA I will hunt you down and subject you to a Spanish inquisition.