You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Robert Enyedi <re...@gmail.com> on 2005/11/14 09:32:30 UTC

[vfs] File system creation documentation/tutorial

Hi,

I recently needed to create a VFS file system implementation for the
JCommander project. I managed to get something working but it is far from a
complete implementation. I looked for some documentation on how to do this
but I couldn't find any.

Is there such a documentation available?

Regards,
Robert

Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Hi Mario,

++1000000
> It would be really great when you document what you do during your
> implementation.


Great. I'll do that and send you a draft as soon as I have it :-)

>It would even make sense to have an Eclipse wizard for creating VFS
> plugins.
> >
> :-o
> Never thought of this.
> At least a project layout with some templates would be great.
> I dont know what a wizard could do in addition as the hard work depends
> on the used underlaying library.
>
What do you have in mind?


Of course the wizard won't do the hard work, but it could do the routine
task of creating the three classes and link them based on some templates.
I'm not exactly sure about what advanced features this wizard could have but
I'll know more and let you know once the documents will be in a more
advanced stage.

Regards,
Robert

Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Yep, got it :-)

Thanks again.

On 11/14/05, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Mario Ivankovits wrote:
> > Robert Enyedi wrote:
> >> Will the main page be automatically regenerated from the SVN?
> >>
> > Now, I have to do it manually.
> Sorry, didnt mean "Now", but "No"
>
> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Great!

Thanks,
Robert

On 11/14/05, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Robert Enyedi wrote:
> > Will the main page be automatically regenerated from the SVN?
> >
> Now, I have to do it manually.
> The latest point in time is when I update it for the 1.0 release, maybe
> earlier.
>
> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Mario Ivankovits wrote:
> Robert Enyedi wrote:
>> Will the main page be automatically regenerated from the SVN?
>>   
> Now, I have to do it manually.
Sorry, didnt mean "Now", but "No"

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Robert Enyedi wrote:
> Will the main page be automatically regenerated from the SVN?
>   
Now, I have to do it manually.
The latest point in time is when I update it for the 1.0 release, maybe 
earlier.

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Mario,

Yes, I saw your commit. Thanks!

Will the main page be automatically regenerated from the SVN?

Regards,
Robert

On 11/14/05, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Robert,
> > Thanks for the links. Actually all my confusion was from the fact that
> the
> > left menu from the VFS site is linking to the non-frame version.
> Wouldn't it
> > be wiser if the link would be to the frame version?
> You are right, I didnt use this link very often ;-)
>
> Its fixed in SVN now.
> Thanks!
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Robert,
> Thanks for the links. Actually all my confusion was from the fact that the
> left menu from the VFS site is linking to the non-frame version. Wouldn't it
> be wiser if the link would be to the frame version?
You are right, I didnt use this link very often ;-)

Its fixed in SVN now.
Thanks!
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Mario,

Thanks for the links. Actually all my confusion was from the fact that the
left menu from the VFS site is linking to the non-frame version. Wouldn't it
be wiser if the link would be to the frame version? I suppose that most Java
developers are used to that layout and find it confusing to see the
non-frame version just as I did.

Regards,
Robert

Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi
> It seems to me that the API docs available at
> http://jakarta.apache.org/commons/vfs/apidocs/org/apache/commons/vfs/package-summary.htmlare
> out of date. For instance I cannot find the docs for the FileProvider
> interface.
>   
Another package, please see: 
http://jakarta.apache.org/commons/vfs/apidocs/org/apache/commons/vfs/provider/package-summary.html
> Additionally, how about providing the API docs for the whole source code
> (including all the implementations that are bundled in the standard
> download)?
>   
But we provide the whole docs, please see the framed version at
http://jakarta.apache.org/commons/vfs/apidocs/index.html

or did I misunderstood you?

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Mario,

It seems to me that the API docs available at
http://jakarta.apache.org/commons/vfs/apidocs/org/apache/commons/vfs/package-summary.htmlare
out of date. For instance I cannot find the docs for the FileProvider
interface.

Additionally, how about providing the API docs for the whole source code
(including all the implementations that are bundled in the standard
download)?

Regards,
Robert

Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Hi Mario,

I have committed a first working draft version of the "VFS File System
Developers Guide" document (OpenOffice.org 2.0 Writer format and the PDF
export) to the JCommander CVS repository:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/jcommander/devdocs/misc/VFS%20File%20System%20Developers%20Guide.odt
<http://cvs.sourceforge.net/viewcvs.py/jcommander/devdocs/misc/VFS%20File%20System%20Developers%20Guide.odt?rev=1.1&view=log>

and

http://cvs.sourceforge.net/viewcvs.py/*checkout*/jcommander/devdocs/misc/VFS%20File%20System%20Developers%20Guide.pdf

The current content is mainly based on your guidance from a previous mail
from this thread. I am doing in parallel the development of a VFS provider
and this document so I try to be as exact as possible there.

If you have the time to take a look at the document and provide some
feedback that would be great. I will continue to make additions so that each
step is clearly explained.

