Class AbstractURLSegment
java.lang.Object
org.apache.wicket.util.string.StringValue
org.wicketstuff.rest.resource.urlsegments.AbstractURLSegment
- All Implemented Interfaces:
Serializable
,IClusterable
,ISegementElement
- Direct Known Subclasses:
FixedURLSegment
,MultiParamSegment
,ParamSegment
Base class to contain the informations of the segments that compose the URL used to map a method.
It's used to use simple segments with no path parameters.
- Author:
- andrea del bene
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MetaPattern
MetaPattern to identify the content of a regular expression.static final MetaPattern
MetaPattern to identify the declaration of a regular expression.static final MetaPattern
MetaPattern to identify a path parameter inside a segment (i.e. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getActualSegment
(String fullSegment) Get the segment value without optional matrix parameters.final MetaPattern
Getter method for segment MetaPattern.getSegmentMatrixParameters
(String fullSegment) Extract matrix parameters from the segment in input.protected abstract MetaPattern
Method invoked to load the MetaPattern for the current segment.static AbstractURLSegment
newSegment
(String segment) Factory method to create new instances of AbstractURLSegment.Methods inherited from class org.apache.wicket.util.string.StringValue
afterFirst, afterLast, beforeFirst, beforeLast, equals, hashCode, isEmpty, isNull, repeat, repeat, replaceAll, to, toBoolean, toBoolean, toBooleanObject, toChar, toChar, toCharacter, toDouble, toDouble, toDoubleObject, toDuration, toDuration, toEnum, toEnum, toEnum, toInstant, toInstant, toInt, toInt, toInteger, toLong, toLong, toLongObject, toOptional, toOptionalBoolean, toOptionalCharacter, toOptionalDouble, toOptionalDuration, toOptionalEnum, toOptionalInstant, toOptionalInteger, toOptionalLong, toOptionalString, toString, toString, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.wicketstuff.rest.resource.urlsegments.visitor.ISegementElement
accept
-
Field Details
-
REGEXP_BODY
MetaPattern to identify the content of a regular expression. -
REGEXP_DECLARATION
MetaPattern to identify the declaration of a regular expression. -
SEGMENT_PARAMETER
MetaPattern to identify a path parameter inside a segment (i.e. "{paramName:regexp}")
-
-
Method Details
-
loadMetaPattern
Method invoked to load the MetaPattern for the current segment.- Returns:
- the MetaPattern for the current segment.
-
newSegment
Factory method to create new instances of AbstractURLSegment.- Parameters:
segment
- The content of the new segment.- Returns:
- the new instance of AbstractURLSegment.
-
getActualSegment
Get the segment value without optional matrix parameters. For example given the following value 'segment;parm=value', the function returns 'segment'.- Parameters:
fullSegment
-- Returns:
- the value of the segment without matrix parameters.
-
getSegmentMatrixParameters
Extract matrix parameters from the segment in input.- Parameters:
fullSegment
- the segment in input.- Returns:
- a map containing matrix parameters.
-
getMetaPattern
Getter method for segment MetaPattern.
-