wCMF
3.6
|
Public Member Functions | |
initialize (&$request, &$response) | |
addWorkPackage ($name, $size, $oids, $callback, $args=null) | |
getWorkPackage ($number) | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getSummaryText () | |
processPart () | |
![]() | |
initialize (&$request, &$response) | |
hasView () | |
executeKernel () | |
getStepNumber () | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getSummaryText () | |
initializeTask () | |
processPart () | |
![]() | |
Controller (&$delegate) | |
initialize (&$request, &$response) | |
validate () | |
hasView () | |
execute () | |
executeKernel () | |
getErrorMsg () | |
setErrorMsg ($msg) | |
appendErrorMsg ($msg) | |
& | getRequest () |
& | getResponse () |
& | getView () |
& | getDelegate () |
getViewTemplate ($controller, $context, $action) | |
getCacheId () | |
assignViewDefaults (&$view) | |
isLocalizedRequest () | |
Public Attributes | |
$WORK_PACKAGES_VARNAME = 'BatchController.workPackages' | |
$NUM_STEPS_VARNAME = 'BatchController.numSteps' | |
$_workPackages = array() | |
![]() | |
$STEP_SESSION_VARNAME = 'LongTaskController.curStep' | |
$ONE_CALL_SESSION_VARNAME = 'LongTaskController.oneCall' | |
$_curStep = 1 | |
![]() | |
$_request = null | |
$_response = null | |
$_errorMsg = '' | |
$_view = null | |
$_delegate = null | |
BatchController allows to define work packages that will be processed in a sequence. It simplifies the usage of LongTaskController functionality for splitting different bigger tasks into many smaller (similar) tasks where the whole number of tasks isn't known at designtime.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Input actions:
Output actions:
Definition at line 38 of file class.BatchController.php.
BatchController::initialize | ( | & | $request, |
& | $response | ||
) |
Definition at line 49 of file class.BatchController.php.
References addWorkPackage(), PersistenceFacade\getInstance(), SessionData\getInstance(), getWorkPackage(), and WCMFException\throwEx().
BatchController::addWorkPackage | ( | $name, | |
$size, | |||
$oids, | |||
$callback, | |||
$args = null |
|||
) |
Add a work package to session. This package will be devided into sub packages of given size.
name | Display name of the package (will be supplemented by startNumber-endNumber, e.g. '1-7', '8-14', ...) |
size | Size of one sub package. This defines how many of the oids will be passed to the callback in one call (e.g. '7' means pass 7 oids per call) |
oids | An array of oids (or other application specific package identifiers) that will be distributed into sub packages of given size |
callback | The name of method to call for this package type |
args | Assoziative array of additional callback arguments (application specific) [default: null] |
Definition at line 99 of file class.BatchController.php.
References SessionData\getInstance(), and WCMFException\throwEx().
Referenced by SearchIndexController\collect(), CopyController\copyNodes(), XMLExportController\exportNodes(), SearchIndexController\index(), XMLExportController\initExport(), initialize(), BatchDisplayController\loadNodes(), BatchDisplayController\startProcess(), and CopyController\startProcess().
BatchController::getWorkPackage | ( | $number | ) |
Get definitions of work packages.
number | The number of the work package (first number is 0, number is incremented on every call) |
Definition at line 166 of file class.BatchController.php.
References WCMFException\throwEx().
Referenced by initialize().
BatchController::getNumberOfSteps | ( | ) |
Definition at line 173 of file class.BatchController.php.
References SessionData\getInstance().
Referenced by SearchIndexController\index(), and processPart().
BatchController::getDisplayText | ( | $step | ) |
Definition at line 181 of file class.BatchController.php.
References Message\get().
BatchController::getSummaryText | ( | ) |
Definition at line 189 of file class.BatchController.php.
BatchController::processPart | ( | ) |
Definition at line 196 of file class.BatchController.php.
References getNumberOfSteps(), LongTaskController\getStepNumber(), and WCMFException\throwEx().
BatchController::$WORK_PACKAGES_VARNAME = 'BatchController.workPackages' |
Definition at line 41 of file class.BatchController.php.
BatchController::$NUM_STEPS_VARNAME = 'BatchController.numSteps' |
Definition at line 42 of file class.BatchController.php.
BatchController::$_workPackages = array() |
Definition at line 44 of file class.BatchController.php.