Programmer's Guide to the wftk -- repository manager API
[ wftk documentation home ]
Overview
The repository manager (repmgr) API is the set of C-language routines you can call from your code, assuming you're
working in some language that can deal with calling C-language routines. Under Windows, these are
contained in the repmgr or repmgr_rt DLLs (depending on which runtime library you link against). Under
Unix you generally static-link to the wftk.
This API is roughly object-oriented, making it relatively easy to embed in an object-oriented language.
Notes on the class structure planned for the wftk are here. These classes
are more or less language-agnostic, in that they will be substantially identical whether you're writing
Python, Java, or C++.
In the repository manager, the universe of discourse is represented by the repository object. This
is defined in XML (like everything else); the command-line repmgr utility assumes this to be stored
in a file called "site.opm" for historical reasons, in a directory the repository manager can use as
its own. However, in your application, you can build the repository object any way you need to.
Data structures
All data structures for the wftk are built as internal XML objects using the XMLAPI.
These are the various things you will encounter while working with the wftk:
- Repository
- List objects (records)
- List definitions
Areas of functionality
The functions in the repository manager API fall into the following categories. Some of the
functions listed here seemed like good ideas at the time, and have yet to be implemented at all,
while others have seen daily use for more than a year in multiple production environments.
- Defining the repository
- repos_open
- repos_open_file
- repos_close
- Publishing pages and objects
- repos_publish_all
- repos_publish_list
- repos_publish_obj
- repos_publish_pages
- repos_publish_page
- repos_get_layout
- Working with data at the list level
- repos_create
- repos_drop
- repos_defn
- repos_form
- repos_form_direct
- repos_define
- Working with data objects
- repos_get
- repos_add
- repos_del
- repos_mod
- repos_merge
- repos_getkey
- repos_getvalue
- repos_setvalue
- Report objects
The report API is something I did in a feverish haze one day when I decided I really needed a way
to open up objects by name and have them hang around in the session until I finished them, at which
point they'd magically turn into objects or attachments. A neat API.
- repos_report_start
- repos_report_close
- repos_report_cancel
- repos_report_log
- repos_report_getobj
- Retrieving lists of objects
- repos_list
- repos_list_first
- repos_list_next
- repos_changes
- repos_snapshot
- Synchronization with remote repository
- repos_push
- repos_push_all
- repos_pull
- repos_pull_all
- repos_synch
- repos_mark_time
- Attaching and retrieving attachments
- repos_attach_open
- repos_attach_write
- repos_attach_cancel
- repos_attach_close
- repos_attach
- repos_retrieve_open
- repos_retrieve_read
- repos_retrieve_close
- repos_retrieve
Examples
For now, you can look at the code in the command-line utility, but at some point I want to snip some
working bits of code out as examples.
Copyright (c) 2002 Vivtek. Please see the licensing
terms for more information.