Open Journal Systems  3.3.0
PubObjectsExportPlugin.inc.php
1 <?php
2 
16 import('lib.pkp.classes.plugins.ImportExportPlugin');
17 
18 // The statuses.
19 define('EXPORT_STATUS_ANY', '');
20 define('EXPORT_STATUS_NOT_DEPOSITED', 'notDeposited');
21 define('EXPORT_STATUS_MARKEDREGISTERED', 'markedRegistered');
22 define('EXPORT_STATUS_REGISTERED', 'registered');
23 
24 // The actions.
25 define('EXPORT_ACTION_EXPORT', 'export');
26 define('EXPORT_ACTION_MARKREGISTERED', 'markRegistered');
27 define('EXPORT_ACTION_DEPOSIT', 'deposit');
28 
29 // Configuration errors.
30 define('EXPORT_CONFIG_ERROR_SETTINGS', 0x02);
31 
32 
35  var $_cache;
36 
41  function getCache() {
42  if (!is_a($this->_cache, 'PubObjectCache')) {
43  // Instantiate the cache.
44  import('classes.plugins.PubObjectCache');
45  $this->_cache = new PubObjectCache();
46  }
47  return $this->_cache;
48  }
49 
53  function register($category, $path, $mainContextId = null) {
54  if (!parent::register($category, $path, $mainContextId)) return false;
55 
56  AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER);
57  $this->addLocaleData();
58 
59  HookRegistry::register('AcronPlugin::parseCronTab', array($this, 'callbackParseCronTab'));
60  foreach ($this->_getDAOs() as $dao) {
61  if ($dao instanceof SchemaDAO) {
62  HookRegistry::register('Schema::get::' . $dao->schemaName, array($this, 'addToSchema'));
63  } else {
64  HookRegistry::register(strtolower_codesafe(get_class($dao)) . '::getAdditionalFieldNames', array(&$this, 'getAdditionalFieldNames'));
65  }
66  }
67  return true;
68  }
69 
73  function manage($args, $request) {
74  $user = $request->getUser();
75  $router = $request->getRouter();
76  $context = $router->getContext($request);
77 
78  $form = $this->_instantiateSettingsForm($context);
79  $notificationManager = new NotificationManager();
80  switch ($request->getUserVar('verb')) {
81  case 'save':
82  $form->readInputData();
83  if ($form->validate()) {
84  $form->execute();
85  $notificationManager->createTrivialNotification($user->getId(), NOTIFICATION_TYPE_SUCCESS);
86  return new JSONMessage(true);
87  } else {
88  return new JSONMessage(true, $form->fetch($request));
89  }
90  case 'index':
91  $form->initData();
92  return new JSONMessage(true, $form->fetch($request));
93  case 'statusMessage':
94  $statusMessage = $this->getStatusMessage($request);
95  if ($statusMessage) {
96  $templateMgr = TemplateManager::getManager($request);
97  $templateMgr->assign(array(
98  'statusMessage' => htmlentities($statusMessage),
99  ));
100  return new JSONMessage(true, $templateMgr->fetch($this->getTemplateResource('statusMessage.tpl')));
101  }
102  }
103  return parent::manage($args, $request);
104  }
105 
109  function display($args, $request) {
110  parent::display($args, $request);
111 
112  $context = $request->getContext();
113  switch (array_shift($args)) {
114  case 'index':
115  case '':
116  // Check for configuration errors:
117  $configurationErrors = array();
118  // missing plugin settings
119  $form = $this->_instantiateSettingsForm($context);
120  foreach($form->getFormFields() as $fieldName => $fieldType) {
121  if ($form->isOptional($fieldName)) continue;
122  $pluginSetting = $this->getSetting($context->getId(), $fieldName);
123  if (empty($pluginSetting)) {
124  $configurationErrors[] = EXPORT_CONFIG_ERROR_SETTINGS;
125  break;
126  }
127  }
128 
129  // Add link actions
130  $actions = $this->getExportActions($context);
131  $actionNames = array_intersect_key($this->getExportActionNames(), array_flip($actions));
132  import('lib.pkp.classes.linkAction.request.NullAction');
133  $linkActions = array();
134  foreach ($actionNames as $action => $actionName) {
135  $linkActions[] = new LinkAction($action, new NullAction(), $actionName);
136  }
137  $templateMgr = TemplateManager::getManager($request);
138  $templateMgr->assign(array(
139  'plugin' => $this,
140  'actionNames' => $actionNames,
141  'configurationErrors' => $configurationErrors,
142  ));
143  break;
144  case 'exportSubmissions':
145  case 'exportIssues':
146  case 'exportRepresentations':
147  $selectedSubmissions = (array) $request->getUserVar('selectedSubmissions');
148  $selectedIssues = (array) $request->getUserVar('selectedIssues');
149  $selectedRepresentations = (array) $request->getUserVar('selectedRepresentations');
150  $tab = (string) $request->getUserVar('tab');
151  $noValidation = $request->getUserVar('validation') ? false : true;
152 
153  if (empty($selectedSubmissions) && empty($selectedIssues) && empty($selectedRepresentations)) {
154  fatalError(__('plugins.importexport.common.error.noObjectsSelected'));
155  }
156  if (!empty($selectedSubmissions)) {
157  $objects = $this->getPublishedSubmissions($selectedSubmissions, $context);
158  $filter = $this->getSubmissionFilter();
159  $objectsFileNamePart = 'articles';
160  } elseif (!empty($selectedIssues)) {
161  $objects = $this->getPublishedIssues($selectedIssues, $context);
162  $filter = $this->getIssueFilter();
163  $objectsFileNamePart = 'issues';
164  } elseif (!empty($selectedRepresentations)) {
165  $objects = $this->getArticleGalleys($selectedRepresentations);
166  $filter = $this->getRepresentationFilter();
167  $objectsFileNamePart = 'galleys';
168  }
169 
170  // Execute export action
171  $this->executeExportAction($request, $objects, $filter, $tab, $objectsFileNamePart, $noValidation);
172  }
173  }
174 
184  function executeExportAction($request, $objects, $filter, $tab, $objectsFileNamePart, $noValidation = null) {
185  $context = $request->getContext();
186  $path = array('plugin', $this->getName());
187  if ($request->getUserVar(EXPORT_ACTION_EXPORT)) {
188  assert($filter != null);
189 
190  $onlyValidateExport = ($request->getUserVar('onlyValidateExport')) ? true : false;
191  if ($onlyValidateExport) {
192  $noValidation = false;
193  }
194 
195  // Get the XML
196  $exportXml = $this->exportXML($objects, $filter, $context, $noValidation);
197 
198  if ($onlyValidateExport) {
199  if (isset($exportXml)) {
200  $this->_sendNotification(
201  $request->getUser(),
202  'plugins.importexport.common.validation.success',
203  NOTIFICATION_TYPE_SUCCESS
204  );
205  } else {
206  $this->_sendNotification(
207  $request->getUser(),
208  'plugins.importexport.common.validation.fail',
209  NOTIFICATION_TYPE_ERROR
210  );
211  }
212 
213  $request->redirect(null, null, null, $path, null, $tab);
214  } else {
215  import('lib.pkp.classes.file.FileManager');
216  $fileManager = new FileManager();
217  $exportFileName = $this->getExportFileName($this->getExportPath(), $objectsFileNamePart, $context, '.xml');
218  $fileManager->writeFile($exportFileName, $exportXml);
219  $fileManager->downloadByPath($exportFileName);
220  $fileManager->deleteByPath($exportFileName);
221  }
222  } elseif ($request->getUserVar(EXPORT_ACTION_DEPOSIT)) {
223  assert($filter != null);
224  // Get the XML
225  $exportXml = $this->exportXML($objects, $filter, $context, $noValidation);
226  // Write the XML to a file.
227  // export file name example: crossref-20160723-160036-articles-1.xml
228  import('lib.pkp.classes.file.FileManager');
229  $fileManager = new FileManager();
230  $exportFileName = $this->getExportFileName($this->getExportPath(), $objectsFileNamePart, $context, '.xml');
231  $fileManager->writeFile($exportFileName, $exportXml);
232  // Deposit the XML file.
233  $result = $this->depositXML($objects, $context, $exportFileName);
234  // send notifications
235  if ($result === true) {
236  $this->_sendNotification(
237  $request->getUser(),
238  $this->getDepositSuccessNotificationMessageKey(),
239  NOTIFICATION_TYPE_SUCCESS
240  );
241  } else {
242  if (is_array($result)) {
243  foreach($result as $error) {
244  assert(is_array($error) && count($error) >= 1);
245  $this->_sendNotification(
246  $request->getUser(),
247  $error[0],
248  NOTIFICATION_TYPE_ERROR,
249  (isset($error[1]) ? $error[1] : null)
250  );
251  }
252  }
253  }
254  // Remove all temporary files.
255  $fileManager->deleteByPath($exportFileName);
256  // redirect back to the right tab
257  $request->redirect(null, null, null, $path, null, $tab);
258  } elseif ($request->getUserVar(EXPORT_ACTION_MARKREGISTERED)) {
259  $this->markRegistered($context, $objects);
260  // redirect back to the right tab
261  $request->redirect(null, null, null, $path, null, $tab);
262  } else {
263  $dispatcher = $request->getDispatcher();
264  $dispatcher->handle404();
265  }
266  }
267 
273  return 'plugins.importexport.common.register.success';
274  }
275 
284  abstract function depositXML($objects, $context, $filename);
285 
292  function getStatusMessage($request) {
293  return null;
294  }
295 
300  function getSubmissionFilter() {
301  return null;
302  }
303 
308  function getIssueFilter() {
309  return null;
310  }
311 
316  function getRepresentationFilter() {
317  return null;
318  }
319 
324  function getStatusNames() {
325  return array(
326  EXPORT_STATUS_ANY => __('plugins.importexport.common.status.any'),
327  EXPORT_STATUS_NOT_DEPOSITED => __('plugins.importexport.common.status.notDeposited'),
328  EXPORT_STATUS_MARKEDREGISTERED => __('plugins.importexport.common.status.markedRegistered'),
329  EXPORT_STATUS_REGISTERED => __('plugins.importexport.common.status.registered'),
330  );
331  }
332 
339  function getStatusActions($pubObject) {
340  return array();
341  }
342 
348  function getExportActions($context) {
349  $actions = array(EXPORT_ACTION_EXPORT, EXPORT_ACTION_MARKREGISTERED);
350  if ($this->getSetting($context->getId(), 'username') && $this->getSetting($context->getId(), 'password')) {
351  array_unshift($actions, EXPORT_ACTION_DEPOSIT);
352  }
353  return $actions;
354  }
355 
360  function getExportActionNames() {
361  return array(
362  EXPORT_ACTION_DEPOSIT => __('plugins.importexport.common.action.register'),
363  EXPORT_ACTION_EXPORT => __('plugins.importexport.common.action.export'),
364  EXPORT_ACTION_MARKREGISTERED => __('plugins.importexport.common.action.markRegistered'),
365  );
366  }
367 
372  abstract function getExportDeploymentClassName();
373 
382  function exportXML($objects, $filter, $context, $noValidation = null) {
383  $filterDao = DAORegistry::getDAO('FilterDAO'); /* @var $filterDao FilterDAO */
384  $exportFilters = $filterDao->getObjectsByGroup($filter);
385  assert(count($exportFilters) == 1); // Assert only a single serialization filter
386  $exportFilter = array_shift($exportFilters);
387  $exportDeployment = $this->_instantiateExportDeployment($context);
388  $exportFilter->setDeployment($exportDeployment);
389  if ($noValidation) $exportFilter->setNoValidation($noValidation);
390  libxml_use_internal_errors(true);
391  $exportXml = $exportFilter->execute($objects, true);
392  $xml = $exportXml->saveXml();
393  $errors = array_filter(libxml_get_errors(), function($a) {
394  return $a->level == LIBXML_ERR_ERROR || $a->level == LIBXML_ERR_FATAL;
395  });
396  if (!empty($errors)) {
397  $this->displayXMLValidationErrors($errors, $xml);
398  }
399  return $xml;
400  }
401 
407  function markRegistered($context, $objects) {
408  foreach ($objects as $object) {
409  $object->setData($this->getDepositStatusSettingName(), EXPORT_STATUS_MARKEDREGISTERED);
410  $this->updateObject($object);
411  }
412  }
413 
418  protected function updateObject($object) {
419  // Register a hook for the required additional
420  // object fields. We do this on a temporary
421  // basis as the hook adds a performance overhead
422  // and the field will "stealthily" survive even
423  // when the DAO does not know about it.
424  $dao = $object->getDAO();
425  $dao->updateObject($object);
426  }
427 
436  function getAdditionalFieldNames($hookName, $args) {
437  assert(count($args) == 2);
438  $additionalFields =& $args[1];
439  assert(is_array($additionalFields));
440  foreach ($this->_getObjectAdditionalSettings() as $fieldName) {
441  $additionalFields[] = $fieldName;
442  }
443 
444  return false;
445  }
446 
455  public function addToSchema($hookName, $params) {
456  $schema =& $params[0];
457  foreach ($this->_getObjectAdditionalSettings() as $fieldName) {
458  $schema->properties->{$fieldName} = (object) [
459  'type' => 'string',
460  'apiSummary' => true,
461  'validation' => ['nullable'],
462  ];
463  }
464 
465  return false;
466  }
467 
472  protected function _getObjectAdditionalSettings() {
473  return array($this->getDepositStatusSettingName());
474  }
475 
479  function callbackParseCronTab($hookName, $args) {
480  $taskFilesPath =& $args[0];
481  $taskFilesPath[] = $this->getPluginPath() . DIRECTORY_SEPARATOR . 'scheduledTasks.xml';
482  return false;
483  }
484 
490  function getUnregisteredArticles($context) {
491  // Retrieve all published submissions that have not yet been registered.
492  $submissionDao = DAORegistry::getDAO('SubmissionDAO'); /* @var $submissionDao SubmissionDAO */
493  $articles = $submissionDao->getExportable(
494  $context->getId(),
495  null,
496  null,
497  null,
498  null,
499  $this->getDepositStatusSettingName(),
500  EXPORT_STATUS_NOT_DEPOSITED,
501  null
502  );
503  return $articles->toArray();
504  }
510  function isTestMode($context) {
511  return ($this->getSetting($context->getId(), 'testMode') == 1);
512  }
513 
518  function getDepositStatusSettingName() {
519  return $this->getPluginSettingsPrefix().'::status';
520  }
521 
522 
523 
527  function usage($scriptName) {
528  echo __(
529  'plugins.importexport.' . $this->getPluginSettingsPrefix() . '.cliUsage',
530  array(
531  'scriptName' => $scriptName,
532  'pluginName' => $this->getName()
533  )
534  ) . "\n";
535  }
536 
540  function executeCLI($scriptName, &$args) {
541  AppLocale::requireComponents(LOCALE_COMPONENT_APP_MANAGER);
542 
543  $command = array_shift($args);
544  if (!in_array($command, array('export', 'register'))) {
545  $this->usage($scriptName);
546  return;
547  }
548 
549  $outputFile = $command == 'export' ? array_shift($args) : null;
550  $contextPath = array_shift($args);
551  $objectType = array_shift($args);
552 
553  $contextDao = DAORegistry::getDAO('JournalDAO'); /* @var $contextDao JournalDAO */
554  $context = $contextDao->getByPath($contextPath);
555  if (!$context) {
556  if ($contextPath != '') {
557  echo __('plugins.importexport.common.cliError') . "\n";
558  echo __('plugins.importexport.common.error.unknownJournal', array('journalPath' => $contextPath)) . "\n\n";
559  }
560  $this->usage($scriptName);
561  return;
562  }
563 
564  if ($outputFile) {
565  if ($this->isRelativePath($outputFile)) {
566  $outputFile = PWD . '/' . $outputFile;
567  }
568  $outputDir = dirname($outputFile);
569  if (!is_writable($outputDir) || (file_exists($outputFile) && !is_writable($outputFile))) {
570  echo __('plugins.importexport.common.cliError') . "\n";
571  echo __('plugins.importexport.common.export.error.outputFileNotWritable', array('param' => $outputFile)) . "\n\n";
572  $this->usage($scriptName);
573  return;
574  }
575  }
576 
577  switch ($objectType) {
578  case 'articles':
579  $objects = $this->getPublishedSubmissions($args, $context);
580  $filter = $this->getSubmissionFilter();
581  $objectsFileNamePart = 'articles';
582  break;
583  case 'issues':
584  $objects = $this->getPublishedIssues($args, $context);
585  $filter = $this->getIssueFilter();
586  $objectsFileNamePart = 'issues';
587  break;
588  case 'galleys':
589  $objects = $this->getArticleGalleys($args);
590  $filter = $this->getRepresentationFilter();
591  $objectsFileNamePart = 'galleys';
592  break;
593  default:
594  $this->usage($scriptName);
595  return;
596 
597  }
598  if (empty($objects)) {
599  echo __('plugins.importexport.common.cliError') . "\n";
600  echo __('plugins.importexport.common.error.unknownObjects') . "\n\n";
601  $this->usage($scriptName);
602  return;
603  }
604  if (!$filter) {
605  $this->usage($scriptName);
606  return;
607  }
608 
609  $this->executeCLICommand($scriptName, $command, $context, $outputFile, $objects, $filter, $objectsFileNamePart);
610  return;
611  }
612 
623  function executeCLICommand($scriptName, $command, $context, $outputFile, $objects, $filter, $objectsFileNamePart) {
624  $exportXml = $this->exportXML($objects, $filter, $context);
625  if ($command == 'export' && $outputFile) file_put_contents($outputFile, $exportXml);
626 
627  if ($command == 'register') {
628  import('lib.pkp.classes.file.FileManager');
629  $fileManager = new FileManager();
630  $exportFileName = $this->getExportFileName($this->getExportPath(), $objectsFileNamePart, $context, '.xml');
631  $fileManager->writeFile($exportFileName, $exportXml);
632  $result = $this->depositXML($objects, $context, $exportFileName);
633  if ($result === true) {
634  echo __('plugins.importexport.common.register.success') . "\n";
635  } else {
636  echo __('plugins.importexport.common.cliError') . "\n";
637  if (is_array($result)) {
638  foreach($result as $error) {
639  assert(is_array($error) && count($error) >= 1);
640  $errorMessage = __($error[0], array('param' => (isset($error[1]) ? $error[1] : null)));
641  echo "*** $errorMessage\n";
642  }
643  echo "\n";
644  } else {
645  echo __('plugins.importexport.common.register.error.mdsError', array('param' => ' - ')) . "\n\n";
646  }
647  $this->usage($scriptName);
648  }
649  $fileManager->deleteByPath($exportFileName);
650  }
651  }
652 
659  function getPublishedSubmissions($submissionIds, $context) {
660  $submissions = array_map(function($submissionId) {
661  return Services::get('submission')->get($submissionId);
662  }, $submissionIds);
663  return array_filter($submissions, function($submission) {
664  return $submission->getData('status') === STATUS_PUBLISHED;
665  });
666  }
667 
674  function getPublishedIssues($issueIds, $context) {
675  $publishedIssues = array();
676  $issueDao = DAORegistry::getDAO('IssueDAO'); /* @var $issueDao IssueDAO */
677  foreach ($issueIds as $issueId) {
678  $publishedIssue = $issueDao->getById($issueId, $context->getId());
679  if ($publishedIssue) $publishedIssues[] = $publishedIssue;
680  }
681  return $publishedIssues;
682  }
683 
689  function getArticleGalleys($galleyIds) {
690  $galleys = array();
691  $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO'); /* @var $articleGalleyDao ArticleGalleyDAO */
692  foreach ($galleyIds as $galleyId) {
693  $articleGalley = $articleGalleyDao->getById($galleyId);
694  if ($articleGalley) $galleys[] = $articleGalley;
695  }
696  return $galleys;
697  }
698 
706  function _sendNotification($user, $message, $notificationType, $param = null) {
707  static $notificationManager = null;
708  if (is_null($notificationManager)) {
709  import('classes.notification.NotificationManager');
710  $notificationManager = new NotificationManager();
711  }
712  if (!is_null($param)) {
713  $params = array('param' => $param);
714  } else {
715  $params = null;
716  }
717  $notificationManager->createTrivialNotification(
718  $user->getId(),
719  $notificationType,
720  array('contents' => __($message, $params))
721  );
722  }
723 
729  function _instantiateExportDeployment($context) {
730  $exportDeploymentClassName = $this->getExportDeploymentClassName();
731  $this->import($exportDeploymentClassName);
732  $exportDeployment = new $exportDeploymentClassName($context, $this);
733  return $exportDeployment;
734  }
735 
741  function _instantiateSettingsForm($context) {
742  $settingsFormClassName = $this->getSettingsFormClassName();
743  $this->import('classes.form.' . $settingsFormClassName);
744  $settingsForm = new $settingsFormClassName($this, $context->getId());
745  return $settingsForm;
746  }
747 
752  protected function _getDAOs() {
753  return array(
754  DAORegistry::getDAO('PublicationDAO'),
755  DAORegistry::getDAO('SubmissionDAO'),
757  DAORegistry::getDAO('SubmissionFileDAO'),
758  DAORegistry::getDAO('IssueDAO'),
759  );
760  }
761 }
762 
763 
PubObjectsExportPlugin\executeExportAction
executeExportAction($request, $objects, $filter, $tab, $objectsFileNamePart, $noValidation=null)
Definition: PubObjectsExportPlugin.inc.php:187
PubObjectsExportPlugin\getCache
getCache()
Definition: PubObjectsExportPlugin.inc.php:44
AppLocale\requireComponents
static requireComponents()
Definition: env1/MockAppLocale.inc.php:56
PubObjectsExportPlugin\getAdditionalFieldNames
getAdditionalFieldNames($hookName, $args)
Definition: PubObjectsExportPlugin.inc.php:439
PubObjectsExportPlugin\manage
manage($args, $request)
Definition: PubObjectsExportPlugin.inc.php:76
PubObjectsExportPlugin\getExportActions
getExportActions($context)
Definition: PubObjectsExportPlugin.inc.php:351
PubObjectsExportPlugin\_getObjectAdditionalSettings
_getObjectAdditionalSettings()
Definition: PubObjectsExportPlugin.inc.php:475
Application\getRepresentationDAO
static getRepresentationDAO()
Definition: Application.inc.php:162
PubObjectsExportPlugin\getDepositStatusSettingName
getDepositStatusSettingName()
Definition: PubObjectsExportPlugin.inc.php:521
ImportExportPlugin\displayXMLValidationErrors
displayXMLValidationErrors($errors, $xml)
Definition: ImportExportPlugin.inc.php:161
PubObjectsExportPlugin\_sendNotification
_sendNotification($user, $message, $notificationType, $param=null)
Definition: PubObjectsExportPlugin.inc.php:709
Plugin\getName
getName()
PubObjectsExportPlugin\getDepositSuccessNotificationMessageKey
getDepositSuccessNotificationMessageKey()
Definition: PubObjectsExportPlugin.inc.php:275
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
PubObjectsExportPlugin\getArticleGalleys
getArticleGalleys($galleyIds)
Definition: PubObjectsExportPlugin.inc.php:692
PubObjectsExportPlugin\display
display($args, $request)
Definition: PubObjectsExportPlugin.inc.php:112
PubObjectsExportPlugin\executeCLICommand
executeCLICommand($scriptName, $command, $context, $outputFile, $objects, $filter, $objectsFileNamePart)
Definition: PubObjectsExportPlugin.inc.php:626
PubObjectsExportPlugin\getExportActionNames
getExportActionNames()
Definition: PubObjectsExportPlugin.inc.php:363
PubObjectsExportPlugin\isTestMode
isTestMode($context)
Definition: PubObjectsExportPlugin.inc.php:513
PubObjectsExportPlugin\_instantiateSettingsForm
_instantiateSettingsForm($context)
Definition: PubObjectsExportPlugin.inc.php:744
PubObjectsExportPlugin\getUnregisteredArticles
getUnregisteredArticles($context)
Definition: PubObjectsExportPlugin.inc.php:493
PubObjectsExportPlugin\getExportDeploymentClassName
getExportDeploymentClassName()
PubObjectsExportPlugin\exportXML
exportXML($objects, $filter, $context, $noValidation=null)
Definition: PubObjectsExportPlugin.inc.php:385
PubObjectsExportPlugin\_instantiateExportDeployment
_instantiateExportDeployment($context)
Definition: PubObjectsExportPlugin.inc.php:732
PubObjectsExportPlugin\getStatusMessage
getStatusMessage($request)
Definition: PubObjectsExportPlugin.inc.php:295
PubObjectsExportPlugin\getSubmissionFilter
getSubmissionFilter()
Definition: PubObjectsExportPlugin.inc.php:303
ImportExportPlugin
Abstract class for import/export plugins.
Definition: ImportExportPlugin.inc.php:18
PubObjectsExportPlugin\getPublishedSubmissions
getPublishedSubmissions($submissionIds, $context)
Definition: PubObjectsExportPlugin.inc.php:662
ImportExportPlugin\getExportFileName
getExportFileName($basePath, $objectsFileNamePart, $context, $extension='.xml')
Definition: ImportExportPlugin.inc.php:152
NullAction
This action does nothing.
Definition: NullAction.inc.php:18
JSONMessage
Class to represent a JSON (Javascript Object Notation) message.
Definition: JSONMessage.inc.php:18
Plugin\getSetting
getSetting($contextId, $name)
Definition: Plugin.inc.php:473
ImportExportPlugin\getExportPath
getExportPath()
Definition: ImportExportPlugin.inc.php:140
PubObjectsExportPlugin\getRepresentationFilter
getRepresentationFilter()
Definition: PubObjectsExportPlugin.inc.php:319
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition: LinkAction.inc.php:22
Seboettg\Collection\count
count()
Definition: ArrayListTrait.php:253
PubObjectsExportPlugin\getIssueFilter
getIssueFilter()
Definition: PubObjectsExportPlugin.inc.php:311
PubObjectsExportPlugin\$_cache
$_cache
Definition: PubObjectsExportPlugin.inc.php:38
PubObjectCache
A cache for publication objects required during export.
Definition: PubObjectCache.inc.php:17
PubObjectsExportPlugin\usage
usage($scriptName)
Definition: PubObjectsExportPlugin.inc.php:530
PubObjectsExportPlugin\_getDAOs
_getDAOs()
Definition: PubObjectsExportPlugin.inc.php:755
PKPTemplateManager\getManager
static & getManager($request=null)
Definition: PKPTemplateManager.inc.php:1239
PubObjectsExportPlugin\executeCLI
executeCLI($scriptName, &$args)
Definition: PubObjectsExportPlugin.inc.php:543
PubObjectsExportPlugin
Basis class for XML metadata export plugins.
Definition: PubObjectsExportPlugin.inc.php:33
strtolower_codesafe
strtolower_codesafe($str)
Definition: functions.inc.php:280
PubObjectsExportPlugin\updateObject
updateObject($object)
Definition: PubObjectsExportPlugin.inc.php:421
Plugin\$request
$request
Definition: Plugin.inc.php:68
PubObjectsExportPlugin\depositXML
depositXML($objects, $context, $filename)
Plugin\addLocaleData
addLocaleData($locale=null)
Definition: Plugin.inc.php:454
HookRegistry\register
static register($hookName, $callback, $hookSequence=HOOK_SEQUENCE_NORMAL)
Definition: HookRegistry.inc.php:70
NotificationManager
Definition: NotificationManager.inc.php:19
PubObjectsExportPlugin\getStatusActions
getStatusActions($pubObject)
Definition: PubObjectsExportPlugin.inc.php:342
PubObjectsExportPlugin\addToSchema
addToSchema($hookName, $params)
Definition: PubObjectsExportPlugin.inc.php:458
fatalError
if(!function_exists('import')) fatalError($reason)
Definition: functions.inc.php:32
FileManager
Class defining basic operations for file management.
Definition: FileManager.inc.php:35
PubObjectsExportPlugin\markRegistered
markRegistered($context, $objects)
Definition: PubObjectsExportPlugin.inc.php:410
PubObjectsExportPlugin\getPublishedIssues
getPublishedIssues($issueIds, $context)
Definition: PubObjectsExportPlugin.inc.php:677
PubObjectsExportPlugin\callbackParseCronTab
callbackParseCronTab($hookName, $args)
Definition: PubObjectsExportPlugin.inc.php:482
PubObjectsExportPlugin\getStatusNames
getStatusNames()
Definition: PubObjectsExportPlugin.inc.php:327
SchemaDAO
A base class for DAOs which rely on a json-schema file to define the data object.
Definition: SchemaDAO.inc.php:18
PKPServices\get
static get($service)
Definition: PKPServices.inc.php:49