Package bscw :: Package api :: Module ap_copy
[hide private]

Module ap_copy

Copies (and renames) object between containers returns id of new object. See copy() for a description.

API definition:

API = (('object_id', 'ASCII string', 1),
       ('from_container_id', 'ASCII string', 1),
       ('to_container_id', 'ASCII string', 1),
       ('new_object_name', 'Unicode string', 0),
       ('depth', 'int', 0))

(c) Fraunhofer FIT, 2002-2008


Version: $Rev: 20668 $

Functions [hide private]
 
param_def()
return the parameter definition
 
do_it(request, object_id, from_container_id, to_container_id, new_object_name=None, depth=2)
see below
list
copy(request, object, to_container, new_name=None, depth=2)
Copies object(s).
Variables [hide private]
  __package__ = 'bscw.api'
Function Details [hide private]

copy(request, object, to_container, new_name=None, depth=2)

 

Copies object(s). Returns a list of copied objects.

Parameters:
  • object (list of objects) - source list of objects to be copied
  • to_container (str) - ID of destination container
  • new_name (str) - (optional) new destination container name
  • depth (int) - (optional) determines clone mode:
    • depth == 0 - make a copy with empty contents
    • depth == 1 - make a shallow copy (contains the same objects)
    • depth == 2 - make a deep (recursive) copy
Returns: list
  • list of copied object IDs