You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by kelvin goodson <ke...@gmail.com> on 2007/07/19 15:48:52 UTC

[Java SDO, DAS and SCA] alteration to unreleased API

Headline message for SCA (and perhaps DAS)  -- this is notice of a change
that will require minor updates in order not to break the build

----

We have 2 new things in SDO that are of significance to this message that
have come about since the beta1 release.

1) An improved notion of what embodies a scope for types -- the
HelperContext (previously the story was confused because the TypeHelper was
used for this purpose at times)
2) Restructuring of the code so that it is clear what it Tuscany SDO API (
i.e. Tuscany extensions as opposed to the SDO API itself)

However, the API in the trunk still uses a TypeHelper to be passed into half
a dozen methods to represent the scope.  It would be an awful shame not to
fix this,  and it would also look odd to go out with a brand new API that
already has deprecations. I have altered the API in the SDO release branch
[1].

As far as I can tell from poking around in eclipse, SCA makes about half a
dozen calls into the API,  so it's a small job to fix this up.  Can someone
is SCA please liaise with me to get this done at our mutual convenience,
thanks.

Kelvin.

[1]
http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615<http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615>

Re: [Java SDO, DAS and SCA] alteration to unreleased API

Posted by kelvin goodson <ke...@gmail.com>.
I responed to this but switched the thread to "SDO Dynamic Metadata creation
APIs"

On 20/07/07, Amita Vadhavkar <am...@gmail.com> wrote:
>
> As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...)
> returns
> null
> if the type is already created before, result of is null for all 2nd and
> later calls to createType(). Also, there is no getType(HelperContext,...)
> in
> (lib)SDOHelper,
> (lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type
> already
> existing
> in ePackage (without creating it). Can this be provided?
> Or otherwise,can createType() be modified to act as createOrGet?
>
> If this is not provided, client code will need to do something like below.
>
> Type root = SDOUtil.createType(hc, getDefaultURI(), "DataGraphRoot",
> false);
> if(root == null){
>     List lst = SDOUtil.getTypes(hc, uri) ;
>     //iterate over the list and match
>     //((Type)lst.get(i)).getName() with say "DataGraphRoot"
>     //and if it matches use that type
> }
>
> Or otherwise, the client will be forced to use a new instance of
> HelperContext each
> time.
>
> Am I missing something here?
>
> Regards,
> Amita
>
> On 7/20/07, kelvin goodson <ke...@thegoodsons.org.uk> wrote:
> >
> > Thanks, I'd be happiest to leave it until the middle of next week if
> that
> > fits with you.
> > Kelvin.
> >
> > On 19/07/07, Raymond Feng <en...@gmail.com> wrote:
> > >
> > > Hi, Kelvin.
> > >
> > > When do you plan to make the changes? I can help on the SCA side.
> > >
> > > Thanks,
> > > Raymond
> > >
> > > ----- Original Message -----
> > > From: "kelvin goodson" <ke...@gmail.com>
> > > To: "tuscany-dev" <tu...@ws.apache.org>
> > > Sent: Thursday, July 19, 2007 6:48 AM
> > > Subject: [Java SDO, DAS and SCA] alteration to unreleased API
> > >
> > >
> > > > Headline message for SCA (and perhaps DAS)  -- this is notice of a
> > > change
> > > > that will require minor updates in order not to break the build
> > > >
> > > > ----
> > > >
> > > > We have 2 new things in SDO that are of significance to this message
> > > that
> > > > have come about since the beta1 release.
> > > >
> > > > 1) An improved notion of what embodies a scope for types -- the
> > > > HelperContext (previously the story was confused because the
> > TypeHelper
> > > > was
> > > > used for this purpose at times)
> > > > 2) Restructuring of the code so that it is clear what it Tuscany SDO
> > API
> > > (
> > > > i.e. Tuscany extensions as opposed to the SDO API itself)
> > > >
> > > > However, the API in the trunk still uses a TypeHelper to be passed
> > into
> > > > half
> > > > a dozen methods to represent the scope.  It would be an awful shame
> > not
> > > to
> > > > fix this,  and it would also look odd to go out with a brand new API
> > > that
> > > > already has deprecations. I have altered the API in the SDO release
> > > branch
> > > > [1].
> > > >
> > > > As far as I can tell from poking around in eclipse, SCA makes about
> > half
> > > a
> > > > dozen calls into the API,  so it's a small job to fix this up.  Can
> > > > someone
> > > > is SCA please liaise with me to get this done at our mutual
> > convenience,
> > > > thanks.
> > > >
> > > > Kelvin.
> > > >
> > > > [1]
> > > >
> > >
> >
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615
> > > <
> > >
> >
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615
> > > >
> > > >
> > >
> > >
> >
>

Re: [Java SDO, DAS and SCA] alteration to unreleased API

