com.atlassian.jira.help
Class MockHelpUrlsLoader

java.lang.Object
  extended by com.atlassian.jira.help.MockHelpUrlsLoader
All Implemented Interfaces:
HelpUrlsLoader, com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,HelpUrls>

public class MockHelpUrlsLoader
extends Object
implements HelpUrlsLoader

Since:
v6.2.4

Nested Class Summary
static class MockHelpUrlsLoader.MockHelpUrlsLoaderKey
           
 
Nested classes/interfaces inherited from interface com.atlassian.jira.help.HelpUrlsLoader
HelpUrlsLoader.HelpUrlsLoaderKey
 
Constructor Summary
MockHelpUrlsLoader()
           
 
Method Summary
 HelpUrls apply(HelpUrlsLoader.HelpUrlsLoaderKey input)
          Return the HelpUrls associated with the passed HelpUrlsLoader.HelpUrlsLoaderKey.
 MockHelpUrlsLoader.MockHelpUrlsLoaderKey createKey(long id)
           
 MockHelpUrls createUrls(MockHelpUrlsLoader.MockHelpUrlsLoaderKey key)
           
 HelpUrlsLoader.HelpUrlsLoaderKey keyForCurrentUser()
          Return the HelpUrlsLoader.HelpUrlsLoaderKey associated with the calling user.
 MockHelpUrlsLoader setCurrentId(long id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

MockHelpUrlsLoader

public MockHelpUrlsLoader()
Method Detail

keyForCurrentUser

@Nonnull
public HelpUrlsLoader.HelpUrlsLoaderKey keyForCurrentUser()
Description copied from interface: HelpUrlsLoader
Return the HelpUrlsLoader.HelpUrlsLoaderKey associated with the calling user. It can safely be used as a key to cache the result of a HelpUrls lookup.

Specified by:
keyForCurrentUser in interface HelpUrlsLoader
Returns:
the loader key associated with the calling user.

apply

public HelpUrls apply(HelpUrlsLoader.HelpUrlsLoaderKey input)
Description copied from interface: HelpUrlsLoader
Return the HelpUrls associated with the passed HelpUrlsLoader.HelpUrlsLoaderKey. The passed HelpUrlsLoaderKey must have been returned from a previous call to HelpUrlsLoader.keyForCurrentUser() on this instance. It is not safe to use HelpUrlsLoaderKey across instances of HelpUrlsLoader.

Specified by:
apply in interface HelpUrlsLoader
Specified by:
apply in interface com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,HelpUrls>
Parameters:
input - the HelpUrlsLoaderKey to query for. It must have been returned from a HelpUrlsLoader.keyForCurrentUser() on this instance. Using HelpUrlsLoaderKey from other instances may result in runtime exceptions.
Returns:
the HelpUrls associated with the passed key.

setCurrentId

public MockHelpUrlsLoader setCurrentId(long id)

createUrls

public MockHelpUrls createUrls(MockHelpUrlsLoader.MockHelpUrlsLoaderKey key)

createKey

public MockHelpUrlsLoader.MockHelpUrlsLoaderKey createKey(long id)


Copyright © 2002-2014 Atlassian. All Rights Reserved.