|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.loom.mapping.Event
public class Event
This class holds the internal data associated to an event.
Events are public methods in Action classes that return Resolution
and receive no arguments.
| Constructor Summary | |
|---|---|
Event(ActionMapping mapping,
java.lang.reflect.Method method)
|
|
| Method Summary | |
|---|---|
void |
addBoundValidator(PropertyValidator validator)
Adds a new Validator. |
void |
addInterceptor(Interceptor interceptor)
|
void |
addMethod(HttpMethod method)
Add an allowed http method to this event. |
void |
assertNoOverlapping(Event other)
|
void |
decorate(Button button)
Modify button attributes based on the interceptors bound to this event. |
void |
decorate(Link link)
Modify link attributes based on the interceptors bound to this event. |
ActionMapping |
getActionMapping()
|
java.util.Set<HttpMethod> |
getHttpMethods()
|
InterceptorProxy |
getInterceptors()
|
java.lang.reflect.Method |
getJavaMethod()
|
java.lang.String |
getName()
|
java.lang.String |
getPrintName()
|
java.util.Set<java.lang.String> |
getUriParameterNames()
|
UriParser |
getUriParser()
|
java.util.Collection<PropertyValidator> |
getValidators()
Used only to inspect the list of validators while in development (actionDetails.jsp). |
java.util.Set<PropertyValidator> |
getValidatorsForProperty(java.lang.String propertyPath)
|
boolean |
isDefault()
|
java.util.Map<java.lang.String,ParameterValue> |
parse(java.lang.String uri,
LoomServletRequest request)
If this event is a match, return the list of parameter values extracted from the uri. |
void |
setInterceptorList(InterceptorProxy interceptorList)
|
void |
setUriParser(UriParser uriParser)
|
boolean |
supports(HttpMethod httpMethod)
|
java.lang.String |
toString()
|
java.lang.StringBuilder |
toUrl(com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> params)
Prepare the string representatuion of this method with the provided params. |
void |
validate(Action action,
PropertyBinderMap propertyBinderMap,
Messages messages)
Applies all the configured validations to this object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Event(ActionMapping mapping,
java.lang.reflect.Method method)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Object
public java.util.Map<java.lang.String,ParameterValue> parse(java.lang.String uri,
LoomServletRequest request)
uri - the URI to be parsed, without the action handle.request - the request object
public java.lang.String getName()
public java.lang.String getPrintName()
public void addBoundValidator(PropertyValidator validator)
validator -
public void validate(Action action,
PropertyBinderMap propertyBinderMap,
Messages messages)
throws MalformedPropertyPathException
action - the action objectmessages - All errors encountered are registered here
MalformedPropertyPathExceptionpublic void assertNoOverlapping(Event other)
ConfigException - if this Event is mapped to a URL that overlaps with another event for the same HTTP methodpublic java.lang.StringBuilder toUrl(com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> params)
params - the list of parameters to include in the URL.
public java.util.Set<java.lang.String> getUriParameterNames()
public void addInterceptor(Interceptor interceptor)
public java.lang.reflect.Method getJavaMethod()
public InterceptorProxy getInterceptors()
public void setInterceptorList(InterceptorProxy interceptorList)
public java.util.Collection<PropertyValidator> getValidators()
public java.util.Set<PropertyValidator> getValidatorsForProperty(java.lang.String propertyPath)
propertyPath - the property path to retrieve validators
public ActionMapping getActionMapping()
public boolean isDefault()
public void decorate(Link link)
decorate in interface LinkDecoratorpublic void decorate(Button button)
decorate in interface ButtonDecoratorpublic boolean supports(HttpMethod httpMethod)
public void addMethod(HttpMethod method)
method - the method that should be allowedpublic UriParser getUriParser()
public void setUriParser(UriParser uriParser)
public java.util.Set<HttpMethod> getHttpMethods()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||