Package org.apache.fulcrum.parser
Interface ParserService
- All Known Implementing Classes:
- DefaultParserService
public interface ParserService
ParserService defines the methods which are needed by the parser objects
 to get their necessities.
- Version:
- $Id: ValueParser.java 535465 2007-05-05 06:58:06Z tv $
- Author:
- Thomas Vandahl
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final booleanThe default value of 'automaticUpload' property (false).static final StringParse file upload items automaticallystatic final intThe default value of 'maxIdle' property in 'pool' (2).static final intThe default value of 'maxTotal' property in 'pool' (1024).static final booleanfulcrum pool by default falsestatic final Stringfulcrum pool activation parameterstatic final StringDefault Encoding for Parameter Parserstatic final StringKey for the Parameter Parser Encodingstatic final Stringcommons pool2 parametersstatic final StringAvalon Identifierstatic final StringProperty for setting the URL folding value
- 
Method SummaryModifier and TypeMethodDescriptionTrims the string data and applies the conversion specified in the property given by URL_CASE_FOLDING.convertAndTrim(String value) Convert a String value according to the url-case-folding property.convertAndTrim(String value, ValueParser.URLCaseFolding fold) A convert method, which trims the string data and applies the conversion specified in the parameter given.booleanGets the automaticUpload value from the configurationGet the parameter encoding that has been configured as default for the ParserService.<P extends ValueParser>
 PGet aValueParserinstance from the service.Gets the folding value from the configurationList<jakarta.servlet.http.Part> parseUpload(jakarta.servlet.http.HttpServletRequest request) Parse the given request for uploaded filesvoidputParser(ValueParser parser) Put the parser into service
- 
Field Details- 
ROLEAvalon Identifier
- 
PARAMETER_ENCODING_DEFAULTDefault Encoding for Parameter Parser- See Also:
 
- 
PARAMETER_ENCODING_KEYKey for the Parameter Parser Encoding- See Also:
 
- 
URL_CASE_FOLDING_KEYProperty for setting the URL folding value- See Also:
 
- 
AUTOMATIC_KEYParse file upload items automatically- See Also:
 
- 
FULCRUM_POOL_DEFAULTstatic final boolean FULCRUM_POOL_DEFAULTfulcrum pool by default false- See Also:
 
- 
FULCRUM_POOL_KEYfulcrum pool activation parameter- See Also:
 
- 
POOL_KEYcommons pool2 parameters- See Also:
 
- 
AUTOMATIC_DEFAULTstatic final boolean AUTOMATIC_DEFAULTThe default value of 'automaticUpload' property ( false). If set totrue, parsing the multipart request will be performed automatically byParameterParser. Otherwise, an org.apache.turbine.modules.Action may decide to parse the request by callingparseRequestmanually.- See Also:
 
- 
DEFAULT_POOL_CAPACITYstatic final int DEFAULT_POOL_CAPACITYThe default value of 'maxTotal' property in 'pool' ( 1024). The default pool capacity.- See Also:
 
- 
DEFAULT_MAX_IDLEstatic final int DEFAULT_MAX_IDLEThe default value of 'maxIdle' property in 'pool' ( 2). The default maximum idle object.- See Also:
 
 
- 
- 
Method Details- 
getParameterEncodingString getParameterEncoding()Get the parameter encoding that has been configured as default for the ParserService.- Returns:
- A String for the parameter encoding
 
- 
convertTrims the string data and applies the conversion specified in the property given by URL_CASE_FOLDING. It returns a new string so that it does not destroy the value data.- Parameters:
- value- A String to be processed.
- Returns:
- A new String converted to lowercase and trimmed.
 
- 
convertAndTrimConvert a String value according to the url-case-folding property.- Parameters:
- value- the String to convert
- Returns:
- a new String.
 
- 
convertAndTrimA convert method, which trims the string data and applies the conversion specified in the parameter given. It returns a new string so that it does not destroy the value data.- Parameters:
- value- A String to be processed.
- fold- The parameter folding to be applied (see- ParserService)
- Returns:
- A new String converted to the correct case and trimmed.
 
- 
getUrlFoldingValueParser.URLCaseFolding getUrlFolding()Gets the folding value from the configuration- Returns:
- The current Folding Value
 
- 
getAutomaticUploadboolean getAutomaticUpload()Gets the automaticUpload value from the configuration- Returns:
- The current automaticUpload Value
 
- 
parseUploadList<jakarta.servlet.http.Part> parseUpload(jakarta.servlet.http.HttpServletRequest request) throws org.apache.avalon.framework.service.ServiceException Parse the given request for uploaded files- Parameters:
- request- the HttpServletRequest object
- Returns:
- A list of Parts
- Throws:
- org.apache.avalon.framework.service.ServiceException- if parsing fails
 
- 
getParserGet aValueParserinstance from the service. Use the default implementation.- Type Parameters:
- P- The ValueParser we are using
- Parameters:
- ppClass- parameter parser class
- Returns:
- An object that implements ValueParser
- Throws:
- InstantiationException- if the instance could not be created
 
- 
putParserPut the parser into service- Parameters:
- parser- The value parser to be used
 
 
-