To understand how TrapEd works and how to work with this
tool, have a look at the following picture.
transferproject-utility you can extract all needed
information of a project from the Vignette e-business platform. You
can also import this data into another Vignette platform. The
transferproject-utility generates as an intermediate output several
Let's assume you have exported a project with something like
transferproject -b ... -o export -p .../example
into the directory
In this directory you will find the following
example.zip (depending if you're using
transferproject on Unix or Windows)
example.... several more files
example.zip) contains all
the files you submitted to the Vignette platform with the help of the
"Program Manager". The file
example.attr (called the
attr-file) contains all the templates, records and projects you
have developed with all their corresponding attributes (e.g. if a
template is cached, the workflow-status, ...) and the meta-information for the submitted files (like e.g. path-information).
Normally you export your project with
transferproject than pass all
the files to a different machine (e.g. the online- or
production-system) and than do an import with
Or you import it to the same-machine to restore a backup.
But the file
example.attr can be used for more than
this. Because everything you need (besides the data of the database
and the submitted files) is packed in this file, you can very well
extract template-information (and code) from this file.
Have a look at the content of the attr-file with your favorite
editor. You wouldn't edit this junk by hand. That's what TrapEd is
TrapEd avoids the mistakes you will make when editing this file
manually. TrapEd was written exactly for this purpose. We tried
editing the attr-file manually and made serious mistakes which even
hang up the CMS while we tried to import the modified attr-file.
With TrapEd you can open this attr-file, edit the file with a
convenient user-interface and save it. And you can be sure that the attr-file is afterwards a valid attr-file, ready to be imported into Vignette.
TrapEd gives way to numerous possibilities of using this attr-file:
- You're making bakups with the
transferproject-utility? Someone deleted a template by mistake? Why bothering to import the whole bunch of templates (and even get an old state of all other templates)? Simply extract the information you need by directly accessing the backup-attr-file.
- Want to work at home? On the weekend? Take the attr-file with you. That's all you need.
- Want to do the same changes in many templates (e.g. when doing a migration to a newer Vignette-version)?
- You are a consultant and have to work into an unknown Vignette-project? Take the attr-file and browse through the templates without bothering that you may lock templates or do changes by mistake.
- Searching for projects-names (this can't be done with a Vignette client) ... go ahead
- Generate standard documenation from your templates (see TemplateDoc)
Features of TrapEd
After opening an attr-file (as produced by
transferproject) you see the usual
project/subproject/template-structure in the left explorer-like
pane. Simply open the projects, click on a template and you can edit
different attributes in the right edit-pane. If you have modified
anything TrapEd will ask you to save the changes before looking at
details of a different template.
In short you can do the following with TrapEd:
- edit attributes of templates, files, records or projects
- delete templates, projects, files or records
- create templates, projects, files or records
- move projects with all their subprojects, templates, files and records with drag & drop
But this is what you can do with the Vignette-"Program Manager" as
well. So here are some features which are unique for TrapEd:
- search for complex structures (via regular expressions) in several attributes (e.g. search for all templates that are cached)
- search and replace complex strings (also with regular expressions) in the attributes
(e.g. search all templates which has the line
INCLUDE LIBNAME xyz in it and replace them with
INCLUDE LIBNAME abc or search for all templates which are created by
smith and replace this with your name :-)).
For a more detailed description see Search & replace
- search for/goto IDs
these IDs are sometimes needed when an transferproject-import fails; transferproject gives you the ID of the object where it fails, something like
/ci/121; you really have problems when you want to find the corresponding template or project in the Program Manager (see Menu>Goto ID).
- export parts of a project
(e.g. sometimes only one subproject is important for an import and you only have a fully exported attr-file but want to deliver only parts)
- delete several templates or files at once that share a common search-pattern
e.g. delete all submitted files; this can be really useful because many submitted files will crash a transferproject-import at least for some versions of Vignette; with TrapEd you can delete all submitted files and then import the rest with
transferproject (see Faq)
or delete all records because you don't want them to be transferred from your development-machine (see Menu>Open "
Read records/Read files") to the production-machine.
Simply take the attr-file and edit it as you like. Afterwards just import it back to Vignette (you should make sure that no one has made any changes in Vignette online, because they will get lost)
- dump all templates into the filesystem on your local computer to edit them and read them back into TrapEd. With this you can do real offline-editing with your favourite editor (see File>Dump).
- additional documentation support
e.g. obtain a list of templates in which the library
xyz is used or the function
RESET_TIMEOUT is called.
or you can extract some javadoc-similar documentation (called TemplateDoc) via the open API (see ExampleCode and SearchReplace).
- import directory/file-structures
e.g. you got the html-design from a design-agency and want to put this structure into Vignette without uploading all the files manually. This feature alone can save you days of stupid work. See Menu>Import.
With TrapEd you can simply search for deprecated functions and easily change them
- generate an attr-file from a bunch of files in the filesystem to import into Vignette
(useful if you get the CDA HTML-pages from a design-agency and want to put it with almost no effort into Vignette V6)
- export templates to the filesystem (e.g. like CMS-Explorer does). See File>Export and File>Dump.
- display the unencrypted password for the database-connection which is stored inside the attr-file (only if you have an unlimited license)
- with the simple-to-use Api you can do everything that is not listed here by yourself (e.g. cvs-checkin, diffs between multiple transferprojects, ...).
TrapEd supports the following attributes (either for templates,
project, records or files), alphabetically case-sensitive sorted:
(this attribute is the value of the details-dialog in Vignette's Program Manager:
Internal Use only, see image below)
Authorized Users in Program Manager details-dialog.
- CreateTime (when was the template, file, ... created?)
- CreatedBy (the user who has created the file, template, ...)
(you find this in the
Misc-tab of the details-dialog in the Program Manager)
- DatabaseName, DatabaseServer (only records)
The database-connection for the record-data
- LastModTime (the last time the template, ... was modified)
- LastModifier (the one who did the last modification)
- Name (the name of the template, ...)
- NameOfTable, PrimaryKeyName (only Records)
The name of the database-table and the column for the primary key in which the record-data is stored.
- Paths (where do you find the file, template on the webserver)
Project Owners in Program Manager details-dialog.
- State (the state of a template, record or file; one of
Working, Live, Expired, Ready For Internal Use, Ready To Launch)
- Subtype (of which type is a template; must be
Component, Library, Content Entry, Index, Item, Transaction, Other)
only valid and displayed for attr-files from Vignette with a version higher than 5.6; the Type of the template may be one of:
this is the template-code itself.
the two characters for browser-identification, can be configured in the
Variations-tab of the details-dialog in the Program Manager.
- cache (is this template cached or not)
- deleted (is this template deleted?)
- ext (the extension of the template, usually
(if the template is associated with a database-table; the tablename is stored in this attribute, I wouldn't recommend to use this feature)
Supported attributes of TrapEd
Not all attributes are always useful (e.g.
an attribute I almost never use). If they are all displayed, TrapEd
may look a bit confusing and overloaded. Therefore you can specify the
attributes you wish to work with in the Options-dialog "Extras>Options".
With TrapEd you can only edit a subset of all attributes which
are stored in the attr-file. Those attributes are mostly those which
can be edited with the Vignette Program Manager and Template
Editor. Other attributes are either set internally or they aren't of
any importance. All attributes which cannot be edited with TrapEd
are left unchanged and will be stored as-is (if you don't use the
How to use/start TrapEd
Download and extract the zip-file.
Double-click the executable
traped.exe and then open
any attr-file (via the menu
If you've created the attr-file under Unix and you transfer the
attr-file via ftp, be sure to set the mode to "binary" (e.g. with the
command "binary" in an ftp-shell).
If you have a complete bundle of all files generated by
transferproject in tar-format and you unpack them with WinZIP be sure
to switch off the LF to CR/LF-conversion for tar-archives in the WinZIP-menu
Options→Configuration in the tab-panel
For further start-options, have a look at StartingTraped.