|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.loom.mapping.DefaultEventParameter
public class DefaultEventParameter
Field Summary | |
---|---|
protected java.lang.annotation.Annotation[] |
annotations
the list of annotations set on this parameter |
protected Event |
event
the event |
protected int |
index
the zero-based parameter index |
protected java.lang.Class<?> |
parameterType
the parameter class |
protected com.google.common.collect.SetMultimap<java.lang.String,PropertyValidator> |
parameterValidators
the list of validators to execute for this parameter |
protected java.util.Map<java.lang.String,PropertyBinder> |
properties
for complex types, the properties that can be populated |
protected PropertyBinderFactory |
propertyBinderFactory
|
Constructor Summary | |
---|---|
DefaultEventParameter()
|
Method Summary | ||
---|---|---|
void |
addValidator(PropertyValidator validator)
|
|
|
getAnnotation(java.lang.Class<T> annotationClass)
If the parameter has the provided annotation, return it. |
|
java.lang.annotation.Annotation[] |
getAnnotations()
|
|
Converter |
getConverter()
|
|
java.lang.String |
getDisplayName()
|
|
Event |
getEvent()
|
|
int |
getIndex()
|
|
ItemMetadata |
getItemMetadata(int index)
|
|
int |
getItemMetadataSize()
|
|
java.lang.String |
getName()
|
|
java.lang.Class<?> |
getParameterType()
|
|
java.lang.Object |
getPropertyAsObject(java.lang.Object container,
java.lang.String propertyPath)
|
|
java.lang.String |
getPropertyAsString(java.lang.Object container,
java.lang.String propertyPath,
MessagesRepository repository)
|
|
PropertyBinder |
getPropertyBinder(java.lang.String normalizedPropertyPathWithPrefix)
|
|
java.lang.Class |
getPropertyClass()
this method exists only to comply with the implemented interface AnnotationContainer |
|
java.util.Set<PropertyValidator> |
getValidators(java.lang.String propertyPath)
|
|
java.lang.Class<?> |
guessCollectionGenericType()
|
|
java.lang.Class<?> |
guessMapGenericKeyType()
|
|
java.lang.Class<?> |
guessMapGenericValueType()
|
|
boolean |
isCollection()
|
|
boolean |
isMap()
|
|
boolean |
matches(java.lang.String propertyPath)
|
|
java.lang.Object |
populate(java.lang.Object container,
ServletRequestParameters parameters,
MessagesRepository repository,
Messages messages)
Return the list of created parameter values for this request |
|
void |
setAnnotations(java.lang.annotation.Annotation[] annotations)
|
|
void |
setConverter(Converter converter)
|
|
void |
setEvent(Event event)
|
|
void |
setIndex(int index)
|
|
void |
setItemMetadata(ItemMetadata[] itemMetadata)
|
|
void |
setName(java.lang.String name)
|
|
void |
setParameterType(java.lang.Class<?> parameterType)
|
|
void |
setPropertyAsObject(java.util.Map<java.lang.String,java.lang.Object> parameterValues,
java.lang.String propertyPath,
java.lang.Object value)
Assigns value to some property nested inside this eventParameter |
|
void |
setPropertyBinderFactory(PropertyBinderFactory propertyBinderFactory)
|
|
java.lang.String |
toString()
|
|
void |
validate(java.lang.Object container,
Messages messages)
execute the validations configured for this event parameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.Class<?> parameterType
protected java.util.Map<java.lang.String,PropertyBinder> properties
protected PropertyBinderFactory propertyBinderFactory
protected com.google.common.collect.SetMultimap<java.lang.String,PropertyValidator> parameterValidators
protected java.lang.annotation.Annotation[] annotations
protected Event event
protected int index
Constructor Detail |
---|
public DefaultEventParameter()
Method Detail |
---|
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation
in interface AnnotationContainer
public Event getEvent()
public void setEvent(Event event)
public int getIndex()
public void setIndex(int index)
public void setPropertyBinderFactory(PropertyBinderFactory propertyBinderFactory)
public void addValidator(PropertyValidator validator)
addValidator
in interface EventParameter
public java.util.Set<PropertyValidator> getValidators(java.lang.String propertyPath)
getValidators
in interface EventParameter
public void setAnnotations(java.lang.annotation.Annotation[] annotations)
public java.lang.annotation.Annotation[] getAnnotations()
getAnnotations
in interface AnnotationContainer
public java.lang.Class<?> getParameterType()
getParameterType
in interface EventParameter
public java.lang.Class getPropertyClass()
AnnotationContainer
getPropertyClass
in interface AnnotationContainer
public void setParameterType(java.lang.Class<?> parameterType)
public java.lang.Class<?> guessCollectionGenericType()
guessCollectionGenericType
in interface AnnotationContainer
public java.lang.Class<?> guessMapGenericKeyType()
guessMapGenericKeyType
in interface AnnotationContainer
public java.lang.Class<?> guessMapGenericValueType()
guessMapGenericValueType
in interface AnnotationContainer
public boolean isCollection()
isCollection
in interface AnnotationContainer
public boolean isMap()
isMap
in interface AnnotationContainer
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object populate(java.lang.Object container, ServletRequestParameters parameters, MessagesRepository repository, Messages messages)
EventParameter
populate
in interface EventParameter
public void validate(java.lang.Object container, Messages messages)
EventParameter
validate
in interface EventParameter
container
- the event parameter valuemessages
- where validation errors will be addedpublic PropertyBinder getPropertyBinder(java.lang.String normalizedPropertyPathWithPrefix)
getPropertyBinder
in interface EventParameter
normalizedPropertyPathWithPrefix
- the property path including the parameter namepublic boolean matches(java.lang.String propertyPath)
matches
in interface EventParameter
public java.lang.Object getPropertyAsObject(java.lang.Object container, java.lang.String propertyPath)
getPropertyAsObject
in interface EventParameter
public java.lang.String getPropertyAsString(java.lang.Object container, java.lang.String propertyPath, MessagesRepository repository)
getPropertyAsString
in interface EventParameter
public java.lang.String getName()
getName
in interface AnnotationContainer
public void setName(java.lang.String name)
public Converter getConverter()
getConverter
in interface EventParameter
public void setConverter(Converter converter)
public java.lang.String getDisplayName()
getDisplayName
in interface AnnotationContainer
public void setPropertyAsObject(java.util.Map<java.lang.String,java.lang.Object> parameterValues, java.lang.String propertyPath, java.lang.Object value)
setPropertyAsObject
in interface EventParameter
public void setItemMetadata(ItemMetadata[] itemMetadata)
public ItemMetadata getItemMetadata(int index)
getItemMetadata
in interface AnnotationContainer
public int getItemMetadataSize()
getItemMetadataSize
in interface AnnotationContainer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |