Package com.atlassian.jira.plugin
Class BootstrapPluginVersionStore
java.lang.Object
com.atlassian.jira.plugin.BootstrapPluginVersionStore
- All Implemented Interfaces:
PluginVersionStore
Bootstrap NOP implementation of the
PluginVersionStore
.- Since:
- v4.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(PluginVersion pluginVersion) Creates aPluginVersion
in the database.boolean
Deletes a plugin version from the datastore.void
deleteByKey
(String pluginKey) Deletes anyPluginVersion
s for the plugin with the given key.getAll()
Returns a list of allPluginVersion
's.Gets thePluginVersion
specified by the id.long
save
(PluginVersion pluginVersion) Persists the givenPluginVersion
, performing an insert or update according to whether a record for this plugin key already exists.update
(PluginVersion pluginVersion) Updates a plugin version in the datastore.
-
Constructor Details
-
BootstrapPluginVersionStore
public BootstrapPluginVersionStore()
-
-
Method Details
-
create
Description copied from interface:PluginVersionStore
Creates aPluginVersion
in the database. The id in the object will be ignored.- Specified by:
create
in interfacePluginVersionStore
- Parameters:
pluginVersion
- contains the key, name, and version to be persisted.- Returns:
- a
PluginVersion
with the database id populated.
-
update
Description copied from interface:PluginVersionStore
Updates a plugin version in the datastore.- Specified by:
update
in interfacePluginVersionStore
- Parameters:
pluginVersion
- contains the key, name, and version to update. The id will be used to find the record to update.- Returns:
- a
PluginVersion
that represents the updated record.
-
delete
Description copied from interface:PluginVersionStore
Deletes a plugin version from the datastore. If the provided id does not resolve to an existing record then this method will return false and no records will be deleted.- Specified by:
delete
in interfacePluginVersionStore
- Parameters:
pluginVersionId
- identifies the plugin version record to delete, not null.- Returns:
- true if the record was deleted, false otherwise.
-
getById
Description copied from interface:PluginVersionStore
Gets thePluginVersion
specified by the id.- Specified by:
getById
in interfacePluginVersionStore
- Parameters:
pluginVersionId
- identifies the plugin version record to retrieve.- Returns:
- the
PluginVersion
with the corresponding id or null if the record is not found.
-
getAll
Description copied from interface:PluginVersionStore
Returns a list of allPluginVersion
's.- Specified by:
getAll
in interfacePluginVersionStore
- Returns:
- a list of all
PluginVersion
's.
-
deleteByKey
Description copied from interface:PluginVersionStore
Deletes anyPluginVersion
s for the plugin with the given key.- Specified by:
deleteByKey
in interfacePluginVersionStore
- Parameters:
pluginKey
- the key for which to delete the version(s) (required)
-
save
Description copied from interface:PluginVersionStore
Persists the givenPluginVersion
, performing an insert or update according to whether a record for this plugin key already exists.- Specified by:
save
in interfacePluginVersionStore
- Parameters:
pluginVersion
- the plugin version to save (required)- Returns:
- the id of the saved row
-