Date: 2004-09-28T06:40:48
   Editor: HowardLewisShip <[EMAIL PROTECTED]>
   Wiki: Jakarta HiveMind Wiki
   Page: ContributionOrderingProposal
   URL: http://wiki.apache.org/jakarta-hivemind/ContributionOrderingProposal

   no comment

New Page:

= Problem Description =

When using configurations in !HiveMind, it is common to order the values in the 
configuration.  This is most commonly done inside a {{{initializeService()}}} 
method.

It would be nice to have a declarative way to order components, either by 
sorting on one (or more) columns, or by makeing use of the {{{Orderer}}} to 
order values by dependencies.

= Proposed Solution =

Allow additional elements inside the <schema> element to support ordering.

Note that these solutions operate on the ''objects'' not the ''contributions''.

== Sorting ==

A <sort> element is used to sort the objects based on a property value.

{{{
  <sort property="..."/>
}}}

Sorting takes place on the objects (not the contributed elements).

== Ordering ==

An <order> element is used to order the objects by contributions.  This 
requires identifying three properties of the object: the name property that 
uniquely identifies each object,
the before property that indicates which other objects must follow (post 
requisites) and the after property, which specified wihch objects must precede 
(pre-requisites).

{{{
  <order name-property="..." before-property="..." after-property="..."/>
}}}

The three attributes identify the properties.  Where (as is common) the 
properties match the defaults ("name", "before", "after"), the corresponding 
attributes may be omitted.  Thus, in many common cases, simply putting an empty 
<order/> element into the <schema> will suffice!

= Discussion =

Do we need to support sorting on multiple columns?  Descending sorts?  Sorting 
with comparators?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to