com.atlassian.jira.plugin.componentpanel
Class BrowseComponentContextImpl

java.lang.Object
  extended by com.atlassian.jira.project.browse.BrowseProjectContext
      extended by com.atlassian.jira.plugin.componentpanel.BrowseComponentContextImpl
All Implemented Interfaces:
BrowseComponentContext, BrowseContext

public class BrowseComponentContextImpl
extends BrowseProjectContext
implements BrowseComponentContext

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

Since:
v4.0

Field Summary
 
Fields inherited from class com.atlassian.jira.project.browse.BrowseProjectContext
project, projectClause
 
Constructor Summary
BrowseComponentContextImpl(SearchService searchService, ProjectComponent component, com.atlassian.crowd.embedded.api.User user)
           
 
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.
 ProjectComponent getComponent()
          Retrieve the component for this context
protected  TerminalClause getComponentSearchClause()
           
 String getContextKey()
          Contains a context unique that can be used to identify this context.
 Project getProject()
          The current projecet being browsed.
 String getQueryString()
          Gets the URL query string for this context.
 
Methods inherited from class com.atlassian.jira.project.browse.BrowseProjectContext
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
getUser
 

Constructor Detail

BrowseComponentContextImpl

public BrowseComponentContextImpl(SearchService searchService,
                                  ProjectComponent component,
                                  com.atlassian.crowd.embedded.api.User user)
Method Detail

getComponent

public ProjectComponent getComponent()
Description copied from interface: BrowseComponentContext
Retrieve the component for this context

Specified by:
getComponent in interface BrowseComponentContext
Returns:
A ProjectComponent

getProject

public Project getProject()
Description copied from interface: BrowseContext
The current projecet being browsed.

Specified by:
getProject in interface BrowseContext
Overrides:
getProject in class BrowseProjectContext
Returns:
The current project.

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.

getComponentSearchClause

protected TerminalClause getComponentSearchClause()

getQueryString

public String getQueryString()
Description copied from interface: BrowseContext
Gets the URL query string for this context. Used to create links to navigator but still in this context.

Specified by:
getQueryString in interface BrowseContext
Overrides:
getQueryString in class BrowseProjectContext
Returns:
the URL query string for this context.

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.

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.