nl_tokens: Load resources configuration loading its pre and postfilters modules .
pl_tokens: function loadResources ( resources , providerIndex ) { var result = [ ] , index , num = resources . length , resource , prefilters , postfilters ; for ( index = 0 ; index < num ; index ++ ) { resource = resources [ index ] ; prefilters = [ ] ; postfilters = [ ] ; // Check resource has required properties if ( ! resource . id ) { throw new InvalidConfiguration ( InvalidConfiguration . INVALID_RESOURCE_MESSAGE + " Resource at index " + index + " on" + " provider at index " + providerIndex + " has no 'id' property." ) ; } if ( ! resource . context ) { throw new InvalidConfiguration ( InvalidConfiguration . INVALID_RESOURCE_MESSAGE + " Resource at index " + index + " on" + " provider at index " + providerIndex + " has no 'context' property." ) ; } // Load resource's filters if ( resource . prefilters ) { prefilters = loadMiddlewareFilters ( resource . prefilters ) ; } if ( resource . postfilters ) { postfilters = loadMiddlewareFilters ( resource . postfilters ) ; } // Store resource information result . push ( { id : resource . id , context : resource . <mask> , prefilters : prefilters , postfilters : postfilters } ) ; } return result ; }