Package org.apache.flex.forks.velocity.runtime.resource

Examples of org.apache.flex.forks.velocity.runtime.resource.Resource


    /*
     * get the path
     */
    arg = value.toString();

    Resource resource = null;

    try {
      resource = rsvc.getContent(arg, getInputEncoding(context));
    } catch (ResourceNotFoundException rnfe) {
      /*
       * the arg wasn't found. Note it and throw
       */

      rsvc.error("#include(): cannot find resource '" + arg
          + "', called from template "
          + context.getCurrentTemplateName() + " at (" + getLine()
          + ", " + getColumn() + ")");
      throw rnfe;
    }

    catch (Exception e) {
      rsvc.error("#include(): arg = '" + arg + "', called from template "
          + context.getCurrentTemplateName() + " at (" + getLine()
          + ", " + getColumn() + ") : " + e);
    }

    if (resource == null)
      return false;

    writer.write((String) resource.getData());
    return true;
  }
View Full Code Here


     * from.
     * @return The encoding to use when processing this directive.    
     */
    protected String getInputEncoding(InternalContextAdapter context)
    {
        Resource current = context.getCurrentResource();
        if (current != null)
        {
            return current.getEncoding();
        }
        else
        {
            return (String) rsvc.getProperty(RuntimeConstants.INPUT_ENCODING);
        }
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.velocity.runtime.resource.Resource

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.