Package org.apache.fulcrum.parser
Schnittstelle ParserService
- Alle bekannten Implementierungsklassen:
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 $
- Autor:
- Thomas Vandahl
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final boolean
The default value of 'automaticUpload' property (false
).static final String
Parse file upload items automaticallystatic final int
The default value of 'maxIdle' property in 'pool' (2
).static final int
The default value of 'maxTotal' property in 'pool' (1024
).static final boolean
fulcrum pool by default falsestatic final String
fulcrum pool activation parameterstatic final String
Default Encoding for Parameter Parserstatic final String
Key for the Parameter Parser Encodingstatic final String
commons pool2 parametersstatic final String
Avalon Identifierstatic final String
Property for setting the URL folding value -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungTrims 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.boolean
Gets the automaticUpload value from the configurationGet the parameter encoding that has been configured as default for the ParserService.<P extends ValueParser>
PGet aValueParser
instance from the service.Gets the folding value from the configurationparseUpload
(HttpServletRequest request) Parse the given request for uploaded filesvoid
putParser
(ValueParser parser) Put the parser into service
-
Felddetails
-
ROLE
Avalon Identifier -
PARAMETER_ENCODING_DEFAULT
Default Encoding for Parameter Parser- Siehe auch:
-
PARAMETER_ENCODING_KEY
Key for the Parameter Parser Encoding- Siehe auch:
-
URL_CASE_FOLDING_KEY
Property for setting the URL folding value- Siehe auch:
-
AUTOMATIC_KEY
Parse file upload items automatically- Siehe auch:
-
FULCRUM_POOL_DEFAULT
static final boolean FULCRUM_POOL_DEFAULTfulcrum pool by default false- Siehe auch:
-
FULCRUM_POOL_KEY
fulcrum pool activation parameter- Siehe auch:
-
POOL_KEY
commons pool2 parameters- Siehe auch:
-
AUTOMATIC_DEFAULT
static 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 callingparseRequest
manually.- Siehe auch:
-
DEFAULT_POOL_CAPACITY
static final int DEFAULT_POOL_CAPACITYThe default value of 'maxTotal' property in 'pool' (
1024
). The default pool capacity.- Siehe auch:
-
DEFAULT_MAX_IDLE
static final int DEFAULT_MAX_IDLEThe default value of 'maxIdle' property in 'pool' (
2
). The default maximum idle object.- Siehe auch:
-
-
Methodendetails
-
getParameterEncoding
String getParameterEncoding()Get the parameter encoding that has been configured as default for the ParserService.- Gibt zurück:
- A String for the parameter encoding
-
convert
Trims 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.- Parameter:
value
- A String to be processed.- Gibt zurück:
- A new String converted to lowercase and trimmed.
-
convertAndTrim
Convert a String value according to the url-case-folding property.- Parameter:
value
- the String to convert- Gibt zurück:
- a new String.
-
convertAndTrim
A 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.- Parameter:
value
- A String to be processed.fold
- The parameter folding to be applied (seeParserService
)- Gibt zurück:
- A new String converted to the correct case and trimmed.
-
getUrlFolding
ValueParser.URLCaseFolding getUrlFolding()Gets the folding value from the configuration- Gibt zurück:
- The current Folding Value
-
getAutomaticUpload
boolean getAutomaticUpload()Gets the automaticUpload value from the configuration- Gibt zurück:
- The current automaticUpload Value
-
parseUpload
List<Part> parseUpload(HttpServletRequest request) throws org.apache.avalon.framework.service.ServiceException Parse the given request for uploaded files- Parameter:
request
- the HttpServletRequest object- Gibt zurück:
- A list of
Part
s - Löst aus:
org.apache.avalon.framework.service.ServiceException
- if parsing fails
-
getParser
Get aValueParser
instance from the service. Use the default implementation.- Typparameter:
P
- The ValueParser we are using- Parameter:
ppClass
- parameter parser class- Gibt zurück:
- An object that implements ValueParser
- Löst aus:
InstantiationException
- if the instance could not be created
-
putParser
Put the parser into service- Parameter:
parser
- The value parser to be used
-