[Zope-CMF] how to catalog an object, overiding its allowedRolesAndUsers Keyword index

Chris Withers chrisw@nipltd.com
Sat Aug 2 15:13:03 EDT 2003


Hi Jean,

Please keep replies CC'ed to the list so everyone can benefit and others can 
pitch in... I've moved this to zope-cmf@zope.org as well, it's a more 
appropriate list if you're using CMF.

Jean Baltus wrote:
> 
> By the way, given my script, "newObject" is not a content type, just an
> object created on the fly...

Well, from your description below it looks like it _should_ be a content type...

> How can I set a workflow state for that
> object?

PortalContent automatically has a workflow associated with it, check the 
portal_workflow tool's main page to see which one. It is also automatically 
catalogued.

 > I didn't see any method for that in the workflow interface :
> 
> class Catalogabled: pass

What is this supposed to do?

> newObject = Catalogabled()
> newObject.id = someGeneratedId
> newObject.Title = li[4]
> newObject.Description = li[16]
> newObject.Type = 'someType'
> newObject.meta_type = 'someType'
> newObject.portal_type = 'someType'
> newObject.SearchableText = li[4]
> newObject.Creator = 'toto5'
> newObject.getIcon = 'document_icon.gif'

This all looks a lot like a content object. What leads you to believe it 
shouldn't be?

> newObject.review_state = 'published'

That won't work ;-)

> catalogTool.catalog_object(newObject, '%s/catalogs_view?id=%s' %(
> urlTool.getPortalPath(), newObject.id))

I'm not sure what you're trying to do here...

cheers,

Chris





More information about the Zope-CMF mailing list