org.eclipse.jetty.webapp
Class MetaData.RelativeOrdering

java.lang.Object
  extended by org.eclipse.jetty.webapp.MetaData.RelativeOrdering
All Implemented Interfaces:
MetaData.Ordering
Enclosing class:
MetaData

public class MetaData.RelativeOrdering
extends Object
implements MetaData.Ordering

RelativeOrdering A set of elements in web-fragment.xmls.


Field Summary
protected  LinkedList<Resource> _afterOthers
           
protected  LinkedList<Resource> _beforeOthers
           
protected  LinkedList<Resource> _noOthers
           
 
Constructor Summary
MetaData.RelativeOrdering()
           
 
Method Summary
 void addAfterOthers(Resource r)
           
 void addBeforeOthers(Resource r)
           
 void addNoOthers(Resource r)
           
protected  int getIndexOf(List<Resource> resources, String fragmentName)
           
 boolean hasOther()
           
protected  void insert(List<Resource> list, int index, Resource resource)
           
protected  void insert(List<Resource> list, int index, String fragName)
          Insert the resource matching the fragName into the list of resources at the location indicated by index.
 boolean isAbsolute()
           
protected  boolean isAfter(List<Resource> list, String fragNameA, String fragNameB)
          Is fragment name "a" after fragment name "b"?
protected  boolean isBefore(List<Resource> list, String fragNameA, String fragNameB)
          Is fragment with name a before fragment with name b?
 List<Resource> order(List<Resource> jars)
          Order the list of jars according to the ordering declared in the various web-fragment.xml files.
protected  boolean orderList(LinkedList<Resource> list)
           
protected  void remove(List<Resource> resources, Resource r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_beforeOthers

protected LinkedList<Resource> _beforeOthers

_afterOthers

protected LinkedList<Resource> _afterOthers

_noOthers

protected LinkedList<Resource> _noOthers
Constructor Detail

MetaData.RelativeOrdering

public MetaData.RelativeOrdering()
Method Detail

order

public List<Resource> order(List<Resource> jars)
Order the list of jars according to the ordering declared in the various web-fragment.xml files.

Specified by:
order in interface MetaData.Ordering
See Also:
MetaData.Ordering.order(java.util.List)

isAbsolute

public boolean isAbsolute()
Specified by:
isAbsolute in interface MetaData.Ordering

hasOther

public boolean hasOther()
Specified by:
hasOther in interface MetaData.Ordering

addBeforeOthers

public void addBeforeOthers(Resource r)

addAfterOthers

public void addAfterOthers(Resource r)

addNoOthers

public void addNoOthers(Resource r)

orderList

protected boolean orderList(LinkedList<Resource> list)

isBefore

protected boolean isBefore(List<Resource> list,
                           String fragNameA,
                           String fragNameB)
Is fragment with name a before fragment with name b?

Parameters:
list -
fragNameA -
fragNameB -
Returns:

isAfter

protected boolean isAfter(List<Resource> list,
                          String fragNameA,
                          String fragNameB)
Is fragment name "a" after fragment name "b"?

Parameters:
list -
fragNameA -
fragNameB -
Returns:

insert

protected void insert(List<Resource> list,
                      int index,
                      String fragName)
Insert the resource matching the fragName into the list of resources at the location indicated by index.

Parameters:
list -
index -
fragName -

insert

protected void insert(List<Resource> list,
                      int index,
                      Resource resource)

remove

protected void remove(List<Resource> resources,
                      Resource r)

getIndexOf

protected int getIndexOf(List<Resource> resources,
                         String fragmentName)


Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.