|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.portal.gadgets.CachingExternalGadgetStore
public class CachingExternalGadgetStore
Eagerly caching implementation on the external Gadget store. The contains() method needs to be especially performant, since every gadget will be checked when displaying a dashboard.
Field Summary | |
---|---|
Map<com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId,com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> |
specCache
|
Set<URI> |
uriCache
|
Constructor Summary | |
---|---|
CachingExternalGadgetStore(ExternalGadgetStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
com.atlassian.gadgets.directory.spi.ExternalGadgetSpec |
addGadgetSpecUri(URI uri)
Adds the URI specified to the whitelist. |
boolean |
containsSpecUri(URI uri)
Checks if the specified URI is already contained in the store |
Set<com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> |
getAllGadgetSpecUris()
Retrieves a set of all external gadgets whitelisted in the directory. |
void |
onClearCache(ClearCacheEvent event)
|
void |
removeGadgetSpecUri(com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId id)
Removes the URI specified from the whitelist. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Map<com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId,com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> specCache
public final Set<URI> uriCache
Constructor Detail |
---|
public CachingExternalGadgetStore(ExternalGadgetStore delegateStore, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public Set<com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> getAllGadgetSpecUris()
ExternalGadgetStore
getAllGadgetSpecUris
in interface ExternalGadgetStore
public com.atlassian.gadgets.directory.spi.ExternalGadgetSpec addGadgetSpecUri(URI uri)
ExternalGadgetStore
addGadgetSpecUri
in interface ExternalGadgetStore
uri
- The gadget URI to add
public void removeGadgetSpecUri(com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId id)
ExternalGadgetStore
removeGadgetSpecUri
in interface ExternalGadgetStore
id
- The id to removepublic boolean containsSpecUri(URI uri)
ExternalGadgetStore
containsSpecUri
in interface ExternalGadgetStore
uri
- the URI to check for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |