Detailed Description
CopyController is used to copy or move Node instances.
The controller supports the following actions:
Parameter | Description |
---|---|
in oid | The object id of the Node to move. The Node and all of its children will be moved |
in targetOid | The object id of the parent to attach the moved Node to (if it does not accept the Node type an error occurs) (optional, if empty the new Node has no parent) |
out oid | The object id of the newly created Node |
Parameter | Description |
---|---|
in oid | The object id of the Node to move. The Node and all of its children will be moved |
in targetOid | The object id of the parent to attach the moved Node to (if it does not accept the Node type an error occurs) (optional, if empty the new Node has no parent) |
in nodesPerCall | The number of Node instances to copy in one call (default: 50) |
in recursive | Boolean whether to copy children too (default: true) |
For additional actions and parameters see BatchController actions.
Definition at line 57 of file CopyController.php.
Public Member Functions | |
initialize (Request $request, Response $response) | |
Public Member Functions inherited from BatchController | |
initialize (Request $request, Response $response) | |
Public Member Functions inherited from Controller | |
__construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration) | |
initialize (Request $request, Response $response) | |
execute ($method=null) | |
getRequest () | |
getResponse () | |
Protected Member Functions | |
validate () | |
getWorkPackage ($number) | |
startProcess ($oids) | |
copyNodes ($oids) | |
endProcess (ObjectId $oid) | |
copyNode (ObjectId $oid) | |
getTargetNode (ObjectId $targetOID) | |
registerCopy (PersistentObject $origNode, PersistentObject $copyNode) | |
updateCopyOIDs (array $oidMap) | |
getCopyOID (ObjectId $origOID) | |
getCopy (ObjectId $origOID) | |
modify (PersistentObject $node) | |
Protected Member Functions inherited from BatchController | |
doExecute () | |
getStepNumber () | |
addWorkPackage ($name, $size, $oids, $callback, $args=null) | |
processPart () | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getDownloadFile () | |
getWorkPackage ($number) | |
Protected Member Functions inherited from Controller | |
validate () | |
executeSubAction ($action) | |
getLogger () | |
getSession () | |
getPersistenceFacade () | |
getPermissionManager () | |
getActionMapper () | |
getLocalization () | |
getMessage () | |
getConfiguration () | |
assignResponseDefaults () | |
isLocalizedRequest () | |
checkLanguageParameter () | |
Additional Inherited Members | |
Public Attributes inherited from BatchController | |
const | ONE_CALL_SESSION_VARNAME = 'BatchController.oneCall' |
const | STEP_SESSION_VARNAME = 'BatchController.curStep' |
const | NUM_STEPS_VARNAME = 'BatchController.numSteps' |
const | DOWNLOAD_STEP = 'BatchController.downloadStep' |
const | WORK_PACKAGES_VARNAME = 'BatchController.workPackages' |
Member Function Documentation
- See also
- Controller::initialize()
Definition at line 72 of file CopyController.php.
|
protected |
- See also
- Controller::validate()
Definition at line 97 of file CopyController.php.
|
protected |
Definition at line 153 of file CopyController.php.
|
protected |
Copy/Move the first node (oids parameter will be ignored)
- Parameters
-
$oids The oids to process
Definition at line 177 of file CopyController.php.
|
protected |
Copy nodes provided by the persisted iterator (oids parameter will be ignored)
- Parameters
-
$oids The oids to process
Definition at line 256 of file CopyController.php.
|
protected |
Finish the process and set the result.
- Parameters
-
$oid The object id of the newly created Node
Definition at line 309 of file CopyController.php.
|
protected |
Create a copy of the node with the given object id.
The returned node is already persisted.
- Parameters
-
$oid The oid of the node to copy
- Returns
- The copied Node or null
Definition at line 328 of file CopyController.php.
|
protected |
Get the target node from the request parameter targetoid.
- Parameters
-
$targetOID The oid of the target node
- Returns
- Node instance
Definition at line 394 of file CopyController.php.
|
protected |
Register a copied node in the session for later reference.
- Parameters
-
$origNode A reference to the original node $copyNode A reference to the copied node
Definition at line 409 of file CopyController.php.
|
protected |
Update the copied oids in the registry.
- Parameters
-
$oidMap Map of changed oids (key: old value, value: new value)
Definition at line 421 of file CopyController.php.
|
protected |
Get the object id of the copied node for a node id.
- Parameters
-
$origOID The object id of the original node
- Returns
- ObjectId or null, if it does not exist already
Definition at line 444 of file CopyController.php.
|
protected |
Get the copied node for a node id.
- Parameters
-
$origOID The object id of the original node
- Returns
- Copied Node or null, if it does not exist already
Definition at line 467 of file CopyController.php.
|
protected |
Modify the given Node before save action (Called only for the copied root Node, not for its children)
- Note
- Subclasses will override this to implement special application requirements.
- Parameters
-
$node A reference to the Node to modify.
- Returns
- Boolean whether the Node was modified (default: false)
Definition at line 485 of file CopyController.php.