public ModelObject load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { while (true) { switch (reader.next()) { case XMLStreamConstants.START_ELEMENT: loaderRegistry.load(reader, ModelObject.class, context); break; case XMLStreamConstants.END_ELEMENT: if ("persistence".equals(reader.getName().getLocalPart())) { return null; } } } } }
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }
@Destroy public void destroy() { registry.unregisterLoader(F3_TYPE); registry.unregisterLoader(SCA_TYPE); }
public ModelObject load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { while (true) { switch (reader.next()) { case XMLStreamConstants.START_ELEMENT: loaderRegistry.load(reader, ModelObject.class, context); break; case XMLStreamConstants.END_ELEMENT: if ("persistence".equals(reader.getName().getLocalPart())) { return null; } } } } }
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }
@Destroy public void destroy() { registry.unregisterLoader(F3_TYPE); registry.unregisterLoader(SCA_TYPE); }
public ModelObject load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { while (true) { switch (reader.next()) { case XMLStreamConstants.START_ELEMENT: loaderRegistry.load(reader, ModelObject.class, context); break; case XMLStreamConstants.END_ELEMENT: if ("persistence".equals(reader.getName().getLocalPart())) { return null; } } } } }
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }
@Destroy public void destroy() { registry.unregisterLoader(F3_TYPE); registry.unregisterLoader(SCA_TYPE); }
private void handleWire(Composite type, XMLStreamReader reader, IntrospectionContext childContext) throws XMLStreamException, UnrecognizedElementException { WireDefinition wire = registry.load(reader, WireDefinition.class, childContext); if (wire == null) { // errror encountered loading the wire return; } type.add(wire); }
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }
@Destroy public void destroy() { registry.unregisterLoader(F3_TYPE); registry.unregisterLoader(SCA_TYPE); }
public CacheSetResourceDefinition load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { CacheSetResourceDefinition definition = new CacheSetResourceDefinition(); validateAttributes(reader, context, definition); while (true) { switch (reader.next()) { case XMLStreamConstants.START_ELEMENT: if ("cache".equals(reader.getName().getLocalPart())) { Location location = reader.getLocation(); String name = reader.getAttributeValue(null, "name"); if (null == name) { MissingAttribute error = new MissingAttribute("Cache name not specified", location); context.addError(error); name = "default"; } reader.nextTag(); CacheResourceDefinition configuration = registry.load(reader, CacheResourceDefinition.class, context); if (configuration == null) { continue; } configuration.setCacheName(name); definition.addDefinition(configuration); } break; case XMLStreamConstants.END_ELEMENT: if ("caches".equals(reader.getName().getLocalPart())) { return definition; } } } }
@Init public void init() { registry.registerLoader(WebImplementation.IMPLEMENTATION_WEB, this); registry.registerLoader(WebImplementation.IMPLEMENTATION_WEBAPP, this); }
@Destroy public void destroy() { registry.unregisterLoader(F3_TYPE); registry.unregisterLoader(SCA_TYPE); }
if (reader.getName().getLocalPart().startsWith("appender.")) { ModelObject modelObject = registry.load(reader, ModelObject.class, context); if (modelObject instanceof AppenderDefinition) { AppenderDefinition appenderDefinition = (AppenderDefinition) modelObject;
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }
@Destroy public void destroy() { registry.unregisterLoader(WebImplementation.IMPLEMENTATION_WEB); registry.unregisterLoader(WebImplementation.IMPLEMENTATION_WEBAPP); }
if (reader.getName().getLocalPart().startsWith("appender.")) { ModelObject modelObject = registry.load(reader, ModelObject.class, context); if (modelObject instanceof AppenderDefinition) { AppenderDefinition appenderDefinition = (AppenderDefinition) modelObject;
@Init public void init() { // register under both namespaces registry.registerLoader(F3_TYPE, this); registry.registerLoader(SCA_TYPE, this); }