Hi All,
I tried the method mentioned by Sameera which resulted in the following
log, indicating the functionalities of the list returned, which contains
"get".
[2016-05-02 16:34:24,140] INFO {module/runtimeLogs/runtimeLogs.jag} -
["remove", "set", "containsAll", "trimToSize", "hashCode", "contains",
"indexOf", "wait", "add", "clear", "isEmpty", "notify", "empty",
"ensureCapacity", "retainAll", "subList", "removeAll", "notifyAll",
"getClass", "clone", "toArray", "iterator", "addAll", "get", "equals",
"listIterator", "class", "lastIndexOf", "size", "toString"]
I also tried the method mentioned by Pirinthapan, which works. Similar to
what is done in java we can get the object from the list and get the values
for the necessary fields.
Thank you both.
Regards.
On Mon, May 2, 2016 at 1:17 PM, Sameera Medagammaddegedara <
[email protected]> wrote:
> Hi,
>
>
> For future reference you can use the following approach to explore the
> returned object:
>
> log.info(Object.keys(versionList));
>
> The above statement will print the list of available functions and
> properties in the versionList object.
>
> Thanks,
> Sameera
>
>
>
> On Thu, Apr 28, 2016 at 4:23 PM, Pirinthapan Mahendran <
> [email protected]> wrote:
>
>> Hi Sabra,
>>
>> You can find the similar use case in [1].
>>
>> 1.
>> https://github.com/wso2/app-cloud/blob/master/modules/jaggeryapps/appmgt/src/modules/application/application.jag#L868
>>
>> Thanks.
>>
>>
>>
>> Mahendran Pirinthapan
>> Software Engineer | WSO2 Inc.
>> Mobile +94772378732.
>>
>> On Thu, Apr 28, 2016 at 1:52 PM, Sabra Ossen <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> How do I obtain the objects from a list, returned by a java method,
>>> using a jaggery app. Following "getAllVersionsOfApplication()" is the
>>> static java method that returns the version objects list and a version
>>> object contains the fields versionName and status.
>>>
>>> var versionList =
>>> ApplicationManager.getAllVersionsOfApplication(applicationKey);
>>>
>>> I have added the jar containing the Application Manager class to
>>> AS_HOME/repository/components/dropins. Now from the jaggery app deployed in
>>> WSO2 AS I need to obtain the values for variables of each of the version
>>> object. Can someone help me on how to start with this issue.
>>>
>>> Thanks and Regards.
>>>
>>> --
>>> *Sabra Ossen*
>>> *Software Engineer*
>>> Email: [email protected]
>>> Mobile: +94 767 837356
>>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sameera Medagammaddegedara
> Software Engineer
>
> Contact:
> Email: [email protected]
> Mobile: + 94 077 255 3005
>
--
*Sabra Ossen*
*Software Engineer*
Email: [email protected]
Mobile: +94 767 837356
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev