com.atlassian.jira.issue.fields.layout.field
Class FieldLayoutImpl

java.lang.Object
  extended by com.atlassian.jira.issue.fields.screen.AbstractGVBean
      extended by com.atlassian.jira.issue.fields.layout.field.FieldLayoutImpl
All Implemented Interfaces:
FieldLayout
Direct Known Subclasses:
EditableDefaultFieldLayoutImpl

public class FieldLayoutImpl
extends AbstractGVBean
implements FieldLayout


Field Summary
protected  Map<String,FieldLayoutItem> fieldLayoutItemByFieldId
           
 
Constructor Summary
FieldLayoutImpl(org.ofbiz.core.entity.GenericValue genericValue, List<FieldLayoutItem> fieldLayoutItems)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDescription()
          The description of the field configuration.
 FieldLayoutItem getFieldLayoutItem(OrderableField orderableField)
          Returns the field layout item for a given orderable field, if this orderable field is part of this field configuration.
 FieldLayoutItem getFieldLayoutItem(String fieldId)
          Returns the field layout item for a given field if, if this field is part of this field configuration.
 List<FieldLayoutItem> getFieldLayoutItems()
          A list of field layout item of this field configuration.
protected  FieldManager getFieldManager()
           
protected  HackyFieldRendererRegistry getHackyFieldRendererRegistry()
           
 List<Field> getHiddenFields(Project project, List<String> issueTypeIds)
          Returns all hidden fields (system fields and custom fields) for a given project and issue type(s).
 List<Field> getHiddenFields(com.atlassian.crowd.embedded.api.User remoteUser, org.ofbiz.core.entity.GenericValue projectGV, List<String> issueTypeIds)
           
 List<Field> getHiddenFields(com.atlassian.crowd.embedded.api.User remoteUser, Project project, List<String> issueTypeIds)
           
 Long getId()
          The id of the field configuration.
protected  List<FieldLayoutItem> getInternalList()
           
 String getName()
          The name of the field configuration
 String getRendererTypeForField(String fieldId)
          Returns the render type for a given field in this field configuration.
 List<FieldLayoutItem> getRequiredFieldLayoutItems(Project project, List<String> issueTypes)
          Returns the list of required fields for an issue type in a project.
 String getType()
           
 List<FieldLayoutItem> getVisibleCustomFieldLayoutItems(Project project, List<String> issueTypes)
          Returns the list of Custom Fields in this Field Layout that are both visible and applicable to the given context (of project and Issue types).
 List<FieldLayoutItem> getVisibleLayoutItems(com.atlassian.crowd.embedded.api.User remoteUser, Project project, List<String> issueTypes)
          Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).
 int hashCode()
           
protected  void init()
           
 boolean isDefault()
          Returns true if this is the default FieldLayout.
 boolean isFieldHidden(String fieldId)
          Checks if a field is hidden in this field configuration.
protected  void setId(Long id)
           
protected  void setInternalDescription(String description)
           
protected  void setInternalName(String name)
           
 
Methods inherited from class com.atlassian.jira.issue.fields.screen.AbstractGVBean
getGenericValue, isModified, setGenericValue, setModified, updateGV, valuesEqual
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayout
getGenericValue
 

Field Detail

fieldLayoutItemByFieldId

protected Map<String,FieldLayoutItem> fieldLayoutItemByFieldId
Constructor Detail

FieldLayoutImpl

public FieldLayoutImpl(org.ofbiz.core.entity.GenericValue genericValue,
                       List<FieldLayoutItem> fieldLayoutItems)
Method Detail

init

protected void init()
Specified by:
init in class AbstractGVBean

getId

public Long getId()
Description copied from interface: FieldLayout
The id of the field configuration.

Specified by:
getId in interface FieldLayout
Returns:
the id

getName

public String getName()
Description copied from interface: FieldLayout
The name of the field configuration

Specified by:
getName in interface FieldLayout
Returns:
the name

getDescription

public String getDescription()
Description copied from interface: FieldLayout
The description of the field configuration.

Specified by:
getDescription in interface FieldLayout
Returns:
the description

getType

public String getType()

isDefault

public boolean isDefault()
Description copied from interface: FieldLayout
Returns true if this is the default FieldLayout. This means that the "type" field holds "value".

Specified by:
isDefault in interface FieldLayout
Returns:
true if this is the default FieldLayout.

setId

protected void setId(Long id)

setInternalName

protected void setInternalName(String name)

setInternalDescription

protected void setInternalDescription(String description)

getFieldLayoutItems

