You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Davanum Srinivas <da...@gmail.com> on 2006/04/19 04:08:50 UTC

Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Sanjiva,

if i remove them, there is no way to remove a RelatesTo that is
already in the bag...

-- dims

On 4/18/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Tue, 2006-04-18 at 23:28 +0000, dims@apache.org wrote:
> > Author: dims
> > Date: Tue Apr 18 16:28:51 2006
> > New Revision: 395085
> >
> > URL: http://svn.apache.org/viewcvs?rev=395085&view=rev
> > Log:
> > Fix for AXIS2-585 - WS-Addressing - Incorrect cardinality for RelatesTo in handler and on API
> >
> > The API in MessageContext and Options now look like the following:
> > public RelatesTo[] getRelatesTo()
> > public void setRelatesTo(RelatesTo[] list)
> > public void addRelatesTo(RelatesTo relatesTo)
> > public RelatesTo getRelatesTo(String type)
>
> Dims, this is not right .. it does not match the normal usage!
>
> It should be:
>
> public void addRelatesTo(RelatesTo relatesTo)
> public RelatesTo getRelatesTo()
>         returns the "default" relationship .. the response one
> public RelatesTo getRelatesTo(String relationship)
>
> Please get rid of the [] types ... that doesn't make sense.
>
> Sanjiva.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2006-04-18 at 22:43 -0400, Davanum Srinivas wrote:
> which would remove all items with a specific relationship, right? then
> one would need one know which items are already present in the bag?
> there is just no way to clean up the whole bag w/o knowing what's in
> it. Also How would one know before hand all the possible relationship
> types that people can add. there is no way to enumerate what's in the
> bag

You can have only one relationship for a given relationship type .. so
the issue of "all" doesn't arise.  

Let's please not solve a use-case that doesn't exist .. people aren't
going to dump relationships into this and then say "oops, damn, I
screwed up - I don't know what I put in there but really need to clean
out all the relationships!"

If that need comes up we can add it later. If we add this method now we
cannot remove it later. I'm a big fan of incremental development .. we
*know* we need add/get()/get(relationship) .. let's just put those in
and not put in additional unused, untested methods. (Adding a test case
does not constitute usage for me :-) ..)

Sanjiva.


Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2006-04-18 at 22:43 -0400, Davanum Srinivas wrote:
> which would remove all items with a specific relationship, right? then
> one would need one know which items are already present in the bag?
> there is just no way to clean up the whole bag w/o knowing what's in
> it. Also How would one know before hand all the possible relationship
> types that people can add. there is no way to enumerate what's in the
> bag

You can have only one relationship for a given relationship type .. so
the issue of "all" doesn't arise.  

Let's please not solve a use-case that doesn't exist .. people aren't
going to dump relationships into this and then say "oops, damn, I
screwed up - I don't know what I put in there but really need to clean
out all the relationships!"

If that need comes up we can add it later. If we add this method now we
cannot remove it later. I'm a big fan of incremental development .. we
*know* we need add/get()/get(relationship) .. let's just put those in
and not put in additional unused, untested methods. (Adding a test case
does not constitute usage for me :-) ..)

Sanjiva.


Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Davanum Srinivas <da...@gmail.com>.
which would remove all items with a specific relationship, right? then
one would need one know which items are already present in the bag?
there is just no way to clean up the whole bag w/o knowing what's in
it. Also How would one know before hand all the possible relationship
types that people can add. there is no way to enumerate what's in the
bag

-- dims

On 4/18/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Tue, 2006-04-18 at 22:08 -0400, Davanum Srinivas wrote:
> > Sanjiva,
> >
> > if i remove them, there is no way to remove a RelatesTo that is
> > already in the bag...
>
> Ah good point .. then let's add:
>
> public void removeRelatesTo (String relationship)
>
> Although I can't think of a single use-case for this method. Can we add
> it later if we find the need for it rather than adding it and finding
> out that its YAGNI?
>
> Sanjiva.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Davanum Srinivas <da...@gmail.com>.
which would remove all items with a specific relationship, right? then
one would need one know which items are already present in the bag?
there is just no way to clean up the whole bag w/o knowing what's in
it. Also How would one know before hand all the possible relationship
types that people can add. there is no way to enumerate what's in the
bag

-- dims

On 4/18/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Tue, 2006-04-18 at 22:08 -0400, Davanum Srinivas wrote:
> > Sanjiva,
> >
> > if i remove them, there is no way to remove a RelatesTo that is
> > already in the bag...
>
> Ah good point .. then let's add:
>
> public void removeRelatesTo (String relationship)
>
> Although I can't think of a single use-case for this method. Can we add
> it later if we find the need for it rather than adding it and finding
> out that its YAGNI?
>
> Sanjiva.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2006-04-18 at 22:08 -0400, Davanum Srinivas wrote:
> Sanjiva,
> 
> if i remove them, there is no way to remove a RelatesTo that is
> already in the bag...

Ah good point .. then let's add:

public void removeRelatesTo (String relationship)

Although I can't think of a single use-case for this method. Can we add
it later if we find the need for it rather than adding it and finding
out that its YAGNI?

Sanjiva.


Re: svn commit: r395085 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/addressing/ core/src/org/apache/axis2/client/ cor

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2006-04-18 at 22:08 -0400, Davanum Srinivas wrote:
> Sanjiva,
> 
> if i remove them, there is no way to remove a RelatesTo that is
> already in the bag...

Ah good point .. then let's add:

public void removeRelatesTo (String relationship)

Although I can't think of a single use-case for this method. Can we add
it later if we find the need for it rather than adding it and finding
out that its YAGNI?

Sanjiva.