public class ValueParserService extends java.lang.Object implements uk.ac.ed.epcc.webapp.Contexed, uk.ac.ed.epcc.webapp.AppContextService<ValueParserService>
This class may be used to fetch a ValueParser by a specific
name.
Parsers may be added by defining their class in the current
AppContext with a property of the following Form:
class.value_parser.parserName = binary java namefor example:
class.value_parser.myParser = com.example.MySpecialParser
The class must be on the class path and implement the ValueParser
interface.
| Constructor and Description |
|---|
ValueParserService(uk.ac.ed.epcc.webapp.AppContext context)
Constructs a new
ValueParserService which will configure
itself based on the state presented by context. |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
uk.ac.ed.epcc.webapp.AppContext |
getContext() |
uk.ac.ed.epcc.webapp.content.Table |
getDocumentationTable() |
java.lang.Class<? super ValueParserService> |
getType() |
ValueParser |
getValueParser(java.lang.String parserName)
Returns a
ValueParser with the specified name. |
public ValueParserService(uk.ac.ed.epcc.webapp.AppContext context)
ValueParserService which will configure
itself based on the state presented by context.context - The environment within which this service operates.public uk.ac.ed.epcc.webapp.AppContext getContext()
getContext in interface uk.ac.ed.epcc.webapp.Contexedpublic ValueParser getValueParser(java.lang.String parserName) throws java.lang.IllegalArgumentException
ValueParser with the specified name. Several names
for parsers have already been predefined. Others may be defined via the
AppContext provided during construction of this object.java.lang.IllegalArgumentException - If a ValueParser with the specified name cannot be
foundparserName - The name of the parser to returnpublic void cleanup()
cleanup in interface uk.ac.ed.epcc.webapp.AppContextService<ValueParserService>public uk.ac.ed.epcc.webapp.content.Table getDocumentationTable()
public java.lang.Class<? super ValueParserService> getType()
getType in interface uk.ac.ed.epcc.webapp.AppContextService<ValueParserService>