Package org.apache.myfaces.config
Class DefaultFacesConfigurationMerger
- java.lang.Object
- 
- org.apache.myfaces.spi.FacesConfigurationMerger
- 
- org.apache.myfaces.config.DefaultFacesConfigurationMerger
 
 
- 
 public class DefaultFacesConfigurationMerger extends FacesConfigurationMerger Default impl of the FacesConfigurationMerger-SPI. This impl gets all FacesConfig data from the current FacesConfigurationProvider SPI impl and merges it into one FacesConfigData object using the ordering and sorting rules of the Faces spec.- Author:
- Jakob Korherr
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultFacesConfigurationMerger()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<FacesConfig>applySortingAlgorithm(List<FacesConfig> appConfigResources)Sort using topological ordering algorithm.FacesConfigDatagetFacesConfigData(ExternalContext externalContext)Returns an object that collect all config information used by MyFaces to initialize the web application.protected List<FacesConfig>getPostOrderedList(List<FacesConfig> appConfigResources)Pre Sort the appConfigResources, detecting cyclic references, so when sort process start, it is just necessary to traverse the preOrderedList once.protected voidorderAndFeedArtifacts(FacesConfigDispenser dispenser, List<FacesConfig> appConfigResources, FacesConfig webAppConfig)protected List<FacesConfig>sortRelativeOrderingList(List<FacesConfig> preOrderedList)Sort a list of pre ordered elements.
 
- 
- 
- 
Method Detail- 
getFacesConfigDatapublic FacesConfigData getFacesConfigData(ExternalContext externalContext) Description copied from class:FacesConfigurationMergerReturns an object that collect all config information used by MyFaces to initialize the web application.- Specified by:
- getFacesConfigDatain class- FacesConfigurationMerger
- Returns:
 
 - 
orderAndFeedArtifactsprotected void orderAndFeedArtifacts(FacesConfigDispenser dispenser, List<FacesConfig> appConfigResources, FacesConfig webAppConfig) throws FacesException - Throws:
- FacesException
 
 - 
applySortingAlgorithmprotected List<FacesConfig> applySortingAlgorithm(List<FacesConfig> appConfigResources) throws FacesException Sort using topological ordering algorithm.- Parameters:
- appConfigResources-
- Returns:
- Throws:
- FacesException
 
 - 
sortRelativeOrderingListprotected List<FacesConfig> sortRelativeOrderingList(List<FacesConfig> preOrderedList) Sort a list of pre ordered elements. It scans one by one the elements and apply the conditions mentioned by Ordering object if it is available. The preOrderedList ensures that application config resources referenced by other resources are processed first, making more easier the sort procedure.- Parameters:
- preOrderedList-
- Returns:
 
 - 
getPostOrderedListprotected List<FacesConfig> getPostOrderedList(List<FacesConfig> appConfigResources) throws FacesException Pre Sort the appConfigResources, detecting cyclic references, so when sort process start, it is just necessary to traverse the preOrderedList once. To do that, we just scan "before" and "after" lists for references, and then those references are traversed again, so the first elements of the pre ordered list does not have references and the next elements has references to the already added ones. The elements on the preOrderedList looks like this: [ no ordering elements , referenced elements ... more referenced elements, before others / after others non referenced elements]- Parameters:
- appConfigResources-
- Returns:
- Throws:
- FacesException
 
 
- 
 
-