com.atlassian.jira.hints
Class DefaultHintManager

java.lang.Object
  extended by com.atlassian.jira.hints.DefaultHintManager
All Implemented Interfaces:
HintManager

public class DefaultHintManager
extends java.lang.Object
implements HintManager

Default implementation of the HintManager.

Since:
v4.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.hints.HintManager
HintManager.Context
 
Field Summary
static java.lang.String ALL_HINTS_SECTION
           
static java.lang.String HINTS_PREFIX
           
static java.util.Random RANDOM
           
 
Constructor Summary
DefaultHintManager(JiraWebInterfaceManager webInterfaceManager)
           
 
Method Summary
 java.util.List<Hint> getAllHints(com.opensymphony.user.User user, JiraHelper helper)
          Get all hints visible in given user context.
 Hint getHintForContext(com.opensymphony.user.User remoteUser, JiraHelper jiraHelper, HintManager.Context context)
          Given a valid HintManager.Context this method returns a random link for that context.
 Hint getRandomHint(com.opensymphony.user.User user, JiraHelper jiraHelper)
          Get random hint visible in given user context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_HINTS_SECTION

public static final java.lang.String ALL_HINTS_SECTION
See Also:
Constant Field Values

HINTS_PREFIX

public static final java.lang.String HINTS_PREFIX
See Also:
Constant Field Values

RANDOM

public static final java.util.Random RANDOM
Constructor Detail

DefaultHintManager

public DefaultHintManager(JiraWebInterfaceManager webInterfaceManager)
Method Detail

getRandomHint

public Hint getRandomHint(com.opensymphony.user.User user,
                          JiraHelper jiraHelper)
Description copied from interface: HintManager
Get random hint visible in given user context.

Specified by:
getRandomHint in interface HintManager
Parameters:
user - current user
jiraHelper - JIRA helper
Returns:
random hint

getAllHints

public java.util.List<Hint> getAllHints(com.opensymphony.user.User user,
                                        JiraHelper helper)
Description copied from interface: HintManager
Get all hints visible in given user context.

Specified by:
getAllHints in interface HintManager
Parameters:
user - current user
helper - JIRA helper
Returns:
all hints accessible to the user

getHintForContext

public Hint getHintForContext(com.opensymphony.user.User remoteUser,
                              JiraHelper jiraHelper,
                              HintManager.Context context)
Description copied from interface: HintManager
Given a valid HintManager.Context this method returns a random link for that context. May be null if no hints exist for the context specified.

Specified by:
getHintForContext in interface HintManager
Parameters:
remoteUser - The current user
jiraHelper - JIRA helper
context - The context to display a hint for
Returns:
A random hint for the context specified or null if none exist


Copyright © 2002-2010 Atlassian. All Rights Reserved.