Knowledge Collector

Alain Hernandez Lopez ahernandezlop at estudiantes.uci.cu
Mon May 28 15:12:04 UTC 2007


Hello 

I'm developing a product for Plone called information observatory,
basically the product responsibility is, to establish a connection with
a previously definite set of information source (urls), to download it
contents and make it persistent. Now, for the development of this
project I've created two Plone products, Knowledge Collector and Portal
Scheduler Tool (tool). The responsibility of Knowledge Collector is to
establish a connection with information sources, to download it contents
and make it persistent, and Portal Scheduler Tool has the responsibility
to check the time, and at midnight it'll execute a set of task. 

 

Knowledge Collector is composed by three content types,
KnowledgeCollector (BaseFolder), InformationSource (BaseContent), and
DownloadedDocument (BaseContent).

 

Portal Scheduler Tool is a tool that works with thread mechanism, So
that there are always a main thread running (checking the time) and when
the right time is, it execute so many thread as task have the Portal
Scheduler Tool. Basically a task is a Knowledge Collector.

 

How this works? You can create so many Knowledge Collector as you want,
and when a Knowledge Collector is created automatically a task is set to
the Portal Scheduler Tool, So that when a tool task is execute, it will
execute the execute() method of each KnowledgeCollector and then will
start the process to consult the information sources , to download it
contents, and finally make it persistent. 

 

Already I've developed brunt of the project, but I've some troubles
which I didn't resolve yet, next is the list of problems.

1.      Once that a task is executed and the information source
documents are downloaded, is when there to make persistent all this
documents (DownloadedDocument), my problem is there, when the method
that create the documents is call, get the next bug.

 

raise AccessControl_Unauthorized('Cannot create %s' % self.getId())

AccessControl.unauthorized.Unauthorized: Cannot create
DownloadedDocument

 

I think that's because as this method is execute by a Portal Scheduler
Tool thread it don't have right permissions to add DownloadedDocuments
in Knowledge Collector product. Any way I don't know how to resolve
this. 

 

2.      While Zope is not restarted, KnowledgeCollectos cant be create
and task are set to the Portal Scheduler Tool perfectly, but once  Zope
is restarted, and Plone wake up the Portal Scheduler Tool tasks list be
lost, I've tested making the __listJob  a PersistentList, but this don't
work to me. 

 

3.      I need that when a KnowledgeCollector is delete a task is delete
in Portal Scheduler Tool, I've tested making a destructor but it don't
work, and I didn't found an event handler that resolve this problem.

Well this are may problems, please if anyone can help me!

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20070528/ef172ca1/attachment-0001.html>


More information about the Product-Developers mailing list