private JoinableResourceBundle buildResourcebundle ( ResourceBundleDefinition definition ) throws BundleDependencyException { if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Init bundle with id:" + definition . getBundleId ( ) ) ; validateBundleId ( definition ) ; DebugInclusion inclusion = DebugInclusion . ALWAYS ; if ( definition . isDebugOnly ( ) ) { inclusion = DebugInclusion . ONLY ; } if ( definition . isDebugNever ( ) ) { inclusion = DebugInclusion . NEVER ; } InclusionPattern include = new InclusionPattern ( definition . isGlobal ( ) , definition . getInclusionOrder ( ) , inclusion ) ; JoinableResourceBundleImpl newBundle = new JoinableResourceBundleImpl ( definition . getBundleId ( ) , definition . getBundleName ( ) , definition . getBundlePrefix ( ) , fileExtension , include , definition . getMappings ( ) , resourceReaderHandler , jawrConfig . getGeneratorRegistry ( ) ) ; if ( null != definition . getBundlePostProcessorKeys ( ) ) newBundle . setBundlePostProcessor ( chainFactory . buildPostProcessorChain ( definition . getBundlePostProcessorKeys ( ) ) ) ; if ( null != definition . getUnitaryPostProcessorKeys ( ) ) newBundle . setUnitaryPostProcessor ( chainFactory . buildPostProcessorChain ( definition . getUnitaryPostProcessorKeys ( ) ) ) ; if ( null != definition . getIeConditionalExpression ( ) ) newBundle . setExplorerConditionalExpression ( definition . getIeConditionalExpression ( ) ) ; // if (null != definition.getVariants()) // newBundle.setVariants(definition.getVariants()); if ( null != definition . getAlternateProductionURL ( ) ) newBundle . setAlternateProductionURL ( definition . getAlternateProductionURL ( ) ) ; if ( null != definition . getDebugURL ( ) ) newBundle . setDebugURL ( definition . getDebugURL ( ) ) ; if ( null != definition . getDependencies ( ) && ! definition . getDependencies ( ) . isEmpty ( ) ) { bundleDefinitionsWithDependencies . add ( definition ) ; } return newBundle ; }
Build a JoinableResourceBundle using a ResourceBundleDefinition