com.atlassian.jira.issue.fields
Interface FieldManager

All Superinterfaces:
FieldAccessor
All Known Implementing Classes:
DefaultFieldManager

@PublicApi
public interface FieldManager
extends FieldAccessor


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()
           
 boolean isCustomField(Field field)
           
 boolean isCustomField(String id)
           
 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()
           
 

Field Detail

CUSTOM_FIELD_PREFIX

static final String CUSTOM_FIELD_PREFIX
See Also:
Constant Field Values
Method Detail

getField

Field getField(String id)
Get a field by its id.

Specified by:
getField in interface FieldAccessor
Parameters:
id - An IssueFieldConstants constant, or custom field key (eg. "customfield_10010")
Returns:
the Field

isCustomField

boolean isCustomField(String id)
Specified by:
isCustomField in interface FieldAccessor

isCustomField

boolean isCustomField(Field field)
Specified by:
isCustomField in interface FieldAccessor

getCustomField

CustomField getCustomField(String id)
Get a CustomField by its text key (eg 'customfield_10000').

Specified by:
getCustomField in interface FieldAccessor
Parameters:
id - Eg. 'customfield_10000'
Returns:
The CustomField or null if not found.

isHideableField

boolean isHideableField(String id)
Specified by:
isHideableField in interface FieldAccessor

isHideableField

boolean isHideableField(Field field)
Specified by:
isHideableField in interface FieldAccessor

getHideableField

HideableField getHideableField(String id)
Specified by:
getHideableField in interface FieldAccessor

isOrderableField

boolean isOrderableField(String id)
Specified by:
isOrderableField in interface FieldAccessor

isOrderableField

boolean isOrderableField(Field field)
Specified by:
isOrderableField in interface FieldAccessor

getOrderableField

OrderableField getOrderableField(String id)
Specified by:
getOrderableField in interface FieldAccessor

getConfigurableField

ConfigurableField getConfigurableField(String id)
Specified by:
getConfigurableField in interface FieldAccessor

getOrderableFields

Set<OrderableField> getOrderableFields()
Specified by:
getOrderableFields in interface FieldAccessor

getNavigableFields

Set<NavigableField> getNavigableFields()
Specified by:
getNavigableFields in interface FieldAccessor

isNavigableField

boolean isNavigableField(String id)
Specified by:
isNavigableField in interface FieldAccessor

isNavigableField

boolean isNavigableField(Field field)
Specified by:
isNavigableField in interface FieldAccessor

getNavigableField

NavigableField getNavigableField(String id)
Specified by:
getNavigableField in interface FieldAccessor

isRequirableField

boolean isRequirableField(String id)
Specified by:
isRequirableField in interface FieldAccessor

isRequirableField

boolean isRequirableField(Field field)
Specified by:
isRequirableField in interface FieldAccessor

isMandatoryField

boolean isMandatoryField(String id)
Specified by:
isMandatoryField in interface FieldAccessor

isMandatoryField

boolean isMandatoryField(Field field)
Specified by:
isMandatoryField in interface FieldAccessor

isRenderableField

boolean isRenderableField(String id)
Specified by:
isRenderableField in interface FieldAccessor

isRenderableField

boolean isRenderableField(Field field)
Specified by:
isRenderableField in interface FieldAccessor

isUnscreenableField

boolean isUnscreenableField(String id)
Specified by:
isUnscreenableField in interface FieldAccessor

isUnscreenableField

boolean isUnscreenableField(Field field)
Specified by:
isUnscreenableField in interface FieldAccessor

getRequiredField

RequirableField getRequiredField(String id)
Specified by:
getRequiredField in interface FieldAccessor

getFieldLayoutManager

@Deprecated
FieldLayoutManager getFieldLayoutManager()
Deprecated. Declare your dependency and let PicoContainer resolve it instead

Returns:
FieldLayoutManager

getColumnLayoutManager

@Deprecated
ColumnLayoutManager getColumnLayoutManager()
Deprecated. Declare your dependency and let PicoContainer resolve it instead

Returns:
ColumnLayoutManager

refresh

void refresh()

getUnavailableFields

Set<Field> getUnavailableFields()
Specified by:
getUnavailableFields in interface FieldAccessor

isFieldHidden

boolean isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser,
                      Field field)
Specified by:
isFieldHidden in interface FieldAccessor

isFieldHidden

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).

Specified by:
isFieldHidden in interface FieldAccessor
Parameters:
remoteUser - the remote user.
fieldId - The Field ID
Returns:
true if this field is hidden from the given user

getAvailableNavigableFieldsWithScope

Set<NavigableField> getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user)
                                                         throws FieldException
Gets all the available fields that the user can see, this is providing no context scope.

Specified by:
getAvailableNavigableFieldsWithScope in interface FieldAccessor
Parameters:
user - the remote user.
Returns:
a set of NavigableFields that can be show because their visibility/configuration fall within what the user can see.
Throws:
FieldException - thrown if there is a problem looking up the fields

getAvailableNavigableFieldsWithScope

Set<NavigableField> getAvailableNavigableFieldsWithScope(com.atlassian.crowd.embedded.api.User user,
                                                         QueryContext queryContext)
                                                         throws FieldException
Gets all the available fields within the defined scope of the QueryContext.

Specified by:
getAvailableNavigableFieldsWithScope in interface FieldAccessor
Parameters:
user - the user making the request
queryContext - the context of the search request.
Returns:
a set of NavigableFields that can be show because their visibility/configuration fall within the specified context
Throws:
FieldException - thrown if there is a problem looking up the fields

getAvailableCustomFields

Set<CustomField> getAvailableCustomFields(com.atlassian.crowd.embedded.api.User remoteUser,
                                          Issue issue)
                                          throws FieldException
Retrieves custom fields in scope for the given issue

Specified by:
getAvailableCustomFields in interface FieldAccessor
Parameters:
remoteUser - Remote User
issue - Issue
Returns:
custom fields in scope for the given issue
Throws:
FieldException - if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects

getAllAvailableNavigableFields

Set<NavigableField> getAllAvailableNavigableFields()
                                                   throws FieldException
Specified by:
getAllAvailableNavigableFields in interface FieldAccessor
Throws:
FieldException

getAvailableNavigableFields

Set<NavigableField> getAvailableNavigableFields(com.atlassian.crowd.embedded.api.User remoteUser)
                                                throws FieldException
Specified by:
getAvailableNavigableFields in interface FieldAccessor
Throws:
FieldException

getAllSearchableFields

Set<SearchableField> getAllSearchableFields()
Return all the searchable fields in the system. This set will included all defined custom fields.

Specified by:
getAllSearchableFields in interface FieldAccessor
Returns:
the set of all searchable fields in the system.

getSystemSearchableFields

Set<SearchableField> getSystemSearchableFields()
Return all the searchable systems fields. This set will *NOT* include defined custom fields.

Specified by:
getSystemSearchableFields in interface FieldAccessor
Returns:
the set of all searchable systems fields defined.

getIssueTypeField

IssueTypeField getIssueTypeField()
Retrieve the IssueType system Field.

Specified by:
getIssueTypeField in interface FieldAccessor
Returns:
the IssueType system Field.

getProjectField

ProjectField getProjectField()
Retrieve the Project system Field.

Specified by:
getProjectField in interface FieldAccessor
Returns:
the Project system Field.

isTimeTrackingOn

boolean isTimeTrackingOn()
Specified by:
isTimeTrackingOn in interface FieldAccessor


Copyright © 2002-2012 Atlassian. All Rights Reserved.