org.apache.cocoon.template.expression
Class AbstractStringTemplateParser

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.template.expression.AbstractStringTemplateParser
All Implemented Interfaces:
Disposable, LogEnabled, Serviceable, ThreadSafe, StringTemplateParser
Direct Known Subclasses:
DefaultStringTemplateParser, JXTGStringTemplateParser

public abstract class AbstractStringTemplateParser
extends AbstractLogEnabled
implements Serviceable, Disposable, ThreadSafe, StringTemplateParser


Field Summary
 
Fields inherited from interface org.apache.cocoon.template.expression.StringTemplateParser
ROLE
 
Constructor Summary
AbstractStringTemplateParser()
           
 
Method Summary
protected  JXTExpression compile(String expression)
           
protected  JXTExpression compile(String expression, String language)
           
 JXTExpression compileBoolean(String val, String msg, Locator location)
          Compile a boolean expression (returns either a Compiled Expression or a Boolean literal)
 JXTExpression compileExpr(String inStr, String errorPrefix, Locator location)
           
 JXTExpression compileInt(String val, String msg, Locator location)
          Compile an integer expression (returns either a Compiled Expression or an Integer literal)
 void dispose()
           
 List parseSubstitutions(Reader in, String errorPrefix, Locator location)
          Parse a set of expressions spaced with literals
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.template.expression.StringTemplateParser
parseSubstitutions
 

Constructor Detail

AbstractStringTemplateParser

public AbstractStringTemplateParser()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

compile

protected JXTExpression compile(String expression)
                         throws Exception
Throws:
Exception

compile

protected JXTExpression compile(String expression,
                                String language)
                         throws Exception
Throws:
Exception

compileBoolean

public JXTExpression compileBoolean(String val,
                                    String msg,
                                    Locator location)
                             throws SAXException
Description copied from interface: StringTemplateParser
Compile a boolean expression (returns either a Compiled Expression or a Boolean literal)

Specified by:
compileBoolean in interface StringTemplateParser
Throws:
SAXException
See Also:
StringTemplateParser.compileBoolean(java.lang.String, java.lang.String, org.xml.sax.Locator)

compileInt

public JXTExpression compileInt(String val,
                                String msg,
                                Locator location)
                         throws SAXException
Description copied from interface: StringTemplateParser
Compile an integer expression (returns either a Compiled Expression or an Integer literal)

Specified by:
compileInt in interface StringTemplateParser
Throws:
SAXException
See Also:
StringTemplateParser.compileInt(java.lang.String, java.lang.String, org.xml.sax.Locator)

compileExpr

public JXTExpression compileExpr(String inStr,
                                 String errorPrefix,
                                 Locator location)
                          throws SAXParseException
Specified by:
compileExpr in interface StringTemplateParser
Throws:
SAXParseException
See Also:
StringTemplateParser.compileExpr(java.lang.String, java.lang.String, org.xml.sax.Locator)

parseSubstitutions

public List parseSubstitutions(Reader in,
                               String errorPrefix,
                               Locator location)
                        throws SAXParseException
Description copied from interface: StringTemplateParser
Parse a set of expressions spaced with literals

Specified by:
parseSubstitutions in interface StringTemplateParser
Throws:
SAXParseException
See Also:
StringTemplateParser.parseSubstitutions(java.io.Reader, java.lang.String, org.xml.sax.Locator)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.