public class CachingExternalGadgetStore extends Object implements ExternalGadgetStore
Modifier and Type | Field and Description |
---|---|
Map<com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId,com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> |
specCache |
Set<URI> |
uriCache |
Constructor and Description |
---|
CachingExternalGadgetStore(ExternalGadgetStore delegateStore) |
Modifier and Type | Method and Description |
---|---|
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.
|
public final Map<com.atlassian.gadgets.directory.spi.ExternalGadgetSpecId,com.atlassian.gadgets.directory.spi.ExternalGadgetSpec> specCache
public CachingExternalGadgetStore(ExternalGadgetStore delegateStore)
@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 addpublic 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 forCopyright © 2002-2022 Atlassian. All Rights Reserved.