Open Monograph Press  3.3.0
ImportExportPlugin Class Reference
Inheritance diagram for ImportExportPlugin:
Plugin CSVImportExportPlugin NativeImportExportPlugin Onix30ExportPlugin PKPUserImportExportPlugin UserImportExportPlugin

Public Member Functions

 display ($args, $request)
 
 displayXMLValidationErrors ($errors, $xml)
 
 executeCLI ($scriptName, &$args)
 
 getActions ($request, $actionArgs)
 
 getExportFileName ($basePath, $objectsFileNamePart, $context, $extension='.xml')
 
 getExportPath ()
 
 getPluginSettingsPrefix ()
 
 isAllowedMethod ($url)
 
 isRelativePath ($url)
 
 pluginUrl ($params, $smarty)
 
 usage ($scriptName)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getCanDisable ()
 
 getCanEnable ()
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getCurrentVersion ()
 
 getDescription ()
 
 getDirName ()
 
 getDisplayName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getName ()
 
 getPluginPath ()
 
getRequest ()
 
 getSeq ()
 
 getSetting ($contextId, $name)
 
 getTemplatePath ($inCore=false)
 
 getTemplateResource ($template=null, $inCore=false)
 
 import ($class)
 
 installContextSpecificSettings ($hookName, $args)
 
 installControlledVocabs ($hookName, $args)
 
 installData ($hookName, $args)
 
 installEmailTemplateData ($hookName, $args)
 
 installEmailTemplates ($hookName, $args)
 
 installFilters ($hookName, $args)
 
 installLocale ($hookName, $args)
 
 installSiteSettings ($hookName, $args)
 
 isSitePlugin ()
 
 manage ($args, $request)
 
 register ($category, $path, $mainContextId=null)
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Data Fields

 $_request
 
- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 

Additional Inherited Members

- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Detailed Description

Abstract class for import/export plugins.

Definition at line 18 of file ImportExportPlugin.inc.php.

Member Function Documentation

◆ display()

ImportExportPlugin::display (   $args,
  $request 
)

Display the import/export plugin.

Parameters
$argsarray
$requestPKPRequest

Reimplemented in NativeImportExportPlugin, Onix30ExportPlugin, PKPUserImportExportPlugin, and CSVImportExportPlugin.

Definition at line 66 of file ImportExportPlugin.inc.php.

References Plugin\$request, and PKPTemplateManager\getManager().

◆ displayXMLValidationErrors()

ImportExportPlugin::displayXMLValidationErrors (   $errors,
  $xml 
)

Display XML validation errors.

Parameters
$errorsarray
$xmlstring

Definition at line 161 of file ImportExportPlugin.inc.php.

References fatalError(), Config\getVar(), and AppLocale\requireComponents().

Referenced by NativeImportExportPlugin\exportSubmissions().

◆ executeCLI()

ImportExportPlugin::executeCLI (   $scriptName,
$args 
)
abstract

Execute import/export tasks using the command-line interface.

Parameters
$scriptNameThe name of the command-line script (displayed as usage info)
$argsParameters to the plugin

Reimplemented in NativeImportExportPlugin, Onix30ExportPlugin, CSVImportExportPlugin, and UserImportExportPlugin.

◆ getActions()

ImportExportPlugin::getActions (   $request,
  $actionArgs 
)

Get a list of link actions for plugin management.

Parameters
requestPKPRequest
$actionArgsarray The list of action args to be included in request URLs.
Returns
array List of LinkActions

Reimplemented from Plugin.

Reimplemented in CSVImportExportPlugin.

Definition at line 42 of file ImportExportPlugin.inc.php.

References Plugin\$request, and Plugin\getName().

◆ getExportFileName()

ImportExportPlugin::getExportFileName (   $basePath,
  $objectsFileNamePart,
  $context,
  $extension = '.xml' 
)

Return the whole export file name.

Parameters
$basePathstring Base path for temporary file storage
$objectsFileNamePartstring Part different for each object type.
$contextContext
$extensionstring
Returns
string

Definition at line 152 of file ImportExportPlugin.inc.php.

References getPluginSettingsPrefix().

Referenced by PKPUserImportExportPlugin\display(), NativeImportExportPlugin\display(), and Onix30ExportPlugin\display().

◆ getExportPath()

ImportExportPlugin::getExportPath ( )

Return the plugin export directory.

Returns
string The export directory path.

Definition at line 140 of file ImportExportPlugin.inc.php.

References Config\getVar().

Referenced by PKPUserImportExportPlugin\display(), NativeImportExportPlugin\display(), and Onix30ExportPlugin\display().

◆ getPluginSettingsPrefix()

ImportExportPlugin::getPluginSettingsPrefix ( )

Get the plugin ID used as plugin settings prefix.

Returns
string

Reimplemented in NativeImportExportPlugin, Onix30ExportPlugin, and PKPUserImportExportPlugin.

Definition at line 132 of file ImportExportPlugin.inc.php.

Referenced by getExportFileName().

◆ isAllowedMethod()

ImportExportPlugin::isAllowedMethod (   $url)

Determine whether the specified URL describes an allowed protocol.

Parameters
$urlstring
Returns
boolean

Definition at line 115 of file ImportExportPlugin.inc.php.

Referenced by isRelativePath().

◆ isRelativePath()

ImportExportPlugin::isRelativePath (   $url)

Check if this is a relative path to the xml document that describes public identifiers to be imported.

Parameters
$urlstring path to the xml file

Definition at line 103 of file ImportExportPlugin.inc.php.

References isAllowedMethod().

Referenced by NativeImportExportPlugin\executeCLI().

◆ pluginUrl()

ImportExportPlugin::pluginUrl (   $params,
  $smarty 
)

Generate a URL into the plugin.

See also
calling conventions at http://www.smarty.net/docsv2/en/api.register.function.tpl
Parameters
$paramsarray
$smartySmarty
Returns
string

Definition at line 93 of file ImportExportPlugin.inc.php.

References Plugin\getName().

◆ usage()

ImportExportPlugin::usage (   $scriptName)
abstract

Display the command-line usage information

Parameters
$scriptNamestring

Reimplemented in NativeImportExportPlugin, CSVImportExportPlugin, Onix30ExportPlugin, and UserImportExportPlugin.

Field Documentation

◆ $_request

Request ImportExportPlugin::$_request

Request made available for plugin URL generation

Definition at line 23 of file ImportExportPlugin.inc.php.


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