com.atlassian.jira.issue.fields.screen.issuetype
Class MockIssueTypeScreenScheme

java.lang.Object
  extended by com.atlassian.jira.issue.fields.screen.issuetype.MockIssueTypeScreenScheme
All Implemented Interfaces:
IssueTypeScreenScheme

public class MockIssueTypeScreenScheme
extends Object
implements IssueTypeScreenScheme

Simple implementation of a IssueTypeScreenScheme for tests.

Since:
v6.2

Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.fields.screen.issuetype.IssueTypeScreenScheme
DEFAULT_SCHEME_ID
 
Constructor Summary
MockIssueTypeScreenScheme()
           
 
Method Summary
 void addEntity(IssueTypeScreenSchemeEntity entity)
           
 boolean containsEntity(String issueTypeId)
           
 MockIssueTypeScreenSchemeEntity createDefaultEntity()
           
 MockIssueTypeScreenSchemeEntity createEntity(IssueType type)
           
 IssueTypeScreenSchemeEntity getDefaultEntity()
           
 String getDescription()
           
 FieldScreenScheme getEffectiveFieldScreenScheme(IssueType type)
          Return FieldScreenScheme that JIRA will actually use for the passed IssueType.
 Collection<IssueTypeScreenSchemeEntity> getEntities()
           
 IssueTypeScreenSchemeEntity getEntity(String issueTypeId)
           
 org.ofbiz.core.entity.GenericValue getGenericValue()
           
 Long getId()
           
 String getName()
           
 Collection<org.ofbiz.core.entity.GenericValue> getProjects()
           
 MockIssueTypeScreenScheme id(long id)
           
 boolean isDefault()
           
 void remove()
           
 void removeEntity(String issueTypeId)
           
 void setDescription(String description)
           
 void setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)
           
 void setId(Long id)
           
 void setName(String name)
           
 void store()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockIssueTypeScreenScheme

public MockIssueTypeScreenScheme()
Method Detail

getId

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

id

public MockIssueTypeScreenScheme id(long id)

setId

public void setId(Long id)
Specified by:
setId in interface IssueTypeScreenScheme

getName

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

setName

public void setName(String name)
Specified by:
setName in interface IssueTypeScreenScheme

getDescription

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

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface IssueTypeScreenScheme

getGenericValue

public org.ofbiz.core.entity.GenericValue getGenericValue()
Specified by:
getGenericValue in interface IssueTypeScreenScheme

setGenericValue

public void setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)
Specified by:
setGenericValue in interface IssueTypeScreenScheme

store

public void store()
Specified by:
store in interface IssueTypeScreenScheme

remove

public void remove()
Specified by:
remove in interface IssueTypeScreenScheme

getEntities

public Collection<IssueTypeScreenSchemeEntity> getEntities()
Specified by:
getEntities in interface IssueTypeScreenScheme

getEntity

public IssueTypeScreenSchemeEntity getEntity(String issueTypeId)
Specified by:
getEntity in interface IssueTypeScreenScheme

getEffectiveFieldScreenScheme

@Nonnull
public FieldScreenScheme getEffectiveFieldScreenScheme(@Nonnull
                                                               IssueType type)
Description copied from interface: IssueTypeScreenScheme
Return FieldScreenScheme that JIRA will actually use for the passed IssueType. This method will never return null as each IssueType must have an associated FieldScreenScheme that either comes from an explicit mapping or the default mapping in the scheme.

Specified by:
getEffectiveFieldScreenScheme in interface IssueTypeScreenScheme
Parameters:
type - the IssueType to query.
Returns:
the FieldScreenScheme for the passed IssueType. Cannot be null.

getDefaultEntity

public IssueTypeScreenSchemeEntity getDefaultEntity()

addEntity

public void addEntity(IssueTypeScreenSchemeEntity entity)
Specified by:
addEntity in interface IssueTypeScreenScheme

removeEntity

public void removeEntity(String issueTypeId)
Specified by:
removeEntity in interface IssueTypeScreenScheme

containsEntity

public boolean containsEntity(String issueTypeId)
Specified by:
containsEntity in interface IssueTypeScreenScheme

getProjects

public Collection<org.ofbiz.core.entity.GenericValue> getProjects()
Specified by:
getProjects in interface IssueTypeScreenScheme

isDefault

public boolean isDefault()
Specified by:
isDefault in interface IssueTypeScreenScheme

createEntity

public MockIssueTypeScreenSchemeEntity createEntity(IssueType type)

createDefaultEntity

public MockIssueTypeScreenSchemeEntity createDefaultEntity()


Copyright © 2002-2014 Atlassian. All Rights Reserved.