You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Michele Vivoda <mi...@libero.it> on 2002/02/18 21:40:02 UTC

Observations

Hi, 

I have been developing two stores for Slide: one that reads and writes 
an existing filesystem and an other that reads and write on a XML:DB 
database.

I have found some difficulties in implementing them because they must 
reflect what is in the final storage and can not just store the data in 
the order requested, anyway it seems they are working now, and I am 
testing them. 

I currently have a Namespace with 4 different stores: a Memory root 
holding a JDBC, a XML:DB and a File store.

I wanted to have security and locks stored in a common database so I 
used three JDBCDescriptorsStore with the same settings as SecurityStore 
and LockStore of these stores. I don't know if this is the way to go, 
if it is, it could be nice to reference child stores between different 
(father) stores.

I have some observations, please, let me know what you think.

In StandardStore.removeRevisionDescriptor(Uri uri, NodeRevisionNumber 
number) when removing from cache the descriptor, also the correspondent 
descriptors should be removed [from cache], because it holds a 
reference to the just removed descriptor.

        if (revisionDescriptorStore.cacheResults()) {
            descriptorCache.remove(uri + "-" + number);
            descriptorsCache.remove(uri.toString());   // ADDED mik
        }

In StructureImpl.remove(SlideToken token, ObjectNode object)

The object is removed from the parent BEFORE checking permission.

ObjectNode obj = parentUri.getStore().retrieveObject(parentUri);
obj.removeChild(realObject.getUri());
securityHelper.checkCredentials(token, realObject, 
namespaceConfig.getRemoveObjectAction());
lockHelper.checkLock(token, realObject,   
namespaceConfig.getRemoveObjectAction());
store(token, obj);
uri.getStore().removeObject(uri, realObject);

In NodeRevisionDescriptors ContentImpl.retrieve(...)
as written in the code, shouldn't create some revision descriptors
// FIXME: createRevisionDescriptors shouldn't be done in this read-only 
method

Greetings,
Michele