Advice on Extending Jigsaw?

Dave Makower writes:
 > Dr. Baird-Smith, et. al.:
 > 
 > I'm working on an extension to Jigsaw that would allow a hierarchy of
 > information to be accessed from the server.  In the model we are using,
 > some resources are collection resources, and others are terminal or "leaf"
 > resources.  Similar to a directory/file structure, except that the leaf
 > objects are not necessarily physical entities, but rather may be
 > generated/synthesized on the fly from metadata.
 > 
 > Right now, I'm in the early stages of testing our idea, and I've designed
 > two classes, both of which inherit from FilteredResource.  Much like
 > DirectoryResource, my TestContainer class makes use of a
 > SimpleResourceStore to keep track of its children.  (I have, in fact, used
 > the DirectoryResource code as a model in constructing my TestContainer
 > class.  Note that TestContainer does _not_, however, inherit from
 > DirectoryResource.)
 > 
 > In order to test these classes, I've placed them in the appropriate
 > locations in the Jigsaw hierarchy, and found that clicking the
 > "AddingResources" link will not allow me to add an instance of my
 > TestContainer resource to the server's information space.
 > 
 > Am I right in concluding that I need to develop my own Editor and
 > AddHandler classes (like DirectoriesEditor and DirectoriesAddHandler)?  I
 > could use a word or two of advice as to the best way to go about this, as I
 > can't find a whole lot of documentation on this part of the Jigsaw API.

You need to construct your own editor class, and register it to the
FormEditorFactory. The best documentation ;-) is to look at the
DirectoryResourceEditor in w3c.jigsaw.formedit, but unless you have
serious reasons for doing so, I would recommend sub-classing the
directory resource (which looks possible from what you says...)

As a bonus, if you sub-class the DirectoryResource, you put yourself
behind an extra layer of abstraction, which will prevent you the
burden of upgrading yor classes when next release of Jigsaw comes out
(although we have taken a lot of care to minimize these changes,
things like lookup have changed).

Anselm.

Received on Wednesday, 7 August 1996 18:34:18 UTC