Hello Chan,
Do you need the asset instances or the rxt templates for the assets?
*To get the asset instances;*
The ArtifactManager in the carbon module has a method called get(id) which
will allow you to retrieve assets by id.
type='gadget'; //Asset type
id='xxxxxxxxxxxxxx';
GovernanceUtils.loadGovernanceArtifacts(this.registry.registry);
var artifactMnger=new
carbon.registry.ArtifactManager(this.registry,type);
var asset=artifactManager.get(id); *(Source: rxt.manager :
line: 106)*
There are some utility methods which are available in ;
/publisher/modules/rxt.manager.js
*To get the templates;
*
You can use ;
*Requires*: /publisher/modules/rxt.manager.js
var rxtManager=new RxtManager();
rxtManager.loadAssets(); //Only need to call this once.
var assetTemplate=rxtManager.findAssetTemplate(function(template){
return (template.shortName=='The type of gadget')?true:false;
});
The returned object will be of the form described in the
/publisher/modules/rxt.domain.js file.
Please let me know if I have answered your query correctly.
*P.S:* Sorry for the delay
Thank You,
Sameera
On Mon, Aug 12, 2013 at 9:47 PM, Nuwan Bandara <[email protected]> wrote:
> Sameera,
>
> I think you wrote some code to do this. Can you share
>
> Regards,
> /Nuwan
>
>
> On Mon, Aug 12, 2013 at 4:25 PM, Chan <[email protected]> wrote:
>
>> $subject.
>>
>> I looked into the store module's asset method but it requires the path of
>> the asset.
>>
>> Thanks.
>>
>> --
>> Chan (Dulitha Wijewantha)
>> Software Engineer - Mobile Development
>> WSO2Mobile
>> Lean.Enterprise.Mobileware
>> * ~Email [email protected]*
>> * ~Mobile +94712112165*
>> * ~Website dulithawijewantha.com
>> *
>> * ~Blog blog.dulithawijewantha.com<http://dulichan.github.io/chan/>
>> *
>> * ~Twitter @dulitharw <https://twitter.com/dulitharw>*
>>
>
>
>
> --
> *Thanks & Regards,
>
> Nuwan Bandara
> Technical Lead; **WSO2 Inc. *
> *lean . enterprise . middleware | http://wso2.com *
> *blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
> 9629
> *
> <http://www.nuwanbando.com/>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev