com.atlassian.jira.project.browse
Interface BrowseContext

All Known Subinterfaces:
BrowseComponentContext, BrowseVersionContext
All Known Implementing Classes:
BrowseComponentContextImpl, BrowseProjectContext, BrowseVersionContextImpl

@PublicApi
public interface BrowseContext

The context of the Browse Project screen. This is passed into tabs to help them render themselves. It contains the current project and user, and for specific sub-classes more criteria. It is also responsible for adding criteria to SearchRequest to narrow their focus to the current context.

Since:
v4.0

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.
 Project getProject()
          The current projecet being browsed.
 String getQueryString()
          Gets the URL query string for this context.
 com.atlassian.crowd.embedded.api.User getUser()
          The user browsing the project.
 

Method Detail

getProject

Project getProject()
The current projecet being browsed.

Returns:
The current project.

getUser

com.atlassian.crowd.embedded.api.User getUser()
The user browsing the project.

Returns:
The user browsing the project.

createQuery

Query createQuery()
Creates a new Query that narrows it down to the current search context. E.g. Project, Component, Version

Returns:
A new Query that has a more refined search based on the current context.

getQueryString

String getQueryString()
Gets the URL query string for this context. Used to create links to navigator but still in this context.

Returns:
the URL query string for this context.

createParameterMap

Map<String,Object> createParameterMap()
Creates a map of the context-specific parameters and their associated domain objects.

Returns:
a mapping from parameter name to domain object.

getContextKey

String getContextKey()
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.

Returns:
a unique key for this context


Copyright © 2002-2014 Atlassian. All Rights Reserved.