public WsdlServiceContract load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { Location startLocation = reader.getLocation(); validateRemotable(reader, startLocation, context); WsdlServiceContract wsdlContract = processInterface(reader, startLocation, context); processCallbackInterface(reader, wsdlContract, context); helper.loadPolicySetsAndIntents(wsdlContract, reader, context); validateAttributes(reader, context, wsdlContract); LoaderUtil.skipToEndElement(reader); return wsdlContract; }
public ImplementationType load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { validateAttributes(reader, context); try { String name = reader.getAttributeValue(null, "name"); QName qName = helper.createQName(name, reader); Set<QName> alwaysProvides = helper.parseListOfQNames(reader, "alwaysProvides"); Set<QName> mayProvide = helper.parseListOfQNames(reader, "mayProvide"); LoaderUtil.skipToEndElement(reader); return new ImplementationType(qName, alwaysProvides, mayProvide); } catch (InvalidPrefixException e) { String prefix = e.getPrefix(); URI uri = context.getContributionUri(); context.addError(new InvalidQNamePrefix("The prefix " + prefix + " specified in the definitions.xml file in contribution " + uri + " is invalid", reader)); } return null; }
public WireDefinition load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { validateAttributes(reader, context); String source = reader.getAttributeValue(null, "source"); String target = reader.getAttributeValue(null, "target"); LoaderUtil.skipToEndElement(reader); URI sourceURI = helper.getURI(source); URI targetURI = helper.getURI(target); return new WireDefinition(sourceURI, targetURI); }
while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); uris.add(loaderHelper.getURI(token)); loaderHelper.loadPolicySetsAndIntents(reference, reader, context);
List<URI> promotedUris = loaderHelper.parseListOfUris(reader, "promote"); if (promotedUris == null || promotedUris.isEmpty()) { MissingPromotion error = new MissingPromotion("Promotion not specied on composite reference " + name, reader); loaderHelper.loadPolicySetsAndIntents(referenceDefinition, reader, context);
private PropertyValue loadInlinePropertyValue(String name, XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { DataType<QName> dataType; String type = reader.getAttributeValue(null, "type"); String element = reader.getAttributeValue(null, "element"); if (type != null) { if (element != null) { InvalidValue failure = new InvalidValue("Cannot supply both type and element for property: " + name, reader); context.addError(failure); return null; } // TODO support type attribute throw new UnsupportedOperationException(); } else if (element != null) { // TODO support element attribute throw new UnsupportedOperationException(); } else { dataType = new XSDSimpleType(Element.class, XSDSimpleType.STRING); } Document value = helper.loadValue(reader); return new PropertyValue(name, dataType, value); }
while (tok.hasMoreElements()) { try { provides.add(helper.createQName(tok.nextToken(), reader)); } catch (InvalidPrefixException e) { String prefix = e.getPrefix();
/** * Loads the key when the component is wired to a map based reference. * * @param componentDefinition the component definition * @param reader a reader positioned on the element containing the key definition @return a Document containing the key value. */ private void loadKey(ComponentDefinition<Implementation<?>> componentDefinition, XMLStreamReader reader) { componentDefinition.setKey(loaderHelper.loadKey(reader)); }
context.addError(error); CompositeService def = new CompositeService(name, null, loaderHelper.getURI(promote)); loaderHelper.loadPolicySetsAndIntents(def, reader, context); boolean callback = false; while (true) {
public Property load(XMLStreamReader reader, IntrospectionContext ctx) throws XMLStreamException { validateAttributes(reader, ctx); String name = reader.getAttributeValue(null, NAME); boolean many = Boolean.parseBoolean(reader.getAttributeValue(null, MANY)); boolean mustSupply = Boolean.parseBoolean(reader.getAttributeValue(null, MUST_SUPPLY)); Document value = helper.loadValue(reader); Property property = new Property(); property.setRequired(mustSupply); property.setName(name); property.setXmlType(XS_STRING); property.setMany(many); property.setDefaultValue(value); return property; }
if (constrainsVal != null) { try { constrains = helper.createQName(constrainsVal, reader); } catch (InvalidPrefixException e) { String prefix = e.getPrefix(); while (tok.hasMoreElements()) { try { QName id = helper.createQName(tok.nextToken(), reader); requires.add(id); } catch (InvalidPrefixException e) {
loaderHelper.loadPolicySetsAndIntents(bd, reader, introspectionContext);
loaderHelper.loadPolicySetsAndIntents(bd, reader, introspectionContext);
public OperationDefinition load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { validateAttributes(reader, context); OperationDefinition operationDefinition = new OperationDefinition(); String name = reader.getAttributeValue(null, "name"); if (name == null) { MissingAttribute failure = new MissingAttribute("Operation name not specified", reader); context.addError(failure); } operationDefinition.setName(name); loaderHelper.loadPolicySetsAndIntents(operationDefinition, reader, context); LoaderUtil.skipToEndElement(reader); return operationDefinition; }
loaderHelper.loadPolicySetsAndIntents(binding, reader, context);
loaderHelper.loadPolicySetsAndIntents(def, reader, context);
loaderHelper.loadPolicySetsAndIntents(implementation, reader, context);
loadKey(componentDefinition, reader); loaderHelper.loadPolicySetsAndIntents(componentDefinition, reader, context);
type.setAutowire(Autowire.fromString(reader.getAttributeValue(null, "autowire"))); type.setConstrainingType(constrainingType); loaderHelper.loadPolicySetsAndIntents(type, reader, childContext); try { while (true) {
metadata.setWireFormat(wireFormat); loaderHelper.loadPolicySetsAndIntents(definition, reader, context);