Jigsaw administration can (and should) be entirely done through the
provided set of form based editors or by using the new graphical tool (see
the available administration tools for more
details). These editors are generally mapped to URLs under the
/Admin
directory of your server. If you have read carefully
Jigsaw architectural
overview , you should be aware that all configuration operations can
be classified in one of the following categories:
This administration guide will go through each of these operations, and explain you how to use the form-based editors to achieve them. Note that it is easier noew to use the graphical tool (called JigAdmin),
The global server configuration is the set of settings that indicate to the server the environment in which it should run. This environment is implemented as a set of Java properties, whose complete description is available here.
To edit these properties, Jigsaw comes with a form-based property editor, which allows you to:
To edit the properties, just point your browser to
/Admin/Properties
, and follow the instructions there.
The resource factory is the piece of software that maps exiting objects (i.e. files and directories) to resource instances. It maintains two databases that can be edited through HTML forms. The first database, the extensions database tells the indexer how to map files having some given extensions to resources. The second database, the directory templates database tells the indexer how to map directories of a given name to resources.
The extensions database maps file extensions to either resource classes,
or default attribute values. To change the extensions database, point your
browser to /Admin/Extensions
. This displays the list of currently
defined extensions. You can remove existing extensions by marking them (click
on the checkbox to the right of the name), and pressing the Delete
button.
To add an extension, follow the Add extension link at the bottom of
the form. This will prompt you for the extension name and an optional extension
class. If no class is provided, the resource factory will assume that you
just want to define a default set of attributes for the resources wrapping
files having this extension (for example, you may want to state that the
en
extension should cause the resource that wrap the file to
have its content-language attribute set to en.).
If you do provide a class (which should be a valid Java classname, such as
w3c.jigsaw.resources.FileResource
), then files having the given
extension will be exported by an instance of that class. The reference guide
comes with a complete description of
all available classes, but of course, you can define your own resource
classes, and use them at will.
The directory templates database maps directory names to resources. When indexing a directory, the resource factory first looks for an existing directory template for the given name. If such a template exists, it is used (see below), otherwise, a default DirectoryResource is built to export the directory.
A directory template must specify the class of the resource to be used to
export directories having the given name. This class will then determine
what editor will be used to edit the directory templates attributes (keep
in mind that these attributes will be used as default values for the actual
resource instance). Directory template can be either generic or
normal. Directory templates that are generic apply to all directory
below them. This means, for example, that if you have defined a directory
template for directories whose name are foo
, and you then query
the resource factory to build a resource for the directory
foo/x/y
, unless x
or y
have associated
directory templates, the foo
template will be used.
Jigsaw allows you to edit particular resources at any time. Each resource
attributes may be changed, and the changes will persist across server
invocations. To change some resource attributes, you need to launch an editor
on the appropriate resource instance. This is done (if you use the dfeault
configuration), by pointing your browser to:
/Admin/Editor/extraPath
, were extraPath is the
path of the resource to be edited. For example, if you want to edit the
Admin
resource itself, then you can point your browser to
/Admin/Editor/Admin
.
Each resource class may define its own specific editor, although at this time, most of them uses the GenericResourceEditor (or some sub-classes of it). This provides the ability to edit all the editable attributes of the target resource, and in the case of container resources, it will allow you to also edit the list of children resources. For more informations on specific resource editors, see the reference guide to resources.