Module: checkinout.py

Author:

Stefan Eletzhofer

Date:

2012-07-10

Abstract

This module offers functions to iterate business objects.

Usage Example

To check out a document, do:

>>> from nexiles.tools.api import get_resource
>>> from nexiles.tools.api.checkinout import checkin, checkout, undo_checkout
>>> resource = get_resource("document")
>>> doc_co = checkout(resource, oid="OR:wt.doc.WTDocument:12345",
... message="checkout message")

This will check out the WTDocument with the given OID – see also Resources.

The checkin and undo_checkout functions work similar.

Module Documentation

nexiles.tools.api.checkinout.checkin(resource, oid, message) new_doc

Check in a checked out document.

Parameters:
Returns:

new business object iteration

nexiles.tools.api.checkinout.checkout(resource, oid, message) new business object iteration

Check out business object and return new iteration.

Parameters:
Returns:

new business object iteration

nexiles.tools.api.checkinout.undo_checkout(resource, oid) doc

Reverts a checkout.

Parameters:
Returns:

previous iteration