Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 71106 invoked from network); 6 May 2009 07:22:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 May 2009 07:22:49 -0000 Received: (qmail 22503 invoked by uid 500); 6 May 2009 07:22:49 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 22436 invoked by uid 500); 6 May 2009 07:22:49 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 22420 invoked by uid 99); 6 May 2009 07:22:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 07:22:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 07:22:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 553762388961; Wed, 6 May 2009 07:22:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r772085 - in /geronimo/sandbox/blueprint/blueprint-core/src/main: java/org/apache/geronimo/blueprint/context/Parser.java resources/org/apache/geronimo/blueprint/blueprint.xsd Date: Wed, 06 May 2009 07:22:17 -0000 To: scm@geronimo.apache.org From: gnodet@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090506072217.553762388961@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gnodet Date: Wed May 6 07:22:16 2009 New Revision: 772085 URL: http://svn.apache.org/viewvc?rev=772085&view=rev Log: Update to latest schema Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java?rev=772085&r1=772084&r2=772085&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java (original) +++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java Wed May 6 07:22:16 2009 @@ -591,18 +591,25 @@ service.addRegistrationListener(parseRegistrationListener(e)); } else if (nodeNameEquals(e, BEAN_ELEMENT)) { if (service.getServiceComponent() != null) { - throw new ComponentDefinitionException("Only one of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or custom inner element can be set"); + throw new ComponentDefinitionException("Only one of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or " + REF_ELEMENT + " element can be set"); } service.setServiceComponent((Target) parseBeanMetadata(e, false)); - } else { - // TODO: can be ref, reference or a custom element + } else if (nodeNameEquals(e, REF_ELEMENT)) { + if (service.getServiceComponent() != null) { + throw new ComponentDefinitionException("Only one of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or " + REF_ELEMENT + " element can be set"); + } + String component = e.getAttribute(COMPONENT_ATTRIBUTE); + if (component == null || component.length() == 0) { + throw new ComponentDefinitionException("Element " + REF_ELEMENT + " must have a valid " + COMPONENT_ATTRIBUTE + " attribute"); + } + service.setServiceComponent(new RefMetadataImpl(component)); } } } } // Check service if (service.getServiceComponent() == null) { - throw new ComponentDefinitionException("One of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or custom inner element must be set"); + throw new ComponentDefinitionException("One of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or " + REF_ELEMENT + " element must be set"); } ComponentMetadata s = service; Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd?rev=772085&r1=772084&r2=772085&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd (original) +++ geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd Wed May 6 07:22:16 2009 @@ -1,7 +1,7 @@ - + + + + + + + if used as a qualified namespace, "bp:" is the recommended + namespace prefix. + ]]> + + - + + + , , + , and elements are all derived from + the Tcomponent type. This type defines an id attributre + that is used create references between different components. + Component elements can also be inlined within other component + definitions. The id attribute is not valid when inliine. + ]]> + + + + - + + + + element is the root element for a blueprint + configuration file. A blueprint configuration has two sections. + The first section (contained within elements) + identifies components that are used for converting values into + different target types. The type converters are optional, so + the file does not need to specify a type converter section. + + Following the type converters are the component definitions. + Components are , , , , and + elements that identify the bundle components that will + be managed by the blueprint service. + ]]> + + + - - + + - + - - - - - - + + + + components. If not specified, the global + default is "false". Individual components may + override the default + ]]> + + + + + + + components. If not specified, no default + init-method is defined. It is not an error for a + bean to not implement the indicated default init-method. + The value will be ignored. A bean can also specify + a different init-method or disable the init-method + call by specifying an init-method value of "". + ]]> + + + + + + + components. If not specified, no default + destroy-method is defined. It is not an error for a + bean to not implement the indicated default destroy-method. + The value will be ignored. A bean can also specify + a different destroy-method or disable the destroy-method + call by specifying a destroy-method value of "". + ]]> + + + + + + + element can override the specified configuration + default. + ]]> + + + + + + + , , and components. The + normal default is "mandatory", and can be changed by individual + service reference components. + ]]> + + + + + + + element. The + section is a set of , , or + elements that identify the type convert components + that will ference components. + ]]> + + - + - - - - - - - - - - - - - - - - - - + + + + element + or inline ( or ). + ]]> + + + + + + + + + + + + + + , , , , and . + ]]> + + + + + + + + + + + + element. + This definition is also used by the + element used in the blueprint-cm schema. + ]]> + + - + - - + + + maxOccurs="unbounded" /> + + + component. + This definition is also used by the + element used in the blueprint-cm schema. The attributes + provide the characteristics for how to create a bean instance. + Constructor arguments and injected properties are specified + via child and elements. + ]]> + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + . This can either + be "eager" ("false") or "lazy" ("true"). If not specified, it + defaults to default-lazy-init attribute of the enclosing + element. The default, default is "eager" + ]]> + + + + + + + + component. The elements are the arguments for the + bean class constructor or passed to the bean factory method. + + The type, if specified, is used to disambiguate the constructor + or method signature. Arguments may also be matched up with + arguments by explicitly specifying the index position. If the + index is used, then all elements for the bean must + also specify the index. + + The value and ref attributes are convenience shortcuts to make + the tag easier to code. A fuller set of injected + values and types can be specified using one of the "value" + type elements. + ]]> + + - - + + - - - - + + + + + + + + component. The elements correspond to named + JavaBean setting methods for a created bean object. + + The value and ref attributes are convenience shortcuts to make + the tag easier to code. A fuller set of injected + values and types can be specified using one of the "value" + type elements. + ]]> + + - - + + - - - + + + - + + + element. + ]]> + + + + + + + + + + element. These + are instances of the TserviceReference type, with the addition + of a timeout attribute. If the timeout is not specified, + the default-timeout value is inherited from the encapsulating + definition. + ]]> + + + + + + + - - - - - - - - - - - - - - - + + + + + + and elements. This adds in the characteristics that + only apply to collections of references (e.g., sorting). + ]]> + + + + + + + + + element defines a comparator instance that will + be used to sort the constructed reference collection. + ]]> + + + - + + + + element when the + comparator target is a top-level or element. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + , and elements. This type defines all of the + characteristics common to both sorts of references. + ]]> + + + + + + + + + + + + + + + + + + + to a or element, or an inline + or . + ]]> + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + element. + ]]> + + + + + + + - - - - + + + , , or element. The listener + object can be specified as a or as an inline or + component. Listener events are mapped to the indicated + bind or unbind methods. + ]]> + + + + + + - - - - - + + + default-lazy-init attribute and the + lazy-init attribute. + ]]> + + + + + + default-availability attribute and the + , , and availability attribute. + ]]> + + - - + + - + + + + to a component or an + bean component. + ]]> + + - - + + - - - - - - + + + + + + , , elements with unstatisfied + manadatory references, then the depends-on relationship will also + be used to determine whether this service is registered or + unregistered. + ]]> + + + + + + + + + + + + + + + element + in this schema and the element in the + blueprint-cm schema. + ]]> + + - - - - - - + + + + + element also has + a shortcut interface attribute for the usual case of just + a single interface being used. This also cannot be used if + the auto-export attribute is used. + ]]> + + + + + + + + + + + + + + + + + + + + + + to a component or an inline component. + ]]> + + + + + - - + + + to a or component, or an inline + or component definition. The registration-method and + unregistration-method attributes define the methods that will be called + for the respective events. + + For the very common case of using a to a listener component, the + ref attribute may also be used as a shortcut. + ]]> + + + + - - + + - - + + + + and elements, any of the + component types (, , etc.) as inline components, the + generic element for types sourced from string values, any of the + collection types (, , , , ), and the + type to inject a null value. + ]]> + + - - - - + + + + - + + + value type. + ]]> + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + and elements, any of the + component types (, , etc.) as inline components, the + generic element for types sourced from string values, and any of the + collection types (, , , , ). + + The type is NOT a member of this group. + ]]> + + + + + + + + + + + + + + + + + + + + elements. This specifies a required + component id for the reference component. + ]]> + + + + + + + + + elements. The element + is used for types that can be created from a single string value. + The string value is the data value for the element. The optional + type attribute allows a target conversion value to be explicitly + specified. + ]]> + + + + + + + + + + + + + + + + + + + + + , , and elements. + ]]> + + + + + + + + + + + + + value element. The prop elements + are pairs of string-valued keys and values. + ]]> + + + + + + - - + + + value type. The property + value can be specified using either the attribute, or as value data for + the property element. + ]]> + + + + + + + elements. A map may have a + default value type specified, so it inherits from the TtypeCollection + type. A key type can also be specified, and the map members are + created from the entry elements, which require a key/value pair. + ]]> + + - + - + - + + + + elements nested inside of a element. + Each instance defines a key/value pair that will be added to the + Map. Both the keys and values may be arbitrary types. Keys must not + be but is permitted for entry values. A default type + can be specified for both the keys and the values, but individual keys + or values can override the default. + ]]> + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + elements. + The syntax is similar to what is defined for , but keys must be + string values and there are no type defaults that can be specified. + created from the entry elements, which require a key/value pair. + ]]> + + + + + + + + + + + + + element. This does not allow a child element and there are no + key-ref or value-ref attributes. + ]]> + + + + + + + + + + + + + + + element type to allow documentation to added to the + blueprint configuration. + ]]> + + + + + + + + + element used for , + , , and ; + ]]> + + + + + + + + + + + element. + This is just a xxxxx element where the contained + value is the name of an interface class. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + +