SPECT Reference Guide

Nathan Stratton Treadway, Ray Ontko & Co. ( nathant@ontko.com)

$Revision: 1.7 $ $Date: 2000-05-08 16:54:06-05 $


This document describes in detail the operation of Ray Ontko & Company's SPECT tool (version 1.alpha1) for Brio.Portal. For an introduction to installing and using SPECT, please see the SPECT Getting Started instructions.

1. GENERAL

SPECT (Simple Portal-Enhancing Configuration Tool) is a simple-to-use utility for batch-loading reports and configuration information into Brio.Portal (ReportMart). It reads a control file and performs the processing it specifies. This control file is a text file in the format described below.

The program is written in Java and uses the ONE/API provided by SQRIBE. It is intended to be more robust than ONE/Script (in terms of error handling and speed), without requiring the user to know any Java. However, the source code is freely availabe so that sites wishing to customize the program can do so.

The program has been tested against ReportMart 1.5.x and Brio.Portal v6.x. (Note that there are some bugs in Portal v6.0; you should upgrade to at least v6.0.2.) There are separate branches of SPECT for v1.5.x and v6.x; the two versions are basically the same except for support of ONE/API features not available in the older versions of the API.

The program is released under the GNU General Public License. (See the "Licenses" section of the GNU web site or the COPYING.TXT file included with the SPECT distribution for more information.)

The following general points apply to all aspects of SPECT's operation:

2. CONTROL FILE SYNTAX

The control files are ordinary text files. White space is ignored (except between double quotes.) Comments start with a "#" character and continue to the end of the line.

There are two basic units in a control file, actions and configurations. An action statement looks like this:

  <ACTION> <OBJECT_TYPE> object_name <KEYWORD>=value <KEYWORD>=value ... ;

There can be any number of keyword-value pairs following the object type. The statement can be broken onto multiple lines of the control file, as required. Actions, object_types, and keywords are not case sensitive. Object_names and values should be enclosed in double-quotes if they contain white space.

Configuration statements look like:

  SETCONFIG <KEYWORD>=value <KEYWORD>=value ... ;

Again, there can be any number of keyword-value pairs, the word "setconfig" and the keywords are not case sensitive, and the values should be enclosed in double-quotes if they contain white space.

For example:


setconfig log-file=rm_loader.log when-preexists=error;

create user test1 description="test user" password=Portal
            group=test_group permissions=755;

setconfig when-preexists=warning;
create report "Sample Report" description = "This is the sample."
       filespec=/tmp/sample.spf mime-type=application/x-spf
       category="/Miscellanous_Merchandise/Samples" 
       OWNER=test1 GROUP = test_group;

3. SETCONFIG

Here are the configuration settings recognized. Each setting takes effect as soon as the SETCONFIG command is processed, and stays in effect until a new setting is specified in another SETCONFIG command.

Many of the settings can take a value of IGNORE, WARNING, or ERROR. These values behave similiary for all settings, as described here:

Other settings take a file specification. Normally, this is simply the name, possibly with a path, of the file to use. The file is overwritten if it already exists. If the filename starts with the characters ">>", then new lines are appended to the end of the file (if it already exists). If the filename is "-", then standard output is used. Finally, if the filename is "*", then output for the given setting is turned off.

WHEN-PREEXISTS

Controls what happens when the object specified in a CREATE action already exists. (This does not apply to JOB or FILE objects; see WHEN-MULTIPLE-PREEXISTS.) DEFAULT: WARNING.

VALUES: allowed values (case insensitive) are:

WHEN-MISSING

Controls what happens when the object specified in an UPDATE or DELETE action does not exist. DEFAULT: ERROR.

VALUES: allowed values (case insensitive) are:

WHEN-MULTIPLE-PREEXISTS

Controls what happens when there are one or more JOB or FILE objects matching the name specified in an CREATE JOB or CREATE FILE action. (Note that the word "Multiple" includes the object being created, so having even one matching object already in the repository will trigger this condition.) DEFAULT: UPDATE.

VALUES: allowed values (case insensitive) are:

WHEN-MULTIPLE-EXISTS

Controls what happens when there are multiple JOB or FILE objects matching the name specified in an UPDATE or DELETE action. DEFAULT: WARNING.

VALUES: allowed values (case insensitive) are:

WHEN-RELOADING-FILE

Controls what happens when an UPDATE FILE action includes a FILESPEC specification and applies to a file other than an SPFSet. (SPFSets don't have versions, so the behavior for them is always like "REPLACE".) DEFAULT: NEWVERSION

VALUES: allowed values (case insensitive) are:

WHEN-MAXVERSIONS-REACHED

Controls what happens when WHEN-RELOADING-FILE is set to NEWVERSION and the current action's attempt to create a new version of an object would cause that object to exceed its maximum version count setting. (Not available when compiled against RM/API v1.5.x.) DEFAULT: PURGE

VALUES: allowed values (case insensitive) are:

WHEN-CATEGORY-MISSING

Not implemented yet. Controls what happens when the category specified to in a CREATE FILE or CREATE JOB statement does not exist. DEFAULT: WARNING.

VALUES: allowed values (case insenstive) are:

WHEN-FILE-MISSING

Control what happens when an operating system file specified in a JOB or FILE statement does not exist. DEFAULT: ERROR.

VALUES: allowed values (case insenstive) are:

WHEN-REMOVING-FROM-DEFAULT-GROUP

Control what happens when an attempt is made to remove a user from its default group. (If you really want to remove the user from this particular group, you must first assign a different default group before Portal will allow the removal.) DEFAULT: WARNING.

VALUES: allowed values (case insenstive) are:

DEFAULT-CATEGORY

Set the default category (similar to the UNIX "cd" command). DEFAULT: "/".

VALUES: If the value starts with a "/", it is an absolute path; if not, it is relative to the default category in effect before the statement is processed.

WHEN-IGNORED-KEYWORD

Control what happens when a keyword is used that is valid for the specified object type but which is not used for the specified action. For example, in the command "delete file /sample_file.spf group=demo_users;", the GROUP keyword is ignored because it has no affect on the DELETE command. DEFAULT: WARNING.

VALUES: allowed values (case insenstive) are:

GOOD-FILE

Specifies the operating system file name of the file to which successfully-loaded records are written. DEFAULT: no file.

VALUES: file specification.

BAD-FILE

Specifies the operating system file name of the file to which records which cannot be loaded are written. DEFAULT: no file.

VALUES: file specification.

LOG-FILE

Specifies the operating system file name of the log file. DEFAULT: standard output.

VALUES: file specification.

4. OBJECT TYPES

The following are supported object types, and the actions and fields defined for each.

For all object types,

USER

Allowed actions:

GROUP

Allowed actions:

CATEGORY

Allowed actions:

USERGROUPS

Allowed actions:

GROUPUSERS

Allowed actions:

FILE

Allowed actions:

JOB

Not yet supported.

Allowed actions:

5. FUTURE ENHANCEMENTS

This section outlines some enhancements that we are considering adding to SPECT in future releases.