Open Data Catalog v2.0.0
Drupal\metastore\LifeCycle\LifeCycle Class Reference

Public Member Functions

 __construct (Referencer $referencer, Dereferencer $dereferencer, OrphanChecker $orphanChecker, ResourceMapper $resourceMapper, DateFormatter $dateFormatter, DataFactory $dataFactory, QueueFactory $queueFactory)
 
 go ($stage, MetastoreItemInterface $data)
 

Public Attributes

const EVENT_DATASET_UPDATE = 'dkan_metastore_dataset_update'
 
const EVENT_PRE_REFERENCE = 'dkan_metastore_metadata_pre_reference'
 

Protected Member Functions

 datasetPredelete (MetastoreItemInterface $data)
 
 datasetLoad (MetastoreItemInterface $data)
 
 datasetUpdate (MetastoreItemInterface $data)
 
 distributionLoad (MetastoreItemInterface $data)
 
 distributionPredelete (MetastoreItemInterface $data)
 
 datasetPresave (MetastoreItemInterface $data)
 
 distributionPresave (MetastoreItemInterface $data)
 

Protected Attributes

 $referencer
 
 $dereferencer
 
 $orphanChecker
 
 $resourceMapper
 
 $dateFormatter
 
 $dataFactory
 
 $queueFactory
 

Detailed Description

Data.

Definition at line 20 of file LifeCycle.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\LifeCycle\LifeCycle::__construct ( Referencer  $referencer,
Dereferencer  $dereferencer,
OrphanChecker  $orphanChecker,
ResourceMapper  $resourceMapper,
DateFormatter  $dateFormatter,
DataFactory  $dataFactory,
QueueFactory  $queueFactory 
)

Constructor.

Definition at line 78 of file LifeCycle.php.

Member Function Documentation

◆ datasetLoad()

Drupal\metastore\LifeCycle\LifeCycle::datasetLoad ( MetastoreItemInterface  $data)
protected

Dataset load.

Definition at line 126 of file LifeCycle.php.

◆ datasetPredelete()

Drupal\metastore\LifeCycle\LifeCycle::datasetPredelete ( MetastoreItemInterface  $data)
protected

Dataset preDelete.

Definition at line 115 of file LifeCycle.php.

◆ datasetPresave()

Drupal\metastore\LifeCycle\LifeCycle::datasetPresave ( MetastoreItemInterface  $data)
protected

Private.

Definition at line 253 of file LifeCycle.php.

◆ datasetUpdate()

Drupal\metastore\LifeCycle\LifeCycle::datasetUpdate ( MetastoreItemInterface  $data)
protected

Purge resources (if unneeded) of any updated dataset.

Definition at line 139 of file LifeCycle.php.

◆ distributionLoad()

Drupal\metastore\LifeCycle\LifeCycle::distributionLoad ( MetastoreItemInterface  $data)
protected

Private.

Todo:
Decouple "resource" functionality from specific dataset properties.

Definition at line 148 of file LifeCycle.php.

◆ distributionPredelete()

Drupal\metastore\LifeCycle\LifeCycle::distributionPredelete ( MetastoreItemInterface  $data)
protected

Distribution predelete.

Definition at line 181 of file LifeCycle.php.

◆ distributionPresave()

Drupal\metastore\LifeCycle\LifeCycle::distributionPresave ( MetastoreItemInterface  $data)
protected

Private.

Definition at line 287 of file LifeCycle.php.

◆ go()

Drupal\metastore\LifeCycle\LifeCycle::go (   $stage,
MetastoreItemInterface  $data 
)

Entry point for LifeCycle functions.

Parameters
string$stageStage or hook name for execution.
Drupal\metastore\MetastoreItemInterface$dataMetastore item object.

Definition at line 104 of file LifeCycle.php.

Member Data Documentation

◆ $dataFactory

Drupal\metastore\LifeCycle\LifeCycle::$dataFactory
protected

Definition at line 66 of file LifeCycle.php.

◆ $dateFormatter

Drupal\metastore\LifeCycle\LifeCycle::$dateFormatter
protected

Definition at line 59 of file LifeCycle.php.

◆ $dereferencer

Drupal\metastore\LifeCycle\LifeCycle::$dereferencer
protected

Definition at line 38 of file LifeCycle.php.

◆ $orphanChecker

Drupal\metastore\LifeCycle\LifeCycle::$orphanChecker
protected

Definition at line 45 of file LifeCycle.php.

◆ $queueFactory

Drupal\metastore\LifeCycle\LifeCycle::$queueFactory
protected

Definition at line 73 of file LifeCycle.php.

◆ $referencer

Drupal\metastore\LifeCycle\LifeCycle::$referencer
protected

Definition at line 31 of file LifeCycle.php.

◆ $resourceMapper

Drupal\metastore\LifeCycle\LifeCycle::$resourceMapper
protected

Definition at line 52 of file LifeCycle.php.

◆ EVENT_DATASET_UPDATE

const Drupal\metastore\LifeCycle\LifeCycle::EVENT_DATASET_UPDATE = 'dkan_metastore_dataset_update'

Definition at line 23 of file LifeCycle.php.

◆ EVENT_PRE_REFERENCE

const Drupal\metastore\LifeCycle\LifeCycle::EVENT_PRE_REFERENCE = 'dkan_metastore_metadata_pre_reference'

Definition at line 24 of file LifeCycle.php.