Open Monograph Press
3.3.0
|
Public Member Functions | |
__construct ($args) | |
getName () | |
getOJSFileTypeFromAssoc ($assocType, $assocId) | |
![]() | |
checkFolderStructure ($install=false) | |
getArchivePath () | |
getCompressArchives () | |
getProcessingPath () | |
getRejectPath () | |
getStagePath () | |
setCompressArchives ($compressArchives) | |
![]() | |
addExecutionLogEntry ($message, $type=null) | |
execute () | |
getHelper () | |
getProcessId () | |
Data Fields | |
$_autoStage | |
$_contextsByPath | |
$_externalLogFiles | |
$_geoLocationTool | |
$_plugin | |
Protected Member Functions | |
autoStage () | |
executeActions () | |
getAssoc ($assocType, $contextPaths, $page, $op, $args) | |
getContextByPath ($contextPaths) | |
getExpectedPageAndOp () | |
getFileTypeFromAssoc ($assocType, $assocId) | |
getFileTypeFromFile ($file) | |
getMetricType () | |
getOJSAssoc ($assocType, $contextPaths, $page, $op, $args) | |
getOMPAssoc ($assocType, $contextPaths, $page, $op, $args) | |
getOPSAssoc ($assocType, $contextPaths, $page, $op, $args) | |
processFile ($filePath) | |
![]() | |
moveFile ($sourceDir, $destDir, $filename) | |
Scheduled task to extract transform and load usage statistics data into database.
Definition at line 23 of file UsageStatsLoader.inc.php.
UsageStatsLoader::__construct | ( | $args | ) |
Constructor.
$argv | array task arguments |
Reimplemented from FileLoader.
Definition at line 59 of file UsageStatsLoader.inc.php.
References FileLoader\checkFolderStructure(), Application\getContextDAO(), PluginRegistry\getPlugin(), PluginRegistry\loadCategory(), DAORegistry\registerDAO(), and FileLoader\setCompressArchives().
|
protected |
Auto stage usage stats log files, also moving files that might be in processing folder to stage folder.
Definition at line 288 of file UsageStatsLoader.inc.php.
References $_plugin, FileLoader\getProcessingPath(), FileLoader\getStagePath(), and FileLoader\moveFile().
Referenced by executeActions().
|
protected |
Implement this method to execute the task actions.
Reimplemented from FileLoader.
Definition at line 123 of file UsageStatsLoader.inc.php.
References $_plugin, ScheduledTask\addExecutionLogEntry(), autoStage(), and FileLoader\getProcessingPath().
|
protected |
Get assoc type and id from the passed page, operation and arguments.
$assocType | ASSOC_TYPE_... |
$contextPaths | array |
$page | string |
$op | string |
$args | array |
Definition at line 426 of file UsageStatsLoader.inc.php.
References $application, $op, PKPApplication\get(), Application\getContextAssocType(), getContextByPath(), DAORegistry\getDAO(), getOJSAssoc(), getOMPAssoc(), and getOPSAssoc().
Referenced by processFile().
|
protected |
Get the context object based on the context path array that's returned by Core::getContextPaths()
$contextPaths | array |
Definition at line 640 of file UsageStatsLoader.inc.php.
References $application, and PKPApplication\get().
Referenced by getAssoc().
|
protected |
Get the expected page and operation from the stats plugin. They are grouped by the object type constant that they give access to.
Definition at line 659 of file UsageStatsLoader.inc.php.
References $application, PKPApplication\get(), and Application\getContextAssocType().
|
protected |
Based on the passed object data, get the file type.
$assocType | int |
$assocId | int |
Definition at line 327 of file UsageStatsLoader.inc.php.
References $application, PKPApplication\get(), DAORegistry\getDAO(), getFileTypeFromFile(), and getOJSFileTypeFromAssoc().
Referenced by processFile().
|
protected |
Associate the passed file type with one of the file type statistics constants.
$file | PKPFile |
Definition at line 376 of file UsageStatsLoader.inc.php.
Referenced by getFileTypeFromAssoc(), and getOJSFileTypeFromAssoc().
|
protected |
Get metric type on which this loader process statistics.
Definition at line 262 of file UsageStatsLoader.inc.php.
References $application, and PKPApplication\get().
UsageStatsLoader::getName | ( | ) |
Get the scheduled task name. Override to define a custom task name.
Reimplemented from ScheduledTask.
Definition at line 116 of file UsageStatsLoader.inc.php.
|
protected |
Get assoc type and id from the passed page, operation and arguments specific to OJS.
$assocType | ASSOC_TYPE_... |
$contextPaths | array |
$page | string |
$op | string |
$args | array |
Definition at line 479 of file UsageStatsLoader.inc.php.
References DAORegistry\getDAO().
Referenced by getAssoc().
UsageStatsLoader::getOJSFileTypeFromAssoc | ( | $assocType, | |
$assocId | |||
) |
Based on the passed object data, get the OJS specific file type.
$assocType | int |
$assocId | int |
Definition at line 358 of file UsageStatsLoader.inc.php.
References DAORegistry\getDAO(), and getFileTypeFromFile().
Referenced by getFileTypeFromAssoc().
|
protected |
$assocType | ASSOC_TYPE_... |
$contextPaths | array |
$page | string |
$op | string |
$args | array |
Definition at line 549 of file UsageStatsLoader.inc.php.
References DAORegistry\getDAO(), and Application\getSectionDAO().
Referenced by getAssoc().
|
protected |
Get assoc type and id from the passed page, operation and arguments specific to OPS.
$assocType | ASSOC_TYPE_... |
$contextPaths | array |
$page | string |
$op | string |
$args | array |
Definition at line 602 of file UsageStatsLoader.inc.php.
References DAORegistry\getDAO().
Referenced by getAssoc().
|
protected |
Process the passed file.
$filePath | string |
Reimplemented from FileLoader.
Definition at line 150 of file UsageStatsLoader.inc.php.
References $_geoLocationTool, $_plugin, $op, ScheduledTask\addExecutionLogEntry(), getAssoc(), DAORegistry\getDAO(), getFileTypeFromAssoc(), and Core\isUserAgentBot().
$_autoStage UsageStatsLoader::$_autoStage |
string
Definition at line 47 of file UsageStatsLoader.inc.php.
$_contextsByPath UsageStatsLoader::$_contextsByPath |
array
Definition at line 41 of file UsageStatsLoader.inc.php.
$_externalLogFiles UsageStatsLoader::$_externalLogFiles |
string
Definition at line 53 of file UsageStatsLoader.inc.php.
A UsageStatsLoader::$_geoLocationTool |
GeoLocationTool object instance to provide geo location based on ip.
Definition at line 29 of file UsageStatsLoader.inc.php.
Referenced by processFile().
$_plugin UsageStatsLoader::$_plugin |
Definition at line 35 of file UsageStatsLoader.inc.php.
Referenced by autoStage(), executeActions(), and processFile().