You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "jeremi Joslin (JIRA)" <ji...@apache.org> on 2006/04/20 05:42:36 UTC

[jira] Created: (JCR-407) read IOHandlers from the config.xml

read IOHandlers from the config.xml
-----------------------------------

         Key: JCR-407
         URL: http://issues.apache.org/jira/browse/JCR-407
     Project: Jackrabbit
        Type: Improvement

  Components: webdav  
    Versions: 1.0    
    Reporter: jeremi Joslin
    Priority: Minor


I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Jcr-Server: Changing IOHandler interface ? (JCR-407)

Posted by Angela Schreiber <an...@day.com>.
hi all

in jira issue JCR-407 jérémi suggested to extend
the resource config present with the simple server.
instead of just defining the IOManager (which knows
about all its handlers) the user should be able to
define the set of IOHandlers in the configuration as
well.

my initial suggestion would be to extend the IOHandler
interface by a 'setIOManager(IOManager)' method in order
to reflect the changed objective (configurable set of
handlers).
alternatively the we could think about introducing
some sort of factory.

what is the general feeling?
suggestions and better solutions are welcome.

regards
angela


ps for jérémi:

jeremi joslin wrote:
> I just do like this because I don't want to change the interface. Like
> I do, that will not broke the compatibility with someone who create
> his own IOManager or IOHandler. But if you don't care about this, yes,
> your design is better.

in fact i do care. but i know that the protected constructor
in the DefaultManager is the result of my own lazyness and making
it public doesn't make it any better. maybe it's better to re-
consider the api in order to reflect the changed target, than
forcing the existing, insufficient implementation to behave
differently.

Re: [jira] Commented: (JCR-407) read IOHandlers from the config.xml

Posted by jeremi joslin <je...@gmail.com>.
Hi,
Thanks for your review.

I just do like this because I don't want to change the interface. Like
I do, that will not broke the compatibility with someone who create
his own IOManager or IOhandler. But if you don't care about this, yes,
your design is better.

> - The 'iohandler' elements should rather be children of the iomanager. they don't have a meaning
Yes, sure, it will be a better design. I do like this because you
don't have to define a IOManager, you can just add some IOHandler.

>
> if nobody objects i would modify the config and iohandler/manager accordingly.
Ok,

Jérémi




--
Blog: http://www.jeremi.info
LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki: http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23@gmail.com

[jira] Updated: (JCR-407) read IOHandlers from the config.xml

Posted by "jeremi Joslin (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-407?page=all ]

jeremi Joslin updated JCR-407:
------------------------------

    Attachment: patchIOHandlers.diff

here is my patch.
Some informations about it:
* I had a node IOHandlers in the config which contains a list of IOhandler.
* the ResourceConfig load the iohandlers and add it to the IOManager.
* if thenode IOHandlers does not exist in the config.xml, we use the default IOhandlers hard coded. If it exist, we use the IOhandlers from the config file.
* I had to change protected DefaultIOManager(boolean doInit) to public, to be able to say if we initialize with the hard coded IOhandlers or not.

> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Priority: Minor
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-407) read IOHandlers from the config.xml

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-407?page=comments#action_12375344 ] 

angela commented on JCR-407:
----------------------------

just a couple of comments regarding the patch.
first of all i would rather want the config to rely on interfaces as much as possible instead of making the example implementations with the server/io package to a quasi standard. second i think it would be better to create a basic (and very simple) IOManager implementation that does not load any handlers.

this would lead to the following major changes of the patch:

IOManager/IOHandler:

- extend the IOHandler interface by a 'setIOManager(IOManager) method.
- create a IOManager implementation that does not init any handler. instead the internal list is populated
  by calling 'addIOHandler).
- this would make the protected constructor of the DefaultIOManager redandant and the
  DefaultIOManager could do one thing as its name insinuates: provide some default behaviour for
  handling import/export.
- the (optional) iomanager field with in the IOHandler can be set while adding the handler to 
  the managers list by calling IOHandler.setIOManager(this).
- the existing iohandler implementations need a default constructor

ResourceConfig:

- The 'iohandler' elements should rather be children of the iomanager. they don't have a meaning
  but within the manager they belong to.
- 'iohandler' elements are optional
- 'iohandler' as well as 'iomanager' must define a class name pointing to an implementation of
   the corresponding interfaces.
- the configuration expects but a empty constructor for both iohandler and iomanager

if nobody objects i would modify the config and iohandler/manager accordingly.
regards
angela

> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Assignee: angela
>     Priority: Minor
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (JCR-407) read IOHandlers from the config.xml

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-407?page=comments#action_12375271 ] 

angela commented on JCR-407:
----------------------------

thanks for the patch. i will take a look at it.



> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Priority: Minor
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (JCR-407) read IOHandlers from the config.xml

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-407?page=all ]

angela reassigned JCR-407:
--------------------------

    Assign To: angela

> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Assignee: angela
>     Priority: Minor
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JCR-407) read IOHandlers from the config.xml

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-407?page=all ]
     
angela resolved JCR-407:
------------------------

    Fix Version: 1.0.1
     Resolution: Fixed

implemented as discussed
revision: 396565  


> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Assignee: angela
>     Priority: Minor
>      Fix For: 1.0.1
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (JCR-407) read IOHandlers from the config.xml

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-407?page=all ]

Jukka Zitting updated JCR-407:
------------------------------

    Fix Version: 1.1
                     (was: 1.0.1)

Rescheduled for 1.1.

> read IOHandlers from the config.xml
> -----------------------------------
>
>          Key: JCR-407
>          URL: http://issues.apache.org/jira/browse/JCR-407
>      Project: Jackrabbit
>         Type: Improvement

>   Components: webdav
>     Versions: 1.0
>     Reporter: jeremi Joslin
>     Assignee: angela
>     Priority: Minor
>      Fix For: 1.1
>  Attachments: patchIOHandlers.diff
>
> I would like to be able to change the order of the IOHandlers and add some.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira