Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pl.matisoft.soy.global.runtime;
 
 
Created with IntelliJ IDEA. User: mati Date: 14/07/2013 Time: 16:46 A default implementation of GlobalModelResolver contains a list of resolvers, each resolver can decide what data should be injected.
    private static final Logger logger = LoggerFactory.getLogger(DefaultGlobalRuntimeModelResolver.class);
    private List<RuntimeDataResolverresolvers = Lists.newArrayList();
    private List<RuntimeDataResolveruserResolvers = Lists.newArrayList();
        this. = resolvers;
    }
    public DefaultGlobalRuntimeModelResolver(List<RuntimeDataResolverresolversList<RuntimeDataResolveruserResolvers) {
        this. = resolvers;
        this. = userResolvers;
    }
    }
    @Override
    public Optional<SoyMapDataresolveData(final HttpServletRequest requestfinal HttpServletResponse responsefinal Map<String, ? extends Objectmodel) {
        final SoyMapData root = new SoyMapData();
        for (final RuntimeDataResolver runtimeDataResolver : ) {
            .debug("resolving:{}"runtimeDataResolver);
            runtimeDataResolver.resolveData(requestresponsemodelroot);
        }
        for (final RuntimeDataResolver runtimeDataResolver : ) {
            .debug("user data resolving:{}"runtimeDataResolver);
            runtimeDataResolver.resolveData(requestresponsemodelroot);
        }
        return Optional.of(root);
    }
    public void setResolvers(List<RuntimeDataResolverresolvers) {
        this. = resolvers;
    }
    public List<RuntimeDataResolvergetResolvers() {
        return ;
    }
        return ;
    }
    public void setUserResolvers(List<RuntimeDataResolveruserResolvers) {
        this. = userResolvers;
    }
New to GrepCode? Check out our FAQ X