com.atlassian.jira.plugin.versionpanel
Class BrowseVersionContextImpl

java.lang.Object
  extended by com.atlassian.jira.project.browse.BrowseProjectContext
      extended by com.atlassian.jira.plugin.versionpanel.BrowseVersionContextImpl
All Implemented Interfaces:
BrowseVersionContext, BrowseContext

public class BrowseVersionContextImpl
extends BrowseProjectContext
implements BrowseVersionContext

A narrowing of context from BrowseProjectContext that also includes a Version.

Since:
v4.0

Field Summary
 
Fields inherited from class com.atlassian.jira.project.browse.BrowseProjectContext
project, projectClause
 
Constructor Summary
BrowseVersionContextImpl(Version version, com.atlassian.crowd.embedded.api.User user)
          Constructs an instance for this class.
 
Method Summary
 Map<String,Object> createParameterMap()
          Creates a map of the context-specific parameters and their associated domain objects.
 Query createQuery()
          Creates a new Query that narrows it down to the current search context.
 String getContextKey()
          Contains a context unique that can be used to identify this context.
 String getQueryString()
          Returns a query string parameter to append to the IssueNavigator URL for field id equal to IssueFieldConstants.FIX_FOR_VERSIONS.
 Version getVersion()
          Returns version
 
Methods inherited from class com.atlassian.jira.project.browse.BrowseProjectContext
getProject, getProjectClause, getProjectManager, getSearchService, getUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.project.browse.BrowseContext
getProject, getUser
 

Constructor Detail

BrowseVersionContextImpl

public BrowseVersionContextImpl(Version version,
                                com.atlassian.crowd.embedded.api.User user)
Constructs an instance for this class.

Parameters:
version - The version at the center of this context
user - The user browsing the version
See Also:
IssueFieldConstants
Method Detail

getQueryString

public String getQueryString()
Returns a query string parameter to append to the IssueNavigator URL for field id equal to IssueFieldConstants.FIX_FOR_VERSIONS. Also includes the project parameter.

Specified by:
getQueryString in interface BrowseContext
Overrides:
getQueryString in class BrowseProjectContext
Returns:
a query string parameter to append to the IssueNavigator URL

createParameterMap

public Map<String,Object> createParameterMap()
Description copied from interface: BrowseContext
Creates a map of the context-specific parameters and their associated domain objects.

Specified by:
createParameterMap in interface BrowseContext
Overrides:
createParameterMap in class BrowseProjectContext
Returns:
a mapping from parameter name to domain object.

getVersion

public Version getVersion()
Description copied from interface: BrowseVersionContext
Returns version

Specified by:
getVersion in interface BrowseVersionContext
Returns:
version

createQuery

public Query createQuery()
Description copied from interface: BrowseContext
Creates a new Query that narrows it down to the current search context. E.g. Project, Component, Version

Specified by:
createQuery in interface BrowseContext
Overrides:
createQuery in class BrowseProjectContext
Returns:
A new Query that has a more refined search based on the current context.

getContextKey

public String getContextKey()
Description copied from interface: BrowseContext
Contains a context unique that can be used to identify this context. This is useful when storing things in the session on per context basis.

Specified by:
getContextKey in interface BrowseContext
Overrides:
getContextKey in class BrowseProjectContext
Returns:
a unique key for this context


Copyright © 2002-2012 Atlassian. All Rights Reserved.