Open Data Catalog v2.0.0
Drupal\datastore\Service Class Reference
Inheritance diagram for Drupal\datastore\Service:

Public Member Functions

 __construct (ResourceLocalizer $resourceLocalizer, Import $importServiceFactory, QueueFactory $queue, JobStoreFactory $jobStoreFactory)
 
 import (string $identifier, bool $deferred=FALSE, $version=NULL)
 
 getImportService (Resource $resource)
 
 drop (string $identifier, $version=NULL)
 
 list ()
 
 summary ($identifier)
 
 getStorage (string $identifier, $version=NULL)
 
 runQuery (DatastoreQuery $datastoreQuery)
 
 getQueryStorageMap (DatastoreQuery $datastoreQuery)
 
 getResourceLocalizer ()
 
 getQueueFactory ()
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Detailed Description

Main services for the datastore.

Definition at line 20 of file Service.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\datastore\Service::__construct ( ResourceLocalizer  $resourceLocalizer,
Import  $importServiceFactory,
QueueFactory  $queue,
JobStoreFactory  $jobStoreFactory 
)

Constructor for datastore service.

Definition at line 65 of file Service.php.

Member Function Documentation

◆ create()

static Drupal\datastore\Service::create ( ContainerInterface  $container)
static

{}

Definition at line 53 of file Service.php.

◆ drop()

Drupal\datastore\Service::drop ( string  $identifier,
  $version = NULL 
)

Drop a resources datastore.

Parameters
string$identifierA resource's identifier.
string | null$versionA resource's version.

Definition at line 165 of file Service.php.

◆ getImportService()

Drupal\datastore\Service::getImportService ( Resource  $resource)

Getter.

Definition at line 153 of file Service.php.

◆ getQueryStorageMap()

Drupal\datastore\Service::getQueryStorageMap ( DatastoreQuery  $datastoreQuery)

Retrieve storage objects for all resources, and map to their aliases.

Parameters
\Drupal\datastore\Service\DatastoreQuery$datastoreQueryDatastoreQuery object.
Returns
array Array of storage objects, keyed to resource aliases.

Definition at line 302 of file Service.php.

◆ getQueueFactory()

Drupal\datastore\Service::getQueueFactory ( )

Return the queue factory.

Returns
\Drupal\Core\Queue\QueueFactory Queue factory.

Definition at line 393 of file Service.php.

◆ getResourceLocalizer()

Drupal\datastore\Service::getResourceLocalizer ( )

Return the resource localizer.

Returns
\Drupal\datastore\Service\ResourceLocalizer Resource localizer.

Definition at line 383 of file Service.php.

◆ getStorage()

Drupal\datastore\Service::getStorage ( string  $identifier,
  $version = NULL 
)

Get Storage.

Parameters
string$identifierThe unique identifier of a resource.
string | null$versionThe version of the resource.
Returns
\Drupal\datastore\Storage\DatabaseTable Storage object.
Exceptions

Definition at line 238 of file Service.php.

◆ import()

Drupal\datastore\Service::import ( string  $identifier,
bool  $deferred = FALSE,
  $version = NULL 
)

Start import process for a resource, provided by UUID.

Parameters
string$identifierA resource identifier.
bool$deferredSend to the queue for later? Will import immediately if FALSE..
string | null$versionA resource's version.
Returns
array Response.

Definition at line 85 of file Service.php.

◆ list()

Drupal\datastore\Service::list ( )

Get a list of all stored importers and filefetchers, and their status.

Returns
array The importer list object.

Definition at line 204 of file Service.php.

◆ runQuery()

Drupal\datastore\Service::runQuery ( DatastoreQuery  $datastoreQuery)

Run query.

Parameters
\Drupal\datastore\Service\DatastoreQuery$datastoreQueryDKAN Datastore Query API object.
Returns
\RootedData\RootedJsonData Array of row/record objects.

Definition at line 256 of file Service.php.

◆ summary()

Drupal\datastore\Service::summary (   $identifier)

Summary.

Definition at line 213 of file Service.php.