Regards,
 Robert

On 11/14/05, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Hi Robert,
> >Would you be interested in some contributions in this area from the
> >JCommander project members? Right now we (myself and probably Marius)
> could
> >start a document and a tutorial on VFS plugin development.
> ++1000000
> It would be really great when you document what you do during your
> implementation.
> >It would even make sense to have an Eclipse wizard for creating VFS
> plugins.
> >
> :-o
> Never thought of this.
> At least a project layout with some templates would be great.
> I dont know what a wizard could do in addition as the hard work depends
> on the used underlaying library.
> What do you have in mind?
>
> ---
> Mario
>
>

Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Robert,
>Would you be interested in some contributions in this area from the
>JCommander project members? Right now we (myself and probably Marius) could
>start a document and a tutorial on VFS plugin development.
++1000000
It would be really great when you document what you do during your 
implementation.
>It would even make sense to have an Eclipse wizard for creating VFS plugins.
>  
:-o
Never thought of this.
At least a project layout with some templates would be great.
I dont know what a wizard could do in addition as the hard work depends 
on the used underlaying library.
What do you have in mind?

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] File system creation documentation/tutorial

Posted by Robert Enyedi <re...@gmail.com>.
Hi Mario,

Thanks for you prompt reply. I will try to apply your guidance on what I
already wrote and I'll let you know if I have any other questions.

As I can see it VFS's usefulness and popularity can be increased in two
ways: API extensions (harder; limited developer resources available) and
more plugins (easier; can be done by third parties). To get third parties
develop new plugins the plugin creation process should be well documented.
At least a guide and a simple tutorial.

Would you be interested in some contributions in this area from the
JCommander project members? Right now we (myself and probably Marius) could
start a document and a tutorial on VFS plugin development. It would even
make sense to have an Eclipse wizard for creating VFS plugins.

What do you think?

Regards,
Robert

On 11/14/05, Mario Ivankovits <ma...@ops.co.at> wrote:
>
> Hi Robert!
> >I recently needed to create a VFS file system implementation for the
> >JCommander project. I managed to get something working but it is far from
> a
> >complete implementation. I looked for some documentation on how to do
> this
> >but I couldn't find any.
> >
> No documentation available for now.
>
> In short its:
>
> *) Create a FileProvider derived from AbstractOriginatingFileProvider
> **) set the capabilities
> **) create a filename parser (derive from URLFileNameParser if its url
> based) and setup it in your fileProvider constructor
> **) override doCreateFileSystem
>
> *) Create a FileSystem derived from AbstractFileSystem
> **) override createFile
> **) if you need to handle a connection this is the right place to do
> (see o.a.c.v.p.sftp)
> **) implement doCloseCommunicationLink() to close such connections of
> free resources
>
> *) Create a FileObject derived from AbstractFileObject
> **) override the do* methods as needed
> **) doAttach is meant to attach the object to the resource
> **) doDetach is the opposite
>
> *) If you have to deal with options create a config builder derived from
> FileSystemConfigBuilder
> **) see SftpFileSystemConfigBuilder as example
> **) its idea is to provide a type safe view of the configuration
> **) a DelegatingFileSystemOptionsBuilder exists to convert a
> string-key/string-value pair to the correct datatypes if you have to
> process a configuration file or so - see its javadoc for details please
>
>
> I know, this is a very brief (and maybe useless, though I hope not)
> documentation, but if you take the providers for SFTP and SMB as
> template you might see its not that complicated.
>
> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: [vfs] File system creation documentation/tutorial

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Robert!
>I recently needed to create a VFS file system implementation for the
>JCommander project. I managed to get something working but it is far from a
>complete implementation. I looked for some documentation on how to do this
>but I couldn't find any.
>  
No documentation available for now.

In short its:

*) Create a FileProvider derived from AbstractOriginatingFileProvider
**) set the capabilities
**) create a filename parser (derive from URLFileNameParser if its url 
based) and setup it in your fileProvider constructor
**) override doCreateFileSystem

*) Create a FileSystem derived from AbstractFileSystem
**) override createFile
**) if you need to handle a connection this is the right place to do 
(see o.a.c.v.p.sftp)
**) implement doCloseCommunicationLink() to close such connections of 
free resources

*) Create a FileObject derived from AbstractFileObject
**) override the do* methods as needed
**) doAttach is meant to attach the object to the resource
**) doDetach is the opposite

*) If you have to deal with options create a config builder derived from 
FileSystemConfigBuilder
**) see SftpFileSystemConfigBuilder as example
**) its idea is to provide a type safe view of the configuration
**) a DelegatingFileSystemOptionsBuilder exists to convert a 
string-key/string-value pair to the correct datatypes if you have to 
process a configuration file or so - see its javadoc for details please


I know, this is a very brief (and maybe useless, though I hope not) 
documentation, but if you take the providers for SFTP and SMB as 
template you might see its not that complicated.

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org