You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ales Dolecek (Created) (JIRA)" <ji...@apache.org> on 2012/01/10 17:17:39 UTC

[jira] [Created] (CHAIN-63) Replace Context with Map

Replace Context with Map<String, ? extends Object>
--------------------------------------------------

                 Key: CHAIN-63
                 URL: https://issues.apache.org/jira/browse/CHAIN-63
             Project: Commons Chain
          Issue Type: Improvement
    Affects Versions: 2.0
            Reporter: Ales Dolecek
            Priority: Minor


Hello,

  I always wandered why you *force* chain users to use the Context interface which adds nothing over Map. I would understand that if the Context would not inherit from map and only required

Object put(String, Object)
Object get(String)

But since Context itself IS Map then you gain nothing while disallowing use of Map implementations. I know that sou suggest that Context shall implement "Attribute-Property Transparency" but it is only recomendation and is not forced by commons chains anyway.

And if you define execute like

Object execute(Map<String, ? extends Object> context)

it can still accept Context instances and all its subclasses.

The downside is that you would have to give up the retrieve method introduced to Context. And BTW the Context imposes hard restriction see my other bug.

--
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] [Closed] (CHAIN-63) Replace Context with Map

Posted by "Simone Tripodi (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CHAIN-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi closed CHAIN-63.
-------------------------------

       Resolution: Duplicate
    Fix Version/s: 2.0
         Assignee: Simone Tripodi

This is a duplicate of CHAIN-58
                
> Replace Context with Map<String, ? extends Object>
> --------------------------------------------------
>
>                 Key: CHAIN-63
>                 URL: https://issues.apache.org/jira/browse/CHAIN-63
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Ales Dolecek
>            Assignee: Simone Tripodi
>            Priority: Minor
>             Fix For: 2.0
>
>
> Hello,
>   I always wandered why you *force* chain users to use the Context interface which adds nothing over Map. I would understand that if the Context would not inherit from map and only required
> Object put(String, Object)
> Object get(String)
> But since Context itself IS Map then you gain nothing while disallowing use of Map implementations. I know that sou suggest that Context shall implement "Attribute-Property Transparency" but it is only recomendation and is not forced by commons chains anyway.
> And if you define execute like
> Object execute(Map<String, ? extends Object> context)
> it can still accept Context instances and all its subclasses.
> The downside is that you would have to give up the retrieve method introduced to Context. And BTW the Context imposes hard restriction see my other bug.

--
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] (CHAIN-63) Replace Context with Map

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CHAIN-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183403#comment-13183403 ] 

Simone Tripodi commented on CHAIN-63:
-------------------------------------

Don't worry, that is because you maybe misses some discussions in the dev@ ML - we agreed on keeping the {{Context}} because users can still customize the context behavior, (put|get) mrthods would not be enough for all situations.

Development is still on patch, there is a compilation issue discussed in CHAIN-58, if you're interested on providing help you can apply the latest patch locally and try to fix the error - remember that to be involved every kind of contribution is always much more than welcome! :)
                
> Replace Context with Map<String, ? extends Object>
> --------------------------------------------------
>
>                 Key: CHAIN-63
>                 URL: https://issues.apache.org/jira/browse/CHAIN-63
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Ales Dolecek
>            Assignee: Simone Tripodi
>            Priority: Minor
>             Fix For: 2.0
>
>
> Hello,
>   I always wandered why you *force* chain users to use the Context interface which adds nothing over Map. I would understand that if the Context would not inherit from map and only required
> Object put(String, Object)
> Object get(String)
> But since Context itself IS Map then you gain nothing while disallowing use of Map implementations. I know that sou suggest that Context shall implement "Attribute-Property Transparency" but it is only recomendation and is not forced by commons chains anyway.
> And if you define execute like
> Object execute(Map<String, ? extends Object> context)
> it can still accept Context instances and all its subclasses.
> The downside is that you would have to give up the retrieve method introduced to Context. And BTW the Context imposes hard restriction see my other bug.

--
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] (CHAIN-63) Replace Context with Map

Posted by "Ales Dolecek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CHAIN-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183392#comment-13183392 ] 

Ales Dolecek commented on CHAIN-63:
-----------------------------------

Ahh - sorry. I looked checked out current trunk and there is still Context as "extends Map<String, Object>".

Where is the development going on? And BTW CHAIN-58 does not mention to aim for complete drop of Context - maybe it's "understood", but it better be stated explicitly. After all 1.x chains also use "Context extens Map" without any further advantage.

Ales
                
> Replace Context with Map<String, ? extends Object>
> --------------------------------------------------
>
>                 Key: CHAIN-63
>                 URL: https://issues.apache.org/jira/browse/CHAIN-63
>             Project: Commons Chain
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Ales Dolecek
>            Assignee: Simone Tripodi
>            Priority: Minor
>             Fix For: 2.0
>
>
> Hello,
>   I always wandered why you *force* chain users to use the Context interface which adds nothing over Map. I would understand that if the Context would not inherit from map and only required
> Object put(String, Object)
> Object get(String)
> But since Context itself IS Map then you gain nothing while disallowing use of Map implementations. I know that sou suggest that Context shall implement "Attribute-Property Transparency" but it is only recomendation and is not forced by commons chains anyway.
> And if you define execute like
> Object execute(Map<String, ? extends Object> context)
> it can still accept Context instances and all its subclasses.
> The downside is that you would have to give up the retrieve method introduced to Context. And BTW the Context imposes hard restriction see my other bug.

--
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