Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler Class Reference
+ Inheritance diagram for Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler:
+ Collaboration diagram for Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler:

Public Member Functions

 __construct (AddItemStatement $addItemStatement, StatementSerializer $statementSerializer, ResponseFactory $responseFactory, MiddlewareHandler $middlewareHandler)
 
 checkPreconditions ()
 Preconditions are checked via PreconditionMiddleware.
 
 run (... $args)
 
 runUseCase (string $itemId)
 
 getParamSettings ()
 
 getBodyValidator ( $contentType)
 

Static Public Member Functions

static factory ()
 

Public Attributes

const ITEM_ID_PATH_PARAM = 'item_id'
 
const STATEMENT_BODY_PARAM = 'statement'
 
const TAGS_BODY_PARAM = 'tags'
 
const BOT_BODY_PARAM = 'bot'
 
const COMMENT_BODY_PARAM = 'comment'
 

Private Member Functions

 newSuccessHttpResponse (AddItemStatementResponse $useCaseResponse, string $itemId)
 
 setEtagFromRevId (Response $httpResponse, int $revId)
 
 setLocationHeader (Response $httpResponse, string $itemId, string $statementGuid)
 
 getUsername ()
 

Private Attributes

AddItemStatement $addItemStatement
 
StatementSerializer $statementSerializer
 
ResponseFactory $responseFactory
 
MiddlewareHandler $middlewareHandler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::__construct ( AddItemStatement $addItemStatement,
StatementSerializer $statementSerializer,
ResponseFactory $responseFactory,
MiddlewareHandler $middlewareHandler )

Member Function Documentation

◆ checkPreconditions()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::checkPreconditions ( )

Preconditions are checked via PreconditionMiddleware.

◆ factory()

static Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::factory ( )
static

◆ getBodyValidator()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::getBodyValidator ( $contentType)

◆ getParamSettings()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::getParamSettings ( )

◆ getUsername()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::getUsername ( )
private

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::newSuccessHttpResponse ( AddItemStatementResponse $useCaseResponse,
string $itemId )
private

◆ run()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::run ( $args)
Parameters
mixed...$args

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::runUseCase ( string $itemId)
Exceptions
Exception

◆ setEtagFromRevId()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::setEtagFromRevId ( Response $httpResponse,
int $revId )
private

◆ setLocationHeader()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::setLocationHeader ( Response $httpResponse,
string $itemId,
string $statementGuid )
private

Member Data Documentation

◆ $addItemStatement

AddItemStatement Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$addItemStatement
private

◆ $middlewareHandler

MiddlewareHandler Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$middlewareHandler
private

◆ $responseFactory

ResponseFactory Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$responseFactory
private

◆ $statementSerializer

StatementSerializer Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$statementSerializer
private

◆ BOT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::BOT_BODY_PARAM = 'bot'

◆ COMMENT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::COMMENT_BODY_PARAM = 'comment'

◆ ITEM_ID_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::ITEM_ID_PATH_PARAM = 'item_id'

◆ STATEMENT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::STATEMENT_BODY_PARAM = 'statement'

◆ TAGS_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::TAGS_BODY_PARAM = 'tags'

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