You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2011/09/21 19:44:10 UTC

[jira] [Created] (CAMEL-4475) Make API self contained

Make API self contained
-----------------------

                 Key: CAMEL-4475
                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.8.0
            Reporter: Christian Schneider
            Assignee: Christian Schneider
             Fix For: 2.9.0


The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.

ProcessorDefinition, RouteDefinition and FromDefiniton

I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.

I will attach a patch shortly that solves the issue and would be glad about some reviews.
The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.

I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112395#comment-13112395 ] 

Christian Schneider commented on CAMEL-4475:
--------------------------------------------

Hi Claus,

I found that Policy beforeWrap is only used in a single test but not in any other form in the whole camel code. Good you spotted this. I wanted to discuss this change but forgot to mention it. So as it does not seem to be used I think it could be removed. The good thing about removing the method is that it improves compatibility. If I simply changed the method parameter it would be incompatible but if I remove the method then any code that implements the method will still work. I think we should do this change in a separate issue though.

Also thanks for spotting the FileEndpoint change. I thought I had already committed this as it is a bugfix for the test in windows. Will commit that spearately.

I still use ProcessorDefinition where it can not be avoided but I think it is a good thing to use the simplest interface that does the job. So using NamedNode instead should be an improvement. Do you think that will cause problems with compatibility?


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112352#comment-13112352 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

Another problem is that you remove existing code, eg PolicyDefinition, beforeWrap

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112507#comment-13112507 ] 

Christian Schneider commented on CAMEL-4475:
--------------------------------------------

The XSD should not have changed as all tests are passing for me. So the spring DSL should be compatible. As far as I can tell the Java DSL should also be compatible. If you would like to keep the .model package as is then I would be interested how to do this while removing the model references from org.apache.camel and org.apache.camel.spi.

About the NamedNode. I used it as it was already there and I think the additional methods did not hurt much. I can also create a new interface the ProcessorDefinition implements but this will create an additional layer. In the moment NamedNode is only used for definition and these can potentially have outputs and parents so I think it is not so bad.

Btw. I wonder if we can replace RouteNode and the implementing classes by interfaces the model classes directly implement. Do you think that might make sense?


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112435#comment-13112435 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

The API in the model package should be kept using ProcessorDefinition.

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider updated CAMEL-4475:
---------------------------------------

    Attachment: camel-4475-after.png
                camel-4475-before.png

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112471#comment-13112471 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

All classes in org.apache.camel.model can be kept as is.
The XSD is based upon this fact, which end users rely upon.

And not all nodes in the route has outputs, so you cannot add getOutputs to NamedNode. And the same time have OptionalIdentifiedDefinition implement NamedNode. OptionalIdentifiedDefinition is to define if a node has an id. It does not define if the node has outputs and whatnot.


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112441#comment-13112441 ] 

Christian Schneider commented on CAMEL-4475:
--------------------------------------------

I am looking into this. Not sure how much this is possible. I have to use NamedNode class in the methods that implement the NamedNode interface at least. So much will have to change. Can you give an example where we can keep ProcessorDefinition?

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112532#comment-13112532 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

For the spi packages, then its not so ideal, but instead of ProcessorDefinition, they are given NamedNode. Then you would have to type cast that to ProcessorDefinition if you really need access to its specific methods. This is of course a big API breaking.

Ideally we cannot break model from root/spi in Camel 2.x, but defer that to Camel 3.0.


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider updated CAMEL-4475:
---------------------------------------

    Attachment: camel-4475-1.patch

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider updated CAMEL-4475:
---------------------------------------

    Fix Version/s:     (was: 2.9.0)
                   2.10

Moving this to at least 2.10 to avoid API changes in 2.9
                
> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.10
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112351#comment-13112351 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

Do not change the model classes, they should still be using the ProcessorDefinition in their API.

Also be careful to not change any other logic than this. For example you change code in FileEndpoint.


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113448#comment-13113448 ] 

Christian Schneider commented on CAMEL-4475:
--------------------------------------------

The SPI changes I made are absolutely necessary. I can add compatibility where it is needed but I think most spi interfaces are not use by many people. So I would only create the compatibility overhead where we expect usage.

I talked to Dan and Hadrian to determine where it is necessary. We agreed that Policy is such a case but the rest should not be a problem.

I also just compared the xsd files before and after this patch. Both are exactly the same. So that should not create any issues.

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112353#comment-13112353 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

ProcessorDefinition should implement NamedNode, and thus allow you to refer to NamedNode from other packages. Then you can leave most of the code as is, in the model package. 

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112520#comment-13112520 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

You cannot assume the XSD is not changed because tests passes. The XSD can very well change as the elements not inherit new base types and whatnot. People have generated tooling and whatnot with Camel, based upon the XSD types is kept stable.

API changes should be kept to minimum. There is no need to change the API in the model.
Inside the model, ProcessorDefinition makes sense to use. This has been the API since the first commit from Camel. Respect this!

FromDefinition extends OptionalIdentifiedDefinition, which is not a ProcessorDefinition.




> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4475) Make API self contained

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112397#comment-13112397 ] 

Claus Ibsen commented on CAMEL-4475:
------------------------------------

beforeWrap cannot be removed, as 3rd party depend up it. I think it was JBoss needing it back then.

Yes keep the API in the model as much as possible. There is many ppl written 3rd party management/monitoring/tracing tooling and whatnot where they access the model to get details etc.

Outside the model package, the NamedNode is fine to use. In fact its already there as part of the OptionalIdentifiedDefinition.


> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4475) Make API self contained

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider updated CAMEL-4475:
---------------------------------------

    Attachment: camel-4475-2.patch

Added beforewrap again. Removed the change in File component as it is now committed.

> Make API self contained
> -----------------------
>
>                 Key: CAMEL-4475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4475
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: camel-4475-1.patch, camel-4475-2.patch, camel-4475-after.png, camel-4475-before.png
>
>
> The API, SPI packages of camel are already quite independent after the previous refactorings. There are three classes in model that are still needed at the moment.
> ProcessorDefinition, RouteDefinition and FromDefiniton
> I propose to add the necessary methods to NamedNode to be able to reference most of the functionality of the classes. For RouteDefinition I propose a special interface that adds the ErrorHandler. For the rare cases where more functionality is needed a instanceof and a cast can be used.
> I will attach a patch shortly that solves the issue and would be glad about some reviews.
> The patch can not be fully compatible but the changes are mostly in spi interfaces that are probably rather rarely used.
> I will also add screenshots from structure 101 that show how much the architecture improves after this patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira