Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\UpdateRepo\UpdateRepoJob Class Reference

Job template for updating the repo after a change in client. More...

+ Inheritance diagram for Wikibase\Repo\UpdateRepo\UpdateRepoJob:
+ Collaboration diagram for Wikibase\Repo\UpdateRepo\UpdateRepoJob:

Public Member Functions

 getSummary ()
 Get a Summary object for the edit. More...
 
 run ()
 

Protected Member Functions

 initRepoJobServices (EntityLookup $entityLookup, EntityStore $entityStore, SummaryFormatter $summaryFormatter, LoggerInterface $logger, MediawikiEditEntityFactory $editEntityFactory)
 
 initRepoJobServicesFromGlobalState ()
 Initialize repo services from global state. More...
 
 verifyValid (Item $item)
 Whether the propagated update is valid (and thus should be applied) More...
 
 applyChanges (Item $item)
 Apply the changes needed to the given Item. More...
 

Protected Attributes

 $entityLookup
 
 $entityStore
 
 $summaryFormatter
 
 $logger
 

Private Member Functions

 getItem ()
 
 saveChanges (Item $item, User $user)
 Save the new version of the given item. More...
 
 getUser ( $name)
 

Private Attributes

 $editEntityFactory
 

Detailed Description

Job template for updating the repo after a change in client.

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Member Function Documentation

◆ applyChanges()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::applyChanges ( Item  $item)
abstractprotected

Apply the changes needed to the given Item.

Parameters
Item$item
Returns
bool

Reimplemented in Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob, and Wikibase\Repo\UpdateRepo\UpdateRepoOnDeleteJob.

◆ getItem()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::getItem ( )
private
Returns
Item|null

◆ getSummary()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::getSummary ( )
abstract

Get a Summary object for the edit.

Returns
FormatableSummary

Reimplemented in Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob, and Wikibase\Repo\UpdateRepo\UpdateRepoOnDeleteJob.

◆ getUser()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::getUser (   $name)
private
Parameters
string$name
Returns
User|bool

◆ initRepoJobServices()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::initRepoJobServices ( EntityLookup  $entityLookup,
EntityStore  $entityStore,
SummaryFormatter  $summaryFormatter,
LoggerInterface  $logger,
MediawikiEditEntityFactory  $editEntityFactory 
)
protected

◆ initRepoJobServicesFromGlobalState()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::initRepoJobServicesFromGlobalState ( )
abstractprotected

Initialize repo services from global state.

Reimplemented in Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob, and Wikibase\Repo\UpdateRepo\UpdateRepoOnDeleteJob.

◆ run()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::run ( )
Returns
bool success

◆ saveChanges()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::saveChanges ( Item  $item,
User  $user 
)
private

Save the new version of the given item.

Parameters
Item$item
User$user
Returns
bool

◆ verifyValid()

Wikibase\Repo\UpdateRepo\UpdateRepoJob::verifyValid ( Item  $item)
abstractprotected

Whether the propagated update is valid (and thus should be applied)

Parameters
Item$item
Returns
bool

Reimplemented in Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob, and Wikibase\Repo\UpdateRepo\UpdateRepoOnDeleteJob.

Member Data Documentation

◆ $editEntityFactory

Wikibase\Repo\UpdateRepo\UpdateRepoJob::$editEntityFactory
private

◆ $entityLookup

Wikibase\Repo\UpdateRepo\UpdateRepoJob::$entityLookup
protected

◆ $entityStore

Wikibase\Repo\UpdateRepo\UpdateRepoJob::$entityStore
protected

◆ $logger

Wikibase\Repo\UpdateRepo\UpdateRepoJob::$logger
protected

◆ $summaryFormatter

Wikibase\Repo\UpdateRepo\UpdateRepoJob::$summaryFormatter
protected

The documentation for this class was generated from the following file: