|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.chain.generic.LookupCommand org.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 |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
ServletPathMapper()
|
Method Summary | |
---|---|
protected Catalog |
getCatalog(Context context)
Return the Catalog to look up the Command in. |
String |
getCatalogKey()
Deprecated. Use catalogName to specify the name of the catalog in the catalog factory |
protected String |
getCommandName(Context context)
Look up the servlet path information for this request, and use it to select an appropriate Command to be executed. |
void |
setCatalogKey(String catalogKey)
Deprecated. Use catalogName to specify the name of the catalog in the catalog factory |
Methods inherited from class org.apache.commons.chain.generic.LookupCommand |
---|
execute, getCatalogFactory, getCatalogName, getCommand, getName, getNameKey, isIgnoreExecuteResult, isIgnorePostprocessResult, isOptional, postprocess, setCatalogFactory, setCatalogName, setIgnoreExecuteResult, setIgnorePostprocessResult, setName, setNameKey, setOptional |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.chain.Command |
---|
execute |
Constructor Detail |
---|
public ServletPathMapper()
Method Detail |
---|
public String getCatalogKey()
Return the context key under which our Catalog
has been
stored.
public void setCatalogKey(String catalogKey)
Set the context key under which our Catalog
has been
stored.
catalogKey
- The new catalog keyprotected String getCommandName(Context context)
Look up the servlet path information for this request, and use it to
select an appropriate Command
to be executed.
getCommandName
in class LookupCommand
context
- Context for the current request
Command
instanceprotected Catalog getCatalog(Context context)
Return the Catalog
to look up the Command
in.
getCatalog
in class LookupCommand
context
- Context
for this request
IllegalArgumentException
- if no Catalog
can be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |