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:
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;
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.
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:
Controls what happens when the object specified in an UPDATE or DELETE action does not exist. DEFAULT: ERROR.
VALUES: allowed values (case insensitive) are:
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:
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:
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:
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:
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:
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:
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:
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.
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:
Specifies the operating system file name of the file to which successfully-loaded records are written. DEFAULT: no file.
VALUES: file specification.
Specifies the operating system file name of the file to which records which cannot be loaded are written. DEFAULT: no file.
VALUES: file specification.
Specifies the operating system file name of the log file. DEFAULT: standard output.
VALUES: file specification.
The following are supported object types, and the actions and fields defined for each.
For all object types,
Allowed actions:
Configuration options used:
Keywords:
Description text for the user. DEFAULT: "".
Password for the user. Required.
The "default" group for this user. Required.
Home category for the user. DEFAULT: "/".
Default permissions for the user. DEFAULT: 740.
Boolean: is this user a superuser? DEFAULT: false.
Boolean: can this user execute jobs? DEFAULT: false.
Email address for this user. DEFAULT: none.
Configuration options used:
Keywords:
Description text for the user.
Password for the user.
The "default" group for this user.
Home category for the user.
Default permissions for the user.
Boolean: can this user execute jobs?
Email address for this user.
Configuration options used:
Allowed actions:
Configuration options used:
Keywords:
Description for the group. DEFAULT: "".
Owner of the group. DEFAULT: user used to log in to Brio.Portal.
Permissions for the group. DEFAULT: 740
Configuration options used:
Keywords:
Description for the group.
Owner of the group.
Permissions for the group.
Configuration options used:
Allowed actions:
Configuration options used:
Keywords:
Description for the category. DEFAULT: "".
Owner for the category. DEFAULT: user used to log in to Brio.Portal.
Group to own this object. DEFAULT: default group of owner.
Permissions for this category. DEFAULT: 740.
Expiration date of the category. DEFAULT: no expiration.
Boolean: Should this object be browsable? DEFAULT: true.
Boolean: should the category be deleted automatically once it expires? DEFAULT: false.
Configuration options used:
Keywords:
Description for the category.
Owner for the category.
Group to own this object.
Permissions for this category.
Expiration date of the category.
Boolean: Should this object be browsable?
Boolean: should the category be deleted automatically once it expires?
Configuration options used:
Allowed actions:
Configuration options used:
Keywords:
Comma-separated list of groups to which this user should be added.
Configuration options used:
Keywords:
Comma-separated list of groups from which this user should be removed.
Configuration options used:
Keywords:
Comma-separated list of groups of which this user should be made a member. (The user is removed from any group not listed.)
Allowed actions:
Configuration options used:
Keywords:
Comma-separated list of users who should be added to this group.
Configuration options used:
Keywords:
Comma-separated list of users who should be removed from this group.
Configuration options used:
Keywords:
Comma-separated list of users which should be members of this group. (All users not listed are removed from the group.)
Allowed actions:
Configuration options used:
Keywords:
Filespec for the operating system file. Required.
Name of report. DEFAULT:filename from the FILESPEC.
Description of report. DEFAULT: ""
Mime type of file to be loaded. DEFAULT: based on the extension specified in FILESPEC.
Owner of this object. DEFAULT: user used to log in to Brio.Portal.
Group to own this object. DEFAULT: default group of owner.
Permissions to assign to this object. DEFAULT: 740.
Boolean: Should this object be browsable? DEFAULT: true.
Boolean: should this object be deleted automatically once it expires? DEFAULT: false.
Expiration date of the file. DEFAULT: no expiration.
Maximum number of versions that may be stored in the Repository for this object. Use "-1" for "no maximum". DEFAULT: no maximum.
Comma-separated list of keywords. DEFAULT: no keywords.
Configuration options used:
Keywords:
Filespec for the operating system file. If specified, the object is reloaded from this file; otherwise, the contents of the object are left unchanged.
Name of report.
A "/" separated path to a catgegory where the object is moved.
Description of report.
Mime type of assigned to the object.
Owner of this object.
Group to own this object.
Permissions to assign to this object.
Boolean: Should this object be browsable?
Boolean: should this object be deleted automatically once it expires?
Expiration date of the file.
Maximum number of versions that may be stored in the Repository for this object. Use "-1" for "no maximum".
Comma-separated list of keywords; these replace any keywords previously assigned. (Use "" to clear the current keywords.)
Configuration options used:
Not yet supported.
Allowed actions:
This section outlines some enhancements that we are considering adding to SPECT in future releases.