public class StoreGraphService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
$_GTE |
static String |
$_LT |
static DateTimeFormatter |
formatter |
static String |
GRAPH |
static LocalDateTime |
INITIAL_START_DATE |
static String |
UNDERSCORE |
static String |
ZIP_EXTENTION |
static String |
ZIP_PREFIX_NAME |
| Constructor and Description |
|---|
StoreGraphService(VitamRepositoryProvider vitamRepositoryProvider) |
StoreGraphService(VitamRepositoryProvider vitamRepositoryProvider,
RestoreBackupService restoreBackupService,
WorkspaceClientFactory workspaceClientFactory,
StorageClientFactory storageClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
LocalDateTime |
getLastGraphStoreDate(MetadataCollections metadataCollections)
As the files generated are zip files.
|
boolean |
isInProgress() |
void |
storeInWorkspace(String containerName,
String graphFolder,
List<org.bson.Document> documents)
Connect to workspace and store the collection of documents as json file
The destination container is containerName
The destination folder is GRAPH
|
Map<MetadataCollections,Integer> |
tryStoreGraph()
If no graph store in progress, try to start one
Should be exposed in the API
|
void |
zipAndSaveInOffer(DataCategory dataCategory,
String containerName,
String graphFolder,
String graphZipName,
String graph_store_name) |
public static final LocalDateTime INITIAL_START_DATE
public static final DateTimeFormatter formatter
public static final String GRAPH
public static final String UNDERSCORE
public static final String ZIP_EXTENTION
public static final String ZIP_PREFIX_NAME
public static final String $_GTE
public static final String $_LT
public StoreGraphService(VitamRepositoryProvider vitamRepositoryProvider, RestoreBackupService restoreBackupService, WorkspaceClientFactory workspaceClientFactory, StorageClientFactory storageClientFactory)
vitamRepositoryProvider - restoreBackupService - workspaceClientFactory - storageClientFactory - public StoreGraphService(VitamRepositoryProvider vitamRepositoryProvider)
vitamRepositoryProvider - public LocalDateTime getLastGraphStoreDate(MetadataCollections metadataCollections) throws StoreGraphException
metadataCollections - the concerned collectionStoreGraphExceptionpublic boolean isInProgress()
public Map<MetadataCollections,Integer> tryStoreGraph() throws StoreGraphException
StoreGraphExceptionpublic void zipAndSaveInOffer(DataCategory dataCategory, String containerName, String graphFolder, String graphZipName, String graph_store_name) throws StoreGraphException
dataCategory - (Unit or GOT)containerName - graphFolder - the name of graph folder in the containergraphZipName - the name if the zipFile in the containergraph_store_name - the name of the zip file in the offerStoreGraphExceptionpublic void storeInWorkspace(String containerName, String graphFolder, List<org.bson.Document> documents) throws StoreGraphException
documents - StoreGraphExceptionCopyright © 2018 Vitam. All rights reserved.