Hi,

There will be a use-case as ability to localize the displaying tier names
in APIM UIs as per users preference and for that,its better to achieve
$subject.

To achieve $subject,we can introduce a new attribute [eg 'displayName'] per
tier definition in tier.xml as shown below.
Then  that attribute value will shown from APIM UI as tier names with
keeping a mapping between throttle policy name and the display name and
 use the throttle policy name as it is in current way for back-end
functionalities .This way we can reduce the code level change to achieve
$subject.


<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
            xmlns:throttle="
http://www.wso2.org/products/wso2commons/throttle";>
    <throttle:MediatorThrottleAssertion>
        <wsp:Policy>
            <throttle:ID throttle:type="ROLE" *throttle:DisplayName="doré"*
>Gold</throttle:ID>
            <wsp:Policy>
                <throttle:Control>
                    <wsp:Policy>
                        <throttle:MaximumCount>20</throttle:MaximumCount>
                        <throttle:UnitTime>60000</throttle:UnitTime>
                        <!--It's possible to define tier level attributes
as below for each tier level.For eg:Payment Plan for a tier
                        <wsp:Policy>
                        <throttle:Attributes>
                            <throttle:Attribute1>xxxx</throttle:Attribute1>
                            <throttle:Attribute2>xxxx</throttle:Attribute2>
                        </throttle:Attributes>
                        </wsp:Policy>
                        -->
                    </wsp:Policy>
                </throttle:Control>
            </wsp:Policy>
        </wsp:Policy>
</throttle:MediatorThrottleAssertion>
</wsp:Policy>

Please let me know,if any concerns or changes needed to do with above
approach...

Thanks;



-- 
Lalaji Sureshika
WSO2, Inc.;  http://wso2.com/
email: [email protected]; cell: +94 71 608 6811
blog: http://lalajisureshika.blogspot.com
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to