|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.remoting.impl.MappingImpl
public class MappingImpl
Default implementation of Mapping. This implementation recognizes
patterns similar to URL mappings in the Servlet Specification:
If a view identifier matches, the corresponding resource identifier is
calculated by stripping the non-wildcard part of the view identifier
(/foo or .foo for the examples above) and
returning the remainder.
| Constructor Summary | |
|---|---|
MappingImpl()
Construct an unconfigured instance. |
|
MappingImpl(Mechanism mechanism,
String pattern,
Processor processor)
Construct a fully configured instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Two Mappings are equal if they have the same pattern. |
Mappings |
getMappings()
Return the |
Mechanism |
getMechanism()
Return a description of the mechanism used to return the response from this processor. |
String |
getPattern()
Return the matching pattern for the view identifier for this
request, used to determine if this is the appropriate |
Processor |
getProcessor()
Return the |
int |
hashCode()
Return the hash code for this object. |
String |
mapResourceId(javax.faces.context.FacesContext context,
String resourceId)
Map the specified resource identifier to a complete URL that may be used to request this resource from the server. |
String |
mapViewId(javax.faces.context.FacesContext context)
If the specified view identifier matches the pattern specified by
this |
void |
setMappings(Mappings mappings)
Set the |
void |
setMechanism(Mechanism mechanism)
Set the mechanism used by this mapping. |
void |
setPattern(String pattern)
Set the matching pattern used by this mapping. |
void |
setProcessor(Processor processor)
Set the |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MappingImpl()
Construct an unconfigured instance.
public MappingImpl(Mechanism mechanism,
String pattern,
Processor processor)
Construct a fully configured instance.
mechanism - Mechanism used to produce response for this mappingpattern - URL matching pattern for this mappingprocessor - Processor instance for this mapping| Method Detail |
|---|
public Mappings getMappings()
Return the Mappings instance this Mapping instance
is associated with.
getMappings in interface Mappingpublic void setMappings(Mappings mappings)
Set the Mappings instance this Mapping instance
is associated with.
setMappings in interface Mappingmappings - The new Mappings instancepublic Mechanism getMechanism()
Return a description of the mechanism used to return the response from this processor. This value may be interpreted, for example, by a JavaServer Faces component that wishes to calculate an appropriate URL for a component specific resource that is packaged in a particular manner.
getMechanism in interface Mappingpublic void setMechanism(Mechanism mechanism)
Set the mechanism used by this mapping.
setMechanism in interface Mappingmechanism - The new mechanismpublic String getPattern()
Return the matching pattern for the view identifier for this
request, used to determine if this is the appropriate Mapping
for processing the current request or not.
getPattern in interface Mappingpublic void setPattern(String pattern)
Set the matching pattern used by this mapping.
setPattern in interface Mappingpattern - The new patternpublic Processor getProcessor()
Return the Processor instance to be used to process
requests where the view identifier matches our pattern.
getProcessor in interface Mappingpublic void setProcessor(Processor processor)
Set the Processor instance used by this mapping.
setProcessor in interface Mappingprocessor - The new Processor instance
public String mapResourceId(javax.faces.context.FacesContext context,
String resourceId)
Map the specified resource identifier to a complete URL that may be used to request this resource from the server.
mapResourceId in interface Mappingcontext - FacesContext for the current requestresourceId - Resource identifier to be mappedpublic String mapViewId(javax.faces.context.FacesContext context)
If the specified view identifier matches the pattern specified by
this Mapping, return the corresponding resource identifier
that should be passed on to our Processor. If the specified
view identifier does not match, return null instead.
mapViewId in interface Mappingcontext - FacesContext for the current requestpublic int hashCode()
Return the hash code for this object.
hashCode in class Objectpublic boolean equals(Object object)
Two Mappings are equal if they have the same pattern.
equals in class Objectobject - Object to which we are tested for equality
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||