com.atlassian.jira.issue.fields
Class DefaultFieldManager

java.lang.Object
  extended bycom.atlassian.jira.issue.fields.DefaultFieldManager
All Implemented Interfaces:
FieldManager

public class DefaultFieldManager
extends java.lang.Object
implements FieldManager


Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.fields.FieldManager
CUSTOM_FIELD_PREFIX
 
Constructor Summary
DefaultFieldManager()
           
 
Method Summary
 java.util.Set getAllAvailableNavigableFields()
          Returns a set of Fields that are NOT hidden in AT LEAST ONE project in the system.
 java.util.Set getAvailableCustomFields(User remoteUser, GenericValue issue)
           
 java.util.Set getAvailableCustomFieldsWithScope(User remoteUser, GenericValue project, java.util.List issueTypes)
          Returns a set of CustomFields that are in scope
 java.util.Set getAvailableNavigableFields(User remoteUser)
          Returns a set of Fields that are NOT hidden in AT LEAST ONE project that the remote user can see (has com.atlassian.jira.security.Permissions.BROWSE permission for).
 java.util.Set getAvailableNavigableFieldsWithScope(User remoteUser, GenericValue project, java.util.List issueTypes)
          Returns a set of Fields that are NOT hidden in AT LEAST ONE project that the remote user can see (has com.atlassian.jira.security.Permissions.BROWSE permission for).
 ColumnLayoutManager getColumnLayoutManager()
           
 CompositeComponentField getCompositeComponentField(java.lang.String id)
           
 CustomField getCustomField(java.lang.String id)
           
 java.lang.Long getCustomFieldId(java.lang.String id)
           
 CustomFieldManager getCustomFieldManager()
           
 Field getField(java.lang.String id)
           
 FieldLayoutManager getFieldLayoutManager()
           
 HideableField getHideableField(java.lang.String id)
           
 NavigableField getNavigableField(java.lang.String id)
           
 OrderableField getOrderableField(java.lang.String id)
           
 java.util.Set getOrderableFields()
           
 RequirableField getRequiredField(java.lang.String id)
           
 java.util.Set getUnavailableFields()
           
 boolean isCustomField(Field field)
           
 boolean isCustomField(java.lang.String id)
           
