Discussion:
[Erp5-dev] proposed change to File class
Bartek Gorny
2006-07-22 15:49:09 UTC
Permalink
Hello

I needed to put objects inside a class that inherits from File
(namely, I wanted to put Role Definition inside under OOoDocument
objects). To do that, I've made a change to
Product/ERP5/Document/File.py - made File inherit from XMLObject:

line 115
- class File(Base, CMFFile)
+ class File(XMLObject, Base, CMFFile)

Works for me, but is it ok from the system's point of view? Can it be
safely commited?

Bartek
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Jean-Paul Smets
2006-07-24 10:16:05 UTC
Permalink
Post by Bartek Gorny
Hello
I needed to put objects inside a class that inherits from File
(namely, I wanted to put Role Definition inside under OOoDocument
objects). To do that, I've made a change to
line 115
- class File(Base, CMFFile)
+ class File(XMLObject, Base, CMFFile)
Works for me, but is it ok from the system's point of view? Can it be
safely commited?
The main issue to check is the support for DAV. File should act as a
terminating leaf from DAV point of view but should behave as a folder to
support local roles.

This probably requires to set the inheritance of webdav related methods on
the File class.

I advise to use konqueror or cadaver to test webdav. If a folder which
contains files appears as empty from webdav point of view, it usually means
that some exception was caught, for example the exception related to file
size.

JPS.
Post by Bartek Gorny
Bartek
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Bartek Gorny
2006-07-24 17:52:45 UTC
Permalink
Post by Jean-Paul Smets
Post by Bartek Gorny
Hello
I needed to put objects inside a class that inherits from File
(namely, I wanted to put Role Definition inside under OOoDocument
objects). To do that, I've made a change to
line 115
- class File(Base, CMFFile)
+ class File(XMLObject, Base, CMFFile)
Works for me, but is it ok from the system's point of view? Can it be
safely commited?
The main issue to check is the support for DAV. File should act as a
terminating leaf from DAV point of view but should behave as a folder to
support local roles.
This probably requires to set the inheritance of webdav related methods on
the File class.
I advise to use konqueror or cadaver to test webdav. If a folder which
contains files appears as empty from webdav point of view, it usually means
that some exception was caught, for example the exception related to file
size.
Ooops - yes, there seems to be a problem with WebDAV. I'll have to dig
deeper into this.

BG
Post by Jean-Paul Smets
JPS.
Post by Bartek Gorny
Bartek
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Loading...