Dear Karansheel,
OSGi configuration is not as configurable as Touch UI.
It does not have option to introduce logic based on your needs, it's a simple xml markup, that's limited to only simple UI Elements.
For complete docs of what's possible as per specs have look here[0] and here for specifics of what's possible in Apache Felix[1]
[0] https://osgi.org/specification/osgi.cmpn/7.0.0/service.cm.html
[1] felix/config.js at trunk · apache/felix · GitHub
Regards,
Peter