public class MockHelpUrlsLoader extends Object implements HelpUrlsLoader
Modifier and Type | Class and Description |
---|---|
static class |
MockHelpUrlsLoader.MockHelpUrlsLoaderKey |
HelpUrlsLoader.HelpUrlsLoaderKey
Constructor and Description |
---|
MockHelpUrlsLoader() |
Modifier and Type | Method and Description |
---|---|
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 |
keyForApplication(com.atlassian.application.api.ApplicationKey applicationKey)
Return the
HelpUrlsLoader.HelpUrlsLoaderKey associated with the application key provided. |
HelpUrlsLoader.HelpUrlsLoaderKey |
keyForCurrentUser()
Return the
HelpUrlsLoader.HelpUrlsLoaderKey associated with the calling user. |
MockHelpUrlsLoader |
setCurrentId(long id) |
@Nonnull public HelpUrlsLoader.HelpUrlsLoaderKey keyForCurrentUser()
HelpUrlsLoader
HelpUrlsLoader.HelpUrlsLoaderKey
associated with the calling user. It can safely be used as
a key to cache the result of a HelpUrls
lookup.keyForCurrentUser
in interface HelpUrlsLoader
@Nonnull public HelpUrlsLoader.HelpUrlsLoaderKey keyForApplication(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey)
HelpUrlsLoader
HelpUrlsLoader.HelpUrlsLoaderKey
associated with the application key provided. It can safely
be used as a key to cache the result of a HelpUrls
lookup.keyForApplication
in interface HelpUrlsLoader
public HelpUrls apply(HelpUrlsLoader.HelpUrlsLoaderKey input)
HelpUrlsLoader
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
.apply
in interface HelpUrlsLoader
apply
in interface com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,HelpUrls>
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.HelpUrls
associated with the passed key.public MockHelpUrlsLoader setCurrentId(long id)
public MockHelpUrls createUrls(MockHelpUrlsLoader.MockHelpUrlsLoaderKey key)
public MockHelpUrlsLoader.MockHelpUrlsLoaderKey createKey(long id)
Copyright © 2002-2015 Atlassian. All Rights Reserved.