]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/NaturesManager.js
1 qx
.Class
.define("org.argeo.security.ria.components.NaturesManager",{
2 extend
: qx
.core
.Object
,
8 construct : function(){
13 detectNatures : function(){
15 for (var key
in qx
.Bootstrap
.$$registry
) {
16 if (qx
.Class
.hasInterface(qx
.Bootstrap
.$$registry
[key
], org
.argeo
.security
.ria
.components
.INaturePane
)) {
17 // FILTER BY ROLE HERE!
18 var klass
= qx
.Bootstrap
.$$registry
[key
];
19 natures
[klass
.NATURE_TYPE
] = klass
;
22 this.setDetectedNatures(natures
);
24 detectNaturesInData : function(userNaturesList
){
25 var detected
= this.getDetectedNatures();
26 var userDetected
= [];
27 for(var i
= 0;i
<userNaturesList
.length
;i
++){
28 var type
= userNaturesList
[i
].type
;
31 NATURE_CLASS
: detected
[type
],
32 NATURE_DATA
: userNaturesList
[i
]