|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.chain.web.servlet.ServletPathMapper
public class ServletPathMapper
Command
that uses the "servlet path" component of the request URI
to select a Command
from the appropriate Catalog
, and
execute it. To use this command, you would typically map an instance
of ChainProcessor
to an extension pattern like "*.execute" and
then arrange that this is the default command to be executed. In such
an environment, a request for a context relative URI of "/foo.execute"
would cause the "/foo.execute" command to be loaded and executed.
Field Summary | |
---|---|
private java.lang.String |
catalogKey
|
Constructor Summary | |
---|---|
ServletPathMapper()
|
Method Summary | |
---|---|
boolean |
execute(Context context)
Look up the servlet path information for this request, and use it to select an appropriate Command to be executed. |
java.lang.String |
getCatalogKey()
Return the context key under which our Catalog has been
stored. |
void |
setCatalogKey(java.lang.String catalogKey)
Set the context key under which our Catalog has been
stored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String catalogKey
Constructor Detail |
---|
public ServletPathMapper()
Method Detail |
---|
public java.lang.String getCatalogKey()
Return the context key under which our Catalog
has been
stored.
public void setCatalogKey(java.lang.String catalogKey)
Set the context key under which our Catalog
has been
stored.
catalogKey
- The new catalog keypublic boolean execute(Context context) throws java.lang.Exception
Look up the servlet path information for this request, and use it to
select an appropriate Command
to be executed.
execute
in interface Command
context
- Context for the current request
true
if the processing of this Context
has been completed, or false
if the processing
of this Context
should be delegated to a subsequent
Command
in an enclosing Chain
java.lang.Exception
- general purpose exception return
to indicate abnormal termination
java.lang.IllegalArgumentException
- if context
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |