CSVImportController.php
44 * | _in_ `docFile` | The file upload as associative array with the following keys: 'name', 'type', 'tmp_name' (typically a $_FILES entry)
105 $uploadFile = $uploadDir.FileUtil::uploadFile($request->getValue('docFile'), $uploadDir.'data.csv');
148 if (!$this->getPermissionManager()->authorize($request->getValue('className'), '', PersistenceAction::CREATE) ||
149 !$this->getPermissionManager()->authorize($request->getValue('className'), '', PersistenceAction::UPDATE)) {
171 * @note This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Session is the interface for session implementations and defines access to session variables.
Definition: Session.php:19
Response holds the response values that are used as output from Controller instances.
Definition: Response.php:20
CSVImportController imports instances of one type into the storage.
Definition: CSVImportController.php:54
Request holds the request values that are used as input to Controller instances.
Definition: Request.php:18
validate()
Definition: CSVImportController.php:131
__construct(Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, Cache $staticCache)
Constructor.
Definition: CSVImportController.php:73
importNodes($oids)
Serialize all Nodes with given object ids to CSV.
Definition: CSVImportController.php:211
cleanup()
Definition: CSVImportController.php:295
initialize(Request $request, Response $response)
Definition: CSVImportController.php:90
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
initImport($oids)
Initialize the CSV import (object ids parameter will be ignored)
Definition: CSVImportController.php:173
requireTransaction()
Start or join a transaction that will be committed at the end of execution.
Definition: Controller.php:334
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
ApplicationError is used to signal errors that occur while processing a request.
Definition: ApplicationError.php:41
static get($code, $data=null)
Factory method for retrieving a predefined error instance.
Definition: ApplicationError.php:144
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
getValue($name, $default=null, $validateDesc=null, $suppressException=false)
Get a value.
FileUtil provides basic support for file functionality like HTTP file upload.
Definition: FileUtil.php:22
const NODES_PER_CALL
Definition: CSVImportController.php:58
const CACHE_KEY_STATS
Definition: CSVImportController.php:55
BatchController is used to process complex, longer running actions, that need to be divided into seve...
Definition: BatchController.php:73
addWorkPackage($name, $size, array $oids, $callback, $args=null)
Add a work package to session.
Definition: BatchController.php:210
Controller is the base class of all controllers.
Definition: Controller.php:49
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
ActionMapper implementations are responsible for instantiating and executing Controllers based on the...
Definition: ActionMapper.php:21
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
PersistenceAction values are used to define actions on PersistentObject instances.
Definition: PersistenceAction.php:19
getWorkPackage($number)
Definition: CSVImportController.php:161
Localization defines the interface for storing localized entity instances and retrieving them back.
Definition: Localization.php:32
const STATE_DIRTY
Definition: PersistentObject.php:26
Message is used to get localized messages to be used in the user interface.
Definition: Message.php:23