3 Replies Latest reply on Sep 19, 2012 4:29 AM by Vladimir Boronin

    How to get EventDefinitions for ResourceType via RHQ API

    Vladimir Boronin Newbie



      I would very appreciated if someone could help me with question: I need to load RHQ ResourceType and its EventDefinitions from RHQ using RHQ API


      To load ResourceType I use

      getResourceTypeManagerLocal().getResourceTypeById(<Subject>, <RHQ ResourceType ID>)  method and ResourceType is loaded successfully

      but when I try to load EventDefinitions for ResourceType I always get null well as in rhq_event_def there are definitions for Resourcetype


      My code is looks like


      ResourceType rt = getResourceTypeManagerLocal().getResourceTypeById(subject, 10251);

      Set<EventDefinition> newEventDefs = rt.getEventDefinitions();



      and newEventDefs  is always = null


      So, if there any way to retrieve EventDefinitions for chosen ResourceType via RHQ API?