Package se.conciliate.extensions.store
Interface MTPluginDataOperations
public interface MTPluginDataOperations
Provides bulk operations for creating and removing plugin data.
This can be used for example by import services to create
plug-in data without having access to implementations of
the original data providers.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Describes the data in a plug-in data entity to create.static interface
Desribes the data in a relation to create. -
Method Summary
Modifier and TypeMethodDescriptioncopyData
(MTPluginData data) Copies plug-in data from another entity.Creates new data for the entity.void
createRelations
(List<MTPluginDataOperations.Relation> relations, Map<String, Long> idMap) Creates relations between plug-in data for an entity.Finds all plug-in data for the entity.findRelations
(Map<Long, String> dataUUIDs) Finds all relations between existing data entries.void
Fires an event that lets plug-in refresh their views when the plug-in data might have changed.void
Removes all plug-in data for the entity.
-
Method Details
-
findPluginData
MTIterator<MTPluginData> findPluginData()Finds all plug-in data for the entity. -
findRelations
Finds all relations between existing data entries. -
copyData
Copies plug-in data from another entity. -
removeData
void removeData()Removes all plug-in data for the entity. -
createData
Creates new data for the entity.- Parameters:
data
- The data to create.- Returns:
- A mapping of data UUID:s to data ID:s for the created data. This is needed to create relations between the data later.
-
createRelations
Creates relations between plug-in data for an entity.- Parameters:
relations
- The relations to create.idMap
- An mapping from data UUID:s to the ID:s of the data.
-
fireRefresh
void fireRefresh()Fires an event that lets plug-in refresh their views when the plug-in data might have changed.
-