Search in sources :

Example 1 with SoaEvents

use of org.jaffa.soa.services.configdomain.SoaEvents in project jaffa-framework by jaffa-projects.

the class SoaEventManager method registerResource.

/**
 * {@inheritDoc}
 */
@Override
public void registerResource(Resource resource, String context, String variation) throws JAXBException, SAXException, IOException {
    SoaEvents soaEvents = JAXBHelper.unmarshalConfigFile(SoaEvents.class, resource, CONFIGURATION_SCHEMA_FILE);
    if (soaEvents != null) {
        for (SoaEventInfo soaEventInfo : soaEvents.getSoaEvent()) {
            ContextKey contextKey = new ContextKey(soaEventInfo.getName(), resource.getURI().toString(), variation, context);
            registerSoaEventInfo(contextKey, soaEventInfo);
        }
    }
}
Also used : SoaEventInfo(org.jaffa.soa.services.configdomain.SoaEventInfo) ContextKey(org.jaffa.loader.ContextKey) SoaEvents(org.jaffa.soa.services.configdomain.SoaEvents)

Example 2 with SoaEvents

use of org.jaffa.soa.services.configdomain.SoaEvents in project jaffa-framework by jaffa-projects.

the class SoaEventManager method unregisterResource.

/**
 * {@inheritDoc}
 */
@Override
public void unregisterResource(Resource resource, String context, String variation) throws JAXBException, SAXException, IOException {
    SoaEvents soaEvents = JAXBHelper.unmarshalConfigFile(SoaEvents.class, resource, CONFIGURATION_SCHEMA_FILE);
    if (soaEvents != null) {
        for (SoaEventInfo soaEventInfo : soaEvents.getSoaEvent()) {
            ContextKey contextKey = new ContextKey(soaEventInfo.getName(), resource.getURI().toString(), variation, context);
            unregisterSoaEventInfo(contextKey);
        }
    }
}
Also used : SoaEventInfo(org.jaffa.soa.services.configdomain.SoaEventInfo) ContextKey(org.jaffa.loader.ContextKey) SoaEvents(org.jaffa.soa.services.configdomain.SoaEvents)

Aggregations

ContextKey (org.jaffa.loader.ContextKey)2 SoaEventInfo (org.jaffa.soa.services.configdomain.SoaEventInfo)2 SoaEvents (org.jaffa.soa.services.configdomain.SoaEvents)2