|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.refimpl.PluginSettingsExternalGadgetSpecStore
public class PluginSettingsExternalGadgetSpecStore
This implementation stores ExternalGadgetSpecs 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 ExternalGadgetSpecs 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()
ExternalGadgetSpecStoreExternalGadgetSpecs 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 ExternalGadgetSpecStoreExternalGadgetSpecs in the store, returned in an unspecified order
public ExternalGadgetSpec add(URI gadgetSpecUri)
throws ExternalGadgetSpecStoreException
ExternalGadgetSpecStoreAdds 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 ExternalGadgetSpecStoregadgetSpecUri - 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)
ExternalGadgetSpecStoreexternalGadgetSpecId 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 ExternalGadgetSpecStoreexternalGadgetSpecId - the gadget spec ID to be removed from the persistent data store. Must not be
null.public boolean contains(URI gadgetSpecUri)
ExternalGadgetSpecStoretrue if the URI is in the store, false otherwise.
contains in interface ExternalGadgetSpecStoregadgetSpecUri - 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 | |||||||||