Package org.exoplatform.resolver

Examples of org.exoplatform.resolver.ResourceResolver


      try
      {
         TemplateStatistic app = statisticService.apps.get(name);
         if(app != null)
         {
            ResourceResolver resolver = app.getResolver();
            templatesCache_.remove(resolver.createResourceKey(name));
         }
      }
      catch (Exception e)
      {
         e.printStackTrace();
View Full Code Here


            throw new IllegalStateException("uicomponent " + uicomponent + " with class " + uicomponent.getClass().getName()
                    + " has no template for rendering");
        }

        //
        ResourceResolver resolver = uicomponent.getTemplateResourceResolver(context, template);
        WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, context);
        bcontext.put(UIComponent.UICOMPONENT, uicomponent);
        renderTemplate(template, bcontext);
    }
View Full Code Here

   {
      Application app = getApplication();
      while (app != null)
      {
         ApplicationResourceResolver appResolver = app.getResourceResolver();
         ResourceResolver resolver = appResolver.getResourceResolver(uri);
         if (resolver != null)
            return resolver;
         RequestContext pcontext = getParentAppRequestContext();
         if (pcontext != null)
            app = pcontext.getApplication();
View Full Code Here

            throw new IllegalStateException("uicomponent " + uicomponent + " with class " + uicomponent.getClass().getName()
                    + " has no template for rendering");
        }

        //
        ResourceResolver resolver = uicomponent.getTemplateResourceResolver(context, template);
        WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, context);
        bcontext.put(UIComponent.UICOMPONENT, uicomponent);
        bcontext.put(uicomponent.getUIComponentName(), uicomponent);
        renderTemplate(template, bcontext);
    }
View Full Code Here

    *
    */
   public void processRender(E uicomponent, WebuiRequestContext context) throws Exception
   {
      String template = uicomponent.getTemplate();
      ResourceResolver resolver = uicomponent.getTemplateResourceResolver(context, template);
      WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, context);
      bcontext.put("uicomponent", uicomponent);
      bcontext.put(uicomponent.getUIComponentName(), uicomponent);
      renderTemplate(template, bcontext);
   }
View Full Code Here

   {
      bcontext.put("decorator", decorator_);
      WebuiRequestContext context = bcontext.getRequestContext();
      ExoContainer pcontainer = context.getApplication().getApplicationServiceContainer();
      TemplateService service = (TemplateService)pcontainer.getComponentInstanceOfType(TemplateService.class);
      ResourceResolver resolver = bcontext.getResourceResolver();

      if (PropertyManager.isDevelopping())
      {
         WebuiRequestContext rootContext = (WebuiRequestContext)context.getParentAppRequestContext();
         if (rootContext == null)
            rootContext = context;
         long lastAccess = rootContext.getUIApplication().getLastAccessApplication();
         if (resolver.isModified(template, lastAccess))
         {
            if (log.isDebugEnabled())
               log.debug("Invalidate the template: " + template);
            service.invalidateTemplate(template, resolver);
         }
View Full Code Here

   public Object getMapXMLObject(WebuiRequestContext context) throws Exception
   {
      if (object != null)
         return object;
      ResourceResolver resolver = context.getResourceResolver(value);
      InputStream is = resolver.getInputStream(value);
      object = XMLObject.getObject(is);
      is.close();
      return object;
   }
View Full Code Here

   {
      try
      {
         if (object != null)
            return (T)object;
         ResourceResolver resolver = context.getResourceResolver(value);
         InputStream is = resolver.getInputStream(value);
         //TODO if is == null throw an exception saying the it's impossible to find the file
         Binding binding = new Binding();
         GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
         object = shell.evaluate(is);
         is.close();
View Full Code Here

   public <T> T getFreshObject(WebuiRequestContext context) throws Exception
   {
      try
      {
         ResourceResolver resolver = context.getResourceResolver(value);
         InputStream is = resolver.getInputStream(value);
         Binding binding = new Binding();
         GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
         object = shell.evaluate(is);
         is.close();
         return (T)object;
View Full Code Here

    public Object getMapXMLObject(WebuiRequestContext context) throws Exception {
        if (object == null) {
            synchronized (this) {
                if (object == null) {
                    ResourceResolver resolver = context.getResourceResolver(value);
                    InputStream is = resolver.getInputStream(value);
                    object = XMLObject.getObject(is);
                    is.close();
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.exoplatform.resolver.ResourceResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.