private void saveMetadata(Boolean success) {
        currentMetadata.setSuccess(success);
        if (currentMetadata.getId() == null) {
            // If there was no exportedOn date in the metadata, we will use the importedOn date
            currentMetadata.setId(currentMetadata.getImportedOn().getTime());
        }
        try {
            storage.createMetadata(currentMetadata);
        } catch (StorageException e) {
            logger.error("Failed to save metadata: ",e);
        }
    }
Write metadata into storage
@param success true if successful
manager/api/export-import/src/main/java/io/apiman/manager/api/exportimport/manager/StorageImportDispatcher.java