Posted by Amita Vadhavkar <am...@gmail.com>.
As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...) returns
null
if the type is already created before, result of is null for all 2nd and
later calls to createType(). Also, there is no getType(HelperContext,...) in
(lib)SDOHelper,
(lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type already
existing
in ePackage (without creating it). Can this be provided?
Or otherwise,can createType() be modified to act as createOrGet?

If this is not provided, client code will need to do something like below.

Type root = SDOUtil.createType(hc, getDefaultURI(), "DataGraphRoot", false);
if(root == null){
    List lst = SDOUtil.getTypes(hc, uri) ;
    //iterate over the list and match
    //((Type)lst.get(i)).getName() with say "DataGraphRoot"
    //and if it matches use that type
}

Or otherwise, the client will be forced to use a new instance of
HelperContext each
time.

Am I missing something here?

Regards,
Amita

On 7/20/07, kelvin goodson <ke...@thegoodsons.org.uk> wrote:
>
> Thanks, I'd be happiest to leave it until the middle of next week if that
> fits with you.
> Kelvin.
>
> On 19/07/07, Raymond Feng <en...@gmail.com> wrote:
> >
> > Hi, Kelvin.
> >
> > When do you plan to make the changes? I can help on the SCA side.
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message -----
> > From: "kelvin goodson" <ke...@gmail.com>
> > To: "tuscany-dev" <tu...@ws.apache.org>
> > Sent: Thursday, July 19, 2007 6:48 AM
> > Subject: [Java SDO, DAS and SCA] alteration to unreleased API
> >
> >
> > > Headline message for SCA (and perhaps DAS)  -- this is notice of a
> > change
> > > that will require minor updates in order not to break the build
> > >
> > > ----
> > >
> > > We have 2 new things in SDO that are of significance to this message
> > that
> > > have come about since the beta1 release.
> > >
> > > 1) An improved notion of what embodies a scope for types -- the
> > > HelperContext (previously the story was confused because the
> TypeHelper
> > > was
> > > used for this purpose at times)
> > > 2) Restructuring of the code so that it is clear what it Tuscany SDO
> API
> > (
> > > i.e. Tuscany extensions as opposed to the SDO API itself)
> > >
> > > However, the API in the trunk still uses a TypeHelper to be passed
> into
> > > half
> > > a dozen methods to represent the scope.  It would be an awful shame
> not
> > to
> > > fix this,  and it would also look odd to go out with a brand new API
> > that
> > > already has deprecations. I have altered the API in the SDO release
> > branch
> > > [1].
> > >
> > > As far as I can tell from poking around in eclipse, SCA makes about
> half
> > a
> > > dozen calls into the API,  so it's a small job to fix this up.  Can
> > > someone
> > > is SCA please liaise with me to get this done at our mutual
> convenience,
> > > thanks.
> > >
> > > Kelvin.
> > >
> > > [1]
> > >
> >
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615
> > <
> >
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615
> > >
> > >
> >
> >
>

Re: [Java SDO, DAS and SCA] alteration to unreleased API

Posted by kelvin goodson <ke...@thegoodsons.org.uk>.
Thanks, I'd be happiest to leave it until the middle of next week if that
fits with you.
Kelvin.

On 19/07/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi, Kelvin.
>
> When do you plan to make the changes? I can help on the SCA side.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "kelvin goodson" <ke...@gmail.com>
> To: "tuscany-dev" <tu...@ws.apache.org>
> Sent: Thursday, July 19, 2007 6:48 AM
> Subject: [Java SDO, DAS and SCA] alteration to unreleased API
>
>
> > Headline message for SCA (and perhaps DAS)  -- this is notice of a
> change
> > that will require minor updates in order not to break the build
> >
> > ----
> >
> > We have 2 new things in SDO that are of significance to this message
> that
> > have come about since the beta1 release.
> >
> > 1) An improved notion of what embodies a scope for types -- the
> > HelperContext (previously the story was confused because the TypeHelper
> > was
> > used for this purpose at times)
> > 2) Restructuring of the code so that it is clear what it Tuscany SDO API
> (
> > i.e. Tuscany extensions as opposed to the SDO API itself)
> >
> > However, the API in the trunk still uses a TypeHelper to be passed into
> > half
> > a dozen methods to represent the scope.  It would be an awful shame not
> to
> > fix this,  and it would also look odd to go out with a brand new API
> that
> > already has deprecations. I have altered the API in the SDO release
> branch
> > [1].
> >
> > As far as I can tell from poking around in eclipse, SCA makes about half
> a
> > dozen calls into the API,  so it's a small job to fix this up.  Can
> > someone
> > is SCA please liaise with me to get this done at our mutual convenience,
> > thanks.
> >
> > Kelvin.
> >
> > [1]
> >
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615
> <
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615
> >
> >
>
>

Re: [Java SDO, DAS and SCA] alteration to unreleased API

Posted by Raymond Feng <en...@gmail.com>.
Hi, Kelvin.

When do you plan to make the changes? I can help on the SCA side.

Thanks,
Raymond

----- Original Message ----- 
From: "kelvin goodson" <ke...@gmail.com>
To: "tuscany-dev" <tu...@ws.apache.org>
Sent: Thursday, July 19, 2007 6:48 AM
Subject: [Java SDO, DAS and SCA] alteration to unreleased API


> Headline message for SCA (and perhaps DAS)  -- this is notice of a change
> that will require minor updates in order not to break the build
>
> ----
>
> We have 2 new things in SDO that are of significance to this message that
> have come about since the beta1 release.
>
> 1) An improved notion of what embodies a scope for types -- the
> HelperContext (previously the story was confused because the TypeHelper 
> was
> used for this purpose at times)
> 2) Restructuring of the code so that it is clear what it Tuscany SDO API (
> i.e. Tuscany extensions as opposed to the SDO API itself)
>
> However, the API in the trunk still uses a TypeHelper to be passed into 
> half
> a dozen methods to represent the scope.  It would be an awful shame not to
> fix this,  and it would also look odd to go out with a brand new API that
> already has deprecations. I have altered the API in the SDO release branch
> [1].
>
> As far as I can tell from poking around in eclipse, SCA makes about half a
> dozen calls into the API,  so it's a small job to fix this up.  Can 
> someone
> is SCA please liaise with me to get this done at our mutual convenience,
> thanks.
>
> Kelvin.
>
> [1]
> http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615<http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org