public class DefaultParserService extends org.apache.avalon.framework.logger.AbstractLogEnabled implements ParserService, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.service.Serviceable
ParserService.AUTOMATIC_DEFAULT, AUTOMATIC_KEY, DEFAULT_MAX_IDLE, DEFAULT_POOL_CAPACITY, FULCRUM_POOL_DEFAULT, FULCRUM_POOL_KEY, PARAMETER_ENCODING_DEFAULT, PARAMETER_ENCODING_KEY, POOL_KEY, ROLE, URL_CASE_FOLDING_KEY| Constructor and Description |
|---|
DefaultParserService() |
DefaultParserService(org.apache.commons.pool2.impl.GenericObjectPoolConfig<?> config) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon component lifecycle method
|
String |
convert(String value)
Trims the string data and applies the conversion specified in
the property given by URL_CASE_FOLDING.
|
String |
convertAndTrim(String value)
Convert a String value according to the url-case-folding property.
|
String |
convertAndTrim(String value,
ValueParser.URLCaseFolding fold)
A static version of the convert method, which
trims the string data and applies the conversion specified in
the property given by URL_CASE_FOLDING.
|
boolean |
getAutomaticUpload()
Gets the automaticUpload value from the configuration
|
String |
getParameterEncoding()
Get the character encoding that will be used by this ValueParser.
|
<P extends ValueParser> |
getParser(Class<P> ppClass)
Get a
ValueParser instance from the service. |
ValueParser.URLCaseFolding |
getUrlFolding()
Gets the folding value from the configuration
|
List<Part> |
parseUpload(HttpServletRequest request)
Parse the given request for uploaded files
|
void |
putParser(ValueParser parser)
Clears the parse and puts it back into
the pool service.
|
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Avalon component lifecycle method
|
void |
setParameterEncoding(String encoding)
Set the character encoding that will be used by this ValueParser.
|
public DefaultParserService()
public DefaultParserService(org.apache.commons.pool2.impl.GenericObjectPoolConfig<?> config)
public String getParameterEncoding()
getParameterEncoding in interface ParserServicepublic void setParameterEncoding(String encoding)
public String convert(String value)
convert in interface ParserServicevalue - A String to be processed.public String convertAndTrim(String value)
convertAndTrim in interface ParserServicevalue - the String to convertpublic String convertAndTrim(String value, ValueParser.URLCaseFolding fold)
convertAndTrim in interface ParserServicevalue - A String to be processed.fold - The parameter folding to be applied
(see ParserService)public ValueParser.URLCaseFolding getUrlFolding()
getUrlFolding in interface ParserServicepublic boolean getAutomaticUpload()
getAutomaticUpload in interface ParserServicepublic List<Part> parseUpload(HttpServletRequest request) throws org.apache.avalon.framework.service.ServiceException
parseUpload in interface ParserServicerequest - the HttpServletRequest objectPartsorg.apache.avalon.framework.service.ServiceException - if parsing failspublic <P extends ValueParser> P getParser(Class<P> ppClass) throws InstantiationException
ValueParser instance from the service. Use the
given Class to create the object.getParser in interface ParserServiceP - The ValueParser we are usingppClass - parameter parser classInstantiationException - if the instance could not be createdpublic void putParser(ValueParser parser)
ValueParser.dispose().putParser in interface ParserServiceparser - The value parser to usepublic void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconf - the configurationorg.apache.avalon.framework.configuration.ConfigurationException - Generic exceptionpublic void service(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceablemanager - The service manager instanceorg.apache.avalon.framework.service.ServiceException - generic exceptionCopyright © 2005–2019 The Apache Software Foundation. All rights reserved.