com.atlassian.jira.mock.issue.fields.layout.field
Class MockFieldConfigurationScheme

java.lang.Object
  extended by com.atlassian.jira.mock.issue.fields.layout.field.MockFieldConfigurationScheme
All Implemented Interfaces:
FieldConfigurationScheme

public class MockFieldConfigurationScheme
extends Object
implements FieldConfigurationScheme

Mock for FieldConfigurationScheme that compares equality based on id and name

Since:
v4.4

Constructor Summary
MockFieldConfigurationScheme()
           
MockFieldConfigurationScheme(Long id, String name, String description)
           
 
Method Summary
 boolean equals(Object o)
           
 Set<Long> getAllFieldLayoutIds(Collection<String> allIssueTypeIds)
          Returns the id's of the field layout's represented by FieldConfigurationScheme (i.e.
 String getDescription()
           
 Long getFieldLayoutId(String issueTypeId)
          Returns the id of the field layout to use for this given issue type id.
 Long getId()
           
 String getName()
           
 int hashCode()
           
 MockFieldConfigurationScheme setDescription(String description)
           
 MockFieldConfigurationScheme setId(Long id)
           
 MockFieldConfigurationScheme setIssueTypeToFieldLayoutIdMapping(Map<String,Long> issueTypeToFieldLayoutIdMapping)
           
 MockFieldConfigurationScheme setName(String name)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockFieldConfigurationScheme

public MockFieldConfigurationScheme()

MockFieldConfigurationScheme

public MockFieldConfigurationScheme(Long id,
                                    String name,
                                    String description)
Method Detail

setId

public MockFieldConfigurationScheme setId(Long id)

setName

public MockFieldConfigurationScheme setName(String name)

setDescription

public MockFieldConfigurationScheme setDescription(String description)

getId

public Long getId()
Specified by:
getId in interface FieldConfigurationScheme

getName

public String getName()
Specified by:
getName in interface FieldConfigurationScheme

getDescription

public String getDescription()
Specified by:
getDescription in interface FieldConfigurationScheme

getFieldLayoutId

public Long getFieldLayoutId(String issueTypeId)
Description copied from interface: FieldConfigurationScheme
Returns the id of the field layout to use for this given issue type id. This will do all the necessary work to lookup the default entry if no specific mapping for the given isuse type id exists. So after calling this method simply use the returned field layout id.

Specified by:
getFieldLayoutId in interface FieldConfigurationScheme
Parameters:
issueTypeId - the Issue Type ID.
Returns:
the id of the FieldLayout ("Field Configuration") to use for this given issue type id.

getAllFieldLayoutIds

public Set<Long> getAllFieldLayoutIds(Collection<String> allIssueTypeIds)
Description copied from interface: FieldConfigurationScheme
Returns the id's of the field layout's represented by FieldConfigurationScheme (i.e. the layouts associated with this project).

Specified by:
getAllFieldLayoutIds in interface FieldConfigurationScheme
Parameters:
allIssueTypeIds - all the issue type id's that are in the system. This is used to determine if we need to return the layout for the default, if we have all the issue types mapped in the system then we do not care about the default since it is never used.
Returns:
the id's of the FieldLayout ("Field Configuration") to use for the project this is associcated with.

setIssueTypeToFieldLayoutIdMapping

public MockFieldConfigurationScheme setIssueTypeToFieldLayoutIdMapping(Map<String,Long> issueTypeToFieldLayoutIdMapping)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.