|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.gadgets.refimpl.PluginSettingsExternalGadgetSpecStore
public class PluginSettingsExternalGadgetSpecStore
This implementation stores ExternalGadgetSpec
s to the SAL PluginSettings
API.
Constructor Summary | |
---|---|
PluginSettingsExternalGadgetSpecStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory,
ExternalGadgetSpecIdGenerator gadgetSpecIdGenerator)
|
Method Summary | |
---|---|
ExternalGadgetSpec |
add(URI gadgetSpecUri)
Adds a gadget spec URI to this store and returns an ExternalGadgetSpec wrapper for it. |
boolean |
contains(URI gadgetSpecUri)
Returns true if the URI is in the store, false otherwise. |
Collection<ExternalGadgetSpec> |
entries()
Retrieves all ExternalGadgetSpec s from the data store. |
void |
remove(ExternalGadgetSpecId externalGadgetSpecId)
Removes the spec URI corresponding to the specified externalGadgetSpecId from the persistent data store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginSettingsExternalGadgetSpecStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory, ExternalGadgetSpecIdGenerator gadgetSpecIdGenerator)
Method Detail |
---|
public Collection<ExternalGadgetSpec> entries()
ExternalGadgetSpecStore
ExternalGadgetSpec
s from the data store. There is no guarantee that these will be
sequenced in any particular order. This method must not return null
; if the store is empty, it
must return an Iterable
with no contents.
entries
in interface ExternalGadgetSpecStore
ExternalGadgetSpec
s in the store, returned in an unspecified orderpublic ExternalGadgetSpec add(URI gadgetSpecUri) throws ExternalGadgetSpecStoreException
ExternalGadgetSpecStore
Adds a gadget spec URI to this store and returns an ExternalGadgetSpec
wrapper for it. The store must
not allow duplicate entries to be stored; if the gadget spec URI is already contained in this store, this
method should return the existing ExternalGadgetSpec
for it.
The implementation must consider syntactically different but semantically equivalent URIs to be equal for the
purposes of duplicate elimination; specifically, the implementation is responsible for calling
URI.normalize()
on gadgetSpecUri
before storing it.
add
in interface ExternalGadgetSpecStore
gadgetSpecUri
- the gadget spec URI to store. Must not be null
.
ExternalGadgetSpec
object wrapping the specified gadget spec URI
ExternalGadgetSpecStoreException
- if there is a problem when adding the gadget spec URI to the
persistent data storepublic void remove(ExternalGadgetSpecId externalGadgetSpecId)
ExternalGadgetSpecStore
externalGadgetSpecId
from the persistent data store.
If externalGadgetSpecId
does not correspond to any stored gadget spec URI, this method should do nothing
but return.
remove
in interface ExternalGadgetSpecStore
externalGadgetSpecId
- the gadget spec ID to be removed from the persistent data store. Must not be
null
.public boolean contains(URI gadgetSpecUri)
ExternalGadgetSpecStore
true
if the URI is in the store, false
otherwise.
contains
in interface ExternalGadgetSpecStore
gadgetSpecUri
- URI to check is in the store
true
if the URI is in the store, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |