|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface FieldManager
Field Summary | |
---|---|
static String |
CUSTOM_FIELD_PREFIX
|
Method Summary | |
---|---|
Set<NavigableField> |
getAllAvailableNavigableFields()
|
Set<SearchableField> |
getAllSearchableFields()
Return all the searchable fields in the system. |
Set<CustomField> |
getAvailableCustomFields(com.atlassian.crowd.embedded.api.User remoteUser,
Issue issue)
Retrieves custom fields in scope for the given issue |
Set<NavigableField> |
getAvailableNavigableFields(com.atlassian.crowd.embedded.api.User remoteUser)
|
Set<NavigableField> |
getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user)
Gets all the available fields that the user can see, this is providing no context scope. |
Set<NavigableField> |
getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user,
QueryContext queryContext)
Gets all the available fields within the defined scope of the QueryContext. |
ColumnLayoutManager |
getColumnLayoutManager()
Deprecated. Declare your dependency and let PicoContainer resolve it instead |
ConfigurableField |
getConfigurableField(String id)
|
CustomField |
getCustomField(String id)
Get a CustomField by its text key (eg 'customfield_10000'). |
Field |
getField(String id)
Get a field by its id. |
FieldLayoutManager |
getFieldLayoutManager()
Deprecated. Declare your dependency and let PicoContainer resolve it instead |
HideableField |
getHideableField(String id)
|
IssueTypeField |
getIssueTypeField()
Retrieve the IssueType system Field. |
NavigableField |
getNavigableField(String id)
|
Set<NavigableField> |
getNavigableFields()
|
OrderableField |
getOrderableField(String id)
|
Set<OrderableField> |
getOrderableFields()
|
ProjectField |
getProjectField()
Retrieve the Project system Field. |
RequirableField |
getRequiredField(String id)
|
Set<SearchableField> |
getSystemSearchableFields()
Return all the searchable systems fields. |
Set<Field> |
getUnavailableFields()
|
Set<FieldLayout> |
getVisibleFieldLayouts(com.atlassian.crowd.embedded.api.User user)
Returns all the visible FieldLayouts for the given user. |
boolean |
isCustomField(Field field)
|
boolean |
isCustomField(String id)
|
boolean |
isFieldHidden(Set<FieldLayout> fieldLayouts,
Field field)
Checks whether the given field is hidden in all of the given Field Layouts. |
boolean |
isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser,
Field field)
|
boolean |
isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser,
String fieldId)
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 Permissions.BROWSE permission). |
boolean |
isHideableField(Field field)
|
boolean |
isHideableField(String id)
|
boolean |
isMandatoryField(Field field)
|
boolean |
isMandatoryField(String id)
|
boolean |
isNavigableField(Field field)
|
boolean |
isNavigableField(String id)
|
boolean |
isOrderableField(Field field)
|
boolean |
isOrderableField(String id)
|
boolean |
isRenderableField(Field field)
|
boolean |
isRenderableField(String id)
|
boolean |
isRequirableField(Field field)
|
boolean |
isRequirableField(String id)
|
boolean |
isTimeTrackingOn()
|
boolean |
isUnscreenableField(Field field)
|
boolean |
isUnscreenableField(String id)
|
void |
refresh()
Invalidates all field-related caches in JIRA. |
Field Detail |
---|
static final String CUSTOM_FIELD_PREFIX
Method Detail |
---|
Field getField(String id)
id
- An IssueFieldConstants
constant, or custom field key (eg. "customfield_10010")
boolean isCustomField(String id)
boolean isCustomField(Field field)
CustomField getCustomField(String id)
id
- Eg. 'customfield_10000'
CustomField
or null if not found.boolean isHideableField(String id)
boolean isHideableField(Field field)
HideableField getHideableField(String id)
boolean isOrderableField(String id)
boolean isOrderableField(Field field)
OrderableField getOrderableField(String id)
ConfigurableField getConfigurableField(String id)
Set<OrderableField> getOrderableFields()
Set<NavigableField> getNavigableFields()
boolean isNavigableField(String id)
boolean isNavigableField(Field field)
NavigableField getNavigableField(String id)
boolean isRequirableField(String id)
boolean isRequirableField(Field field)
boolean isMandatoryField(String id)
boolean isMandatoryField(Field field)
boolean isRenderableField(String id)
boolean isRenderableField(Field field)
boolean isUnscreenableField(String id)
boolean isUnscreenableField(Field field)
RequirableField getRequiredField(String id)
@Deprecated FieldLayoutManager getFieldLayoutManager()
@Deprecated ColumnLayoutManager getColumnLayoutManager()
void refresh()
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.
Set<Field> getUnavailableFields()
boolean isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser, Field field)
boolean isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser, String fieldId)
FieldLayout
that the user can see
(assigned to projects for which the user has the Permissions.BROWSE
permission).
remoteUser
- the remote user.fieldId
- The Field IDboolean isFieldHidden(Set<FieldLayout> fieldLayouts, Field field)
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 checkfield
- The field to check
getVisibleFieldLayouts(com.atlassian.crowd.embedded.api.User)
,
isFieldHidden(com.atlassian.crowd.embedded.api.User, Field)
Set<FieldLayout> getVisibleFieldLayouts(com.atlassian.crowd.embedded.api.User 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.
Set<NavigableField> getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user) throws FieldException
user
- the remote user.
FieldException
- thrown if there is a problem looking up the fieldsSet<NavigableField> getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user, QueryContext queryContext) throws FieldException
user
- the user making the requestqueryContext
- the context of the search request.
FieldException
- thrown if there is a problem looking up the fieldsSet<CustomField> getAvailableCustomFields(com.atlassian.crowd.embedded.api.User remoteUser, Issue issue) throws FieldException
remoteUser
- Remote Userissue
- Issue
FieldException
- if cannot retrieve the projects the user can see, or if cannot retrieve
the field layouts for the viewable projectsSet<NavigableField> getAllAvailableNavigableFields() throws FieldException
FieldException
Set<NavigableField> getAvailableNavigableFields(com.atlassian.crowd.embedded.api.User remoteUser) throws FieldException
FieldException
Set<SearchableField> getAllSearchableFields()
Set<SearchableField> getSystemSearchableFields()
IssueTypeField getIssueTypeField()
ProjectField getProjectField()
boolean isTimeTrackingOn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |