DirectoryResource.registerResource()

Dave Makower writes:
 > Anselm:
 > 
 > Why isn't registerResource() in DirectoryResource defined in StoreContainer
 > instead?  All of the methods it calls are present in StoreContainer, and it
 > doesn't have any physical file-system-dependent code.  It seems that just
 > about any useful subclass of StoreContainer will need to define
 > registerResource() in the same way as DirectoryResource does.  Do you think
 > maybe it should be moved up?

I guess the reason I didn't do it is because of the call to
updateDefaultChildAttribute. 

This method is abstract for sub-classes of StoreContainer because it
*has* to implement default initialization of the resource before
addResource (the protected one) is called to attach the resource to
the container.

Does this makes sense ? Would you still have a registerResource method
in StoreContainer along with an abstract initializeChild method
instead ?

Anselm.

Received on Friday, 28 February 1997 02:31:37 UTC