org.apache.shale.remoting
Interface Mapping

All Known Implementing Classes:
MappingImpl

public interface Mapping

Configuration element describing the mapping between a view identifier URL pattern to a corresponding processor class.


Method Summary
 Mappings getMappings()
          Return the Mappings instance this Mapping instance is associated with.
 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 Mapping for processing the current request or not.
 Processor getProcessor()
          Return the Processor instance to be used to process requests where the view identifier matches our pattern.
 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 Mapping, return the corresponding resource identifier that should be passed on to our Processor.
 void setMappings(Mappings mappings)
          Set the Mappings instance this Mapping instance is associated with.
 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 Processor instance used by this mapping.
 

Method Detail

getMappings

Mappings getMappings()

Return the Mappings instance this Mapping instance is associated with.


setMappings

void setMappings(Mappings mappings)

Set the Mappings instance this Mapping instance is associated with.

Parameters:
mappings - The new Mappings instance

getMechanism

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.


setMechanism

void setMechanism(Mechanism mechanism)

Set the mechanism used by this mapping.

Parameters:
mechanism - The new mechanism

getPattern

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.


setPattern

void setPattern(String pattern)

Set the matching pattern used by this mapping.

Parameters:
pattern - The new pattern

getProcessor

Processor getProcessor()

Return the Processor instance to be used to process requests where the view identifier matches our pattern.


setProcessor

void setProcessor(Processor processor)

Set the Processor instance used by this mapping.

Parameters:
processor - The new Processor instance

mapResourceId

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.

Parameters:
context - FacesContext for the current request
resourceId - Resource identifier to be mapped

mapViewId

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.

Parameters:
context - FacesContext for the current request


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.