com.atlassian.jira.issue.fields.FieldManager |
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).
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CUSTOM_FIELD_PREFIX |
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.
| |||||||||||
This method is deprecated.
Declare your dependency and let PicoContainer resolve it instead
| |||||||||||
Get a CustomField by its text key (eg 'customfield_10000').
| |||||||||||
Get a field by its id.
| |||||||||||
This method is deprecated.
Declare your dependency and let PicoContainer resolve it instead
| |||||||||||
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.
| |||||||||||
Checks whether the given field is hidden in all of the given Field Layouts.
| |||||||||||
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 permission). | |||||||||||
Invalidates all field-related caches in JIRA.
|
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 User |
---|---|
issue | Issue |
FieldException | if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects |
---|
Gets all the available fields that the user can see, this is providing no context scope.
user | the remote user. |
---|
FieldException | thrown if there is a problem looking up the fields |
---|
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 | thrown if there is a problem looking up the fields |
---|
This method is deprecated.
Declare your dependency and let PicoContainer resolve it instead
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") |
---|
This method is deprecated.
Declare your dependency and let PicoContainer resolve it instead
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(User, 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. |
---|
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.crowd.embedded.api.User)
to provide a more performant way of looking up isFieldHidden(com.atlassian.crowd.embedded.api.User, 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 |
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
permission).
remoteUser | the remote user. |
---|---|
fieldId | The Field ID |
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.
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.