cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upayavira" ...@upaya.co.uk>
Subject Re: [Proposal] A little reworking of the Cocoon Command Line
Date Wed, 11 Dec 2002 21:07:49 GMT
> >2. org.apache.cocoon.ProgrammaticInterface (or some such name):

> The name of CocoonBean was proposed some time ago for the class with
> such functionality.

Sounds good. Better than my name. I'll switch.

> There are two levels to Main.java functionality:
>   1. Process one request
>   2. Process multiple requests, using multiple starting URLs and/or
> crawling.
> 
> You suggest implementing programmatic interface for 2nd level. I think
> it is more important to have it for the 1st level. Example method can
> be:
> 
>   cocoon.process(input, output);
> 
> Where input can be String - URL with Parameters (or Environment), and
> output is OutputStream.

I agree with you on your two levels of functionality. And I agree that I have reproduced 
the second. This is not because that is what I want, it is rather because that is all I have

been able to work out how to do as yet. I have not found finding my way around the 
Main.java code very easy so far. But I'm sure I'll get the hang of it.

I would suggest:

cocoon.processTargets();

to process multiple targets, including recursion, and:

cocoon.processPage(URI, outputStream);

Would achieve the two functions that you refer to. I would also like to suggest the 
following:

cocoon.configureFTP(host, port, user, pass, rootPath, folderStripCount);
cocoon.processTargets();

The configureFTP has set up the details for the FTP server, including the root path for 
the files on the server, and also details how many folder names should be stripped from 
the front of a file path when it is sent to the server, such that: 
cocoon:/sites/books/authors/smith.html, having a folder strip count of 1 would send up 
the page as books/authors/smith.html.

Because the configureFTP function has been called, the processTargets() would 
automatically do an FTP send as well as saving to disk.

Therefore, there are three functionalities that would be useful from a bean:
1) Have a page returned to the supplied output stream
2) Have a page saved or a site spidered and saved to the local disk.
3) Have a page saved or a site spidered and saved locally, and then sent to a remote 
FTP server (making use of locally stored checksums to prevent unnecessary uploading 
work).

Make sense?

Regards,

Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message