You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2008/03/10 19:32:26 UTC

How can I get a list of effective policySets for a given operation?

Hi,

If I have the (component, service/reference, binding, operation) model 
instances handy, how can I get a list of effective policySets for the 
operation? Are we consolidating the declarations at different levels to the 
binding?

We can use the following example (I intentionally omit the @requires).

<component name="MyComponent" policySets="ns1:PS1">
    <service name="MyService" policySets="ns1:PS2">
        <operation name="op1" policySets="ns1:PS3">
        <binding.xyz policySets="ns1:PS4 ns2:PS5">
            <operation name="op1" policySets="ns1:PS6">
        </binding.xyz>
    </service>
</component>

Thanks,
Raymond 


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


Re: How can I get a list of effective policySets for a given operation?

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Raymond,

I found a few holes that had crept into this part with the recent
'applicablePolicySets' related work.  Am fixing them and should be done
anytime.  Will not hold you back from your work for long.  Thanks

- Venkat

On Tue, Mar 11, 2008 at 12:47 PM, Venkata Krishnan <fo...@gmail.com>
wrote:

> Hi Raymond,
>
> SCA Artifacts that can have operations configured on them implement the
> 'OperationsConfigurator' interface.  This interface has a method that will
> return a list of 'ConfiguredOperation' and each element in this list
> represents an operation that has been configured for policies.  The
> 'ConfiguredOperation' extends a PolicySetAttachPoint and hence you should be
> able to get the list of policysets from this.
>
> Yes, we do aggregate the intents and policysets upto the operation level.
> Let me go and add a test for the scenario you have mentioned here, in the
> itest-policy.  I will post back once that is done
>
> Thanks
>
> - Venkat
>
>
> On Tue, Mar 11, 2008 at 12:02 AM, Raymond Feng <en...@gmail.com>
> wrote:
>
> > Hi,
> >
> > If I have the (component, service/reference, binding, operation) model
> > instances handy, how can I get a list of effective policySets for the
> > operation? Are we consolidating the declarations at different levels to
> > the
> > binding?
> >
> > We can use the following example (I intentionally omit the @requires).
> >
> > <component name="MyComponent" policySets="ns1:PS1">
> >    <service name="MyService" policySets="ns1:PS2">
> >        <operation name="op1" policySets="ns1:PS3">
> >        <binding.xyz policySets="ns1:PS4 ns2:PS5">
> >            <operation name="op1" policySets="ns1:PS6">
> >        </binding.xyz>
> >    </service>
> > </component>
> >
> > Thanks,
> > Raymond
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>

Re: How can I get a list of effective policySets for a given operation?

Posted by Raymond Feng <en...@gmail.com>.
What about an operation that is not explicitly customized by the <operation> 
element? For example, if I have this:

<component ... policySets="ns1:PS1">
    <service ... policySets="ns1:PS2">
        <binding.xyz ... policuSets="ns1:PS3"/>
    </service>
</component>

Can I do the the following?

OperationsConfigurator ops = (OperationsConfigurator) binding;
List<ConfiguredOperation> cops= ops.getConfiguredOperations);

If op1 is an operation on the service interface, is op1 on the cops list? If 
yes, do I get ns1:PS1, ns2:PS2 and ns1:PS3 for op1?

Should I use PolicyAttachPoint.getPolicySets() or getApplicablePolicySets() 
to get the list of effective policy sets?

Thanks,
Raymond

--------------------------------------------------
From: "Venkata Krishnan" <fo...@gmail.com>
Sent: Tuesday, March 11, 2008 12:17 AM
To: <tu...@ws.apache.org>
Subject: Re: How can I get a list of effective policySets for a given 
operation?

> Hi Raymond,
>
> SCA Artifacts that can have operations configured on them implement the
> 'OperationsConfigurator' interface.  This interface has a method that will
> return a list of 'ConfiguredOperation' and each element in this list
> represents an operation that has been configured for policies.  The
> 'ConfiguredOperation' extends a PolicySetAttachPoint and hence you should 
> be
> able to get the list of policysets from this.
>
> Yes, we do aggregate the intents and policysets upto the operation level.
> Let me go and add a test for the scenario you have mentioned here, in the
> itest-policy.  I will post back once that is done
>
> Thanks
>
> - Venkat
>
> On Tue, Mar 11, 2008 at 12:02 AM, Raymond Feng <en...@gmail.com> 
> wrote:
>
>> Hi,
>>
>> If I have the (component, service/reference, binding, operation) model
>> instances handy, how can I get a list of effective policySets for the
>> operation? Are we consolidating the declarations at different levels to
>> the
>> binding?
>>
>> We can use the following example (I intentionally omit the @requires).
>>
>> <component name="MyComponent" policySets="ns1:PS1">
>>    <service name="MyService" policySets="ns1:PS2">
>>        <operation name="op1" policySets="ns1:PS3">
>>        <binding.xyz policySets="ns1:PS4 ns2:PS5">
>>            <operation name="op1" policySets="ns1:PS6">
>>        </binding.xyz>
>>    </service>
>> </component>
>>
>> Thanks,
>> Raymond
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
> 

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


Re: How can I get a list of effective policySets for a given operation?

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Raymond,

SCA Artifacts that can have operations configured on them implement the
'OperationsConfigurator' interface.  This interface has a method that will
return a list of 'ConfiguredOperation' and each element in this list
represents an operation that has been configured for policies.  The
'ConfiguredOperation' extends a PolicySetAttachPoint and hence you should be
able to get the list of policysets from this.

Yes, we do aggregate the intents and policysets upto the operation level.
Let me go and add a test for the scenario you have mentioned here, in the
itest-policy.  I will post back once that is done

Thanks

- Venkat

On Tue, Mar 11, 2008 at 12:02 AM, Raymond Feng <en...@gmail.com> wrote:

> Hi,
>
> If I have the (component, service/reference, binding, operation) model
> instances handy, how can I get a list of effective policySets for the
> operation? Are we consolidating the declarations at different levels to
> the
> binding?
>
> We can use the following example (I intentionally omit the @requires).
>
> <component name="MyComponent" policySets="ns1:PS1">
>    <service name="MyService" policySets="ns1:PS2">
>        <operation name="op1" policySets="ns1:PS3">
>        <binding.xyz policySets="ns1:PS4 ns2:PS5">
>            <operation name="op1" policySets="ns1:PS6">
>        </binding.xyz>
>    </service>
> </component>
>
> Thanks,
> Raymond
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>