Re: AccessHandlers

eric casteleijn <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
eric casteleijn wrote:
> Samuel Schluep wrote:
>> Hello Developers
>>
>> In earlier Silva versions extension products could register metadata 
>> access handlers for ghost like content types. This was useful, in order 
>> to get the metadata from the target contents. In Silva 1.6 this is not 
>> functional anymore, although the API still exists (no exceptions are 
>> thrown if Products.SilvaMetadata.Access.registerAccessHandler is used). 
>> Is there a replacement for this functionality? Does this have something 
>> to do with Eric's announcement "[Silva-general] New version of Silva 
>> Metadata", 2006-12-21?
> 
> As far as I know there was no conscious decision to deprecate this 
> functionality, so if it doesn't work anymore, that is likely a bug that 
> was overlooked. I'm investigating this right now.

Right, I think I've found out what's wrong: When we changed as much code 
as we could to take advantage of the new more efficient way to get 
metadata values, i.e. MetadataTool.getMetadataValue() we bypassed those 
access handlers. The reason it keeps working for Ghosts and Ghostfolders 
is that we explicitly check for their interfaces in the getMetadataValue 
method (Actually on IGhostFolder and IGhostVersion, which is why it 
doesn't work for the SimpleGhost object.) This means that everyone else 
registering an access handler is out of luck. Obviously less than ideal. 
I'm going to try to change the code to take the access handlers into 
account again, instead of explicitly checking on those interfaces.

-- 
- eric casteleijn
http://infrae.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.