public List<FieldLayoutItem> getFieldLayoutItems()
Description copied from interface: FieldLayout
A list of field layout item of this field configuration.

Specified by:
getFieldLayoutItems in interface FieldLayout
Returns:
a list of field layout items of this field configuration.

getFieldLayoutItem

public FieldLayoutItem getFieldLayoutItem(OrderableField orderableField)
Description copied from interface: FieldLayout
Returns the field layout item for a given orderable field, if this orderable field is part of this field configuration.

Specified by:
getFieldLayoutItem in interface FieldLayout
Parameters:
orderableField - the orderable field to find in this field configuration.
Returns:
the field layout item if this field is part of this field configuration, otherwise null.

getFieldLayoutItem

public FieldLayoutItem getFieldLayoutItem(String fieldId)
Description copied from interface: FieldLayout
Returns the field layout item for a given field if, if this field is part of this field configuration.

Specified by:
getFieldLayoutItem in interface FieldLayout
Parameters:
fieldId - the id of the field.
Returns:
the field layout item if this field is part of this field configuration, otherwise null.

getVisibleLayoutItems

public List<FieldLayoutItem> getVisibleLayoutItems(com.atlassian.crowd.embedded.api.User remoteUser,
                                                   Project project,
                                                   List<String> issueTypes)
Description copied from interface: FieldLayout
Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).

Specified by:
getVisibleLayoutItems in interface FieldLayout
Parameters:
remoteUser - the user TODO: User is not used! We should remove it!
project - the project
issueTypes - a list of issue types to use when checking for VISIBLE CUSTOM FIELDS.
Returns:
all visible field layout items for the given project and it's issue type(s).

getVisibleCustomFieldLayoutItems

public List<FieldLayoutItem> getVisibleCustomFieldLayoutItems(Project project,
                                                              List<String> issueTypes)
Description copied from interface: FieldLayout
Returns the list of Custom Fields in this Field Layout that are both visible and applicable to the given context (of project and Issue types).

Specified by:
getVisibleCustomFieldLayoutItems in interface FieldLayout
Parameters:
project - The project context
issueTypes - The Issue Types for context
Returns:
the list of visible Custom Fields applicable to the given context (of project and Issue types).

getHiddenFields

public List<Field> getHiddenFields(com.atlassian.crowd.embedded.api.User remoteUser,
                                   org.ofbiz.core.entity.GenericValue projectGV,
                                   List<String> issueTypeIds)
Specified by:
getHiddenFields in interface FieldLayout

getHiddenFields

public List<Field> getHiddenFields(com.atlassian.crowd.embedded.api.User remoteUser,
                                   Project project,
                                   List<String> issueTypeIds)
Specified by:
getHiddenFields in interface FieldLayout

getHiddenFields

public List<Field> getHiddenFields(Project project,
                                   List<String> issueTypeIds)
Description copied from interface: FieldLayout
Returns all hidden fields (system fields and custom fields) for a given project and issue type(s).

Specified by:
getHiddenFields in interface FieldLayout
Parameters:
project - the project
issueTypeIds - issueTypes a list of issue types to use when checking for HIDDEN CUSTOM FIELDS.
Returns:
all hidden fields (system fields and custom fields).

getFieldManager

protected FieldManager getFieldManager()

getHackyFieldRendererRegistry

protected HackyFieldRendererRegistry getHackyFieldRendererRegistry()

getRequiredFieldLayoutItems

public List<FieldLayoutItem> getRequiredFieldLayoutItems(Project project,
                                                         List<String> issueTypes)
Description copied from interface: FieldLayout
Returns the list of required fields for an issue type in a project.

Specified by:
getRequiredFieldLayoutItems in interface FieldLayout
Parameters:
project - the project
issueTypes - the issue type.
Returns:
the list of required fields. System fields and custom fields.

isFieldHidden

public boolean isFieldHidden(String fieldId)
Description copied from interface: FieldLayout
Checks if a field is hidden in this field configuration.

Specified by:
isFieldHidden in interface FieldLayout
Parameters:
fieldId - the field id.
Returns:
true if the field is hidden, otherwise false.

getRendererTypeForField

public String getRendererTypeForField(String fieldId)
Description copied from interface: FieldLayout
Returns the render type for a given field in this field configuration.

Specified by:
getRendererTypeForField in interface FieldLayout
Parameters:
fieldId - the id of the field.
Returns:
the type of the renderer e.g. DefaultTextRenderer.RENDERER_TYPE

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getInternalList

protected List<FieldLayoutItem> getInternalList()


Copyright © 2002-2014 Atlassian. All Rights Reserved.