List Info

Thread: why should documentManager.create?




why should documentManager.create?
user name
2006-05-30 01:24:37
I'm wondering why documentManager.create exists?

This method just copies xml from one sourceURI to another.
What then are 
you to do if your document is not xml, or not even stored in
a file?

Should the method be removed and the document content create
be moved 
into the usecase? Then the developer can make a usecase
implementation 
for each of their document types.

MichaelR

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

why should documentManager.create?
user name
2006-05-30 08:35:06
Michael Ralston wrote:
> I'm wondering why documentManager.create exists?

Hmmm - I can't find the method ...
Do you mean the interface
o.a.lenya.cms.publication.DocumentManager?


> This method just copies xml from one sourceURI to
another. What then are 
> you to do if your document is not xml, or not even
stored in a file?

There's a create method in the DocumentManagerImpl, it is
used by add().
But it copies arbitrary sources (not only XML) ...


> Should the method be removed and the document content
create be moved 
> into the usecase? Then the developer can make a usecase
implementation 
> for each of their document types.

At the moment, DocumentManager.add() creates a new document
by using
the sample content provided by the resource type.
Post-processing
of the created content should be handled by the usecase.

Would you mind giving an example what you mean? Thanks!

-- Andreas


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache
Lenya
http://www.wyona.com     
                http://lenya.apache.org
andreas.hartmannwyona.com                     andreasapache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )