|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sourceforge.stripes.exception.StripesRuntimeException
net.sourceforge.stripes.exception.UrlBindingConflictException
public class UrlBindingConflictException
This exception indicates that a URL does not contain enough information to map it to a single
ActionBean class. In some cases, a URL may match more than one URL binding.
For example, suppose you have two ActionBeans with the URL bindings /foo/{param}/bar
and /foo/{param}/blah. The paths /foo and /foo/X -- while legal,
since any number of parameters or literals may be omitted from the end of a clean URL -- match
both of the URL bindings. Since Stripes cannot determine from the URL the ActionBean to which to
dispatch the request, it throws this exception to indicate the conflict.
| Constructor Summary | |
|---|---|
UrlBindingConflictException(Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
New exception indicating that the path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
|
UrlBindingConflictException(String message,
Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
New exception indicating that the path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
|
UrlBindingConflictException(String path,
Collection<String> matches)
New exception indicating that the path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
|
UrlBindingConflictException(String message,
String path,
Collection<String> matches)
New exception indicating that the path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
|
| Method Summary | |
|---|---|
Collection<String> |
getMatches()
Get all the URL bindings on existing ActionBeans that match the path |
protected static String |
getMessage(Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
Generate the message to pass to the superclass constructor |
String |
getPath()
Get the path that failed to map to a single ActionBean |
Class<? extends ActionBean> |
getTargetClass()
Get the ActionBean class for which a URL was being generated when this exception was
thrown. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UrlBindingConflictException(String message,
Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection.
message - An informative message about what went wrongtargetClass - The class for which a URL could not be generated.path - The offending pathmatches - A collection of all the potentially matching URL bindings
public UrlBindingConflictException(Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection.
targetClass - The class for which a URL could not be generated.path - The offending pathmatches - A collection of all the potentially matching URL bindings
public UrlBindingConflictException(String message,
String path,
Collection<String> matches)
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection.
message - An informative message about what went wrongpath - The offending pathmatches - A collection of all the potentially matching URL bindings
public UrlBindingConflictException(String path,
Collection<String> matches)
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection.
path - The offending pathmatches - A collection of all the potentially matching URL bindings| Method Detail |
|---|
protected static String getMessage(Class<? extends ActionBean> targetClass,
String path,
Collection<String> matches)
public String getPath()
public Collection<String> getMatches()
public Class<? extends ActionBean> getTargetClass()
ActionBean class for which a URL was being generated when this exception was
thrown. If the exception occurred while dispatching a request, then this property will be
null since the path cannot be associated with an ActionBean class. However, if it is thrown
while generating a URL that is intended to point to an ActionBean, then this property will
indicate the class that was being targeted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||