protected  boolean isEnterpriseEdition()
           
 boolean isFieldHidden(User remoteUser, Field field)
          Determines whether the field 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 isFieldHidden(User remoteUser, java.lang.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(java.lang.String id)
           
 boolean isNavigableField(Field field)
           
 boolean isNavigableField(java.lang.String id)
           
 boolean isOrderableField(Field field)
           
 boolean isOrderableField(java.lang.String id)
           
 boolean isRequirableField(Field field)
           
 boolean isRequirableField(java.lang.String id)
           
protected  boolean isTimeTrackingOn()
           
 void refresh()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFieldManager

public DefaultFieldManager()
Method Detail

getField

public Field getField(java.lang.String id)
Specified by:
getField in interface FieldManager

getAllAvailableNavigableFields

public java.util.Set getAllAvailableNavigableFields()
                                             throws FieldException
Returns a set of Fields that are NOT hidden in AT LEAST ONE project in the system.

Specified by:
getAllAvailableNavigableFields in interface FieldManager
Returns:
Throws:
FieldException - if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects

getAvailableNavigableFields

public java.util.Set getAvailableNavigableFields(User remoteUser)
                                          throws FieldException
Returns a set of Fields that are NOT hidden in AT LEAST ONE project that the remote user can see (has com.atlassian.jira.security.Permissions.BROWSE permission for).

Specified by:
getAvailableNavigableFields in interface FieldManager
Parameters:
remoteUser -
Returns:
Throws:
FieldException - if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects

getAvailableNavigableFieldsWithScope

public java.util.Set getAvailableNavigableFieldsWithScope(User remoteUser,
                                                          GenericValue project,
                                                          java.util.List issueTypes)
                                                   throws FieldException
Returns a set of Fields that are NOT hidden in AT LEAST ONE project that the remote user can see (has com.atlassian.jira.security.Permissions.BROWSE permission for).

Specified by:
getAvailableNavigableFieldsWithScope in interface FieldManager
Parameters:
remoteUser -
Returns:
Throws:
FieldException - if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects

getAvailableCustomFields

public java.util.Set getAvailableCustomFields(User remoteUser,
                                              GenericValue issue)
                                       throws FieldException
Specified by:
getAvailableCustomFields in interface FieldManager
Throws:
FieldException

getAvailableCustomFieldsWithScope

public java.util.Set getAvailableCustomFieldsWithScope(User remoteUser,
                                                       GenericValue project,
                                                       java.util.List issueTypes)
                                                throws FieldException
Returns a set of CustomFields that are in scope

Specified by:
getAvailableCustomFieldsWithScope in interface FieldManager
Parameters:
remoteUser -
Returns:
Throws:
FieldException - if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts for the viewable projects

isFieldHidden

public boolean isFieldHidden(User remoteUser,
                             java.lang.String fieldId)
                      throws FieldLayoutStorageException
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 FieldManager
Parameters:
remoteUser -
fieldId -
Returns:
Throws:
FieldLayoutStorageException

isFieldHidden

public boolean isFieldHidden(User remoteUser,
                             Field field)
                      throws FieldLayoutStorageException
Determines whether the field 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 FieldManager
Parameters:
remoteUser -
field -
Returns:
Throws:
FieldLayoutStorageException

getCustomFieldId

public java.lang.Long getCustomFieldId(java.lang.String id)
                                throws java.lang.NumberFormatException
Specified by:
getCustomFieldId in interface FieldManager
Throws:
java.lang.NumberFormatException

isCustomField

public boolean isCustomField(java.lang.String id)
Specified by:
isCustomField in interface FieldManager

isCustomField

public boolean isCustomField(Field field)
Specified by:
isCustomField in interface FieldManager

getCustomField

public CustomField getCustomField(java.lang.String id)
Specified by:
getCustomField in interface FieldManager

isHideableField

public boolean isHideableField(java.lang.String id)
Specified by:
isHideableField in interface FieldManager

isHideableField

public boolean isHideableField(Field field)
Specified by:
isHideableField in interface FieldManager

getHideableField

public HideableField getHideableField(java.lang.String id)
Specified by:
getHideableField in interface FieldManager

isOrderableField

public boolean isOrderableField(java.lang.String id)
Specified by:
isOrderableField in interface FieldManager

isOrderableField

public boolean isOrderableField(Field field)
Specified by:
isOrderableField in interface FieldManager

getOrderableField

public OrderableField getOrderableField(java.lang.String id)
Specified by:
getOrderableField in interface FieldManager

getOrderableFields

public java.util.Set getOrderableFields()
Specified by:
getOrderableFields in interface FieldManager

isNavigableField

public boolean isNavigableField(java.lang.String id)
Specified by:
isNavigableField in interface FieldManager

isNavigableField

public boolean isNavigableField(Field field)
Specified by:
isNavigableField in interface FieldManager

getCompositeComponentField

public CompositeComponentField getCompositeComponentField(java.lang.String id)

getNavigableField

public NavigableField getNavigableField(java.lang.String id)
Specified by:
getNavigableField in interface FieldManager

isRequirableField

public boolean isRequirableField(java.lang.String id)
Specified by:
isRequirableField in interface FieldManager

isRequirableField

public boolean isRequirableField(Field field)
Specified by:
isRequirableField in interface FieldManager

getRequiredField

public RequirableField getRequiredField(java.lang.String id)
Specified by:
getRequiredField in interface FieldManager

getCustomFieldManager

public CustomFieldManager getCustomFieldManager()
Specified by:
getCustomFieldManager in interface FieldManager

getFieldLayoutManager

public FieldLayoutManager getFieldLayoutManager()
Specified by:
getFieldLayoutManager in interface FieldManager

getColumnLayoutManager

public ColumnLayoutManager getColumnLayoutManager()
Specified by:
getColumnLayoutManager in interface FieldManager

refresh

public void refresh()
Specified by:
refresh in interface FieldManager

isTimeTrackingOn

protected boolean isTimeTrackingOn()

isEnterpriseEdition

protected boolean isEnterpriseEdition()

getUnavailableFields

public java.util.Set getUnavailableFields()
Specified by:
getUnavailableFields in interface FieldManager